SubGraph {gRapHD} | R Documentation |
Generates a sub-graph.
SubGraph(model=NULL,edges=NULL,v=NULL,p=0)
model |
gRapHD object. |
edges |
matrix with 2 columns, each row representing one edge, and each column one of the vertices in the edge. |
v |
list of vertices in the sub-graph. |
p |
Number of vartices (used only if edges is not NULL ). |
Based on a list of vertices, generate a sub-graph.
Returns a gRapHD
object, in which the edge list contains only
edges where both vertices are in v
.
Gabriel Coelho Goncalves de Abreu (Gabriel.Abreu@agrsci.dk)
Rodrigo Labouriau (Rodrigo.Labouriau@agrsci.dk)
David Edwards (David.Edwards@agrsci.dk)
data(dsCont) m1 <- minForest(dsCont,homog=TRUE,forbEdges=NULL,stat="LR") plotG(edges=m1$edges,numIter=1000) v <- c(1,11,21,19,30,25,22,24,34,9,20,29) subEdges <- SubGraph(edges=m1$edges,v=v)$edges plotG(edges=subEdges,v=v,numIter=1500)