Learn R Programming

klausuR (version 0.12-14)

klausur.gen.corr: A function to generate a vector with correct answers

Description

Create a vector of correct answers to be used by klausur.

Usage

klausur.gen.corr(answ = NULL, items.char = FALSE, test.forms = 1)

Arguments

answ

Either an object with item names in klausuR scheme (see klausur), e.g. your observation data, or an integer representing the maximum score of the test. If NULL, you will be asked for the maximum score.

items.char

Logical, will the answers be coded as characters or integer numbers (default)?

test.forms

An integer value specifying how many parallel test forms are available

Value

A numeric or character vector (depending on the parameter items.char).

Details

By default answers are expected to be numeric values. You can change that to character with items.char=TRUE.

The parameter answ is quite versatile. You can just feed it your observation data, if it complies with the naming scheme for items (Item###, see also klausur.gen), and klausur.gen.corr will use all of its items automatically. Or you assign the number of items directly as an integer value. If you leave answ=NULL, you will be asked for the number of items.

See Also

klausur

Examples

Run this code
# NOT RUN {
richtig <- klausur.gen.corr(answ=antworten)
# }

Run the code above in your browser using DataLab