# NOT RUN {
# Load dplyr for access to the %>% operator and group_by()
library(dplyr)
# 1 variable
count_data(quote_source, source)
# 2 variables
count_data(quote_source, source, sex)
# Ignore missing values
count_data(quote_source, source, sex, na.rm = TRUE)
# Use group_by() to get percentages within each group
quote_source %>%
group_by(source) %>%
count_data(sex)
# }
Run the code above in your browser using DataLab