MODULE 2.1 Acquiring and Installing R

baseR-V2016.2 - Data Management and Manipulation using R

Tested on R versions 3.0.X through 3.3.1
Last update: 15 August 2916


Objective:

  • How to obtain and install R on your personal CPU

Let’s begin by asking …



Where Do I Find R?


The link http://www.r-project.org/ directs you you to the R-Project homepage.

From there a large number of CRANs (Comprehensive R Archive Network) exist from which R products can be obtained. A CRAN is simply a location that stores R products on a server accessible to the public via web mirrors or secure sites. You can pick any R CRAN you wish; for sentimental reasons I always select USA (CA1), which is U.C. Berkeley.

The R-Project home page looks something like this, with any differences likely due to different releases available or items under News:


What Version of R Should I Use?


The current version as of 15 August 2016 is 3.3.1, a.k.a “Bug in Your Hair”, with a release date of 21 June 2016. R upgrades 2-4 times per year, but there is no real advantage for upgrades at .X levels. All versions from 2.14.X up to 3.3.1 have been tested and work for this website.

If you are new to R, I recommend you install the most current version. There are a few important distinctions between W7/W8/W10 and MAC OS’s, and some specific hoops to leap through for Linux installations, but for the most part installing R on any OS is similar.

R comes in both x32- and x64-bit bundles. R will automatically install both into your CPU; you select the version to launch. Most CPUs today are x64-bit so you should configure your CPU to launch the x64 version on starting a R session. There still remain a few packages in R that require both x32- and x64-bit builds (e.g., RODBC), so installing both is best.

R and the Windows World. R works with W7/W8/W10/Vista/Server 2008, and I have not seen or heard of issues with W10 other than those related to the OS release itself. Don’t even think about W2000 or XP.

There can exist some idiosyncrasies regarding read-write file permissions that are Windows-, not R-based. These arise if the main R libraries are installed under full Admin, and a User attempts to update packages. Additional information on R for Windows can be found here.

R and the MAC World. The MAC OS versions are all x64-bit, and can be run in command line mode or using the GUI R.app. R requires MAC OS 10.2 (a.k.a “Jaguar”) or higher. Click here and here for additional information on R and MAC OS installation.

R and the Linux World. As noted on the R-Project CRAN for linux, which shows the available Linux installations (Debian, RedHat, SUSE, Ubuntu), you will need to perform installation operations specific to your Linux package. The single best, non-R Project, link I have come across to help in R Linux installations is this blog site.


Installing R


You follow the bulleted processes described below for installation of R, or watch a video [LINKHERE].

From the R-Project homepage:

  • click the download R link
  • Select a CRAN mirror (Example here is USA (CA1) => UC Berkeley)

This takes you to the selected CRAN site (here, UC Berkeley) where you can:

  • Download R for Linux, or
  • Download R for (Mac) OS X, or
  • Download R for Windows

Each OS has a slightly different look.

For Windows:

  • Select base (or install R for the first time)
  • Click Download R 3.3.1 for Windows (most current as of 15 August 2016)
  • Save file R-3.3.1-win.exe to your Desktop (or the downloads folder you use)
  • Double-click R-3.3.1-win.exe and follow the gui instructions.
    It is recommended that all defaults be selected. See R FAQ and R for Windows FAQ links for further information if desired. There is also a link for “Previous releases” if you desire an older version of R.

For MAC OS X:

  • Select the R-3.3.1.pkg (most current as of 15 August 2016)
  • Save the .pkg file
  • Double-click and follow the gui instructions.
    As with Windows, it is recommended that all defaults be selected.

For Linux installations:

  • Select your Linux OS
    • Debian
    • RedHat
    • SUSE
    • Ubuntu

Each, with the exception of redhat, comes with instructions for installation. For RedHat installation instructions click here.


Uninstalling R


Uninstalling R is specific to your OS. Use the Control Panel “Programs and Features” to uninstall a Windows version of R. For MAC OS, simply drag the R.framework and R.app files to the trash. Linux versions of R can be uninstalled by deleting /usr/local/lib/R.


END MODULE 2.1


Printable Version