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()
. Load this library before proceeding.
library(tidyverse)
References
———. 2023. Tidyverse: Easily Install and Load the Tidyverse. https://CRAN.R-project.org/package=tidyverse.