# Automated scoring for CRTtwo responses using the categorical coding scheme:
reflectR::CRTtwo(
item1 = c("first place", "second place", "1", "seconddd", "meh"),
item2 = c("7", "eightt", "seven", NA, "8"),
item3 = c("emily", "i think emily", "JUNEE", "maybe june", "the name is emily"),
item4 = c("nothing", "27 sqmt", "0", "it's empty", "i suck at math"),
codingscheme = "categ",
na.rm = TRUE)
# Compute the sum score for CRTtwo responses based on binary-coded correctness:
reflectR::CRTtwo(
item1 = c("first place", "second place", "1", "seconddd", "meh"),
item2 = c("7", "eightt", "seven", NA, "8"),
item3 = c("emily", "i think emily", "JUNEE", "maybe june", "the name is emily"),
item4 = c("nothing", "27 sqmt", "0", "it's empty", "i suck at math"),
codingscheme = "sum",
na.rm = FALSE)$crt_sum
Run the code above in your browser using DataLab