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), thensepmust be a character vector of length one. In that case,sepis 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
xprior to coercing to a vector of types.- sort
Logical. Should
xbe alphabetically sorted prior to coercing to a vector of types; this argument is ignored ifremove_duplicatesisTRUE, 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()
