Description Usage Arguments Value Examples
Plot counts of combinations of two category columns
1 2 3 4 5 6 7  | two_category_tally(
  data,
  main_category,
  sub_category,
  separate = FALSE,
  position = "stack"
)
 | 
data | 
 A data frame or tibble  | 
main_category, sub_category | 
 Unquoted column names of two categories (can be factor, character or numeric)  | 
separate | 
 Boolean indicating whether the plot should be faceted or not  | 
position | 
 "stack" or "dodge"  | 
A ggplot plot object
1 2 3 4 5  | two_category_tally(ggplot2::mpg, class, drv)
two_category_tally(ggplot2::mpg, class, drv, position = "dodge")
two_category_tally(ggplot2::mpg, class, drv, separate = TRUE)
two_category_tally(ggplot2::diamonds, cut, clarity)
two_category_tally(ggplot2::diamonds, cut, clarity, separate = TRUE)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.