groupwise.data.frame | R Documentation |
Calculates widgets with and without groups. Supplies 'groupfull' and 'groupless' (prefixed) columns instead of 'widgets'.
## S3 method for class 'data.frame'
groupwise(
x,
fun = list(sum ~ sum(x, na.rm = TRUE), pct ~ signif(digits = 3, sum/n * 100), ave ~
signif(digits = 3, mean(x, na.rm = TRUE)), std ~ signif(digits = 3, sd(x, na.rm =
TRUE)), med ~ signif(digits = 3, median(x, na.rm = TRUE)), min ~ signif(digits = 3,
min(x, na.rm = TRUE)), max ~ signif(digits = 3, max(x, na.rm = TRUE))),
fac = list(` ` ~ sum + " (" + pct + "%" + ")"),
num = list(`Mean (SD)` ~ ave + " (" + std + ")", `Median (range)` ~ med + " (" + min +
", " + max + ")"),
...
)
x |
data.frame |
fun |
passed to groupfull() and groupless() |
fac |
passed to groupfull() and groupless() |
num |
passed to groupfull() and groupless() |
... |
passed to groupfull() and groupless() |
class 'groupwise', arranged by groups:
_tablet_name |
observation identifier |
_tablet_level |
factor level or LHS of formulas in 'num' |
_tablet_N |
number of records |
_tablet_n |
number of records in group |
_tablet_groupfull |
the LHS of formulas in 'fac' and 'num' |
_tablet_groupless |
the LHS of formulas in 'fac' and 'num' |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.