I have R 3.5.0 and Rtools 3.5 installed on a Windows 10 machine. Running devtools::find_rtools()
yields TRUE
but when I try to check and build a package I'm working on, I get the error:
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/
Based on this link I ran the following commands but get the same error:
Sys.setenv(PATH = paste("C:/Rtools/bin", Sys.getenv("PATH"), sep=";"))
Sys.setenv(BINPREF = "C:/Rtools/mingw_$(WIN)/bin/")
How can I get Rtools to be recognized to build a package?
Turns out I needed to add
c:\Rtools\mingw_64\bin;
to my PATH as well.