[R] Running R file from Command line.

Vladimir Eremeev wl2776 at gmail.com
Thu Sep 13 10:50:50 CEST 2007



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.



More information about the R-help mailing list