Learn R Programming

discursive (version 0.1.1)

discursive_range: Compute the range component of discursive sophistication

Description

This function takes a data frame (data) containing a set of open-ended responses (openends) to compute the Shannon entropy in individual response lengths across items. The function returns a numeric vector of topic counts re-scaled to range from 0 to 1. See Kraft (2023) for details.

Usage

discursive_range(data, openends)

Value

A numeric vector with the same length as the number of rows in data.

Arguments

data

A data frame.

openends

A character vector containing variable names of open-ended responses in data.

Examples

Run this code
discursive_range(data = cces,
                 openends = c(paste0("oe0", 1:9), "oe10"))

Run the code above in your browser using DataLab