get.states {gRaven} | R Documentation |
Get states, edges and children in a gRaven domain
Description
Get states, edges and children in a gRaven domain
Usage
get.states(domain, nodes=domain$nodes)
get.children(domain, nodes)
get.edges(domain, nodes=domain$nodes)
Arguments
domain |
name of gRaven domain |
nodes |
name of node(s) |
Details
Emulates functions of the same name in the RHugin
package by calls to gRain
functions
Value
For get.states
, vector of state values. For get.edges
,
a list with one element for each node in domain
. Each element is in turn a list with a single element edges
which is a character vector of names of the node's children.
An empty vector indicates that the node has no children. For get.children
,
character vector of children's node names in the case of a single node, otherwise list of children of each node, each element being a character vector of names of the node's children.
Differences from RHugin
get.states and get.children allow more than one node; get.edges allows selecting nodes.
Author(s)
Peter J. Green, P.J.Green@bristol.ac.uk
Examples
demo("chest",package="gRaven",echo=FALSE)
get.states(chest,"asia")
get.children(chest,"asia")
get.edges(chest)