## define an exam with five exercises
myexam <- list(
"boxplots.Rmd",
c("tstat.Rmd", "ttest.Rmd", "confint.Rmd"),
c("regression.Rmd", "anova.Rmd"),
"scatterplot.Rmd",
"relfreq.Rmd"
)
## run exams with default drivers (i.e., no transformations or writer)
x <- xexams(myexam, n = 2)
## x is a list of 2 exams,
## each of which contains 5 exercises,
## each of which contains LaTeX code for question(list) and solution(list),
## plus metainformation and potential supplements
## The first exercise in each exam is "boxplots.Rmd", a multiple choice question.
## Its general question text is
x[[1]][[1]]$question
## with a list of multiple choice questions given as
x[[1]][[1]]$questionlist
## the corresponding graphic is in supplementary file
x[[1]][[1]]$supplements
## The metainformation is a list read from the ex* items
x[[1]][[1]]$metainfo
## The metainformation can also be extracted/printed
exams_metainfo(x)
## customize printing: only exam 1 in blocks of up to 3 exercises
print(exams_metainfo(x), which = 1, block = 3)
## The metainformation can also be prepared as a data.frame
exams_metainfo(x, class = "data.frame")
Run the code above in your browser using DataLab