hist_group | R Documentation |
This function make a histogram categorized by grouping variable
hist_group(
data,
var,
group,
show.hist = T,
show.density = T,
show.mean = T,
bins = 50,
alpha = 0.5
)
data |
a dataframe to be used |
var |
a numeric variable |
group |
a grouping variable (factor) |
show.hist |
a logical indicating whether to show histogram |
show.density |
a logical indicating whether to show density plot |
show.mean |
a logical indicating whether to show mean values |
bins |
number of bins |
alpha |
transparency of density plot |
ggplot2 histogram
hist_group(mtcars, "mpg", "am")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.