read_txt {mclm} | R Documentation |
Read a text file into a character vector
Description
This function reads a text file and returns a character vector containing the lines in the text file.
Usage
read_txt(file, file_encoding = "UTF-8", line_glue = NA, ...)
Arguments
file |
Name of the input file. |
file_encoding |
Encoding of the input file. |
line_glue |
A character vector or |
... |
Additional arguments (not implemented). |
Value
A character vector.
See Also
Other reading functions:
read_assoc()
,
read_conc()
,
read_fnames()
,
read_freqlist()
,
read_tokens()
,
read_types()
Examples
x <- "This is
a small
text."
# write the text to a text file
write_txt(x, "example-text-file.txt")
# read a text from file
y <- read_txt("example-text-file.txt")
y
[Package mclm version 0.2.7 Index]