Hi, I would like to run R with a script from MS-DOS. R is in "My Documents "and my script too. How to do? -- View this message in context: r.789695.n4.nabble.com/MS-DOS-script-R-tp4635398.html Sent from the R help mailing list archive at Nabble.com.
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: 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 > stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >
I have the following in a batch file "TLT.BAT": "C:\Program Files\R\R-2.13.2\bin\x64\R.exe" CMD BATCH "C:\Users\Frank\Documents\R\Scripts\TLT_2012.txt" "C:\Users\Frank\Documents\R\Scripts\TLT_2012.out" PAUSE The TLT_2012.txt has my R code in it. The TLT_2012.out has the output from R. Look to TLT_2012.out for problems with your batch file. Frank Chicago, IL> Date: Wed, 4 Jul 2012 05:44:01 -0700 > From: cindy.dolomieu@insa-lyon.fr > To: r-help@r-project.org > Subject: [R] MS-DOS & script R > > Hi, > I would like to run R with a script from MS-DOS. > R is in "My Documents "and my script too. > How to do? > > -- > View this message in context: r.789695.n4.nabble.com/MS-DOS-script-R-tp4635398.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help@r-project.org mailing list > stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.[[alternative HTML version deleted]]