Learn R Programming

gRbase (version 1.6-4)

graph-operations1: Simple operations on undirected and directed acyclic graphs.

Description

Make operations on undirected and directed acyclic graphs (which are represented as graphNEL objects.

Usage

ancestors(set, object)
ancestralGraph(set, object)
ancestralSet(set, object)
children(set, object)
closure(set, object)
vpar(object, forceCheck=TRUE)
is.complete(object, set)
is.decomposition(set, set2, set3, object)
is.simplicial(set, object)
parents(set, object)
simplicialNodes(object)
as.adjMAT(object, result="matrix")
graphNEL2ftM(object)
maxCliqueMAT(amat)

Arguments

set, set2, set3
Vectors of sets
object
A graphNEL object
forceCheck
Logical indicating if it should be checked that the object is a DAG
result
Either "matrix" of "Matrix" (for a sparse matrix representation).
amat
Adjacency matrix

Details

Notice: as.adjMAT(g) does the same as as(g, "matrix") but considerably faster. maxCliqueMAT applied to an adjacency matrix does the same as maxClique applied to a graphNEL; but maxCliqueMAT is is considerably faster. If the matrix is sparse, it will be coerced to a non-sparse matrix.

See Also

edgeList nonEdgeList mcs rip moralize jTree

Examples

Run this code
uG <- ug(~me:ve,~me:al,~ve:al,~al:an,~al:st,~an:st)
closure("me", uG)

maxClique(uG)
amat1 <- as.adjMAT(uG)
maxCliqueMAT(amat1)

amat1 <- as.adjMAT(uG, result="Matrix")
maxCliqueMAT(amat1)

Run the code above in your browser using DataLab