Description Usage Arguments Value Author(s) References Examples
Check and manipulate graph-related properties of an object of class bn
.
1 2 3 4 5 6 7 8 9 10 | # check whether the graph is acyclic/completely directed.
acyclic(x, debug = FALSE)
directed(x)
# check whether there is a path between two nodes.
path(x, from, to, direct = TRUE, underlying.graph = FALSE, debug = FALSE)
# build the skeleton or a complete orientation of the graph.
skeleton(x)
pdag2dag(x, ordering)
# build a subgraph spanning a subset of nodes.
subgraph(x, nodes)
|
x |
an object of class |
from |
a character string, the label of a node. |
to |
a character string, the label of a node (different from |
direct |
a boolean value. If |
underlying.graph |
a boolean value. If |
ordering |
the labels of all the nodes in the graph; their order is the node ordering used to set the direction of undirected arcs. |
nodes |
the labels of the nodes that induce the subgraph. |
debug |
a boolean value. If |
acyclic
, path
and directed
return a boolean value.
skeleton
, pdag2dag
and subgraph
return an object of
class bn
.
Marco Scutari
Bang-Jensen J, Gutin G (2009). Digraphs: Theory, Algorithms and Applications. Springer, 2nd edition.
1 2 3 4 5 6 7 8 9 | data(learning.test)
res = gs(learning.test)
acyclic(res)
directed(res)
res = pdag2dag(res, ordering = LETTERS[1:6])
res
directed(res)
skeleton(res)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.