Skip to content
David Kahler edited this page Aug 16, 2021 · 2 revisions

Before Workshop

  • Install R and RStudio
    • video from last workshop
  • Run test.R, as explained in the video, as your assignment
    • test.R will also install additional packages for R that may take some time to install
  • Download workshop materials from this repository, select "Download ZIP" from the green "code" button on the main, "Code" page

Day 1 – Introduction to R and Data Wrangling

Morning – Basics and Introduction to R

Installing R, RStudio, & packages Introduction to R, RStudio interface, components of R code

  • Basic coding, types of data (character, numeric, etc.) & objects (vectors, matrices, data frames, etc.), warnings & errors (coding style, case, object naming)
  • Getting help & troubleshooting in R (help files, stackoverflow, Google search)
  • Importing & viewing data in RStudio

Afternoon – Data Wrangling with R

  • Importing data into RStudio
  • Indexing, subsetting, & summarizing data
  • “dplyr” functions (select, filter, mutate, summarize)
  • “tidyr” functions (pivot_wider, pivot_longer)
  • Dates and times with “lubridate”

Day 2 – Visualizing Data, Data Analysis, and Statistics

Morning – Exploring Graphs and Plots in R

  • Plotting in base-R (scatterplots, line plots, histogram, bar plots, boxplots)
  • Introduction to “ggplot2”
  • Plotting in “ggplot2” (scatterplots, line plots, histogram, bar plots, boxplots)
  • Customizing & advanced plotting (scales, colors, labels, trendlines, faceting, annotations, saving hi-res figures)

Afternoon – Data Analysis and Statistics in R

  • Descriptive & summary data analysis
  • Statistical analysis in R (correlation, t-test, ANOVA, simple linear regression)
  • Reading and extracting statistical output
  • Data assumptions
  • Checking normality and residuals

Day 3 – Advanced Statistics, Additional Examples, and Review (Half-day)

Morning – Data Analysis and Statistics in R

  • Specific examples with hydrological data
  • Practice data wrangling, analysis, statistics, & plotting
  • Additional resources, cheat sheets, & guides to working in R (“swirl”, “tidyverse” cheat sheets, R Graphics Cookbook, Storytelling with Data)
  • Tips on teaching R
  • Google Earth Engine demonstration (if time)

NOTE: Each day will include breaks between morning and afternoon sessions, as well as shorter breaks during each session