R Tutorials Top Banner

HELP WITH R INSTALLATION


If you haven't downloaded R, do so now. Go to this link...

R Statistical Computing Project

...and click on CRAN over on the left margin of the page under "Download, Packages". When the list of mirror sites appears, scroll down and choose one that appeals to you. (Pick one in the United States if that's where you are. I'm partial to Berkeley and UCLA myself, especially if it's early in the morning here on the East coast.) Click on the link for Windows (Win95 and later, if that's your operating system of choice), then click on base, then click on Download R-2.11.1 for Windows. In the little pop-up box, click on Save File. As of this writing (25 July 2010), R-2.11.1 is the current version, but if you see a higher version number, that's fine, too. Older versions also work just fine, so if you already have an older version of R installed, it should work, as long as it's newer than about 2.2.

Mac users should click on the MacOS X link at the mirror site and download the R-2.11.1.pkg file. Please read the information at the mirror site. This package requires OS X 10.5 (Leopard) or higher to work. If you need an older version, there is an old link a little farther down the page. Linux users will have the easiest time by using their package manager to install R. For example, in Ubuntu, open a terminal window and type "sudo apt-get install r-base", or use the Synaptic package manager (under System Administration) to install this package. You will need an administrator password to do so.

It's a big file, 30 MB or more, so unless you have a really fast Internet connection, it will take awhile to download. Once it downloads, an icon will appear on your desktop (or wherever it is you save downloaded files--the Downloads folder perhaps) that looks something like this (in Windows):

Note: On the Mac it will be a .pkg file. Double click this icon (looks like a little cardboard box) and follow the instructions. You will be asked for an administrator password sometime during the installation.

In Windows, double click the .exe installer icon. The installer will open and ask you a bunch of questions. Just agree with whatever the installer says. Click "Next" or "Agree" or "Continue" or whatever means "yes." R will be installed on your computer. You can now throw the setup file away.

During the installation, a shortcut will be created on your (Windows) desktop that looks like this, with the correct version number of course:

Note: On the Mac, a program icon will be placed in the Applications folder. Drag a copy to the Dock for quick startup. In Linux, R is started from a terminal window by typing R and pressing Enter at a command prompt. (You can also start a terminal version on the Mac, by the way.)

Double click on this shortcut icon to start the program running. This is what you will see (in Windows):

The prompt and the cursor won't be labeled, of course, but be sure you know what they look like. In my current Windows version, the cursor is a vertical bar rather than a block and does not blink. You will be seeing A LOT of this prompt and cursor as you use R. This window will look somewhat different on a Mac, but not terribly different. There is one big difference, however. In Windows the R Console is enclosed in a larger RGui window. On the Mac this is not the case. This can be changed on either system by setting an option, but for now it will be fine the way it is. In Linux the program runs in the terminal, but you will recognize it when it starts.

If you started it and now want to know how to stop it, type this and press the Enter key. Don't type the command prompt (greater than sign). R has already supplied that for you. You have to type the open and close parentheses, however. When asked if you want to save your workspace, pick "no".

> quit()

Congratulations, by the way. You have just installed one of the most powerful pieces of statistical software available at any price, and the good news is you got it for free. You are not paying an exorbitant amount of money to "rent" the software, and it will not go dead on you when your license runs out. Updates and add-on packages are also free. Nor are you being addicted to a horrifyingly expensive software package by being given some cheap student version to learn on. This is the full package! Go to one of these links if you want to find out what free software is all about:


revised 2010 July 25
Back to Table Of Contents