Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get Rtools 3.0 working for R 3.0? R can't find the installation

Tags:

r

devtools

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

like image 509
nickfishbane Avatar asked May 17 '13 19:05

nickfishbane


People also ask

How do I manually install Rtools?

Installing RTools Go to https://cran.r-project.org/, click on 'Download R for Windows', then 'Rtools', and select the very latest version of RTools to download. After downloading has completed run the installer. Select the default options everywhere.

What version of R is needed for Rtools?

Rtools is a collection of software for building packages for R under Microsoft Windows, or for building R itself (version 1.9.


2 Answers

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
like image 109
G. Grothendieck Avatar answered Nov 06 '22 02:11

G. Grothendieck


I ran into this issue running a Windows 7 machine without admin rights. I leveraged G. Grothendieck's response, with a few additional steps.

  1. Get Rpathset.bat from https://code.google.com/p/batchfiles/
  2. Edit the Set statements in Rpathset.bat to your paths
  3. Run CMD and change directories to where Rpathset.bat is stored
  4. In the command prompt, run rpathset.bat > mypath.txt
  5. Open mypath.txt with a text editor
  6. Click Windows Start and search for environment
  7. Click Edit environment variables for your account
  8. Click path and then edit
  9. Copy and paste the entire path from mypath.txt into the Windows path (everything after the path statement)
  10. Restart RStudio and check that devtools::find_rtools() is TRUE
like image 28
Whitebeard Avatar answered Nov 06 '22 03:11

Whitebeard