Day 6 — Tuesday, January 17th, 2023
Tuesday January 17th
- 1:30-1:50 Activity: Discussion of Onikye et al reproduction article
- 1:50-2:10 Lecture: Introduction to R Packages
- 2:10-2:30 Demonstration of how to create R packages that standardize data loading and cleaning processes
- 2:30-3:00 Lecture: How to use R Markdown to produce reproducible reports including tables, visualizations, and inline-quantitative statements.
- 3:00-3:10 Break
- 3:10-3:30 Activity: Experiment with different R Markdown features
- 3:30-3:50 Lecture: Advice for Debugging
- 3:50-4:10 Activity: Debugging
- 4:10-4:30 Activity: Getting Help Online
- 4:30-4:45 Demonstration of how to do the homework
- 4:45-5:30 Time to do the homework, work on the final project together, peruse recommended materials
Homework 5:
- Use R Markdown to document some exploratory data analyses
Recommended Materials:
- R Packages:
- Read Karl Broman’s Why write an R package?
- Familiarize yourself with what’s in the R Packages book: https://r-pkgs.org/ — having a rough familiarity with the different parts will be helpful. Our suggestion here is to try and approach this more in terms of “what are the ingredients in a good R Package?” rather than trying to learn how to craft all of those ingredients from the ground up immediately.
- R Markdown:
- Check out the Get Started for R Markdown, especially the ~1 minute video intro on the first page: https://rmarkdown.rstudio.com/lesson-1.html
- How R Helps Airbnb Make the Most of Its Data
- If you find yourself loving R Markdown, you may find the R Markdown Cookbook useful, but it is incredibly comprehensive and we’d suggest it’s better to reference as you need it than to try to read it cover-to-cover.
Video Recording
Resources
link to daily google doc
link to PDF slides
Lecture 1: Packages
Lecture 2: RMarkdown
Lecture 3: Debugging
link to view slides fullscreen
link to live coding example reproducing a map of literacy rates in India from Wikipedia