Learn R Programming

ezEDA (version 0.1.1)

two_category_contribution: Plot the contribution to a measure by combinations of two categories

Description

Plot the contribution to a measure by combinations of two categories

Usage

two_category_contribution(
  data,
  category1,
  category2,
  measure,
  separate = FALSE
)

Arguments

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

Value

A ggplot plot object

Examples

Run this code
# NOT RUN {
two_category_contribution(ggplot2::diamonds, cut, clarity, price)
two_category_contribution(ggplot2::diamonds,  clarity, cut, price, separate = TRUE)
# }

Run the code above in your browser using DataLab