# Automated scoring for CRTlong responses using the categorical coding scheme:
reflectR::CRTlong(
item1 = c("five", "5 cents", "10"),
item2 = c("5", "one hundred", "100"),
item3 = c("47", "24", "forty seven"),
item4 = c("3 elves", "dunno", "six"),
item5 = c(NA, "thirty", "30"),
item6 = c("15", "fifteen", "0"),
codingscheme = "categ",
na.rm = TRUE)
# Compute the sum score for CRTlong responses based on binary-coded correctness:
reflectR::CRTlong(
item1 = c("five", "5 cents", "10"),
item2 = c("5", "one hundred", "100"),
item3 = c("47", "24", "forty seven"),
item4 = c("3 elves", "dunno", "six"),
item5 = c(NA, "thirty", "30"),
item6 = c("15", "fifteen", "0"),
codingscheme = "sum",
na.rm = FALSE)$crt_sum
Run the code above in your browser using DataLab