trim.file | R Documentation |
This function reads a text file, removes all empty lines, and saves the modified content back to the same file.
trim.file(file_path, resave = TRUE)
file_path |
A character string specifying the path to the text file. |
resave |
A logical value indicating if the file content should be resaved or returned |
NULL This function modifies the file in place and does not return a value.
if(interactive()){
# Remove empty lines from a file
trim.file("path/to/your/file.txt")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.