Description Usage Arguments Value Examples
This function make a histogram categorized by grouping variable
1 2 3 4 5 6 7 8 9 10 | 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 |
bins |
number of bins |
alpha |
transparency of density plot |
ggplot2 histogram
1 | hist_group(mtcars, "mpg", "am")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.