cash-set-Response-method: Set values to components of 'Response' class objects

Description Usage Arguments Value Author(s) Examples

Description

Set values to components of 'Response' class objects

Usage

1
2
## 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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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

irt documentation built on Nov. 9, 2021, 9:07 a.m.