[R] Run Rscript.exe, how to capture error message?
mytechforum at yahoo.com
Wed Jun 9 00:53:53 CEST 2010
I use Rscript.exe for batch run (actually it is used in ASP.net code)
c:>"C:\Program Files\R\R-2.10.1\bin\Rscript.exe" test.r xxx.txt
Where test.r is the r program and xxx.txt is a file name test.r will read in, it comes from
a web form. This works fine, when the file is in required format. Sometime, xxx.txt
has wrong format, test.r read in but can't process it. If I run interactive mode, I
probably can see the error message on the screen. But since this is running
as a background process, I don't really have a screen to see.
I tried redirct:
c:>"C:\Program Files\R\R-2.10.1\bin\Rscript.exe" test.r xxx.txt > error.log
But it doesn't work even in local windows.
More information about the R-help