Write Lines to a File
Write text lines to a file.
write_lines(text, path, gz = FALSE)
text
: 'character' vector. Text to write to file.path
: 'character' string. Path to the file.gz
: 'logical' flag. Whether to compress the file using Gzip. The .gz
extension is added to the file path
.Invisibly returns the extracted path(s).
path <- write_lines( text = "Test", path = tempfile(fileext = ".txt"), gz = TRUE ) unlink(path)
J.C. Fisher, U.S. Geological Survey, Idaho Water Science Center
Useful links