Reputation: 1434
I followed this instructions to install R and Rstudio, specifically, in the installation of R, I set C:\R\R-3.4.1
as the folder to store R instead of C:\Program Files\R\R-3.4.1
to avoid any possible issues with space in the path. Then I followed this instruction step by step to download and install the latest version of rtools
. Specifically, during the installation of rtools, there is a message box
And I followed the instruction and click both of them.
Then I open Rstudio
(at this moment, it is all fresh, I didn't install any R packages except for those basic ones that comes with Rstudio) and install.packages("devtools")
then everything looks smooth
package ‘withr’ successfully unpacked and MD5 sums checked
package ‘devtools’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\FTXX\AppData\Local\Temp\RtmpK2EE70\downloaded_packages
Then
library(devtools)
find_rtools(T)
Error: running command '"C:/R/R-34~1.1/bin/x64/R" --no-site-file --no-
environ --no-save --no-restore --quiet CMD config CC' had status 65535
My system path is
Sys.getenv()['PATH']
PATH C:\R\R-
3.4.1\bin\x64;c:\Rtools\bin;c:\Rtools\mingw_32\bin;C:\R\R-
3.4.1\bin;C:\Program
Files\mingw-w64\x86_64-5.3.0-posix-seh-rt_v4-rev0\mingw64\bin\;C:\Users\FTXX\AppData\Local\Continuum\Anaconda3;C:\Users\FTXX\AppData\Local\Continuum\Anaconda3\Scripts;C:\Users\FTXX\AppData\Local\Continuum\Anaconda3\Library\bin
I also found that the output of Sys.getenv()['PATH']
and shell("PATH")
generates different message. In Shell('PATH')
is says
Warning messages:
1: running command 'C:\Program Files\mingw-w64\x86_64-5.3.0-posix-seh-
rt_v4-rev0\mingw64\bin /c PATH' had status 127
2: In shell("PATH") : 'PATH' execution failed with error code 127
I also output some variables
Sys.which("ls.exe")
ls.exe
"c:\\Rtools\\bin\\ls.exe"
Sys.which("gcc.exe")
gcc.exe
"c:\\Rtools\\mingw_32\\bin\\gcc.exe"
and my R is 3.4.1 and I am on Windows 10. Any suggestions are appreciated.
Upvotes: 1
Views: 2906
Reputation: 311
Maybe you can use the installr package to download and install Rtools.
try this in your IDE I did it in RStudio.
install.packages("installr")
Then, when the package is installed, make it available with
library("installr")
At this point, you are good to go!
Install Rtool using the following
install.Rtools()
Upvotes: 1