R for Biologists, March 8, 2017

We will be utilizing red and green sticky notes today. If you run into problems or have questions,

please place the red sticky note to the back of your computer screen and a helper will assist you.


If you have not already requested an HCC account under the rcourse998 group, please do so here

If you already have an HCC account and need to be added to the rcourse998 group, please let us know.

If you have not previously set up Duo Authentication, please ask for assistance.


Set up Instructions:


For Windows will we use two third party application PuTTY and WinSCP for demonstration.

PuTTY:   <http://www.putty.org/>

WinSCP: < http://winscp.net/eng/download.php>


Mac and Linux users will need to download and install Cyberduck. Detailed information for downloading and setting up Cyberduck can be found here: For Mac/Linux Users


Linux Commands Reference List:



R core and R Studio:

We will be writing scripts offline in RStudio and then uploading them to execute them on the cluster. This lesson assumes you have the R core and RStudio installed. If you do not you can install them here:

R core: https://cloud.r-project.org/

RStudio: https://www.rstudio.com/products/rstudio/download/


Required Packages:

We will also be using the dplyr, ggplot2 and maps package. If you do not have these installed, please install them now. You can do so using the following commands inside the RStudio console:





What is a cluster:

(picture courtesy of: http://training.h3abionet.org/technical_workshop_2015/?page_id=403)

To download the tutorial files:


Take Home Exercise:

Data Analysis in R - Please note that the on the bottom of page three, there is a missing parenthesis at the end of the last command.

The final code chunk should read:

# Calculate flight age using birthmonth

age <- data.frame(names(acStart), acStart, stringsAsFactors=FALSE)

colnames(age) <- c("TailNum", "acStart")

flights <- left_join(flights, age, by="TailNum")

flights <- mutate(flights, Age = (flights$Year * 12) + flights$Month - flights$acStart)