Description Usage Arguments Examples
summarize segments in tables
1 2 3 4 5 6 7 8 | util.segment.summarize(
data,
segment,
summ.func = NULL,
highlight.tol = 0.2,
kable = TRUE,
...
)
|
data |
output from 'util.profile.fnames' |
segment |
char, segment variable name |
summ.func |
segment summarize function 'e.g function(i) summarise(i, n = n())' |
highlight.tol |
tolerance for highlighting |
kable |
boolean, TRUE -> return kable table |
... |
extra params from 'util.vis.kable' |
1 2 3 4 5 6 7 8 | util.segment.summarize(mtcars, segment = 'gear')
library(dplyr)
summ.func <- function(i){
summarise(i, n = n(),
`am-0` = mean(am == 0),
`am-1` = mean(am == 1))
}
util.segment.summarize(mtcars, 'gear', summ.func)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.