discursive_constraint {discursive} | R Documentation |
Compute the constraint component of discursive sophistication
Description
This function takes a data frame (data
) containing a set of open-ended responses (openends
) and a dictionary
to identify terms that signal a higher level of constraint between different considerations (usually conjunctions and exclusive words). It returns a numeric vector of dictionary counts re-scaled to range from 0 to 1. See Kraft (2023) for details.
Usage
discursive_constraint(data, openends, dictionary, remove_duplicates = FALSE)
Arguments
data |
A data frame. |
openends |
A character vector containing variable names of open-ended responses in |
dictionary |
A character vector containing dictionary terms to flag conjunctions and exclusive words. May include regular expressions. |
remove_duplicates |
Logical. If TRUE duplicates in |
Value
A numeric vector with the same length as the number of rows in data
.
Examples
discursive_constraint(data = cces,
openends = c(paste0("oe0", 1:9), "oe10"),
dictionary = dict_sample)
[Package discursive version 0.1.1 Index]