The R Commander: A Basic-Statistics GUI for R

Current Version: 2.0-x

John Fox and Milan Bouchet-Valat


Please Read the Rcmdr Installation Notes


(click on the image for a larger view)

For more details, see my paper on the R Commander in the Journal of Statistical Software (which is somewhat out of date) and the introductory manual distributed with the package (accessible via the Help -> Introduction to the R Commander menu).

The R-Commander GUI consists of a window containing several menus, buttons, and information fields. (The menu tree, etc., are shown below.) In addition, the Commander window contains script and output text windows. The R-Commander menus are easily configurable through a text file or, preferably, through plug-in packages, of which many are now available on CRAN.

The menus lead to simple dialog boxes, the general contents of which are more or less obvious from the names of the menu items. These boxes have a common structure, including a help button leading to the help page for a relevant function, and a reset button to reset the dialog to its original state.

By default, commands generated via the dialogs are posted to the output window, along with printed output, and to the script window. Lines in the script window can be edited and (re)submitted for execution. Error messages, warnings, and "notes" appear in a messages window.

Commands access a current or active data set (data frame). When a new data set is read (from an attached package or imported), it becomes the active data set. The user can also select an active data set from among data frames currently in memory.

In addition to standard packages, the R Commander uses functions in a number of other packages. To install the Rcmdr package, use the command install.packages("Rcmdr"). If any of the other packages on which it depends are missing, the Rcmdr will offer to install them when it first starts up.

My original object in designing and implementing this GUI was to cover the content of a basic-statistics course. The target text was Moore's The Basic Practice of Statistics, Second Edition (Freeman, 2000), which is the text that I used for a two-semester introduction to statistics for undergraduate sociology majors. The R Commander implements the content of this text plus some additional material (e.g., linear and generalized linear models). As a result of several suggestions that I have received, the coverage is now substantially larger than originally envisaged, and is broader still when the various R Commander plug-in packages are considered.

I must confess that I'm not terribly enamored of menu/dialog box interfaces to statistical software, but I do feel that these interfaces have a role for introductory and occasional use. The R Commander interface is not innovative, but I hope that it's simple and familiar. One of my design goals was to wean users from the GUI to writing commands, which is one motivation for the script window.

It is relatively easy for me to add statistical functionality to the R Commander, and I'd appreciate suggestions for what you'd like to see implemented. Please remember, however, that my intention is to keep things simple and basic. In particular, I don't like extensive menu/dialog-box interfaces to large statistical systems that attempt to provide access to every option and procedure. In R, of course, which relies on thousands of contributed packages, this is not feasible anyway. As mentioned, the R Commander can also be extended by plug-in packages: See my article in the December 2007 issue of R News (though the facilities for plug-ins have advanced in the interim; also see the Journal of Statistical Software paper by Carvalho and Fox on the RcmdrPlugin.survival package).

I'm making the GUI available as the Rcmdr package. You can get a copy of the latest released version of the Rcmdr package through CRAN. I should mention that I've only tested the package under Windows 95, 2000, XP; Vista, and 7 (recent versions under Windows 7), and under Ubuntu Linux (earlier versions under Red Hat and Quantian Linux); and under Mac OS X. Mac OS X users in particular (and possibly others) should see the installation notes.

The lastest version of the Rcmdr has some new features, and there are many new features beyond the original release. (See the NEWS and CHANGES files in the installed or source package for details.) Version 0.9-9 introduced substantial changes to the interface, with output by default routed to an output window within the main Commander window; version 0.9-10 included rewritten dialog-box generating functions, reducing the R code for the package by about 40 percent. Development version 0.9-18 (never submitted to CRAN) introduced other substantial changes, such as conditionally activated menus. Version 1.0-0 was the first "non-beta" version. Version 1.1-1 included support for translation into other languages, using the tools for internationalization and localization introduced in R 2.1.0; please contact me if you'd like to contribute a translation of the Rcmdr package into another language. Version 1.3-0 introduced "plug-ins," which simplify extending the R Commander: See ?Plugins. There are now a number of plug-in packages on CRAN, most with names of the form RcmdrPlugin.* (e.g., RcmdrPlugin.survival) . Version 1.8-0 introduced dialogs that retain previous selections until the data set is changed.

An introductory manual (in a PDF file, up-to-date as of Rcmdr version 2.0-1) is part of the R Commander package and is accessible from its Help menu.

I'd very much appreciate learning about your experiences.


R Commander Default Menu Tree [current as of version 2.0-3]

File - Change working directory
|- Open script file
|- Save script
|- Save script as |- Open R Markdown file
|- Save R Markdown file
|- Save R Markdown file as
|- Save output
|- Save output as
|- Save R workspace
|- Save R workspace as
|- Exit - from Commander
|- from Commander and R
Edit - Cut
|- Copy
|- Paste
|- Delete
|- Find
|- Select all
|- Undo
|- Redo
|- Clear Window
Data - New data set
|- Load data set
|- Merge data sets
|- Import data - from text file, clipboard, or URL
| |- from SPSS data set | |- from SAS xport file
| |- from Minitab data set
| |- from STATA data set
| |- from Excel, Access, or dBase data set [32-bit Windows only] | |- from Excel file [all other platforms, requires Java]
|- Data in packages - List data sets in packages
| |- Read data set from attached package
|- Active data set - Select active data set
| |- Refresh active data set
| |- Help on active data set (if available)
| |- Variables in active data set
| |- Set case names
| |- Subset active data set
| |- Aggregate variables in active data set
| |- Remove row(s) from active data set
| |- Stack variables in active data set
| |- Remove cases with missing data
| |- Save active data set
| |- Export active data set
|- Manage variables in active data set - Recode variable
|- Compute new variable
|- Add observation numbers to data set
|- Standardize variables
|- Convert numeric variables to factors
|- Bin numeric variable
|- Reorder factor levels
|- Define contrasts for a factor
|- Rename variables
|- Delete variables from data set
Statistics - Summaries - Active data set
| |- Numerical summaries
| |- Frequency distributions
| |- Count missing observations
| |- Table of statistics
| |- Correlation matrix
| |- Correlation test
| |- Shapiro-Wilk test of normality
|- Contingency Tables - Two-way table
| |- Multi-way table
| |- Enter and analyze two-way table
|- Means - Single-sample t-test
| |- Independent-samples t-test
| |- Paired t-test
| |- One-way ANOVA
| |- Multi-way ANOVA
|- Proportions - Single-sample proportion test
| |- Two-sample proportions test
|- Variances - Two-variances F-test
| |- Bartlett's test
| |- Levene's test
|- Nonparametric tests - Two-sample Wilcoxon test
| |- Paired-samples Wilcoxon test
| |- Kruskal-Wallis test
| |- Friedman rank-sum test
|- Dimensional analysis - Scale reliability
| |- Principal-components analysis
| |- Factor analysis | |- Confirmatory factor analysis
| |- Cluster analysis - k-means cluster analysis
| |- Hierarchical cluster analysis
| |- Summarize hierarchical clustering
| |- Add hierarchical clustering to data set
|- Fit models - Linear regression
|- Linear model
|- Generalized linear model
|- Multinomial logit model
|- Ordinal regression model
Graphs - Color palette
|- Index plot
|- Histogram
|- Stem-and-leaf display
|- Boxplot
|- Quantile-comparison plot
|- Scatterplot
|- Scatterplot matrix
|- Line graph
|- XY conditioning plot
|- Plot of means
|- Strip chart
|- Bar graph
|- Pie chart
|- 3D graph - 3D scatterplot
| |- Identify observations with mouse
| |- Save graph to file
|- Save graph to file - as bitmap
|- as PDF/Postscript/EPS
|- 3D RGL graph
Models - Select active model
|- Summarize model
|- Add observation statistics to data
|- Confidence intervals
|- Akaike Information Criterion (AIC)
|- Bayesian Information Criterion (BIC)
|- Stepwise model selection
|- Subset model selection
|- Hypothesis tests - ANOVA table
| |- Compare two models
| |- Linear hypothesis
|- Numerical diagnostics - Variance-inflation factors
| |- Breusch-Pagan test for heteroscedasticity
| |- Durbin-Watson test for autocorrelation
| |- RESET test for nonlinearity
| |- Bonferroni outlier test
|- Graphs - Basic diagnostic plots
|- Residual quantile-comparison plot
|- Component+residual plots
|- Added-variable plots
|- Influence plot
|- Effect plots
Distributions - Set random number generator seed |- Continuous distributions - Normal distribution - Normal quantiles
| | |- Normal probabilities
| | |- Plot normal distribution
| | |- Sample from normal distribution
| |- t distribution - t quantiles
| | |- t probabilities
| | |- Plot t distribution
| | |- Sample from t distribution
| |- Chi-squared distribution - Chi-squared quantiles
| | |- Chi-squared probabilities
| | |- Plot chi-squared distribution
| | |- Sample from chi-squared distribution
| |- F distribution - F quantiles
| | |- F probabilities
| | |- Plot F distribution
| | |- Sample from F distribution
| |- Exponential distribution - Exponential quantiles
| | |- Exponential probabilities
| | |- Plot exponential distribution
| | |- Sample from exponential distribution
| |- Uniform distribution - Uniform quantiles
| | |- Uniform probabilities
| | |- Plot uniform distribution
| | |- Sample from uniform distribution
| |- Beta distribution - Beta quantiles
| | |- Beta probabilities
| | |- Plot beta distribution
| | |- Sample from beta distribution
| |- Cauchy distribution - Cauchy quantiles
| | |- Cauchy probabilities
| | |- Plot Cauchy distribution
| | |- Sample from Cauchy distribution
| |- Logistic distribution - Logistic quantiles
| | |- Logistic probabilities
| | |- Plot logistic distribution
| | |- Sample from logistic distribution
| |- Lognormal distribution - Lognormal quantiles
| | |- Lognormal probabilities
| | |- Plot lognormal distribution
| | |- Sample from lognormal distribution
| |- Gamma distribution - Gamma quantiles
| | |- Gamma probabilities
| | |- Plot gamma distribution
| | |- Sample from gamma distribution
| |- Weibull distribution - Weibull quantiles
| | |- Weibull probabilities
| | |- Sample from Weibull distribution
| |- Gumbel distribution - Gumbel quantiles
| |- Gumbel probabilities
| |- Plot Gumbel distribution
| |- Sample from Gumbel distribution
|- Discrete distributions - Binomial distribution - Binomial quantiles
| |- Binomial tail probabilities
| |- Binomial probabilities
| |- Plot binomial distribution
| |- Sample from binomial distribution
|- Poisson distribution - Poisson quantiles
| |- Poisson tail probabilities
| |- Poisson probabilities
| |- Plot Poisson distribution
| |- Sample from Poisson distribution
|- Geometric distribution - Geometric quantiles
| |- Geometric tail probabilities
| |- Geometric probabilities
| |- Plot geometric distribution
| |- Sample from geometric distribution
|- Hypergeometric distribution - Hypergeometric quantiles
| |- Hypergeometric tail probabilities
| |- Hypergeometric probabilities
| |- Plot hypergeometric distribution
| |- Sample from hypergeometric distribution
|- Negative binomial distribution - Negative binomial quantiles
|- Negative binomial tail probabilities
|- Negative binomial probabilities
|- Plot negative binomial distribution
|- Sample from negative binomial distribution
Tools - Load package(s)
|- Load Rcmdr plug-in(s)
|- Options |- Save Rcmdr options |- Manage Mac OS X app nap for R.app [Mac OS X only]
Help - Commander help
|- Introduction to the R Commander |- R Commander website
|- Help on active data set (if available)
|- About Rcmdr
|- Start R help system |- R website
|- Using R Markdown

Buttons: Edit data set; View data set; Submit (lines from the script window)

Information field buttons: active data set; active model

Right-click "context" menus for script and output windows.


Last modified: 2014-01-16 by John Fox <jfox AT mcmaster.ca>.