spicy_categorical_table to a plain data frame or tibbleThese S3 methods strip the "spicy_categorical_table" /
"spicy_table" classes and the rendering-only attributes
(display_df, indent_text, align, decimal_mark,
long_data, ...) from an object returned by table_categorical()
so the underlying wide-format data can be manipulated with
downstream tools (dplyr, tidyr, etc.) under the standard
data.frame / tbl_df contract. The single attribute
"group_var" is preserved as a lightweight provenance marker; all
other spicy attributes are dropped. The original x is unaffected,
and print(x) continues to render the formatted ASCII table.
# S3 method for spicy_categorical_table
as.data.frame(x, row.names = NULL, optional = FALSE, ...)# S3 method for spicy_categorical_table
as_tibble(x, ...)
A plain data.frame (or tbl_df) with the same rows and
columns as the wide raw output of table_categorical().
A spicy_categorical_table returned by table_categorical().
Standard base::as.data.frame() arguments.
Currently ignored.
Further arguments passed to tibble::as_tibble() (for
the tibble method) or ignored (for the as.data.frame() method).
The returned data is the wide raw representation (one row per
(variable x level), group columns side by side). For the
tidy long format -- one row per (variable x level x group) --
use tidy.spicy_categorical_table() or call table_categorical()
directly with output = "long".
tidy.spicy_categorical_table(),
glance.spicy_categorical_table().