Description Usage Arguments See Also Examples
A generic function for converting objects to
parental
objects.
1 | as.parental(x, ...)
|
x |
An object |
... |
Further arguments passed to method |
as.parental.bn
,
as.parental.matrix
,
as.parental.character
,
as.parental.graphNEL
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | x <- bn(c(), c(1), c(1, 2))
as.parental(x)
adjmat <- matrix(sample(c(0, 1), 100, rep = TRUE), 10, 10)
diag(adjmat) <- 0
as.parental(adjmat)
edgelist <- matrix(c(1, 2), nrow = 1, ncol = 2)
colnames(edgelist) <- c("row", "col")
as.parental(edgelist, type = "edgelist", n = 2)
x <- "[3][1][2][1][1,3]"
as.parental(x, pretty = TRUE)
x <- "3,1,2,1,c(1,3)"
as.parental(x)
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.