I think you're looking for:
write.table(file, file=paste("MY NAME",Sys.Date(),sep = "_"), col.names=T, row.names=FALSE)
or something similar.
Question
I am using the write.table function.
#code
write.table(file, file="MY NAME", col.names=T, row.names=FALSE);
I also want to add the date automatically each time, thus each file will have the same name an only vary by date? I have tried #Sys.time(); but this isnt working. Any ideas guys?
Solution
I think you're looking for:
write.table(file, file=paste("MY NAME",Sys.Date(),sep = "_"), col.names=T, row.names=FALSE)
or something similar.
OTHER TIPS
Try and give this a shot
write.table(data, file=paste0("SomeName", Sys.Date()))
write.table(dat, file = paste("FILE", Sys.time(), sep="_"))