Description Usage Arguments Value Examples
compute a mean of means
1 | layered_mean(x, first_group_by, then_group_by, value_str)
|
x |
a tbl() to compute proportions |
first_group_by |
vector of variabels names strings. the first mean would be grouped by them. |
then_group_by |
vector of variabels names strings. the second mean would be grouped by them. aought to be shorter. |
value_str |
the variable on which to mean |
A tbl, grouped the same way as then_group_by with avg and n variables.
1 2 3 4 | cars <- mtcars %>%
layered_mean(value_str = "qsec",
first_group_by = c("vs","am","gear"),
then_group_by = c("vs","am"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.