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, car, effects, lmtest, multcomp, mvtnorm, relimp, sandwich, strucchange, and zoo. In addition, you should install the rgl package if you want dynamic 3D graphics under the R Commander.
Once it is installed, to load the Rcmdr package, just enter the command library(Rcmdr).
Notes for specific platforms follow:
The easiest way to install the Rcmdr package if you have an active Internet connection, is via the Rgui Packages -> Install packages menu. As of R 2.5.0, however, only the Rcmdr package and not missing packages on which it depends will be downloaded and installed. You can, however, install the Rcmdr package and all of its dependencies from the R command prompt via the command
install.packages("Rcmdr", dependencies=TRUE)
Alternatively, you can load the Rcmdr package after installing it, and it will offer to download and install missing dependencies. Note: The packages on which the Rcmdr depends also have dependencies, which have dependencies, etc., so many packages get installed; with a fast Internet connection, the process should go quickly, however. At the time of writing, there is an indirect dependency on one of the Bioconductor packages (Biobase), which will not be installed unless you have selected a Bioconductor package repository; the absence of this package seems to do no harm.
On Windows, the package works properly only with the single-document Rgui interface (SDI). Under the default multiple-document interface (MDI), Tk dialog boxes don't 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.
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 systems typically have all of the software required for building packages already installed. The easiest way to install the Rcmdr package and its dependencies if you have an active Internet connection is to run R as root and issue the command install.packages("Rcmdr", dependencies=TRUE) at the R prompt.
On Ubutu systems, in particular, the following procedure should work (slightly modified from a suggestion by Ista Zahn):
Once these are installed:
4) Start R (e.g. double-click the R icon in /Applications).
5) Start X11 (e.g. click the X11 button on the R Console or double-click
the X11 icon in /Applications/Utilities).
6) Close the X11 terminal (optional -- but DO NOT quit X11 itself).
7) Type library(Rcmdr) in the
R Console and press Return.
The Rcmdr window will open up.
8) For a quick test/tour:
8.1) Check that most of the menu items are greyed-out before a data set is read.
8.2) Read the Prestige data set
from the car package, via Data -> Data in packages -> Read data from
an attached package.
8.3) Test standard R graphics via Graphs -> Index plot, selecting
income; then try a 3D plot of
prestige vs. income
and education; the 3D plot requires
that the rgl package is installed.
8.4) Fit a linear model, regressing prestige
on education, income,
and type, via Statistics ->
Fit models -> Linear model.
8.5) Test the linear hypothesis that the two coefficients for type
are 0, via Models -> Hypothesis tests -> Linear hypothesis.
8.6) Finally, test lattice graphics via Models -> Graphs -> Effect
plots.
9) Once you exit from the R Commander GUI (but not from R), you can type Commander()
to restart the R Commander.
10) If you save/restore the R workspace, you will need to start X11 before starting
R! After the workspace is restored, type library(Rcmdr)
again.
Note: Closing a graphics window occasionally crashed R. This problem was solved in R 2.10.0 (thanks to Rob Goedman).
Last modified: 29 October 2009 by John Fox <jfox AT mcmaster.ca>.