cash-Item-method: Get slots from an 'Item-class' object.

Description Usage Arguments Value Author(s) Examples

Description

Get slots from an Item-class object.

Usage

1
2
## S4 method for signature 'Item'
x$name

Arguments

x

An Item-class object.

name

Name of the parameter.

Available values:

'item_id'

Extract 'item_id' of an Item-class object.

'id'

Extract 'item_id' of an Item-class object.

'model'

Extract the 'model' of an Item-class object.

'parameters'

Extract the 'parameters' of an Item-class object.

'se_parameters'

Extract the standard error of parameters of an Item-class object.

'content'

Extract the 'content' slot of an Item-class object.

'misc'

Extract the 'misc' slot of an Item-class object.

'max_score'

Extract the maximum possible score of an Item-class object. Minimum score is assumed to be 0.

Value

This operation will return the desired slot.

Author(s)

Emre Gonulates

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
item1 <- item(model =  "3PL", item_id = 'item23', content = 'Geometry',
              misc = list(enemies = c("item1", "item2"), key = "C"),
              parameters = list(b = 2, c = .12, a = 1.2, D = 1))
# Get individual parameters
item1$a
item1$b
item1$D
# Get item 'model'
item1$model
# Get all parameters
item1$parameters
# Get item ID
item1$item_id
# Get item content
item1$content
# Get misc values
item1$misc
# Get maximum possible score of item
item1$max_score

# Get elements of misc directly:
item1$misc$key  # "C"
item1$key  # "C"

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