University of Melbourne

July 28 and August 4, 2016

9:00 am - 5:00 pm

Instructors: Tim Esler, Nikki Rubinstein, Tiane Ryman, Chenkai Ma

Helpers: Marion Shadbolt, Sepideh Foroutan, Ramyar Molania, Andy Krause, Michael Silk

General Information

Introduction to R for non-programmers using psychological data.

The goal of this lesson is to teach novice programmers to write modular code and best practices for using R for data analysis. R is commonly used in many scientific disciplines for statistical analysis and its array of third-party packages. The emphasis of these materials is to give attendees a strong foundation in the fundamentals of R, and to teach best practices for scientific computing: breaking down analyses into modular units, task automation, and encapsulation.

Note that this workshop will focus on teaching the fundamentals of the programming language R, and will not teach statistical analysis. If you would like help with your statistical analysis, you can contact the Statistical Consulting Centre for one-on-one consultations or see their flyer for details of statistical training courses.

A variety of third party packages are used throughout this workshop. These are not necessarily the best, nor are they comprehensive, but they are packages we find useful, and have been chosen primarily for their usability. These materials are a modified version of those used by Software Carpentry for their "R for reproducible scientific analysis" workshop: Greg Wilson: "Software Carpentry: Lessons Learned". F1000Research, 2016, 3:62 (doi: 10.12688/f1000research.3-62.v2).

Who: The course is aimed at graduate students and other researchers. You don't need to have any previous knowledge of the tools that will be presented at the workshop.

Where: William Hearn Seminar Room, Room G09, The Old Quadrangle, University of Melbourne. Get directions with Google Maps.

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.

Contact: Please email t.esler@student.unimelb.edu.au or nikkir@student.unimelb.edu.au for more information.


Schedule

Surveys

Please be sure to complete these surveys at the end of each day of the workshop.

End of first day survey

End of second day survey

Thursday July 28th

09:00 Introduction and access to R through "Data Intensive Tools for the Cloud (DIT4C)"
10:00 Intro to R and how to find help
11:00 Data structures
12:00 Reading and subsetting data
13:00 Lunch break
14:30 Functions
16:00 Plotting data using ggplot2
16:45 Wrap up

Thursday August 4th

09:00 Setup
09:30 Vectorisation
10:30 Control flow ("if" and "for" statements)
12:00 Lunch break
13:00 Writing data and figures
13:30 Dataframe manipulation using dplyr
15:00 Discussion
16:45 Wrap up

Topics

  1. Introduction to R and RStudio
  2. Seeking help
  3. Data structures
  4. Data frames and reading in data
  5. Subsetting data
  6. Creating functions
  7. Creating publication quality graphics
  8. Vectorisation
  9. Control flow
  10. Writing data
  11. Dataframe manipulation with dplyr
  12. Wrapping up

Other Resources

Etherpad: https://public.etherpad-mozilla.org/p/Introductory-R-Workshop-28July2016.
We will use this Etherpad for chatting, taking notes, and sharing URLs and bits of code.


Setup

Requirements: **Participants will be required to bring their own laptop**, from which they will logon to the Data Intensive Tools for the Cloud (DIT4C) environment on the NeCTAR Research Cloud. This environment has all the required software pre-installed, so there's nothing participants need to do in preparation for the workshop. Instructions for connecting to DIT4C can be found here.

Wifi: If you're bringing a wifi device to the workshop, access to the wifi network will depend on whether you're affiliated with the Univerity of Melbourne. University of Melbourne staff/students can connect to the UniWireless network; instructions on how to do this and where to get assistance can be found here. Attendees from other Australian universities should find out (from the IT website of their home institution) how to connect to the Eduroam wireless network.

For visitors who are not from a tertiary institution, the visitor login details for the UniWireless are:
  • network: Software Carpentry
  • password: hackerwithin

R

R is a programming language that is especially powerful for data exploration, visualization, and statistical analysis. To interact with R, we use RStudio.

Windows

Install R by downloading and running this .exe file from CRAN. Also, please install the RStudio IDE.

Mac OS X

Install R by downloading and running this .pkg file from CRAN. Also, please install the RStudio IDE.

Linux

You can download the binary files for your distribution from CRAN. Or you can use your package manager (e.g. for Debian/Ubuntu run sudo apt-get install r-base and for Fedora run sudo yum install R). Also, please install the RStudio IDE.