5 Installation Instructions

5.1 Quick installs

5.1.1 Mac

  1. Download and install R
  2. Download and install RStudio
  3. Copy and paste the next line of code into the RStudio console (usually the lower left-hand box), press enter to run

    source('https://raw.githubusercontent.com/HoustonUseRs/intro-to-R-guide/master/scripts/setup.r')

5.1.2 Windows

  1. Download and install R
  2. Download and install RStudio
  3. Copy and paste the next line of code into the RStudio console (usually the lower left-hand box), press enter to run

    source('https://raw.githubusercontent.com/HoustonUseRs/intro-to-R-guide/master/scripts/setup.r')

5.1.3 Ubuntu

  1. Download and install R
  2. Download and install RStudio
  3. Copy and paste the next line of code into the RStudio console (usually the lower left-hand box), press enter to run

    source('https://raw.githubusercontent.com/HoustonUseRs/intro-to-R-guide/master/scripts/setup.r')

5.2 R for Mac OS X

5.2.1 Option 1: CRAN

  1. Go to http://cran.us.r-project.org/
  2. Click on “Download R for Mac OS X”
  3. Choose appropriate “R-x.x.x.pkg” based on your operating system version (“R-3.3.3.pkg” is the most recent)
  4. Follow installation instructions

5.2.2 Option 2: Homebrew

If you are not sure if you have Homebrew, open your Terminal or CLI and type which brew.

If you get output like this: /usr/local/bin/brew, then you have Homebrew and you are good to go.

Otherwise, if you get: command not found, you’ll need to install it from here: http://brew.sh/.

After confirming you have Homebrew, proceed with instructions:

  1. Open Terminal.
  2. Before installing anything, run brew update && brew upgrade
  3. Copy/paste the comands below to install R:

    $ brew tap caskroom/cask
    $ brew install homebrew/completions/brew-cask-completion
    $ brew install Caskroom/cask/xquartz
    $ brew cask install java
    $ brew tap homebrew/science
    $ brew install R

5.3 R for Windows/Linux

5.3.1 Windows

  1. Go to http://cran.us.r-project.org/
  2. Click on “Download R for Windows” > “base”
  3. Install R. Leave all default settings in installation options.

5.3.2 Linux

  1. Go to http://cran.us.r-project.org/
  2. Click on “Download R for Linux”
  3. Choose appropriate directory for your linux operating system
  4. Follow R installation instructions

5.4 R Studio

  1. Download from https://www.rstudio.com/products/rstudio/download/preview/
  2. Select appropriate installer listed under “Desktop Version”
  3. Follow installation instructions