Coerce a spicy_continuous_lm_table to a plain data frame or tibble
Source: R/table_continuous_lm_print.R
as.data.frame.spicy_continuous_lm_table.Rdas.data.frame() returns the table table_continuous_lm() displays,
with its numbers: exactly what output = "data.frame" returns. One
row per outcome, the key columns variable (the column name of the
outcome) and label (the label displayed for it), then the printed
columns under their names ("M (<level>)", the contrast, the
interval bounds, the test statistic, "p", the fit statistic, the
effect size, "n", "Weighted n"); an effect size printed with its
interval keeps the bounds beside it as es_ci_lower and
es_ci_upper. The note, as printed, is kept in attr(, "note").
as_tibble() returns the same table as a tibble. The original x is
unaffected, and print(x) continues to render the formatted ASCII
table.
Usage
# S3 method for class 'spicy_continuous_lm_table'
as.data.frame(x, row.names = NULL, optional = FALSE, ...)
# S3 method for class 'spicy_continuous_lm_table'
as_tibble(x, ...)Arguments
- x
A
spicy_continuous_lm_tablereturned bytable_continuous_lm().- row.names, optional
Standard
base::as.data.frame()arguments. Currently ignored.- ...
Further arguments passed to
tibble::as_tibble()(for the tibble method) or ignored (for theas.data.frame()method).
Details
For one row per level of by with every estimate, use
output = "long", tidy.spicy_continuous_lm_table() or
glance.spicy_continuous_lm_table().
See also
tidy.spicy_continuous_lm_table(),
glance.spicy_continuous_lm_table() for cleaner broom-style
pivots tailored to downstream pipelines.