I am relatively new to R/RStudio. I was successfully able to install packages until today. Each time I try to install a package, I receive the following error:
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding: https://cran.rstudio.com/bin/windows/Rtools/ Installing package into ‘C:/Users/my. Name/Documents/R/win-library/3.6’ (as ‘lib’ is unspecified) trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/openintro_1.7.1.zip' Content type 'application/zip' length 3136068 bytes (3.0 MB) downloaded 3.0 MB
Rtools is already installed on my machine, so I'm not sure why it's not being recognized.
I have tried un-installing and re-installing rtools but can't seem to resolve the issue. Any insight here would be greatly appreciated!
As I said, Rtools is not an R package so it doesn't need to (or should) be in your package library, just install it in the default location (i. e. the "Program Files" folder) like you would do with any other software.
Installing RToolsGo to https://cran.r-project.org/, click on 'Download R for Windows', then 'Rtools', and select the very latest version of RTools to download. After downloading has completed run the installer. Select the default options everywhere.
has_rtools() determines if Rtools is installed, caching the results. Afterward, run rtools_path() to find out where it's installed.
This will solve the problem 90% of the time:
The reason this is necessary is because:
Rtools is a collection of software you need to be able to call R from the command line on Windows. You need to be able to call R from the command line to build and install packages from source code. Most packages will also require the program pdflatex.
If you already followed the instructions above, but it still says not found, it may help to:
Other possible causes of problems:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With