[R] How to use Sys.time() while writing a csv file name
PtitBleu
ptit_bleu at yahoo.fr
Wed Jul 4 07:39:34 CEST 2012
Hello,
It seems that there is a problem with ":".
If you only need the date, you can use as.Date(Sys.time()) instead of the
complete form.
If you need the time, you can try the following commands which change the
":" into "-" :
newsystime<-<-format(Sys.time(),"%Y-%m-%d-%H-%M-%S")
write.csv(data.frame(recovery_rates = rr), file =
paste("recovery_rates_at_", newsystime, ".csv", sep = ""), row.names =
FALSE)
Have a good day,
Ptit Bleu.
--
View this message in context: http://r.789695.n4.nabble.com/How-to-use-Sys-time-while-writing-a-csv-file-name-tp4635358p4635363.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list