igraph integration | R Documentation |
Convert bn
and bn.fit
objects to igraph
and vice versa.
## S3 method for class 'igraph'
as.bn(x, ..., check.cycles = TRUE)
## S3 method for class 'bn'
as.igraph(x, ...)
## S3 method for class 'bn.fit'
as.igraph(x, ...)
x |
an object of class |
... |
extra arguments from the generic method (currently ignored). |
check.cycles |
a boolean value. If |
An object of the relevant class.
Marco Scutari
## Not run:
a = bn.fit(hc(learning.test), learning.test)
b = as.igraph(a)
plot(b, edge.arrow.mode = 2L * !igraph::which_mutual(b))
c = as.bn(b)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.