powered by
Plot the distribution of a numeric (measure) column differentiated by two categories
measure_distribution_by_two_categories( data, measure, category1, category2, bwidth = NULL )
A data frame or tibble
Unquoted column name of containing numbers (measure)
Unquoted column names of categories (can be factor, character or numeric)
width of bin for histogram (by default uses binwidth for 30 bins)
A ggplot plot object
# NOT RUN { measure_distribution_by_two_categories(ggplot2::mpg, hwy, class, fl) measure_distribution_by_two_categories(ggplot2::diamonds, carat, cut, clarity) # }
Run the code above in your browser using DataLab