How to Install rtools in Windows

Sheeraz Gul Feb 02, 2024
How to Install rtools in Windows

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.

    Step 1

  • Step 2

  • Once the exe file is downloaded, run the file to begin the installation.

    Step 3

  • Go with the default setting at each step, press Next > Next > Install.

    Step 4

  • Once you press Install, it will take a while to install; wait until the installation is completed, and click Finish.

    Step 5

  • The next step is to install the devtools if it is not already installed. Open RStudio and first check using find.package("devtools") command in the console.
  • If devtools is installed, it will show in the console; otherwise, install using install.packages("devtools"). The devtools is installed in our system, so the output for the find.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 Gul avatar Sheeraz Gul avatar

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