Hi, I am trying to install RTools 40 on a Windows 10 PC.I have R 4.1.1 and RStudio 1.4.1717-3. I followed the instructions here, by accepting the defaults, the .Renviron file created to the documents folder but R can't find it. I triend also and some other solutions found here in the community without luck. My latest try was this:
Sys.getenv("PATH")
Sys.setenv(PATH = paste(Sys.getenv("PATH"),
"C:\\RTools40",
"C:\\RTools40\\mingw64\\bin",
sep = ";"))
# Did it work (look at the end)?
Sys.getenv("PATH")
The result is:
[1] "C:\Program Files\R\R-4.1.1\bin\x64;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\R\rtools40\\usr\bin;C:\Users\Drolias\AppData\Local\Microsoft\WindowsApps;C:\R\rtools40\\usr\bin;C://RTools40;C://RTools40//mingw64//bin"
Then I type: Sys.which("make")
and I'm getting:
make
""
meaning the installation wasn't correct. Any ideas?
EDIT
After running :
library(pkgbuild)
pkgbuild::find_rtools(debug = TRUE)
Im getting
Scanning R CMD config CC...
- c_path: The screen cannot be set to the number of lines and columns specified.*
' does not existot be set to the number of lines and columns specified.
Scanning path...
Scanning registry...
*Found C:/rtools40 for 4.0 *
[1] TRUE
butSys.which("make")
returns an empty ""
EDIT
with thefind_tools()
command R returns TRUE, but when I try to install a package, R says WARNING: Rtools is required to build R packages but is not currently installed.