widgets.devalued | R Documentation |
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 class 'devalued'
widgets(
x,
fac = list(` ` ~ sum + " (" + pct + "%" + ")"),
num = list(`Mean (SD)` ~ ave + " (" + std + ")", `Median (range)` ~ med + " (" + min +
", " + max + ")"),
...
)
x |
devalued |
fac |
a list of formulas to generate widgets for factors |
num |
a list of formulas to generate widgets for numerics |
... |
formulas with matching LHS replace defaults; x ~ NULL removes x |
In the context of this call, "+" is redefined to allow concatenation of text. Evaluation proceeds left to right as usual.
class 'widgets', arranged by groups:
_tablet_name |
observation identifier |
_tablet_level |
factor level (or special value 'numeric' for numerics) |
_tablet_N |
number of records |
_tablet_n |
number of records in group |
_tablet_stat |
the LHS of formulas in 'fac' and 'num' |
_tablet_widget |
the RHS of formulas in 'fac' and 'num' (evaluated) |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.