[R] MS-DOS & script R

Uwe Ligges ligges at statistik.tu-dortmund.de
Wed Jul 4 15:10:39 CEST 2012



On 04.07.2012 14:44, cindy.dol wrote:
> Hi,
> I would like to run R with a script from MS-DOS.

I don't even know how to compile R for MS-DOS to run it under that OS. I 
am using R since 1998, but we used 64-bit Solaris or 32-bit Linux or 
Windows systems at the time, but no DOS left.


> R is in "My Documents "

Unlikely DOS supports such a name.


> and my script too. > How to do?

Actually, I guess you are going to run R in the Windows shell.
Just add the bin path of R to the PATH environment variable, go to a 
Windows command shell and start R via

Rscript filename.R

or

R CMD BATCH filename.R

from the folder where filename.R is located.

For more details and the differences of those approaches, see the manuals.

Best,
Uwe Ligges


>
> --
> View this message in context: http://r.789695.n4.nabble.com/MS-DOS-script-R-tp4635398.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> 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.
>



More information about the R-help mailing list