Learn R Programming

examly (version 0.2.0)

parse_mc_bin: Score Multiple Choice items as 1/0

Description

Scores a Multiple Choice (A-E) response vector against a key.

Usage

parse_mc_bin(x, key)

Value

An integer vector (1=correct, 0=wrong, NA=invalid).

Arguments

x

A vector of student responses.

key

The correct answer key (e.g., "A", "B").

Examples

Run this code
parse_mc_bin(c("a", "B", "c", "F", " b "), key = "B")

Run the code above in your browser using DataLab