executing R batch files
Without the actual VBA commands you are using we can't be sure but if you are using Shell then it requires an exe, not a bat file. Try cmd.exe /c RBatch.bat so that it has an exe file to execute.
On Mon, Feb 2, 2009 at 6:42 PM, <joseph.g.boyer at gsk.com> wrote:
The following command, issued from the DOS command prompt (running Windows
XP), produces the intended result of a .csv file created by program.R:
?c:\program files\R\R-2.8.0\bin\Rterm.exe? --save < "c:\TEMP\program.R"
However, when I create a file called Rbatch.bat that contains exactly the
line above, and try to execute it (by double clicking or via the Shell
command
in an Excel macro), nothing happens.
Does anyone have an explanation, or any suggestions as to how to run an R
program from within an Excel macro? (PS: I know about RExcel, can't quite
get it to install
correctly.)
Much appreciated.
Joe Boyer
Statistical Sciences
Renaissance Bldg 510, 3233-D
Mail Stop RN0320
8-275-3661
cell: (610) 209-8531
[[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.