Learn R Programming

mariposa (version 0.7.3)

print.chisq_gof: Print chi-square goodness-of-fit test results (compact)

Description

Compact print method for objects of class "chisq_gof". Shows a one-line summary per variable with the chi-square statistic, degrees of freedom, p-value, and sample size.

For the full detailed output (frequency tables with observed, expected, and residual counts), use summary().

Usage

# S3 method for chisq_gof
print(x, digits = 3, ...)

Value

Invisibly returns the input object x.

Arguments

x

An object of class "chisq_gof"

digits

Number of decimal places (default: 3)

...

Additional arguments (currently unused)

Examples

Run this code
result <- chisq_gof(survey_data, gender)
result              # compact one-line overview
summary(result)     # full detailed output

Run the code above in your browser using DataLab