Learn R Programming

fsia (version 1.0)

resp2binary: Convert Responses to Binary Data

Description

Converts data to binary (correct/incorrect) responses, according to the key.

Usage

resp2binary(obj, columns)

Arguments

obj
An object of class fsdata containing the data imported by function read.formscanner.
columns
A vector containing which columns to use. Columns can be specified by name or number.

Value

The data frame data contained in obj with columns replaced by binary data.

See Also

read.formscanner

Examples

Run this code
data(exam1)
exam1bin <- resp2binary(obj = exam1, col = 2:31)
head(exam1bin)
exam1bin <- resp2binary(obj = exam1, col = c("I1", "I2"))
head(exam1bin)

Run the code above in your browser using DataLab