Pergunta

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?

Foi útil?

Solução

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.

Outras dicas

Try and give this a shot

write.table(data, file=paste0("SomeName", Sys.Date()))
 write.table(dat, file = paste("FILE", Sys.time(), sep="_"))
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top