3

So I'm trying to run some R scripts via cmd directly using

Rscript.exe "C:\Users\xxxxx\Documents\test.R"

but it fails every time with the same error :

Fatal error: cannot open file 'C:\Users\xxxxx\Documents\test.R': Permission denied

However, if I run it via

R CMD BATCH "C:\Users\xxxxx\Documents\test.R"

Then it works. Do you know why Rscript cannot reach the file ? I would really like to use this rather the R CMD BATCH approach. Everything is in the PATH and I tried moving the .R script file around to no avail.

Thanks!

Havimo
  • 61
  • 4

0 Answers0