# NOT RUN {
sM <- make_scoring_matrix_aem(1:5, "simultaneous")
answersStraigth <- t(sapply(c(1:5, rep(3, 5)), score_on_last_answer_straight,
scoringMatrix = sM))
dimnames(answersStraigth) <- list(paste0("previous answer: '",
c(1:5, rep(3, 5)), "'"),
paste0("'", 1:ncol(answersStraigth), "'"))
answersStraigth
answersNext <- t(sapply(rep(1:5, 2), score_on_last_answer_next,
scoringMatrix = sM))
dimnames(answersNext) <- list(paste0("previous answer: '",
1:nrow(answersNext), "'"),
paste0("'", 1:ncol(answersNext), "'"))
answersNext
answersPrev <- t(sapply(rep(1:5, 2), score_on_last_answer_previous,
scoringMatrix = sM))
dimnames(answersPrev) <- list(paste0("previous answer: '",
1:nrow(answersPrev), "'"),
paste0("'", 1:ncol(answersNext), "'"))
answersPrev
bounceMatrix <- matrix(c(3:1, 2:5, 4:2, 2:1, 2:5, 4:1), ncol = 2)
answersBounce <- t(apply(bounceMatrix, 1, score_on_previous_answers_bounce,
scoringMatrix = sM))
dimnames(answersBounce) <- list(paste0("previous answers: '",
apply(bounceMatrix, 1, paste,
collapse = "', '"), "'"),
paste0("'", 1:ncol(answersBounce), "'"))
answersBounce
# }
Run the code above in your browser using DataLab