node_levels {dbnR}R Documentation

Defines a level for every node in the net

Description

Calculates the levels in which the nodes will be distributed when plotting the structure. This level is defined by their parent nodes: a node with no parents will always be in the level 0. Subsequently, the level of a node will be one more of the maximum level of his parents.

Usage

node_levels(net, order, lvl = 1, acc = NULL)

Arguments

net

the structure of the network.

order

a topological order of the nodes, with the orphan nodes in the first place. See node.ordering

lvl

current level being processed

acc

accumulator of the nodes already processed

Value

a matrix with the names of the nodes in the first row and their level on the second


[Package dbnR version 0.7.8 Index]