conditionList {unitizer} | R Documentation |
Contains A List of Conditions
Description
Condition lists are S4 classes that contain condition
objects
emitted by unitizer
tests. Condition lists will typically be
accessible via the .NEW
and .REF
unitizer
test objects.
You can access individual conditions using [[
(see examples), and for
the most part you can treat them as you would an S3 list containing
conditions.
Details
There are show
and all.equal
methods implemented for them, the
latter of which is used to compare conditions across tests. If you wish to
implement a custom comparison function via unitizer_sect
, your
function will need to compare conditionList
objects.
Slots
.items
list of conditions
Note
Implemented as an S4 class to avoid setOldClass
and related
compatibility issues; the conditionList
class contains
unitizerList
.
See Also
unitizer_sect
, unitizerList
,
all.equal.conditionList
Examples
## Create a test item as you would find normally at the `unitizer` prompt
## for illustrative purposes:
.NEW <- mock_item()
## Access the first condition from the new test evaluation
.NEW$conditions[[1L]]
## loop through all conditions
for(i in seq_along(.NEW$conditions)) .NEW$conditions[[i]]