sub-Itempool-ANY-missing-method: Subset 'Itempool' objects

[,Itempool,ANY,missing-methodR Documentation

Subset Itempool objects

Description

Subset Itempool objects

Usage

## S4 method for signature 'Itempool,ANY,missing'
x[i, j, ..., drop = TRUE]

Arguments

x

An Itempool-class object from which to extract element(s) or in which to replace element(s).

i

indices specifying elements to extract or replace.

j

This will not be used in Itempool-class objects.

...

Parameters to be passed to the function.

drop

(From R manual:) For matrices and arrays. If TRUE the result is coerced to the lowest possible dimension (see the examples). This only works for extracting elements, not for the replacement. See drop for further details.

Value

An Itempool-class object with elements from Item-class.

Author(s)

Emre Gonulates

Examples

ip <- itempool(a = c(1.12, 2.1, 1.28), b = c(2, 3.2, 0.21),
                item_id = c("i1", "i2", "i3"))

ip[1]
# Create an Itempool using the first and third element:
ip[c(1, 3)] # Order is important
ip[c(3, 1)]
ip[-2]
ip[c(TRUE, FALSE, TRUE)]
ip[c("i2", "i1")]
# Recycle, i.e. get all elements
ip[TRUE]

irt documentation built on Nov. 10, 2022, 5:50 p.m.