How to Install rtools in Windows
Sheeraz Gul
Feb 02, 2024
Rtools is a collection of tools necessary for building packages in R. This tutorial demonstrates how to install Rtools in Windows.
Install Rtools in Windows
Follow the steps below to install the Rtools.
-
To install the Rtools, first of all, download the Rtools from here.
-
The link above will go to the download page, select your version and download it from the next page; make sure the version must be the same as your R language. In our case,
Rtools42
. -
Once the
exe
file is downloaded, run the file to begin the installation. -
Go with the default setting at each step, press
Next
>Next
>Install
. -
Once you press
Install
, it will take a while to install; wait until the installation is completed, and clickFinish
. -
The next step is to install the
devtools
if it is not already installed. Open RStudio and first check usingfind.package("devtools")
command in the console. -
If
devtools
is installed, it will show in the console; otherwise, install usinginstall.packages("devtools")
. Thedevtools
is installed in our system, so the output for thefind.package
is:> find.package("devtools") [1] "C:/Users/Sheeraz/AppData/Local/R/win-library/4.2/devtools"
-
The final step is to verify the Rtools installation. Load the
devtools
package and find the Rtools using the following code.library(devtools) find_rtools()
The code above will look for Rtools, and if it finds that the Rtools are installed, it will output TRUE
like below.
> library(devtools)
> find_rtools()
[1] TRUE
Author: Sheeraz Gul
Sheeraz is a Doctorate fellow in Computer Science at Northwestern Polytechnical University, Xian, China. He has 7 years of Software Development experience in AI, Web, Database, and Desktop technologies. He writes tutorials in Java, PHP, Python, GoLang, R, etc., to help beginners learn the field of Computer Science.
LinkedIn Facebook