Week 7

Customizing tables, adding and reordering factors, and more ggplot
Published

February 19, 2026

Modified

March 17, 2026

Topics

Finish Part 6:

  • Practice thinking through and planning ahead data wrangling steps to prepare a dataset ready for analysis
  • Practice working with real data
  • Practice cleaning variables
  • Practice merging datasets with bind_rows and joining
  • Practice making data long by pivoting
  • Practice making complex visualizations with ggplot

Part 7:

  • Learn new options for customizing tables
  • Practice modifying factor levels
  • Practice ggplot and Learn more geometries

Announcements

  • The Midterm is posted on OneDrive. It is due Sunday 2/22/26.
    • Please start early on this since finding a suitable dataset might take some time.
    • I encourage you to meet with me to discuss your research question and data, to make sure you are on the right track.
  • Functions of the Week
    • Signup sheet for your functions of the week presentations. The file is in OneDrive in the functions_of_the_week folder.
    • Presentations will be during weeks 5-10. Please no more than 4 presentations per week.
    • If there is a function you are interested in presenting that is not on the signup sheet, please check with me. If it hasn’t been covered before and isn’t covered in the class, then most likely I will approve it.
  • Cascadia R Conf in June 26-27 this year. It will be held at OHSU in RLSB. This is a great conference to meet other R enthusiasts in the area and learn more about what they are working on.

Class materials

  • Class materials in OneDrive folder BSTA_526_W26_class_materials_public.
  • For today’s class, make sure to download to your computer the folder called part7.
  • Open RStudio by double-clicking on the project file called BSTA_526_W26_class_materials_public.Rproj in the main OneDrive folder.


Part OneDrive folder Slides Webpage
6
7

Readings

Optional

Note: These were original listed as the Week 6 Optional readings. They actually more closely relate to the Week 7 material and thus I moved them to Week 7.

  • tabyl vignette: learn about the various adorn options
  • gt package: learn more about creating customized tables with various gt options
  • gtsummary package: great for creating summary tables (Table 1); a companion package to gt

Post-class survey

  • Please fill out the post-class survey to provide feedback. Thank you!
  • Previous muddiest points and clearest points with responses are collected here.

Homework

  • See OneDrive folder for homework assignment.
  • HW 7 due on 02/19.

Recording

  • In-class recording links are on Sakai. Navigate to Course Materials -> Schedule with links to in-class recordings.