View source: R/constraint_functions.R
getSolutionAttributes | R Documentation |
getSolutionAttributes
is a helper function to retrieve constraints-related attributes from a solution.
getSolutionAttributes(constraints, item_idx, all_values = FALSE)
constraints |
a |
item_idx |
item indices from a solution. |
all_values |
if |
If all_values == FALSE
, getSolutionAttributes
returns a data.frame
containing constraints data and their associated attributes.
If all_values == TRUE
, getSolutionAttributes
returns a list
containing attributes associated to each constraint.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.