Reputation: 33
I want to run a R code (say a.R) from Windows Command Prompt.
I tried this in CMD:
Rscript a.R
But gives me this error:
'Rscript' is not recognized as an internal or external command, operable program or batch file.
Upvotes: 0
Views: 1611
Reputation: 146224
For anything to run on the command line, it needs to be on your system path.
The error you get makes it sound like the directory containing the Rscript executable isn't on your system path. Add it to the path and it will work.
Upvotes: 1