- Please complete the post-workshop survey.
- R script session-01.R from first session.
- R script session-02.R from second session.
- R script session-03.R from second session.
- R script session-04.R from second session.
- Download this zip file and save it in the folder "workshop" on your Desktop.
- Click here for the exercises.
Registration is required and is limited to those affiliated with the Biological Sciences Division. Please register at 2016-09-14-introR.eventbrite.com.
This interactive workshop will cover the basics of R. R is a programming language that is especially powerful for data exploration, visualization, and statistical analysis.
Coffee and lunch will be provided.
When: 8:00 am - 4:30 pm, Wednesday, Sep 14, 2016
Who: The course is limited to graduate students and other researchers in the Biological Sciences Division at the University of Chicago.
Prerequisites: There are no prerequisites. Attendees are expected to have no (or little) previous programming experience. If you are already familiar with the basics of R, you should consider attending our Software Carpentry Workshop, which will focus on intermediate R concepts as well as other tools for scientific computing.
Requirements: Participants must bring a laptop with a Mac, Linux, or Windows operating sytem (not a tablet, Chromebook, etc.) that they have administrative privileges on. They should have a few specific software packages installed (listed below).
Instructors: John Blischak, Emily Davenport
Helpers: Lauren Blake, Arjun Biddanda, Joe Marcus
Faculty advisors: Allan Drummond, Matthew Stephens, Mark Abney
Administrators: Lisa Anderson, Candice Lewis
Funding: This workshop was made possible through the generous sponsorhip of the Office of Graduate and Postdoctoral Affairs, the Department of Human Genetics, and the Department of Biochemistry and Molecular Biology.
Contact: Please mail firstname.lastname@example.org for more information.
|08:00 am - 08:30 am - Introduction to RStudio|
|08:30 am - 10:00 am - Analyze data with R|
|10:00 am - 10:30 am - Coffee break|
|10:30 am - 12:00 pm - Organize your code with R functions|
|12:00 pm - 01:00 pm - Lunch|
|01:00 pm - 02:30 pm - Automate tasks with loops|
|02:30 pm - 03:00 pm - Coffee break|
|03:00 pm - 04:30 pm - Make choices with if/else statements|
We will introduce the basic functionalities of RStudio, a useful integrated development environment (IDE) for writing R code.
We will demonstrate how to import a data set, calculate descriptive statistics, and create some basic plots.
We can extend R by converting common routines into functions. This allows us to execute the same commands on many different input arguments. Best of all, writing functions makes it easier to read and maintain your code. In this lesson, we convert the analysis we performed in the previous lesson into a function that can then be applied to any similar input data set.
One of the main advantages of writing code over using spreadsheet software is that it is easier to repeat the analysis on new data sets. In this lesson, we use loops to automatically apply the function we wrote in the previous lesson to process multiple data sets.
Automated data analysis pipelines can be made even more powerful by allowing the code to make decisions based on the input parameters and data. In this lesson, we modify our code from the previous lessons so that it will save the analysis plots to a specific file only if we provide a filename as input. This allows us to choose whether to immediately view the results in the RStudio window or save the results to a file.
Mac OS XVideo Tutorial
You can download the binary files for your distribution
from CRAN. Or
you can use your package manager (e.g. for Debian/Ubuntu
sudo apt-get install r-base and for Fedora run
sudo yum install R). Also, please install the
The materials used for this workshop are based on open source content produced by Software Carpentry. Specifically, this workshop webpage was adapted from their workshop template, and the R lesson material is their lesson Programming with R. This page was generated by GitHub Pages using the Architect theme by Jason Long.