Learn R Programming

irt (version 0.2.9)

$<-,Item-method: Set values to parameters or components of Item-class object

Description

Set values to parameters or components of Item-class object

Usage

# S4 method for Item
$(x, name) <- value

Value

This operation will not return anything.

Arguments

x

An Item-class object.

name

Name of the parameter or component.

value

The new value that will be assigned.

Author

Emre Gonulates

Examples

Run this code
itm <- new("3PL", item_id = 'item23', content = 'Geometry',
            misc = list(enemies = c("item1", "item2")),
            b = 2, c = .12, a = 1.2, D = 1)
itm$a <- 2
itm$D <- 1.7
itm$item_id <- "Item-111"
itm$content <- 'Algebra'
itm$se_a <- 2.2
# Set all misc fields like this
itm$misc <- list(enemies = c("item5"), strands = c("A4", "C2"))

# Add a misc field
itm$key <- "C"

# Remove a misc field
itm$enemies <- NULL

Run the code above in your browser using DataLab