A function to generate a vector with correct answers

Share:

Description

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

Usage

1
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

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.

Value

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

Author(s)

m.eik michalke meik.michalke@uni-duesseldorf.de

See Also

klausur

Examples

1
2
3
4
## Not run: 
richtig <- klausur.gen.corr(answ=antworten)

## End(Not run)