University of Melbourne

Tuesday June 20 and Friday June 23, 2017

9:00 am - 5:00 pm

Instructors: Pablo Franco

Helpers: David Wilkinson, Meghana Kulkarni, Chenkai Ma, Sara Moghaddam, Miriam Yeung, Lucy Liu, Himali Ratnayake, Amit German, Jason Whyte

General Information

Introduction to R for non-programmers.

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. However, if you have no previous programming experience, we recommend that you consult the course material for introduction to programming concepts workshop prior to attending the current workshop.

Where: Day One (2017-06-20) - COLAB (Room 329), Level 3, ERC, Building 171, University of Melbourne, Parkville;

Day Two (2017-06-23) - COLAB (Room 329), Level 3, ERC, Building 171, University of Melbourne, Parkville. Get directions with Google Maps.

Requirements: **Participants must bring a laptop and charger** with a Mac, Linux, or Windows operating sytem (not a tablet, Chromebook, etc.) that they have administrative privileges on.

Participants are also asked to install R, and the RStudio IDE prior to the workshop (See instructions ).

Contact: Please email pablo.franco.dn@gmail.com or nicole.unimelb@gmail.com 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

Day 1

09:00 Introduction"
10:00 Intro to R and how to find help
11:00 Data structures
12:00 Lunch break
13:00 Reading and subsetting data
14:30 Functions
16:00 Plotting data using ggplot2
16:45 Wrap up

Day 2

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

We will use this google doc for taking notes, and sharing URLs and bits of code. Editable Google Doc click here

Setup

Requirements: **Participants will be required to bring their own laptop and charger**

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.

For visitors who are not from a tertiary institution, the visitor login details for the Visitor network are:
  • network: resbaz
  • password: 0N$izq

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.