Description Usage Arguments Value Examples
View source: R/contributions.R
Plot the contribution to a measure by combinations of two categories
1 2 3 4 5 6 7 | two_category_contribution(
data,
category1,
category2,
measure,
separate = FALSE
)
|
data |
A data frame or tibble |
category1, category2 |
Unquoted names of category columns (can be factor, character or numeric) |
measure |
Unquoted name of measure |
separate |
Boolean to indicate whether the plots for different combinations should be in different facets |
A ggplot plot object
1 2 | two_category_contribution(ggplot2::diamonds, cut, clarity, price)
two_category_contribution(ggplot2::diamonds, clarity, cut, price, separate = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.