$<-,Response-method {irt}R Documentation

Set values to components of 'Response' class objects

Description

Set values to components of 'Response' class objects

Usage

## S4 replacement method for signature 'Response'
x$name <- value

Arguments

x

Response-class object.

name

Name of the parameter or component. Following are available:

'examinee_id'

Set Examinee/Subject/Student ID.

'item_id'

Set item ids.

'testlet_id'

Set testlet IDs.

'score'

Set item scores.

'raw_response'

Set raw responses.

'order'

Set item order.

'response_time'

Set response times.

'misc'

Set 'misc' field.

...

Any value that does not match the names above, will be added to the misc field of the Response.

value

The new value that will be assigned.

Value

This operation will return an Response-class object.

Author(s)

Emre Gonulates

Examples

resp <- response(score = c(0, 1, 0))
resp
resp$examinee_id <- "Stu-123"
resp$item_id <- c("i14", "i4", "i9")
resp$raw_response <- c("D", "D", "C")
resp$order <- c(4L, 3L, 1L)
resp$misc <- list(Form = "A1", operational = c(TRUE, TRUE, FALSE))
resp

# Add any other named element:
resp$content <- c("Alg", "Alg", "Geo")
resp
resp$misc

[Package irt version 0.2.9 Index]