View source: R/dbn_visualization.R
node_levels | R Documentation |
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.
node_levels(net, order, lvl = 1, acc = NULL)
net |
the structure of the network. |
order |
a topological order of the nodes, with the orphan nodes
in the first place. See |
lvl |
current level being processed |
acc |
accumulator of the nodes already processed |
a matrix with the names of the nodes in the first row and their level on the second
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.