add.node {gRaven}R Documentation

Add or Delete Node in a gRaven domain

Description

Add or delete a node in a gRaven domain.

Usage

add.node(domain, name, category = c("chance", 
    "decision", "utility", "function"), kind = c("discrete", "continuous", "other"), 
    subtype, states)
delete.node(domain, name)

Arguments

domain

name of a gRaven domain

name

a character string containing the name of the node to be added or deleted

category

a character string specifying the category of the node

kind

a character string specifying the kind of the node

subtype

a character string, 'labeled', 'numbered' or 'boolean'

states

a character, numeric or logical vector listing the states for this node

Details

Emulates functions of the same name in the RHugin package by calls to gRain functions, delete.node deletes the specified node and all incident edges; nullifies all corresponding CPTs.

Value

a NULL value is invisibly returned.

Differences from RHugin

Only discrete chance nodes are currently handled in gRaven.

Author(s)

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

Examples

demo(chest.setup,package="gRaven")
chest
add.node(chest,'dummy',states=1:3)
delete.node(chest,'either')
chest

[Package gRaven version 1.1.8 Index]