sc <- new("SingleChoice", prompt = "Question", choices = c("A", "B", "C"))
es <- new("Essay", prompt = "Question")
# Since ready-made S4 "AssessmentItem" objects are taken, in this example a
#permanent section consisting of two tasks is created.
s <- section(c(sc, es), title = "Section with nonrandomized tasks")
# Since Rmd files with randomization of internal variables are taken,
#in this example 2 variants are created with a different seed number for each.
path <- system.file("rmarkdown/templates/", package='rqti')
file1 <- file.path(path, "singlechoice-simple/skeleton/skeleton.Rmd")
file2 <- file.path(path, "singlechoice-complex/skeleton/skeleton.Rmd")
s <- section(c(file1, file2), n_variants = 2,
title = "Section with two variants of tasks")
Run the code above in your browser using DataLab