- data
A data frame (typically tibble) containing the variables to summarize.
- x
The variable to use for the rows of the cross-tabulation.
- ...
Additional variable(s) to use for the columns of the cross-tabulation. If none are provided, a frequency table for x will be returned.
- add_total
Logical. If TRUE, adds total row and/or column.
- add_total_row
Logical. If TRUE, adds a total row.
- add_total_column
Logical. If TRUE, adds a total column.
- add_percent
Logical. If TRUE, adds percent or proportion values to the table.
- as_proportion
Logical. If TRUE, displays proportions instead of percentages (range 0–1).
- percent_by_column
Logical. If TRUE, percentages are calculated by column; otherwise, by row.
- name_separator
Character. Separator used when constructing variable names in the output.
- label_separator
Character. Separator used when constructing labels in the output.
- label_total
Character. Label used for the total row/category.
- label_total_column
Character. Label used for the total column/category.
- label_total_row
Character. Label used for the total row/category.
- label_na
Character. Label to use for missing (NA) values.
- include_na
Logical. If TRUE, includes missing values in the cross table.
- recode_na
Character or NULL. Value used to replace missing values in labelled vectors; "auto" will determine a code automatically.
- label_as_group_name
Logical. If TRUE, uses the variable label of the grouping variable(s) as the name in the output list.
- group_separator
Character. Separator used when constructing group names in the output list.
- group_as_list
Logical. If TRUE, the output will be a list of data frames, one for each combination of grouping variable(s).
- group_grand_total
Logical. Compute grand total based on the grouping variable.
- group_grand_total_label
Character. Apply label to the grand total if group_grand_total is set to TRUE.
- calculate_per_group
Logical. If TRUE, calculates the cross-tabulation separately for each group defined by the grouping variable(s).
- expand_categories
Logical. If TRUE, ensures that all categories of x are represented in the output, even if they have zero counts.
- position_total
Character. Position of the total row/column; either "bottom" or "top" for rows, and "right" or "left" for columns.
- sort_column_names
Logical. If TRUE, sorts the column names in the output.
- collapse_list
Logical (NOT YET IMPLEMENTED). If TRUE and group_as_list = TRUE, collapses the list of frequency tables into a single data frame with group identifiers. See also collapse_list().
- convert_factor
Logical. If TRUE, converts labelled variables to factors in the output. See also convert_factor().
- metadata
A named list with optional metadata to attach as attributes, e.g. title, subtitle, and source_note.