| write_lines | R Documentation |
Normalizes path, check if directory exists, creates it if necessary, writes lines to file, and checks if file was created successfully.
write_lines(x, file, overwrite = FALSE, verbosity = 1L)
x |
Character: Text to write to file. |
file |
Character: Path to output file. |
overwrite |
Logical: If TRUE, overwrite an existing file. |
verbosity |
Integer: Verbosity level. |
Invisible NULL. Called for the side effect of writing to file.
EDG
tmpfile <- file.path(tempdir(), "demo.txt")
write_lines("hello", tmpfile, overwrite = TRUE, verbosity = 0L)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.