R installation notes
Murtaza Haider August 01, 2010
Table of Contents
Installing R and related Add-ins ... 2
R with point-and-click GUI feature ... 7
Deducer ... 8
Other packages suggested ... 9
How to UNinstall R? ... 10
Installing R and related Add-ins
You can learn about the R Project website: http://www.r-project.org/
To download R from the University of Toronto’s site, please click on http://probability.ca/cran/. R is available for Linux, Windows, and MacOS X.
To download the Windows version, please visit:
http://cran.stat.sfu.ca/ and click on base
and click onDownload R 2.9.0 for Windows (36 megabytes)
Save the file and then double-click it to install R.
The following dialogue will appear:
Select OK.
Click Next on the following dialogue box:
Select the directory to install the software. For default location, click Next.
Click Next on the following ensuring that you have selected (Yes customize startup):
Select SDI (Separate Windows) on the following dialogue box.
--
--
--
Double click to run R.
R will launch and appear as follows:
Researchers around the world have contributed approximately 2000 packages for R. You can search for a package from the R website and download/install it directly from within R using:
Packages>install packages.
R will prompt you to select a mirror site to
download the packages. I often use the Ontario site.
R with point-and-click GUI feature
Until recently, R was a command driven software. John Fox at McMaster University has added the GUI capabilities to R in a package. For details, please see:
http://socserv.mcmaster.ca/jfox/Misc/Rcmdr/
To install R Commander, please type the following at the red cursor in R:
>install.packages("Rcmdr", dependencies=TRUE)
This command will download R commander.
Once downloaded, load R Commander by typing the following at the red prompt:
>library(Rcmdr)
This will launch the Rcmdr, which is a GUI like environment shown on the next page.
Also, update packages by selecting
To add additional functionality to R Cmdr, various packages in R have provided plugins for R Cmdr to offer the point and click functionality. Those plugins could be installed from within R as well.
Use Packages>Install Packages to select Rcmdr plug-ins.
Deducer By Ian Fellows
http://www.deducer.org
For Windows:
Deducer is much like any other package in R, and can be used from within the native R Gui or the Java R Gui JGR.
1. Make sure your R is updated to at least version 2.12.0 2. Download the JGR launcher from: JGR 64-bit JGR 32-bit 3. Open R and enter: install.packages(c("JGR","Deducer")) 4. Double click on the JGR launcher and enter: library(Deducer)
For Mac:
1. Download and install R from CRAN
2. Download JGR from: JGR 64-bit, JGR 32-bit.
3. Open the native R GUI (it should be on the desktop) and at the prompt enter: install.packages(c("JGR","Deducer"))
4. Open JGR and enter: library(Deducer) to load Deducer
Other packages suggested
AER Hmisc IsWR mlogit Zelig Psych R2HTML Ecdat
Estout and apsrtable
How to UNinstall R?
Normally you can do this from the R group on the Start Menu or from the `Add/Remove Programs' or `Programs and Features' group in the Control Panel. If it does not appear there, run unins000.exe in the top-level installation directory. (There should be a separate uninstall item in the R group on the Start Menu for each installed version of R. On recent versions of Windows you may well be asked to confirm that you wish to run a program from an `unidentified publisher'.)
Uninstalling R only removes files from the initial installation, not (for example) packages you have installed or updated.
If all else fails, you can just delete the whole directory in which R was installed.
What's the best way to upgrade?
That's a matter of taste. For most people the best thing to do is to uninstall R (see the previous Q), install the new version, copy any installed packages to the library folder in the new installation, run update.packages(checkBuilt=TRUE, ask=FALSE) in the new R and then delete anything left of the old installation. Different versions of R are quite deliberately installed in parallel folders so you can keep old versions around if you wish.