Rtools installation on a Windows 10 or a WURclient computer

Image credit: Panos Sakalakis on Unsplash
Table of Contents

Motivation

Many people are able to use R, without ever having the need to compile from source and, therefore, the need to install Rtools. However, if you want to do package development, compile from source, or use packages like rstan or cmdstanr, you will definitely need to install Rtools.

In this post the installation procedure for Rtools will be given step wise. It will work for both regular Windows 10 computers as well as WURclient computers.

A WURclient desktop or laptop at Wageningen University & Research is not a standard Windows 10 computer. WURclients use Windows 10 Enterprise, which has been modified by Facilities and Services Information Technology (FB-IT) among others with respect to installation rights for security reasons.

This post will show how to install Rtools on a privately owned running Windows 10, or a WURclient desktop or laptop computer, where the user possesses POWER USER RIGHTS.

The only difference is how the installer for Rtools is started.

Requirement for and Download of Rtools

Requirement

Prior requirement for using Rtools:

Without having R installed on your desktop or laptop computer it makes no sense to install RTools. The software Rtools provides, as the name suggests, tools (compilers, and such) for use within R.

Download

Rtools can be downloaded for the following webpage: https://cran.r-project.org/bin/windows/Rtools/

Download the correct vesion, which matches the version of R installed on your desktop or laptop computer.

For R version 4.2.0 and above the installer for Rtools can be downloaded directly from this link: Rtools42 installer (ca. 467 MB, 64-bit).

Installation Rtools

  1. Open a File Explorer window (keyboard shortcut: 🪟 + E) and navigate to your downloads folder.

  2. On a Windows 10 computer start the downloaded Rtools installer. For a WURclient computer right-click the downloaded Rtools installer and select select ‘WUR - Run with administrative rights’ (see below in Figure 1).

Start Rtools installer on a WURclient.
Start Rtools installer on a WURclient.
  1. The Rtools installer will open with the Select Destination Location window as displayed below in Figure 2. Do not change the destination location, leave the default suggested value! Click ‘Next’ to continue.
Select Rtools destination location.
Select Rtools destination location.
  1. The installer will next show the Select Additional Tasks window, as show in Figure 3. Make sure that both boxes are ticked and click the ‘Next’ button to continue.
Select Rtools additional tasks.
Select Rtools additional tasks.
  1. Now the installer will present a window, as displayed below in Figure 4, with the selected installation options. Click the ‘Install’ button to start the installation or select ‘Back’ to modify the installer options.
Rtools ready to install overview.
Rtools ready to install overview.
  1. Once the installer has completed, Figure 5 will be shown. Click the ‘Finish’ button to complete the installation.
Finish the Rtools installation.
Finish the Rtools installation.

Check the Installation

For Rtools 4.2 there is an easy way to check, that the installation of Rtools was successful.

  1. Open R (either RGui or RStudio)
  2. Execute the following command: Sys.which("make")

When R returns "C:\\rtools42\\usr\\bin\\make.exe", you know that Rtools was successfully installed.

For Rtools 4.0 the returned path will be empty.

This does not mean that the installation was not successful. Just that Rtools was not automatically added to the PATH environment variable.

If you wish to add Rtools to the PATH environment variable, please follow the instructions on https://cran.r-project.org/bin/windows/Rtools/rtools40.html

Maikel Verouden, Ph.D.
Maikel Verouden, Ph.D.
Researcher | Lecturer | IT & Organization contact person

My research interests include Statistics, Teaching and programmable matter (statistical software).