safe_write_csv | R Documentation |
Save comma separated value files, if file exists, backup original file.
safe_write_csv(x, file, ..., quiet = FALSE)
x, file, ... |
pass to |
quiet |
whether to suppress overwrite message |
Normalized path of file
f <- tempfile()
x <- data.frame(a = 1:10)
# File not exists, same as write file, returns normalized `f`
safe_write_csv(x, f)
# Check whether file exists
file.exists(f)
# write again, and the old file will be copied
safe_write_csv(x, f)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.