Day 2: Programming, typesetting, and tidyverse
This session will be held in JRR 399.
Functions
- Writing and calling functions
- Arguments, defaults, and return values
Loops, iteration, and lapply()
forandwhileloopslapply()and friends- Guided exercise
Quarto and typesetting
- Making work replicable and research-ready
- Migrating the morning exercise into Quarto
- How R Markdown fits in
Tidyverse
tibbledplyr, frommutate()through mergespurrr- Gesturing at
stringr,lubridate, andtidyr
Code for exercises:
library(tidyverse)
counties <- read_csv(
'https://princeton-ddss.github.io/r-bootcamp/files/county_data.csv'
)
county_pop <- read_csv(
'https://princeton-ddss.github.io/r-bootcamp/files/county_population.csv'
)