text_read | R Documentation |
text_read()
and text_write()
respectively wrap base::readLines()
and
base::writeLines()
. They further validate their arguments, normalize
file paths and re-encode inputs to UTF-8
before reading and writing.
text_read(path = "", encoding = "UTF-8")
text_write(x = character(), path = "", encoding = "UTF-8")
path |
A non-empty and non-NA character string. A path to a file to read text from, or write text to. |
encoding |
A non-empty and non-NA character string. The source character encoding. In almost all cases, this should be UTF-8. Other encodings are internally re-encoded to UTF-8 for portability. |
x |
A character vector. Lines of text to write. Its current encoding is
given by |
text_read()
returns a character vector.
text_write()
returns NULL
, invisibly.
readLines()
,
writeLines()
,
iconv()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.