Moralize a directed acyclic graph which means marrying parents and
dropping directions
Usage
moralize(object, ...)
## S3 method for class 'graphNEL':
moralize(object, result="graphNEL", ...)
## S3 method for class 'igraph':
moralize(object, result="igraph", ...)
## S3 method for class 'matrix':
moralize(object, result="matrix", ...)
## S3 method for class 'Matrix':
moralize(object, result="Matrix", ...)
moralizeMAT(amat, result=NULL)
Arguments
object
A directed acyclic graph represented either as a 'graphNEL', a 'matrix' or
an 'igraph'.
result
The representation of the moralized graph.
When NULL the representation will be the same as the input object.
...
Additional arguments, currently not used
amat
Adjacency matrix
Value
A moralized graph represented either as a 'graphNEL', a 'matrix' or
an 'igraph'.
daG <- dag(~me+ve,~me+al,~ve+al,~al+an,~al+st,~an+st)
moralize(daG)
daG <- dag(~me+ve,~me+al,~ve+al,~al+an,~al+st,~an+st, result="matrix")
moralizeMAT(daG)