Calculates widgets for class 'devalued'. In this context, a widget is a text fragment that formats one or more aggregate statistics, all of which must have been present as LHS of some element of 'fun' in the call to devalued(). Furthermore, LHS must be unique across 'fac' and 'num' for expected behavior.
# S3 method for devalued
widgets(
x,
fac = list(` ` ~ sum + " (" + pct + "%" + ")"),
num = list(`Mean (SD)` ~ ave + " (" + std + ")", `Median (range)` ~ med + " (" + min +
", " + max + ")"),
...
)
class 'widgets', arranged by groups:
observation identifier
factor level (or special value 'numeric' for numerics)
number of records
number of records in group
the LHS of formulas in 'fac' and 'num'
the RHS of formulas in 'fac' and 'num' (evaluated)
devalued
a list of formulas to generate widgets for factors
a list of formulas to generate widgets for numerics
formulas with matching LHS replace defaults
In the context of this call, "+" is redefined to allow concatenation of text. Evaluation proceeds left to right as usual.