list2chain: transforms a consistent list into a new chain object

Description Usage Arguments Details Value Examples

Description

Just analyzing the components of the list (consistent names have to be used) which are supposed to be character and tackle them to produce consistent slots of a /des/ object and /nod/ objects. The main use of this function is to generate chains read from text files with the function read8chain.

Usage

1
list2chain(li, chaind=1, nod=bf(li)[-1])

Arguments

li

The list to be transformed into a chain object. The chaind-th component must be the description of the bn; the nod components are supposed to be the nodes.

chaind

the number of the li component to be interpreted as the description of the chain.

nod

the numbers of the li to be considered as defining a node (in the right order).

Details

Be aware that the node must be given in a compatible order with the sequential construction of the chain, that is parents before children.

Value

The generated /chain/ object

Examples

1
2
 prr3k("RESET"); # (only for R checking)
 print(list2chain(chain2list(prr.chain1)));

prr documentation built on May 2, 2019, 6:35 p.m.

Related to list2chain in prr...