This function read an object of the class types
from a text file. By default,
the text file is assumed to contain one type on each line.
Usage
read_types(
file,
sep = NA,
file_encoding = "UTF-8",
trim_types = FALSE,
remove_duplicates = FALSE,
sort = FALSE,
...
)
Arguments
- file
Name of the input file.
- sep
If not
is.na(sep)
, thensep
must be a character vector of length one. In that case,sep
is interpreted as a type separator in the input file. This separator the serves as an additional type separator, next to the end of each line. The end of a line always indicated a separator between types (in other words, types cannot cross lines).- file_encoding
The file encoding used in the input file.
- trim_types
Logical. Should leading and trailing white space should be stripped from the types.
- remove_duplicates
Logical. Should duplicates be removed from
x
prior to coercing to a vector of types.- sort
Logical. Should
x
be alphabetically sorted prior to coercing to a vector of types; this argument is ignored ifremove_duplicates
isTRUE
, because the result of removing duplicates is always sorted.- ...
Additional arguments (not implemented).
Value
Object of class types
.
See also
Other reading functions:
read_assoc()
,
read_conc()
,
read_fnames()
,
read_freqlist()
,
read_tokens()
,
read_txt()