Reputation: 141
I'm trying to get R to recognize that I have installed Rtools.exe. I've tried installing it in several different locations. However, whenever I restart R and load devtools
I get the same error:
> library(devtools)
WARNING: Rtools is required to build R packages, but is not currently installed.
Please download and install Rtools 3.0 from http://cran.r-project.org/bin/windows
/Rtools/ and then run find_rtools().
Naturally, whenever I try the function find_rtools()
I get the same error message. I'm done trying to figure this out with help files, as the devtools
help doesn't offer much. I've tried installing in several of the locations returned by get_path()
but the problem persists.
FYI, currently my R is installed at D:/R
.
Has anyone else had this problem, and more importantly, can anyone help me? I'm sorry if this is a duplicate, and I've tried to include as many relevant details as possible so if you need any clarification please let me know.
Thanks, Nick
Upvotes: 14
Views: 6652
Reputation: 664
I ran into this problem trying to install Rtools33 to use Hadley Wickham's lineprof
package. I got that error multiple times. I'm running Windows 7 on a laptop.
I was able to fix the problem by running the Rtools installation file as the windows Admin (i.e. right-click the Rtools33.exe and choose "Run as administrator")
I also made sure to point the path to the R
source directory, which I kept in C:\Rtools\
(which contains C:\Rtools\bin\
and C:\Rtools\gcc-4.6.3\
).
This solved the problem for me and I am now able to install lineprof
from GitHub and make use of it.
Upvotes: 0
Reputation: 6203
I ran into this issue running a Windows 7 machine without admin rights. I leveraged G. Grothendieck's response, with a few additional steps.
Rpathset.bat
from https://code.google.com/p/batchfiles/Set
statements in Rpathset.bat
to your pathsCMD
and change directories to where Rpathset.bat
is storedrpathset.bat > mypath.txt
mypath.txt
with a text editorStart
and search for environment
Edit environment variables for your account
path
and then edit
mypath.txt
into the Windows path (everything after the path
statement)devtools::find_rtools()
is TRUE
Upvotes: 2
Reputation: 7313
As Thomas mentioned here, "Rtools is not a package." This is what I did to install Rtools. My RStudio is running R version 3.1.3. So I downloaded Rtools31.exe from https://cran.r-project.org/bin/windows/Rtools/. I executed the exe file, selected all the default options in the Setup Wizard and installed. (I had admin privilege on the computer I was using but I am not sure if that makes any difference.) To check that it was properly installed, you can enter find_rtools()
in the R prompt which should return TRUE
if Rtools installed properly.
For R 3.0, you probably just need to download Rtools30.exe and follow the same steps above.
Upvotes: 0
Reputation: 269596
Grab the batch file Rpathset.bat
from batchfiles, edit the SET
statements in it appropriately and then run R like this from the Windows console:
Rpathset
Rgui
Upvotes: 2
Reputation: 4359
This file rtools.r contains the code for find_rtools()
. It looks like it is trying to find ls
and gcc
in your system path (and then does some more checks based on the version) and if that fails it tries to look up SOFTWARE\R-core\Rtools
in the the Windows registry.
Upvotes: 0