cpt_list | R Documentation |
A check and conversion of cpts to be used in the junction tree algorithm
cpt_list(x, g = NULL)
## S3 method for class 'list'
cpt_list(x, g = NULL)
## S3 method for class 'data.frame'
cpt_list(x, g)
x |
Either a named list with cpts in form of array-like object(s)
where names must be the child node or a |
g |
Either a directed acyclic graph (DAG) as an igraph object or a
decomposable graph as an igraph object. If |
library(igraph)
el <- matrix(c(
"A", "T",
"T", "E",
"S", "L",
"S", "B",
"L", "E",
"E", "X",
"E", "D",
"B", "D"),
nc = 2,
byrow = TRUE
)
g <- igraph::graph_from_edgelist(el)
cl <- cpt_list(asia, g)
print(cl)
dim_names(cl)
names(cl)
plot(get_graph(cl))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.