R Commander installation in R on Windows 10

Image credit: Panos Sakalakis on Unsplash

Table of Contents

Motivation

Due to the novel coronavirus (SARS-CoV-2) and its related disease 😷 COVID-19 employees and students at Wageningen University & Research are all working from home. Students taking Statistical Courses taught by Mathematical and Statistical Methods at Wageningen University & Research will most likely use R. Students enrolled in MAT-15303 Statistics 1 and MAT-15403 Statistics 2 will use R Commander instead of basic R. Therefore, they will need to install R Commander.

This post will show how to install R Commander within R on a privately owned desktop or laptop computer running Windows 10 as operating system.
The installation instructions in this post are not to be used on WURclient desktops or laptops!

R Commander Installation

Prior requirement:

To be able to install R Commander you will need to have R installed first. If you haven’t done so already, please first install R on your Windows 10 computer (use the link above to go to that specific post).

Two installation methods will be described here:

  • Using the library.zip file downloaded from Brightspace.
  • Manual installation from the R GUI (graphical user interface)

The first method using the library.zip file is recommended. However, if due to issues with Administrative Rights this does not work, try the manual installation from the R GUI.

This post was originally based on R version 3.6.3. For newer versions of R the steps desribed are the same, only some screens you will see during your installation will display a higher version number of R compared to the screenshots in this post.

Installation using the library.zip file from Brightspace.

  1. Download the library.zip file in Brightspace from either the course MAT-15303 Statistics 1 or MAT-15403 Statistics 2. This file can be found on the respective course page under ‘Content’ > ‘Practicals’ > ‘library (Zip Compressed File)’. Behind the text you see a downwards mark. Click on this and select ‘Download’. This will download the library.zip file into your Downloads folder of your user account. Below you see the downloaded file in the Windows File Explorer.

Downloaded library.zip file in Windows File Explorer

  1. Right-click the library.zip file and select ‘Extract All…’ as shown in the image below.

Extract all from library.zip

  1. A new window will open, where you have to set the destination for the extracted folders and files. Click ‘Browse…’ and select the following destination: C:\Program Files\R\R-4.0.2\library as shown below, but for version 3.6.3.

Destination for extracted folders and files.

  1. If a message pops-up, check the box ‘Do this for all current items’ and click on the ‘Continue’ button.

The extraction process can take 10 to 15 minutes before all folders and files are extracted to the specified location. When the extraction process has finished, you are ready 😆 to start R 4.0.2 and use R Commander.

Manual installation from the R GUI

  1. Start R x64 4.0.2 from the ‘R’ folder in the ‘Start Menu’ as displayed below.

Start Menu R x64

  1. The R GUI (graphical user interface) will open and the cursor will be ready for input behind the prompt, as indicated by the > sign. Use the mouse pointer and navigate to the top menu and select ‘Packages’ > ‘Install Package(s)…’ as shown below.

R GUI prompt

  1. Now a CRAN (Comprehensive R Archive Network) mirror needs to be selected, from which packages will be installed. Select, as shown below, the top one ‘0-Cloud [https]’. This to make sure, that always the nearest CRAN mirror will be used no matter where you will be on the globe 🌍. Click on the ‘OK’ button to confirm the selection.

Select CRAN mirror.

  1. After the CRAN mirror selection a list of available packages will appear. Scroll down to find the Rcmdr package and click it to select. As shown below the package will turn blue, when selected. Confirm the installation by clicking the ‘OK’ button. Now a lot will happen in your display while the Rcmdr pacakage and its dependencies are being installed.

Select the Rcmdr package to be installed.

  1. Repeat step 4. for installing the RcmdrPlugin.HH package. This plugin is required for MAT-15403 Statistics 2 to be able to do the practicals on Simple Linear Regression.
Once the installation of the RcmdrPlugin.HH package has finised, you are ready 😆 to start R 4.0.2 and use R Commander.
When using R Commander for the first time additional packages, required for R Commander to work correctly, will need to be installed. Allow the installation to be able to work smoothly without errors!

Starting and restarting R Commander

Start R Commander

To start R Commander type the library(Rcmdr) command behind the R Console prompt (indicated by a > sign) and press return (↩) to execute the command.

Restart R Commander

In case R Commander crashes while using it, you will need to resart it. However, in the R Console currently running R, the library(Rcmdr) command will not restart R Commander.

The reason is, that the R Commander package is still loaded and first needs to be detached. To detach the R Commander package you can copy (Ctrl+C) the following command:

detach("package:Rcmdr", unload = TRUE)

paste (Ctrl+V) it behind the prompt in the R Console (indicated by a > sign) and press return (↩) to execute the command.

Now R Commander can be restarted by using the library(Rcmdr) command as before.

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

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

Related