graph-operations {gRbase}R Documentation

Operations on undirected and directed acyclic graphs.

Description

Make operations on undirected and directed acyclic graphs.

Usage

MCS(object, root=NULL, index=FALSE)
RIP(object,root=NULL,nLevels=NULL)
MCSMAT(amat, vn = colnames(amat), root = NULL, index = FALSE) 
RIPMAT(amat, root = NULL, nLevels = NULL) 
as.adjMAT(object)
moralize(object)
jTree(object, method="mcwh", nLevels=rep(2,length(nodes(object))),control=list())

Arguments

object An undirected graph (of class "graphNEL")
root Variables to be considered first when doing the orderings
index If TRUE, then a permutation is returned
nLevels Number of levels of the nodes in the graph
amat Adjacency matrix (symmetrical) for undirected graph
vn Nodes in the graph given by adjacency matrix
method The triangulation method, "mcwh" is a C implementation of a minimum clique weight heuristic, "R" is a corresponding R implementation (experimental)
control Currently not used

Author(s)

Søren Højsgaard, sorenh@agrsci.dk

See Also

newUG, newDAG

Examples


## Undirected graphs
##
ug <- newUG(~me+ve,~me+al,~ve+al,~al+an,~al+st,~an+st)
edges(ug)
nodes(ug)
MCS(ug)
MCSMAT(as.adjMAT(ug))
RIP(ug)
RIPMAT(as.adjMAT(ug))

## Directed graphs
##
#dag <- newdag(~me+ve,~me+al,~ve+al,~al+an,~al+st,~an+st)
#edges(dag)
#nodes(dag)
#moralize(dag)

[Package gRbase version 0.6.0 Index]