rrtools

Sys.which("make") empty although Rtools is in PATH


I have completely uninstalled R, RStudio, and RTools and removed all folders (as described here); then re-installed R (4.0.4), RTools (4.0 x86), and RStudio (1.4.1106). I have added the RTools folder to the path (Sys.getenv("PATH") # [1] "$C:\\rtools40\\usr\\bin;....") but the problem persists - 'make' is empty, although C:\rtools40\usr\bin\make.exe exists:

> Sys.which("make")
make 
  "" 

Can someone help me? (This question didn't help, since my PATH variable contains the RTools folder already.)

Thanks a lot in advance! :)


Solution

  • For posterity: the problem was that the "$" doesn't belong in the path.

    Thanks to @r2evans for the solution - Sys.setenv(PATH=gsub("^\\$", "", Sys.getenv("PATH"))) did the trick.