Reputation: 17
I have vscode and the R extension installed as well as R 4.0.5 on my computer ,but when I run the code in vscode i get this error message
'Rscript' is not recognized as an internal or external command, operable program or batch file.
what do I need to do so I can run R code in vscode.
Upvotes: 0
Views: 870
Reputation: 404
You probably need to add the directory containing R
and RScript
to your PATH variable. In Linux/MacOS you can add the following line to your ~/.bashrc file:
# Change /usr/local/bin/ to where R is located
PATH=“/usr/local/bin/:$PATH"
In Windows follow the steps in the article: https://learn.microsoft.com/en-us/previous-versions/office/developer/sharepoint-2010/ee537574(v=office.14) The installation directory in Windows is probably something like 'C:/Program Files/R’.
Upvotes: 1