Installing R on Your Personal Computer

R is an open-source statistical package commonly used by statisticians developing new statistical methods. While it is more difficult to learn and use than Stata, SAS or SPSS, some cutting-edge techniques have only been implemented in R.

R is already installed on Winstat, on the SSCC Linux servers and in the SSCC computer labs. But since R is open-source, you are free to download, install and use R on your computer as well. This article will help you to do so on either a Windows computer or a Mac.

Windows

Go to the R for Windows download page, then click Download R #.#.# for Windows, where #.#.# will be the version number of the current version. Your browser will then download the file r-#.#.#-win32.exe. When the download is complete, double-click on the file to start the installation.

Mac

Go to the R for Mac OS X download page, then click on R-#.#.#.dmg where #.#.# will be the version number of the current version. When that file has finished downloading, double-click on it to start the installation.

Packages

If your computer is always connected to the SSCC network, you may want to store your packages on your U: drive. Then if you ever want to run R on Winstat or in the SSCC computer labs your packages will already be installed. See Using R Packages on SSCC Computers for instructions.

Updating R

To update R, uninstall it and then install the latest version as described above.

If you had R store your packages on the U: drive, they'll be available immediately. Otherwise they are stored with the program and you'll need to move them from the old version's folder to the new version's. In Windows the default library location is C:\Program Files\R\R-#.#.#\library and it is similar on a Mac. For example, to move packages installed under R 2.9.1 to R 2.9.2, take the library folder in C:\Program Files\R\R-2.9.1 and put it under C:\Program Files\R\R-2.9.2.

This is a good time to make sure your packages are up to date: click Packages, Update Packages.

Last Revised: 10/5/2009