Chapter 3 Data Summarization

In this chapter, you will learn how to:

  • Numerically and visually examine the distributions of continuous and categorical variables;
  • Create a complete-case analysis dataset; and
  • Summarize a dataset using a “Table 1” of descriptive statistics.

Some of the R programming code used in this chapter uses elements of the tidyverse library (Hadley Wickham 2023), in particular the pipe operator %>% and functions such as select(). This chapter also uses the gtsummary library to create tables. Load these libraries before proceeding.



———. 2023. Tidyverse: Easily Install and Load the Tidyverse.