parental: Constructor function for a 'parental' object.

Description Usage Arguments Details Value See Also Examples

View source: R/class.R

Description

Objects of class parental are lists with the ith component specifyingthe parents of node i. The parents must be specified as a vector of integers – the storage.mode() of these integers MUST be integer. If the node has no parents, use integer(0).

Usage

1

Arguments

...

A series of vectors specifying the parents of each node. These vectors must be of storage.mode "integer".

Details

Note, in particular, that list(2, 1) would not be a valid parental object, because storage.mode(2) and storage.mode(1) == "double". Instead one would use list(2L, 1L), as documented in the R FAQ (see [1])

Parents of each node MUST be sorted in increasing order. Conformance with object requirements can be tested by is.valid()

[1] http://cran.r-project.org/doc/manuals/R-lang.html#Constants

Value

An object of class parental.

See Also

bn

Examples

1
2
3
parental(c(), 1, 2)
parental(3, c(), 1)
parental(c(), c(1, 3), c())

rjbgoudie/parental documentation built on May 27, 2019, 9:11 a.m.