Coerce a spicy_continuous_table to a plain data frame or tibble
Source: R/table_continuous_print.R
as.data.frame.spicy_continuous_table.Rdas.data.frame() returns the table table_continuous() displays,
with its numbers: exactly what output = "data.frame" returns. One
row per printed row, the key columns variable (the column name),
label (the label displayed for it) and, with by, group and
.row_role ("group", or "missing" for the group of missing by
values), then one column per displayed column ("M", "SD",
"95% CI LL" and "95% CI UL", the bounds printed under 95% CI,
..., "n", "p"). A cell that prints several
numbers keeps the first in its column and the others beside it under
their names in the long output: df and df.residual after the test
statistic "Test", es_ci_lower and es_ci_upper after the effect
size "ES" when its interval is printed, q1 and q3 after
"Mdn [Q1, Q3]". The note, as printed, is kept in attr(, "note").
as_tibble() returns the same table as a tibble.
Usage
# S3 method for class 'spicy_continuous_table'
as.data.frame(x, row.names = NULL, optional = FALSE, ...)
# S3 method for class 'spicy_continuous_table'
as_tibble(x, ...)Arguments
- x
A
spicy_continuous_tablereturned bytable_continuous().- 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 every statistic the table computes, whatever it displays, use
output = "long" or tidy.spicy_continuous_table(). The original
x is unaffected, and print(x) continues to render the formatted
ASCII table.
See also
tidy.spicy_continuous_table(),
glance.spicy_continuous_table() for cleaner broom-style pivots
tailored to downstream pipelines.