R and R Studio Installation
In this Workshop we'll use RStudio, a free and open-source integrated development environment for R. R is also open source and developers have made R available for every major desktop platform available with no license fee.
The first step is to install R prior to installing RStudio. For the Workshop, we will be using R-3.3.1. If you have an earlier version of R currently installed, consider upgrading to avoid possible issues during the Workshop. If you are using a Mac or Windows machine, you may want to download the files yourself and then run the installers. If you're using Linux, using a package management system like Yum simplifies the installation and updating process.
Go to the official R mirror website, http://cran.r-project.org/mirrors.html which takes you to a list of mirror sites. The list is organized by country. Use the link for the National Institute of Computational Sciences, Oak Ridge, TN due to proximity, https://mirrors.nics.utk.edu/cran/. Locate the appropriate precompiled binary for your platform and run the installer.
Windows
Installing R on Windows is just like installing any other software. Select the link "Installing R for the first Time", https://mirrors.nics.utk.edu/cran/ and then "Download R-3.3.1 for Windows. Select "Run" and follow the prompts.
Mac OS X
R-3.3.1 runs on Mac systems running Mac OS X 10.9 (Mavericks) and higher. If you have
an older operating system there are older versions linked at the top of the web page
that may work better.
Reference R for Mac OS X FAQ for additional details regarding installation of R on
the Mac OS: https://mirrors.nics.utk.edu/cran/bin/macosx/RMacOSX-FAQ.html
Note that links to various FAQs are available from the left side menu on the main page of the mirror site: https://mirrors.nics.utk.edu/cran/
Linux and Unix Systems
On a Linux system, the easiest way to install R is to use a package management system. These systems automate the installation process.For example, on Red Hat (or Fedora), you can use Yum, "Yellow Dog Updater, Modified", to automate the installation. On an x86 Linux platform open the terminal window and type:
sudo yum install R.x86_64
You'll be prompted for your password, and if you have sudo privileges, R should be installed on your system
Installing R Studio
For the Workshop, we'll be using RStudio Desktop 0.99.902. For this version of RStudio,
you will need to have installed R 2.11.1 (or higher); which if you followed the instructions
above, should not be a problem.
Install R Studio by choosing the RStudio package for your platform at the link below
and then follow the prompts: https://www.rstudio.com/products/rstudio/download/
Follow the installer prompts for Windows. For Mac, you'll download a .dmg file which
loads RStudio. For Linux, it is again recommended to use a package management system
such as Yum.
You may also want to go to: https://www.rstudio.com/products/RStudio/ to view a video
overview of RStudio.
Installing Packages
Additional packages need to be installed for various tasks, e.g. visualizations.
To install packages, open RStudio and navigate to Tools-> Install Packages, and type
the name of the package you would like to install. For example, enter ggplot2, to
install the most popular plotting system for R. RStudio will then install the ggplot2
package and all its dependencies.
As an alternative, you may navigate to the RStudio Console and type:
install.packages("ggplot2")
To make sure the package was installed correctly, you may type:
library(ggplot2)
Packages you may want to install prior to the Workshop include:
• ggplot2
• plyr
• stringr
• reshape2
• zoo
• openxlsx
• quantmod
• RSQLite
Additional References:
• Quick-R: http://www.statmethods.net/, a website by Robert I. Kabacoff, Ph.D.
• R Tutorial: http://www.cyclismo.org/tutorial/R/, written by Kelly Black at the University
of Georgia
• LearnR: https://www.youtube.com/user/TheLearnR, YouTube videos from RStatistics.Net