R and RStudio
R is a free, open-source software environment for statistical computing and graphics. It runs on a wide variety of UNIX platforms, Windows and Mac.
To download and install R, do the following:
- Go to the Comprehensive R Archive Network (CRAN), which is mirrored on dozens of servers around the world, and choose the location closest to you. The mirror at Carnegie Mellon is a good choice: http://watson.nci.nih.gov/cran_mirror/.
- Select the distribution appropriate for your operating system. These are the links at the top of the page.
- Windows: Click the “base” link and then click the “Download R…” link on the following page. Double-click the executable file when it finishes downloading to begin the installation.
- Mac: Download the .pkg binary. Double-click the file when it finishes downloading to begin the installation.
You must first have a working installation of R to use RStudio.
- Go to the RStudio website
- Choose “Products” from the drop down menus to the righthand side of the page
- Choose the first option, RStudio
- Select “Desktop” since you want to run RStudio on your desktop computer
- Make sure you choose the Open Source Edition, and click the Download RStudio Desktop download bar
- Pick the installer for your platform.
- Click the RStudio file in your downloads, or wherever your downloads normally appear
- Select the default selections when installing RStudio unless you have other instructions from your instructor or colleague
- Windows note: Rstudio should be able to detect your latest installed R version. If RStudio does not recognize your R, or if you want to use a different R version from the one that RStudio detected, you can go to RStudio -> Tools -> Global Options to open the Options pane, then click the first “Change” button to select a specific R version.
Getting Started with R
There are many fine web sites, tutorials and presentations available on the internet that introduce R. A sample of those resources include:
- An Introduction to R gives an introduction to the language and how to use R for doing statistical analysis and graphics
- Manuals, tutorials, etc. provided by users of R
- Past StatLab workshops materials with class handouts and R scripts
Research Software Support can only provide limited support for programs such as R whose binaries and source originate offsite. Please remember that it is up to you to:
- Check the system requirements.
- Scan any downloads for viruses.
- Read the documentation for instructions on installation and program use.
- Comply with any licenses to which you agree.