loadKey: Load Answer Key File

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/loadFunctions.R

Description

Load a file with the multiple choice exam answer key needed for grading.

Usage

1
loadKey(keyFile)

Arguments

keyFile

A character string (REQUIRED) specifying the location and name of the .csv or .xls(x) file containing the answer key to the exam items (questions).

Details

The loadKey() function loads a file with the exam answer key for all versions needed to grade the multiple choice answer forms handed in by students. This file should be a comma or semicolon separated value file, having the extension .csv, or a Microsoft Excel file, having the extension .xls(x), with on its rows the exam versions (e.g. "A", "B", "C", "D") and on its columns the correct responses to the multiple choice test items (questions).

The examples directory of this package contains a Microsoft Excel Template named key_template.xltx to aid the creation of the answer key file.

NOTE: The answer key file should be cropped to the number of required versions as well as to the required number of test items (questions).

The first rows of the file specifies the column names:

Rows following the first provide the answer key for each multiple choice exam required and starts with the version (e.g. "A", "B", "C", "D", etc.).

Value

A data.frame object with in the first column the version and the subsequent columns giving the correct answers to the multiple choice exam test items (questions). The dimensions of the data.frame are used in the grading process.

Author(s)

Maikel Verouden

See Also

Other load functions: loadResponses()

Examples

1
2
3
4
5
6
## Load the answer key from a Microsoft Excel file created with the Microsoft
## Excel Template key_template contained in the examples folder of this package
key <- loadKey(keyFile = paste0(.libPaths()[1], "/wurmc/examples/keyFile.xlsx"))

## Load the answer key from a comma separated value file
key <- loadKey(keyFile = paste0(.libPaths()[1], "/wurmc/examples/keyFile.csv"))

mverouden/wurmc documentation built on March 10, 2021, 11:20 a.m.