KAUST Visualization Core Lab

2 September 2019

8:30 am - 5:00 pm

Instructors: David R. Pugh

Helpers: Joao Curdia, Alejandra Ortega, Tamara Huete-Stauffer, Kashif Nawaz, Alejandro Morales

General Information

The KAUST Visualization Lab is hosting an Introduction to R for Data Science workshop. Visualization lab staff will provide an introduction to R for data science designed for learners with little or no previous programming experience. Topics covered will include the following.

This hands-on lesson is part of the Introduction to Data Science Workshop Series being offered by the KAUST Research Computing Core Labs as part of our on-going efforts to build capacity in core data science skills at KAUST. The workshop curriculum largely follows the curriculum developed by Software Carpentry, a volunteer project dedicated to helping researchers get their work done in less time and with less pain by teaching them basic research computing skills.

This is a live-coding based workshop and learners are expected to bring their own laptops with the required software already downloaded and installed.

For more information on what Software Carpentry teaches and why, please see their paper "Best Practices for Scientific Computing".

Who: The course is aimed at graduate students (MSc and PhD), Post-docs, faculty and other research staff at KAUST. You don't need to have any previous knowledge of the tools that will be presented at the workshop.

Where: Auditorium 215 (between bldg. 2-3, level 0). Get directions with OpenStreetMap or Google Maps.

When: 2 September 2019. Add to your Google Calendar.

Registration: Register Now!

Course Materials: R For Reproducible Scientific Analysis

Requirements: Participants must bring a laptop with a Mac, Linux, or Windows operating system (not a tablet, Chromebook, etc.) that they have administrative privileges on. They should have a few specific software packages installed (listed below).

Code of Conduct: Everyone who participates in Carpentries activities is required to conform to the Code of Conduct. This document also outlines how to report an incident if needed.

Contact: Please email help@vis.kaust.edu.sa for more information.


Please be sure to complete these surveys before and after the workshop.

Pre-workshop Survey

Post-workshop Survey


Before Pre-workshop survey
09:00 Introduction to R and RStudio
10:30 Morning break
10:45 Introduction to Dataframes
12:00 Lunch break
13:00 Plotting in R
14:30 Afternoon break
14:45 Introduction to the Tidyverse
16:30 Wrap-up
17:00 END
After Post-workshop survey

We will use this collaborative document for chatting, taking notes, and sharing URLs and bits of code.


R for Reproducible Scientific Analysis

  • Introduction to R and RStudio
  • Project Management with RStudio
  • Seeking Help
  • Data Structure
  • Exploring Dataframes
  • Subsetting Data
  • Control Flow
  • Creating Publication-Quality Graphics with ggplot2
  • Vectorization
  • Functions Explained
  • Writing Data
  • Splitting and Combining Dataframes with plyr
  • Dataframe Manipulation with dplyr
  • Dataframe Manipulation with tidyr
  • Producing Reports with knitr
  • Writing Good Software
  • Reference...


To participate in a Software Carpentry workshop, you will need access to the software described below. In addition, you will need an up-to-date web browser.

We maintain a list of common issues that occur during installation as a reference for instructors that may be useful on the Configuration Problems and Solutions wiki page.


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

Video Tutorial

Install R by downloading and running this .exe file from CRAN. Also, please install the RStudio IDE. Note that if you have separate user and admin accounts, you should run the installers as administrator (right-click on .exe file and select "Run as administrator" instead of double-clicking). Otherwise problems may occur later, for example when installing R packages.

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 dnf install R). Also, please install the RStudio IDE.