Learn R Programming

irt (version 0.2.9)

$,Response-method: Get slots of the an Response-class object.

Description

Get slots of the an Response-class object.

Usage

# S4 method for Response
$(x, name)

Value

See the 'name' argument above for possible return values.

Arguments

x

An Response-class object.

name

Name of the parameter. Available values:

'examinee_id'

Extract Examinee/Subject/Student ID.

'item_id'

Extract item ids

'testlet_id'

Extract testlet IDs, if there is any.

'score'

Extract item scores.

'raw_response'

Extract raw responses.

'order'

Extract item order.

'response_time'

Extract response times.

'misc'

Extract 'misc' field.

Author

Emre Gonulates

Examples

Run this code
resp <- response(score = c(0, 1, 0), examinee_id = "Ex-412",
                 item_id = c("I1", "I2", "I3"),
                 raw_response = c("B", "D", "A"),
                 order = 1:3,
                 response_time = c(66, 23, 89),
                 misc = list(form = "A1",
                             operational = c(TRUE, TRUE, FALSE))
                 )
resp$score
resp$item_id
resp$examinee_id
resp$raw_response
resp$order
resp$response_time
resp$misc
resp$misc$form
resp$form

Run the code above in your browser using DataLab