read_types {mclm} | R Documentation |
Read a vector of types from a text file
Description
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 |
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 |
sort |
Logical. Should |
... |
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()
Examples
types <- as_types(c("first", "second", "third"))
write_types(types, "file_with_types.txt")
types_2 <- read_types("file_with_types.txt")