R Commander Installation Notes

The Rcmdr package is a standard R package, and it installs and is loaded in the normal manner. There are, however, a few installation issues, particularly on Macintosh systems, and these are described in this document.

A general point is keep is mind is that the Rcmdr package uses a number of other "contributed" packages (in addition to packages, such as tcltk and MASS, that are part of the standard R distribution), and these must be present for it to work properly: abind, aplpack, car, colorspace, effects, Hmisc, leaps, lmtest, multcomp, relimp, rgl, and (on Windows) RODBC. Many of these packages have their own dependencies, which depend on still other packages, etc.

Once it is installed, to load the Rcmdr package, just enter the command library(Rcmdr).

Notes for specific platforms follow:

Windows

The easiest way to install the Rcmdr package if you have an active Internet connection, is via the Rgui Packages -> Install packages menu or via the command

install.packages("Rcmdr")

When you first load the Rcmdr package with the command library(Rcmdr), it will offer to download and install missing dependencies; allow it to do so. If you installed R in Program Files under Windows Vista or Windows 7, you should run R with adminstrator privileges to install packages: Right click the R icon and select "Run as administrator." I suggest that you install R into a different directory, such as C:\R\, to avoid this issue.

On Windows, the Rcmdr package works best with the single-document Rgui interface (SDI). Under the default multiple-document interface (MDI), Tk dialog boxes may not stay on top of the main R window. This is a general issue with applications, such as the R Commander, that are based on the tcltk package.

To enable the SDI, make a copy of the R desktop icon (right-click on the icon, drag it to a different location on the desktop, select Copy Here from the context menu). Right-click the new icon and select Properties. Add --sdi (preceded by a space) to the Target field on the Shortcut tab of the Properties dialog box. The field should read something like "C:\Program Files\R\rw2010\bin\Rgui.exe" --sdi. If you wish, change the name of the icon on the General tab (e.g., to R 2.1.0 SDI). Click OK. Alternatively, you can install R to use the SDI, or you can edit the Rconsole file in R's etc subdirectory.

If you wish to load the R Commander automatically when R starts up, you can add the following to the Rprofile.site file in R's etc directory:

local({
old <- getOption("defaultPackages")
options(defaultPackages = c(old, "Rcmdr"))
})

Linux/Unix

Linux/Unix systems typically have all of the software required for building packages already installed. The easiest way to install the Rcmdr package if you have an active Internet connection is to run R as root and issue the command install.packages("Rcmdr") at the R prompt. 

On Ubutu systems, in particular, the following procedure should work (slightly modified from a suggestion by Ista Zahn):

  1.  Add the R repository to Ubuntu (see http://cran.r-project.org/bin/linux/ubuntu/).
  2.  Install base R and the R dev package: sudo apt-get install r-base r-base-dev
  3. Start R from the Ubuntu command line as root so you can install packages system-wide: sudo R
  4. From the R command prompt, install Rcmdr:  install.packages("Rcmdr")
It is also possible to install R and R packages from the Ubuntu package respository but these are almost always out of date. When you first load the Rcmdr package with the command library(Rcmdr), it will offer to download and install missing dependencies; allow it to do so.

Mac OS X

The procedure for installing the R Commander under Mac OS X is more complicated, so please read and follow these instructions carefully. These instructions and the associated files are intended for Mac OS X 10.5 (Leopard), 10.6 (Snow Leopard), and 10.7 (Lion) systems. I assume that you've already installed R.             install.packages("Rcmdr")

R will ask you to select a CRAN mirror; pick a mirror site near you. The install.packages command may report some warnings about missing packages, but these are not needed, and you can ignore the warnings. Note that many packages will be downloaded and installed, so be patient.


Once it is installed, to load the Rcmdr package, simply issue the command

    library(Rcmdr)

at the R > command prompt and press return. When you first load the Rcmdr package, it will offer to download and install missing dependencies; allow it to do so.

Last modified: 1 November 2011 by John Fox <jfox AT mcmaster.ca>.