Description Usage Arguments See Also Examples
A generic function that converts objects to bn
objects
1 |
x |
An object |
... |
Further arguments, passed to method |
as.bn.matrix
,
as.bn.character
,
as.bn.graphNEL
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | edgelist <- matrix(c(c(1,2), c(2, 3)), byrow = TRUE, nrow = 2, ncol = 2)
colnames(edgelist) <- c("row", "col")
as.bn(edgelist, type = "edgelist", n = 3)
x <- "[][1][1,2][3]"
as.bn(x, pretty = TRUE)
if (require(graph)){
set.seed(123)
c1 <- c(1, 1, 2, 4)
names(c1) <- as.character(1:4)
g1 <- randomNodeGraph(c1)
as.parental(g1)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.