loadResponses: Load Student Responses File

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

View source: R/loadFunctions.R

Description

Loads a file containing the student responses to the multiple choice exam test items (questions).

Usage

1
loadResponses(respFile, noItems = ifelse(exists("key"), ncol(key) - 1, 25))

Arguments

respFile

A character string (REQUIRED) specifying the location and name of the .csv or .xls(x) file containing the student responses to the multiple choice exam test items (questions).

noItems

An integer (OPTIONAL) specifying the number of multiple choice exam test items (questions) on the answers sheet to be considered and matching the number of test items (questions) in the answer key file. If a key object has been created with the loadKey() function prior to using the loadResponses() function the noItems function argument requires no specification and will be filled automatically, otherwise the default value for noItems will be 25.

Details

The loadResponses() function loads a file with the student responses to the multiple choice exam test items (questions). This file should be a FormScanner (http://www.formscanner.org/) generated comma or semicolon separated value .csv file or a Microsoft Excel .xls(x) file generated by Wageningen University & Research EDUsuport, or by means of the formScanner2Excel() function in this package.

The Microsoft Excel .xls(x) file has on each row for each student in the following particular order:

  1. the student registration number,

  2. the exam version,

  3. the responses to the multiple choice exam test items (questions).

Value

A data.frame object with in the first column the student registration numbers of students taking the exam. The second column specifies the exam version the student filled. Subsequent columns give the filled in answers to the multiple choice exam test items (questions) as filled by the students, with a maximum of 40 test items (questions).

Author(s)

Maikel Verouden

See Also

Other load functions: loadKey()

Examples

1
2
3
4
5
6
7
8
9
## Load Answer Key File
key <- loadKey(keyFile = paste0(.libPaths()[1], "/wurmc/examples/keyFile.xlsx"))

## Load the student responses from a Microsoft Excel file
responses <- loadResponses(respFile = paste0(.libPaths()[1], "/wurmc/examples/respFile.xlsx"))

## Load the student responses from a comma separated value file as created by
## FormScanner
responses <- loadResponses(respFile = paste0(.libPaths()[1], "/wurmc/examples/respFile.csv"))

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