Learn R Programming

mariposa (version 0.7.3)

print.crosstab: Print method for crosstab results (compact)

Description

Compact print method for objects of class "crosstab". Shows the table variables, dimensions, and valid N, plus a reminder that no significance test is included.

For the full cross-tabulation table (cell counts and percentages), use summary().

Usage

# S3 method for crosstab
print(x, digits = 1, ...)

Value

Invisibly returns the input object x.

Arguments

x

A crosstab result object

digits

Number of decimal places for percentages (default: 1)

...

Additional arguments (currently unused)

Examples

Run this code
result <- crosstab(survey_data, gender, region)
result              # compact overview
summary(result)     # full cross-tabulation table

Run the code above in your browser using DataLab