I am trying to schedule an R code execution. I was referrig Scheduling R Script and I am creating the following batch file:
C:\R\R-2.10.1\bin\Rcmd.exe BATCH D:\mydocuments\mycode.R
However, when I run the .bat file, a black command window shows up for a second and nothing else is happening. I was also trying to use Rscript.exe
instead of Rcmd.exe
, but that did not help.
Have you got any suggestions?
Here is the code:
r <- matrix(rnorm(100,1,1), ncol=10, nrow=10)
write.csv(r, file = "D:/aa/ttt.csv", row.names = F)
What I get after running the .bat file is the workspace and .Rout file, but this contains only a log of the code that was ran.