Defines functions amat2arcs arcs2amat

# convert a set of arcs to a (real) adjacency matrix.
arcs2amat = function(arcs, nodes) {

        arcs = as.character(arcs),
        nodes = as.character(nodes))


# convert an adjacency matrix back to a set of arcs.
amat2arcs = function(a, nodes) {

        amat = a,
        nodes = nodes)


Try the bnlearn package in your browser

Any scripts or data that you put into this service are public.

bnlearn documentation built on Sept. 7, 2021, 1:07 a.m.