Coerce a spicy_battery_table to a plain data frame or tibble
Source: R/table_battery_print.R
as.data.frame.spicy_battery_table.Rdas.data.frame() returns the table table_battery() displays, with
its numbers: exactly what output = "data.frame" returns. One row per
item, with the columns variable (the item's column), label (the label
displayed), then the printed columns under their names (one per level
shown, "(Missing)", the summary column of top, "n", each prefixed
with its group under by, then "p"). The "note" attribute is 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_battery_table'
as.data.frame(x, row.names = NULL, optional = FALSE, ...)
# S3 method for class 'spicy_battery_table'
as_tibble(x, ...)
# S3 method for class 'spicy_battery_svy_table'
as.data.frame(x, row.names = NULL, optional = FALSE, ...)
# S3 method for class 'spicy_battery_svy_table'
as_tibble(x, ...)Arguments
- x
A
spicy_battery_tablereturned bytable_battery(), or aspicy_battery_svy_tablereturned bytable_battery_svy().- row.names, optional
Standard
base::as.data.frame()arguments, currently ignored.- ...
Further arguments passed to
tibble::as_tibble()(for the tibble method) or ignored.