Skip to contents

as.data.frame() returns the table table_categorical_svy() displays, with its numbers: exactly what output = "data.frame" returns. One row per printed row – the header row of each variable, which carries its p-value, then one row per level – and one column per displayed column ("Female n", "Female %", the interval bounds "Female 95% CI LL" and "Female 95% CI UL", "Female DEff", ..., "p"), the name of a column of a domain joining the domain printed above it to the header printed under it, plus the key columns variable, label, level and .row_role ("factor_header", "level", or "missing"). The note, as printed, is kept in attr(, "note"). as_tibble() returns the same table as a tibble.

Usage

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

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

Arguments

x

A spicy_categorical_svy_table returned by table_categorical_svy().

row.names, optional, ...

Passed on for method compatibility; ignored.

Value

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