1

I have had problems with the latest RStudio-1.2.1335 and RStudio-1.2.5001.

When I install a package, either from a .zip file or Online from CRAN, I get a warning message saying "Rtools is required to build R packages..."

I am only installing packages and not building one. I wonder if this is a bug. Warning message paste below.

install.packages("aod")
WARNING: Rtools is required to build R packages but is not currently
installed. Please download and install the appropriate version of Rtools
before proceeding:
M--
  • 25,431
  • 8
  • 61
  • 93
Steven Yen
  • 11
  • 3
  • 1
    Maybe try `install.packages("aod", type="binary")`? Did you at some point during your session say that you wanted to build a package from source? I think that preference is cached. – MrFlick Sep 23 '19 at 17:38
  • No. Adding type="binary" did not eliminate the warning message. Note that I did not have this problem with the earlier RStudio-1.1.463. I am installing the same package (aod) from CRAN so that's something about these new RStudio versions. – Steven Yen Sep 25 '19 at 05:37
  • It seems more likely to have something to do with the version of R you are running rather than the version of RStudio. What R version are you running? – MrFlick Sep 25 '19 at 12:35
  • No. I have the latest R-3.6.1. Besides, (1) returning to RStudio-1.1.463 I do just fine; (2) Installing Rtools 3.5 resolves the problem as well. I am unhappy with option (2) because it is silly have the students install Rtools when they are not developing packages; they just install packages. – Steven Yen Sep 26 '19 at 15:35
  • Well, if this is an RStudio only thing, then you should probably seek help on their support site: https://community.rstudio.com/. I agree it seems like Rtools should not be required. But I'm unable to replicate the exact environment you are testing in. – MrFlick Sep 26 '19 at 17:26
  • I contacted RStudio already and they did not offer support for free version. They'd be nuts to not fix a known problem. – Steven Yen Sep 27 '19 at 18:09

1 Answers1

1

When using R on Windows, some packages want to compile directly from the source code, but have a pre-compiled binary as a back-up.

This warning message is telling you just that. It is possible that you are not getting the latest version this way. In some cases, you will get a flat out error since there is no binary available.

The simple enough solution is to install Rtools.

https://cran.r-project.org/bin/windows/Rtools/