First Steps

Purpose of R/exams

R/exams is used to automatically generate and evaluate exam questions. See here for more info about R and R/exams.

At BOKU, it is used by the Institute for Statistics in several courses. Homework, review exercises and exams are all created with R/exams, both on paper as well as online quizzes, for example on BOKUlearn. Currently this is mostly used for courses in statistics, however the application is not limited to statistical applications at all.

This documentation should serve as a basic first introduction and a how-to for anyone interested in using R/exams for teaching their courses at BOKU.

Using R/exams

What program and what files are used?

The generation of the exams is happening within RStudio. See how to install R and RStudio.

Generally, a structure of folders and files are used, which all have a specific purpose. For a basic implementation, two types of files are necessary, namely .R-files and .Rmd-files. See a description for each and a template here: .Rmd-file and the .R-file as a conversions script.

.R-files are scripts written in R, where R code is written and evaluated.

.Rmd-files are files written in markdown, a markup language, where it is possible to process normal text, (R) code and other components and generate reports in various formats (pdf, Word etc.) as well as web applications such as HTML pages.

What is in the files?

The .Rmd-file contains the questions, answers and other necessary parameters for creating the exam. These components are created by the person wanting to create an exam, however they need to be written according to a certain structure, see Structure of an .Rmd-file and Creation of the .Rmd-file.

The .R file contains the code, which converts the questions that are written in the .Rmd-file into the actual exam in a certain output format. Several formats are possible, such as .pdf, HTML and .xml for Moodle quizzes. See here for more info. This code is based on the functionality of the R/exams package.

An additonal separate .R-file can contain other R objects, which are then (dynamically) used in exam questions, however this is not a necessary component. For more information about add-ons see this page and for advanced examples using this, see here.

What does the exam look like?

An exam can contain many different types of questions. R/exams is suitable for creating not only calculation questions, but also multiple or single choice questions, open answer questions (single word or essay questions) or including upload points in Moodle exams. It is possible to use any combination in one exam, eg. two numeric and three multiple choice questions.

For basic examples see these pages:

R/exams does not only have statistical applications, the look of the exam is entirely customizable. It is also possible to include data, graphs, pictures and other things, see the page about add-ons.

How can R/exams prohibit cheating?

With R/exams it is possible to create a (very) large number of different versions of the same exam, see this page for the conversion process. Slight automatic alterations lead to an individualized exam for each student. For example, this can be used to be able to use the same materials for different exercise groups or to prohibit cheating by having slightly different questions for each student.

In what ways can an exam be individualized?

There are multiple ways of individualizing an exam, for example dynamically changing the (con)text of the questions. This is also particularly useful when creating exams used for multiple study programs at BOKU in order to have tailored exams for each of them.

Numbers or data can also be randomly sampled, meaning each student will get individual results.

It is also possible to create a pool of True/False statements which are then randomly drawn when creating an exam. In addition, the answer options for multiple choice questions can be individualized in a similar way.

For implementations and tutorials see the following pages:

Examples: Basic and Advanced

Websites: R/exams: Dynamic Exercises

How can the exams be corrected?

For each output format, there is a different method for correcting the exams.

For Moodle quizzes, the correct solutions are imported automatically as well, meaning they are graded automatically. The allocation of points can also be adjusted using the expoints tag in the .Rmd-file.

For pdf exams, an answer sheet is provided, but it is also possible to automatically grade scans of the students’ multiple choice exams using R/exams. An instruction on how to generate and grade these paper exams can be found here

How do I get started?

See other pages for: