Computing with the R Statistical Program

Installation binaries from CRAN (Comprehensive R Archive Network) Mirrors

Download the R program from one of the following mirrors (I have found UCLA to be the fastest, and Carnegie Mellon the slowest):
UCLA -- Berkeley -- Case -- Iowa State -- Carnegie Mellon

Follow the instructions below for a quick setup; read the more extensive R installation guide for options and to try to solve any problems with installation.

Setting up your R directory

  1. Navigate to your Documents directory (on Windows 7) or to your "My Documents" directory on XP; for Linux, open a terminal window and type "cd" at the prompt to get to your home directory.

  2. RIGHT CLICK the link below and copy both the Stat1040.R and the .Rprofile files to your Documents directory. (Choose the "Save file as..." item that comes up when you right click, and navigate to your home or Documents directory).
    IF USING Windows, be sure to save the files as TYPE="allfiles" when given the option to save as a "text" file -- if you do, the file will be saved as "Rprofile.txt" and you will have to rename it. These two files will define several useful functions for making the R program work more easily.
  3. If it doesn't load automatically when you run R, use the command:
    > source("Stat1040.R")

>
  • R installation notes How to obtain and install R. Read this very carefully if something goes wrong with your installation.

    R data files

    Copy the files below to your home directory.
    This can be done automatically with the command:
    > Download.Data() You can load these files into R, but it will require one of several commands, depending on the file type:


    R websites