Tidying methods for a spicy_continuous_table
Source: R/table_continuous_print.R
tidy.spicy_continuous_table.RdStandard broom::tidy() and broom::glance() interfaces for an
object returned by table_continuous(). They re-shape the
underlying long-format data into the two canonical broom views so
the descriptive table can be consumed by any downstream
tidyverse-stats pipeline.
Usage
# S3 method for class 'spicy_continuous_table'
tidy(x, ...)
# S3 method for class 'spicy_continuous_table'
glance(x, ...)Arguments
- x
A
spicy_continuous_tablereturned bytable_continuous().- ...
Currently ignored. Present for compatibility with the
broom::tidy()/broom::glance()generics.
Details
tidy() returns one row per (variable x group) (or per
variable when by is not used) with broom-conventional columns:
outcome, label, group (when applicable), estimate (the
empirical mean), std.error (sd / sqrt(n)), conf.low,
conf.high (the mean confidence interval at ci_level), n,
min, max, sd. The outcome column carries the variable name
and label the human-readable label.
glance() returns one row per outcome with the omnibus group
comparison (when by is used), the requested effect size and the
balance diagnostic. Columns: outcome, label, test_type,
statistic, df, df.residual, p.value, es_type, es_value,
es_ci_lower, es_ci_upper, smd_type, smd_value, n_total.
Without by, only outcome, label, and n_total are populated;
the other columns are NA. The schema is fixed: smd_type /
smd_value are present whether or not smd = TRUE, like every
other comparison column here, and are NA when the table carries
no standardized mean difference. They sit before n_total, so
index this frame by NAME rather than by position.
glance.spicy_categorical_table() does not carry the SMD: each
family documents its own broom contract, and the categorical one
publishes the association measure alone. On a mixed balance table,
read the categorical SMD from output = "long".
See also
as.data.frame.spicy_continuous_table() for the raw
long-format access; tidy.spicy_continuous_lm_table() for the
model-based companion.