No RTools compatible with R version 3.5.0 was found
The problem was Rtools 3.5
was not in your Windows system PATH
thus find_rtools
couldn't find it. Another possibility was that an incompatible version of Rtools
was in the PATH
Best practice for installing Rtools
:
Download the latest version
Install
RTools
at default recommended location (at the root of yourC
drive):C:/Rtools/
<Important> Check the box that allows
Rtools
to modify system PATH
After the installation, we can double check by running this command inside R
R> Sys.getenv('PATH')
[1] "C:\\Program Files\\R\\R-3.5.0\\bin\\x64;c:\\Rtools\\bin;c:\\Rtools\\mingw_64\\bin;
See also this guide
Edit: for those who don't have Administration rights, see these links:
- Rtools with R portable
- Building R packages on Windows without administrator access
- Setting up RStudio Portable Default R version
RStudio not finding RTools
I have sorted the problem in this way, partly guided by the comments on the question at:
Rtools not being detected by R
Given that devtools::find_rtools()
returns TRUE
and the check at the end of this webpage using Rcpp
(https://thecoatlessprofessor.com/programming/installing-rtools-for-compiled-code-via-rcpp/) works:
Try Sys.which("ls.exe")
and Sys.which("gcc.exe")
. The former should return a path, but the latter may be empty, which is the problem.
I then found another copy of gcc.exe
(in my case it there was one at C:\Rtools\mingw_64\bin
, which is a bit maddening) and copied it into C:\Rtools\bin
, which is where RStudio seems to want it. That is where ls.exe
was found using the Sys.which
. That solved the problem for me.
RStudio cannot find Rtools to build package
Turns out I needed to add c:\Rtools\mingw_64\bin;
to my PATH as well.
Can't install tidyverse package in R version 3.5.2
You have a very old version of R. You should update to the current version if you want things to go smoothly.
If you can't do that, here's what you'll have to do:
- Install the version of Rtools suitable for R 3.5.x.
- Install the packages you want. Some of them won't work, because they will need later versions of R, but won't declare that. So when you find one that fails, try installing the previous version of that package. If that also fails, try an even earlier one. Etc. Your R version was current in 2018, so you may need to go that far back in time to find compatible packages.
- Once you finally have everything working, try to update your packages. Maybe some of them could be more recent versions, maybe not. Do them one at a time. Typically
tidyverse
needs about 90 of them, so this will take a while.
So I recommend that you update your R version.
Related Topics
What Ides Are Available for R in Linux
Printing Newlines with Print() in R
Get_Map Not Passing the API Key (Http Status Was '403 Forbidden')
R Error "Sum Not Meaningful for Factors"
How to Directly Select the Same Column from All Nested Lists Within a List
Duplicate 'Row.Names' Are Not Allowed Error
Add Objects to Package Namespace
R: Assign Variable Labels of Data Frame Columns
Mean of a Column in a Data Frame, Given the Column's Name
Is There a Way of Manipulating Ggplot Scale Breaks and Labels
Pretty Ticks for Log Normal Scale Using Ggplot2 (Dynamic Not Manual)
How to Multiply Data Frame by Vector
Install Rtools on R Version 3.0.2