[,Response_set,ANY,missing-method {irt} | R Documentation |
Subset Response_set
objects
Description
Subset Response_set
objects
Usage
## S4 method for signature 'Response_set,ANY,missing'
x[i, j, ..., drop = TRUE]
Arguments
x |
A |
i |
indices specifying elements to extract or replace. |
j |
This will not be used in |
... |
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 Response_set-class
object.
Author(s)
Emre Gonulates
Examples
resp_set <- sim_resp(ip = generate_ip(n = 12), theta = rnorm(10),
output = "response_set")
resp_set[1]
# Create an Response_set using the first and third element:
resp_set[c(1, 3)] # Order is important
resp_set[c(3, 1)]
resp_set[-2]
resp_set[c(TRUE, FALSE, TRUE)]
resp_set[c("S2", "S1")]
# Recycle, i.e. get all elements
resp_set[TRUE]
# Recycle, i.e. get all even elements
resp_set[c(FALSE, TRUE)]
# Use logical expressions
resp_set[resp_set$examinee_id %in% c("S3", "S8")]
[Package irt version 0.2.9 Index]