Description Usage Arguments Value Examples
Summarise a data frame at cascading levels of granularity
1 | heirarchicalSummary(collapse, hold, rawData, ...)
|
collapse |
A character vector of variables to group the data frame by, which will be succesively collapsed over. |
hold |
A character vector of variables to consistently group the data frame by, even while other variables are collapsed |
rawData |
The data frame to summmarise iteratively |
... |
Name-value pairs of summary functions like mean(), sd() etc. See details for warnings about naming conventions |
A list of tbl_df's, the same length as the character vector passed as the
collapse
argument
1 2 3 4 5 6 7 | derp <- heirarchicalSummary(collapse = c("subject","group"),
hold = c("practice","other_type",
"prac_score", "other_prac_acc"),
rawData=ungroup(cbind(LB4L_allSs,n=1)),
weighted.mean(final_score,n), mean(final_score),
n = sum(n))
str(derp)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.