Skip to contents

as.data.frame() returns the table table_multiresponse() displays, with its numbers: exactly what output = "data.frame" returns. One row per printed row – the items, the rows of none_row, then the base – with the key columns variable (the item's column, or the token of a row the table adds: "none", "no_data", "nobs" for the base), label (the label displayed) and .row_role ("summary" for an item, "none", "missing", or "fit_stat" for the base), then the printed columns under their names ("<group> n", "<group> %", ..., "Test" with df beside it under statistic = TRUE, "p"). The "note" and "global_test" attributes are kept. as_tibble() returns the same table as a tibble. The original x is unaffected, and print(x) continues to render the formatted table.

Usage

# S3 method for class 'spicy_multiresponse_table'
as.data.frame(x, row.names = NULL, optional = FALSE, ...)

# S3 method for class 'spicy_multiresponse_table'
as_tibble(x, ...)

Arguments

x

A spicy_multiresponse_table returned by table_multiresponse().

row.names, optional

Standard base::as.data.frame() arguments, currently ignored.

...

Further arguments passed to tibble::as_tibble() (for the tibble method) or ignored.

Value

A plain data.frame (or tbl_df), identical to the output = "data.frame" of the same call.