make_boxplot1 | R Documentation |
Create a boxplot to display the distribution of a numeric variable grouped by a categorical variable. Good for categorical variable that has ten or less categories. When the maximum observations for a category is < 200, each observation will be plotted and outliers will be hidden, vice versa for observations >= 200. Median for each category is labeled in the box.
make_boxplot1(data, num_var, cat_var, plot_title, vjust = 1.5)
data |
dataset that contains the variables |
num_var |
name of the numeric variable as a string |
cat_var |
name of the categorical variable as a string |
plot_title |
title for the plot as a string |
vjust |
position of the median labels |
none
make_boxplot1(ggplot2::diamonds, "price", "cut", "Price of Diamonds by Cuts")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.