Rtools – choose you own download adventure.

Windows users may have a little trouble getting Rtools to work … Once you have installed Rtools and loaded the devtools package, you may get this error message when you type in this command find_rtools()

WARNING: Rtools is required to build R packages, but is not currently installed.
Please download and install Rtools 3.1 from http://cran.r-project.org/bin/windows/Rtools

Don’t worry, its pretty common and you just need to change a couple of details in the System Path. This is how to do it….

  1. Before you download Rtools, type this into R

Sys.getenv(‘PATH’) This will get you the Path  for the environmental variables i.e.Path R code

  1. Copy this Path into a text file (removing the quote marks “ “) – it should look something like Path below.

If you have admin rights go to step 5. C:\\Program Files\\Common Files\\Microsoft Shared\\Windows Live; C:\\Program Files (x86)\\Common Files\\Microsoft Shared\\Windows Live; C:\\Windows\\system32; C:\\Windows; C:\\Windows\\System32\\Wbem; C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\; C:\\Program Files\\Intel\\WiFi\\bin\\; C:\\Program Files\\Common Files\\Intel\\WirelessCommon\\; C:\\Program Files (x86)\\Windows Live\\Shared; C:\\Program Files (x86)\\Common Files\\Roxio Shared\\DLLShared\\; C:\\Program Files (x86)\\Common Files\\Roxio Shared\\OEM\\DLLShared\\; C:\\Program Files (x86)\\Common Files\\Roxio Shared\\OEM\\DLLShared\\; C:\\Program Files (x86)\\Common Files\\Roxio Shared\\OEM\\12.0\\DLLShared\\; C:\\Program Files (x86)\\Roxio\\OEM\\AudioCore\\; C:\\Program Files (x86)\\QuickTime\\QTSystem\\; C:\\Program Files (x86)\\WinSCP\\; C:\\Python27; C:\\Python27\\Scripts

  1. Copy the text file onto a memory stick so you can do step 4.
  1. Log in as the administrator (or whoever can) and download Rtools from the admin account.

Rtools doesn’t ask for admin privileges by default. But you won’t be able to change the registry (or something above my computing pay grade) without admin rights.

  1. Then download Rtools…

http://cran.at.r-project.org/bin/windows/Rtools/ BUT before you install you have to check that you can edit the system path. If you can, then  copy in the Path you have in the text file, then go through the pages to to install R tools, and go to 7. Otherwise go to 6. Rtools System Path

  1. If you can’t alter the system path then make sure the top box is checked on this previous page of the wizard.

The option name isn’t visible because of the path name, awkward! But by checking the top box you should get to the option above. Go to 5. R tools check box

  1. That worked for me 🙂

Helpful links: https://github.com/stan-dev/rstan/wiki/Install-Rtools-for-Windows http://stackoverflow.com/questions/20023739/r-getting-rtools-to-install-on-r-version-3-0-2 http://cran.r-project.org/doc/manuals/R-admin.html#The-Windows-toolset


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s