I had problems installing data.table for R version 3.5.0, and was advised to check that RTools was properly installed.
After installing RTools 3.5 (this seems to be the latest) I typed
find_rtools(T)
I got the following message:
WARNING: Rtools is required to build R packages, but no version
of Rtools compatible with R 3.5.0 was found.
(Only the following incompatible version(s) of Rtools were found:3.4,3.5)
Please download and install the appropriate version of Rtools from
http://cran.r-project.org/bin/windows/Rtools/.
So on the one hand it looks like I do have 3.5 installed, but it seems to think there is a newer/different version.
Any thoughts?
UPDATE
The utility
find_rtools
has been moved to the packagepkgbuild
(as noted indevtools
News). The functionpkgbuild::find_rtools()
correctly discoversRtools
3.5 in my system.Old answer
I had this same problem and it occurs because
devtools
has not been updated to consider the newest version of RTools (3.5). Here is an easy fix that should work while they update the package:Of course, this approach assumes that
devtools::find_rtools
worked for you before updating R and RTools. If this is not the case, then you might have a faulty installation and/or PATH variable as others have mentioned.I'm quite sure RTools 3.5 works with R-3.5 . I haven't used find_rtools() before, but I did manage to compile data.table from source a week ago. Here's how I did it:
After installing R 3.5 and RTools 3.5, I manually checked/modified the following system-envs (somehow the RTools installer failed to do this automatically, so I went through the readme from RTools and do it manually): BINREF = "C:/Rtools/mingw_$(WIN)/bin/" (with "s, slashes are /) PATH = ";C:\Rtools\bin" ("s are optional , slashes are \ )
Then I downloaded the source package for data.table(was version 1.10.4-3) and ran R CMD INSTALL data.table_1.10.4-3.tar.gz from windows command-line. With a working RTools, the package would successfully compile. I also tried the install.packages(data.table) from R-GUI, where I got pop-up window to confirm compilation from source.
Anyway, I believe cran now provides a working windows-binary for data.table, so using RTools is no longer necessary.
The problem was
Rtools 3.5
was not in your Windows systemPATH
thusfind_rtools
couldn't find it. Another possibility was that an incompatible version ofRtools
was in thePATH
Best practice for installing
Rtools
:Install
RTools
at default recommended location (at the root of yourC
drive):C:/Rtools/
<Important> Check the box that allows
Rtools
to modify system PATHAfter the installation, we can double check by running this command inside
R
See also this guide
Edit: for those who don't have Administration rights, see these links: