Description Usage Arguments Value Examples
generalized aggregation function, handy when use together with summarise_all
1 | util.agg.value(x, agg.func = max)
|
x |
input series/array |
agg.func |
the aggregation function |
the aggregated value
1 2 3 4 | util.agg.value(c(rep(1,4), rep(2, 10)), agg.func = mean)
util.agg.value(c(rep('a',4), rep('b', 10)), agg.func = util.get.mode)
library(dplyr)
mtcars %>% summarise_all(function(i) util.agg.value(i, util.get.mode))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.