| write_text | R Documentation |
Writes text to a file, optionally including a header at the top of the file. Text and header are converted from Linux newline format to Windows newline format before writing.
write_text(
txt,
file = "",
header = "**THIS FILE IS CONSTANTLY OVERWRITTEN -- DO NOT MANUALLY EDIT**\r\n\r\n"
)
txt |
A character string of text to be written to the file. |
file |
A character string specifying the file path. Passed through to |
header |
An optional character string header to be inserted at the top of the text file.
Default is |
No return value. Called for its side effect of writing to a file.
## Not run:
org::write_text("Sample text", "output.txt")
org::write_text("Another piece of text", "output.txt", "Custom Header\r\n\r\n")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.