Search code examples
rtestingrstudiorandom-seedr-exams

How can I generate exams that contain randomly-generated single-choice answers using R/exams package?


I am interested in using R/exams package in order to generate tests composed of 'single-choice' questions. The three most important things that I am looking for are:

-being able to randomly select one (or more) out of a set of exercises for each participant

-being able to randomly shuffle answer alternatives

-being able to randomly select numbers, text blocks, graphics using the R programming language.

I have followed the basic R/exams tutorials and was able to generate their demo exams, but I was not yet able to find a full tutorial on how to achieve these goals. I am a beginner R programmer and I would, therefore, need a step-by-step tutorial.

If there are any suggestions of such tutorials here I would really appreciate any help.

Thank you


Solution

  • All things you are looking for can be accomplished with R/exams. There is not one step-by-step tutorial that illustrates everything, though. But there are quite a few bits and pieces that should get you started.

    Do you want to generate written single-choice exams or do you want to conduct your tests in some learning management system like Moodle or so? If you're looking for written exams, then exams2nops() is the most complete solution, see: http://www.R-exams.org/tutorials/exams2nops/

    For setting up single-choice exercises based on numeric questions, a step-by-step tutorial is: http://www.R-exams.org/tutorials/static_num_schoice/

    If you prefer an arithmetic illustration rather than one from economics, there is: http://www.R-exams.org/general/user2019/

    For selecting one out of a set of exercises for each participant, you need to define an exam with a list of exercises, e.g.,

    exm <- list(
      c("a.Rmd", "b.Rmd", "c.Rmd"),
      c("d.Rmd", "e.Rmd")
    )
    

    When using exams2xyz(exm) then you will get an exam with two exercises. The first one is a random sample of a-c and the second one a random sample of d-e.

    I suggest you try to get started with these, keeping it simple in the beginning. I.e., instead of accomplishing all tasks immediately, try to take them one by one.