[R] write.csv file= question

Brittany Demmitt demmitba at gmail.com
Tue Aug 4 16:51:24 CEST 2015


Hello,

I have a quick question about the “file=“ specification for the command write.csv.    When I run this command in Rstudio I do not need the “file=“ specified.  For example the below command works just fine.

write.csv(data,”/home/data.csv”)   

However when I am running an Rscript from the terminal and putting it in the background I need to specify “file=“.  So for the example above I need to instead have

write.csv(data,file=”/home/data.csv”)   

Any ideas why this is the case?  Writing file= isn’t a problem, just trying to get an idea of how R works better.

Thanks!



More information about the R-help mailing list