Learn R Programming

gRaven (version 1.1.10)

get.states: 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)

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.

Arguments

domain

name of gRaven domain

nodes

name of node(s)

Differences from RHugin

get.states and get.children allow more than one node; get.edges allows selecting nodes.

Author

Peter J. Green, P.J.Green@bristol.ac.uk

Details

Emulates functions of the same name in the RHugin package by calls to gRain functions

Examples

Run this code
demo("chest",package="gRaven",echo=FALSE)
get.states(chest,"asia")
get.children(chest,"asia")
get.edges(chest)

Run the code above in your browser using DataLab