adds a new node to a bn object

Share:

Description

(bn) A new node is added to a bn, it is potentially defined by the alk argument.
The proposed name for the new node must be different of those already registrated. Also, the parent nodes must already exist in the bn. This prevents the occurrence of cycles.
The function returns the BN with the added node.
For details about the way to define the node, see the 'new8alk' function.

Usage

1
and4bn(bn, alk)

Arguments

bn

The bn object to which a node has to be added.

alk

An alk object not completed as given by the user.

Details

The complete list of standard already programmed distributions is given with help8ltype function.
From the definition of the link given by ("l*" arguments), a function which generates values for the link is constructed and stored into the slot "lien" of the BN.

Value

an object of class "bn" with an additional node

Examples

1
2
3
4
 rebastaba3k("RESET"); # (only for R checking)
 print(and4bn(rebastaba.bn1, new8alk(char2des("new"), ltype="normal", 
 lpara=list(mu="{{A}}+{{B}}", sigma=2), lpod=list(c(-1, 6)))), 
 quoi="n");

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.