Cannot run R.exe in Powershell


I often find it more useful to run R on the command line (windows). However when I try it in Powershell I tend to run into problems, but this is easily overcome by first running cmd and then it works.

This is the error I get when I do R CMD BATCH

I later realised that r is an alias that returns the immediate past command, hence my inability to run R.

Subsequently, I found that using the full filename for the executable (i.e. R.exe) or using Rcmd.exe (i.e. Rcmd BATCH ...) worked.

However, I’m just curious, is there a work around, in case one runs into similar conflicts?


To start R in powershell:


Cannot run R.exe in Powershell by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply