Hi all, Is there any way through which i can run a R file from Command line. For example> r mean.RThanks and Regards, Vaibhav Gathibandhe [[alternative HTML version deleted]]
For example, you can use: R CMD BATCH mean.R mean.Rout Xiaohui Vaibhav Gathibandhe wrote:> Hi all, > > Is there any way through which i can run a R file from Command line. > > For example > >> r mean.R > > Thanks and Regards, > Vaibhav Gathibandhe > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >
Vaibhav Gathibandhe wrote:> > Is there any way through which i can run a R file from Command line. >Yes, there are several. R < mean.R R CMD BATCH mean.R Rscript mean.R Vaibhav Gathibandhe wrote:> > For example > > r mean.R >What does ">" above mean? Is it OS command prompt (looks like a part of Windows' cmd.exe)? If you are trying to run the file from inside the R shell, that's wrong way. You should type> source("mean.R")instead -- View this message in context: http://www.nabble.com/Running-R-file-from-Command-line.-tf4433456.html#a12651109 Sent from the R help mailing list archive at Nabble.com.