Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

getSolutionAttributes

Retrieve constraints-related attributes from solution


Description

getSolutionAttributes is a helper function to retrieve constraints-related attributes from a solution.

Usage

getSolutionAttributes(constraints, item_idx, all_values = FALSE)

Arguments

constraints

a constraints object.

item_idx

item indices from a solution.

all_values

if TRUE, return all values as-is without taking the mean when there are multiple values. If FALSE, return the mean when there are multiple values. This has an effect when there is a constraint on items per stimulus, where there are multiple values of number of items per stimulus. In this case, if TRUE, the number of items for every stimuli are returned as-is. If FALSE, the average number of items across stimuli is returned. (default = FALSE)

Value

Examples

item_idx <-
  c( 29,  33,  26,  36,  34,
    295, 289, 296, 291, 126,
    133, 124, 134, 129,  38,
     47,  39,  41,  46,  45,
    167, 166, 170, 168, 113,
    116, 119, 117, 118, 114)

getSolutionAttributes(constraints_reading, item_idx, FALSE)
getSolutionAttributes(constraints_reading, item_idx, TRUE)

TestDesign

Optimal Test Design Approach to Fixed and Adaptive Test Construction

v1.2.2
GPL (>= 2)
Authors
Seung W. Choi [aut, cre] (<https://orcid.org/0000-0003-4777-5420>), Sangdon Lim [aut] (<https://orcid.org/0000-0002-2988-014X>)
Initial release
2021-01-26

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.