Learn R Programming

mariposa (version 0.7.3)

print.multiple_response: Print multiple response results (compact)

Description

Compact print method for objects of class "multiple_response": one line per answer option with mentions and percent of cases.

Usage

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

Value

Invisibly returns the input object x.

Arguments

x

An object of class "multiple_response" returned by multiple_response.

digits

Number of decimal places for percentages (default: 1).

...

Additional arguments (not used).

Examples

Run this code
d <- survey_data
d$gov <- as.integer(d$trust_government >= 4)
d$media <- as.integer(d$trust_media >= 4)
multiple_response(d, gov, media)

Run the code above in your browser using DataLab