Make sure R is installed!
We assume that you have installed R. If not, follow the instructions from last lectures to install R.
Install RStudio
RStudio is a powerful and easy to use open source IDE for R. Download the appropriate version for your OS from http://www.rstudio.com/ide/download/desktop and install it on your computer.
R Packages
In this workshop, a few different R packages will be used. To install R packages, you can either follow the steps described here or use the package installation tool in RStudio (Tools -> Install Packages... ). Please install the following packages:
Python
Although our focus will be on R, we will cover the interaction between R and Python. In order to install Python on your computer, you can follow one of Iain's installation guide: Modelling with Python Workshop - Installation Guide for OSX, Modelling with Python Workshop - Installation Guide for Linux, Modelling with Python Workshop - Installation Guide for Windows . You only need to follow the sections "Install Python" and "Install setuptools". For this workshop, we will keep the required Python knowledge to a minimum. However, since Python will be used extensively in other workshops, it's a good idea to go over some Resources for Learning Python.
Installing PypeR
OSX
- Open a terminal
- Type sudo python -m easy_install pyper
- easy_install will download and install PypeR to your computer
Linux
- Open a terminal.
- Type easy_install pyper
- easy_install will download and install PypeR to your computer
Windows (because life can't always be simple)
- Open a command prompt
- Type R
- If this runs R, then exit with the command "q()" (no quotes) and skip step 3 below.
- If this doesn't run R (for most of you it won't), then do step 3 below.
- Add R binary folder to your system path with the following procedure:
- Find the R binary folder on your computer; this is the folder "bin" in your R directory. For me it was at "C:\Program Files\R\R-2.12.2\bin", but yours will probably be different depending on your R version number.
- Navigate to Computer
- Right click and select "Properties"
- Select "Advanced system settings"
- Select "Environment variables..."
- In the bottom section called "System variables", click on the line for the variable "Path" and click "Edit..."
- Go to the end of the variable, add a semicolon, and then the path to the R folder. Click "Ok" a few times to update the system variables.
- Close the command prompt you were using and open a new one.
- Go to step 2 again and repeat (it should work now, and if it doesn't bug John at josilber@mit.edu).
- Navigate to your Python folder's scripts folder, e.g. by running "cd C:/Python27/Scripts"
- Type easy_install pyper
- easy_install will download and install PypeR to your computer