SCM

Forum: support

Monitor Forum | Start New Thread Start New Thread
RE: exams2nops() question on different nsamp [ Reply ]
By: Achim Zeileis on 2021-03-18 10:34
[forum:48847]
If you have a "file" with a list of exercises, then "nsamp" can be a vector of the same length as the list. For example:

exm <- list(
a = c("boxplots.Rmd", "scatterplot.Rmd", "ttest.Rmd"),
b = c("deriv2.Rmd", "tstat2.Rmd", "switzerland.Rmd", "swisscapital.Rmd", "capitals.Rmd")
)
exams2nops(exm, nsamp = c(1, 3))

This randomly selects 1 of the three exercises in exm$a and 3 out of the five exercises in exm$b.

exams2nops() question on different nsamp [ Reply ]
By: Eric Lin on 2021-03-17 18:13
[forum:48846]
I have a list of exercises broken down by topic. Some topics have just 3 possible questions (group a), some have 12 possible questions (group b). I would like to sample 1 question from group a, and then I would like to sample 3 questions from group b. Is this possible? Can the parameter of nsamp take a vector of values, such that for each list element, it knows how many questions to take from that draw? Or does the number of questions from each list element have to be the same?

Thanks to:
Vienna University of Economics and Business Powered By FusionForge