Skip to content

Instantly share code, notes, and snippets.

@simonthompson99
Last active January 15, 2021 12:47
Show Gist options
  • Save simonthompson99/5941ecf79f1f2d405115a58f89a6cf74 to your computer and use it in GitHub Desktop.
Save simonthompson99/5941ecf79f1f2d405115a58f89a6cf74 to your computer and use it in GitHub Desktop.
[Write CSV file with datestamp] Write out a csv file with current date appended to filename #r
#-- function to write out csv file with date appended to filename
writeCSV <- function(df, fn){
ffn <- paste0(fn, "-", Sys.Date(), ".csv")
write.csv(df, ffn, row.names = F)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment