observables: Access parts of an evidence set message.

observablesR Documentation

Access parts of an evidence set message.

Description

The function observables access the list of observables contained in this EvidenceSet. The function seqno access the order in which the evidence sets were incorporated into the student record.

Usage

observables(x)

Arguments

x

An EvidenceSet object.

Details

The observables function access the data field of the underlying P4Message. This should be a named list of values that the BNEngine knows how to process.

Value

The function observables returns a named list of observable values.

Author(s)

Russell Almond

See Also

EvidenceSet, EvidenceSet StudentRecord, handleEvidence P4Message

Examples


e1 <- EvidenceSet(uid="S1",app="Test",context="PPcompEM",
                  obs=list("CompensatoryObs"="Right"))

e2 <- EvidenceSet(uid="S1",app="Test",context="PPdurAttEM",
                  obs=list("Attempts"=2,"Duration"=38.3))

stopifnot(all.equal(observables(e1),
                    list("CompensatoryObs"="Right")))

stopifnot(all.equal(observables(e2)$Attempts,2))

stopifnot(is.na(seqno(e1)))
seqno(e1) <- 1
stopifnot(seqno(e1)==1L)





ralmond/EABN documentation built on Aug. 30, 2023, 12:52 p.m.