简体   繁体   中英

save rdata environment with timestamp

I am trying to loop a code every 24h to download and process data from a database that updates every day. I would like it to save automatically with the date.

This is the line I'm using to save the environment.

    save.image("~/Bus data/leeds bus live/timetable data/itm_gtfs/yorkshire.data.RData")

How can I modify it so it captures the current date as well?

Thanks

you can paste() them together. I also prefer myself to set wd a command before having to repeat the path

setwd("~/Bus data/leeds bus live/timetable data/itm_gtfs")
   save.image(paste(Sys.date(),"yorkshire.data.RData", sep = "."))

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM