Why is R telling me that Rtools 4.0 is an incompatible version?

Viewed 2711

I want to code in R language using RStudio. I'm using RStudio latest version:1.4.1106 and Rtools version: 4.0. But I have an error

"WARNING: Rtools is required to build R packages but no version of Rtools compatible with the currently running version of R was found. Note that the following incompatible version(s) of Rtools were found:

  • Rtools 4.0 (installed at C:\rtools40)

Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/"

But now I'm using RStudio latest version is 1.4.1106. What should I do to fix that error

2 Answers

R ≠ RStudio ≠ Rtools. These are three different pieces of software.

You need to have a version of Rtools matching your version of R installed. You can find older versions of Rtools in the Rtools history.

But it would be better to instead update your version of R, which seems to be well outdated (the current version of R is 4.1.0, but the error message suggests that you are running version 3.6 or earlier). To do this, download and install R from https://cran.r-project.org/bin/windows/base/. (To find out which version of R you’re running, type R.version in the R command prompt.)

Note that the current release of RStudio does not yet support R 4.1.0 (which was just released). To make RStudio work with that version of R, you’ll then also need install the preview version of RStudio.

Alternatively, you could elect to install the previous stable version, R 4.0.5. This version of R will work with your version of RStudio.

It sounds like you are attempting to install and/or use RTools but the version of R that you are running is incompatible with version 4.0 of RTools.

You need to check which version of R you are running (R --version) and then check to see if it is compatible with RTools 4.0.

If not, then I imagine you would need to upgrade your version of R in order to be able to use it.

Related