0

Rscript : The term 'Rscript' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. I am facing this Error while running the R code on VS code. How to change its path? Change directory of this Rscript So as I will able to run R program in VS code.

I am facing this Error while running the R code on VS code. How to change its path? Change directory of this Rscript So as I will able to run R program in VS code.

  • Inside of R, if you run `R.home("Rscript")` that should show you where `Rscript` is located. You need to [add that folder to your PATH variable](https://stackoverflow.com/questions/9546324/adding-a-directory-to-the-path-environment-variable-in-windows). After you do that, you should be able to restart VS Code and that should work. There is nothing special about R/Rscript here. That's just how you get programs in general to be recoginzed on the Windows command line. – MrFlick Aug 30 '23 at 16:54

0 Answers0