Learn R Programming

LikertEZ (version 0.1.0)

summarize: Summarize a Likert item

Description

This function calculates summary statistics for a Likert item, including mean, median, mode, and performs a chi-square test.

Usage

summarize(responses, max_scale = 5, exact = TRUE, B = 10000, tidy = FALSE)

Value

A list or data.frame with summary statistics.

Arguments

responses

Numeric vector of responses.

max_scale

The maximum scale value.

exact

If TRUE, use exact Monte Carlo method.

B

Number of simulations for Monte Carlo.

tidy

If TRUE, returns a tidy data frame.

Examples

Run this code
responses <- c(1, 2, 3, 4, 5, 4, 3, 2, NA)
summarize(responses)

Run the code above in your browser using DataLab