SubGraph: Generates a subgraph

Description Usage Arguments Details Value Author(s) Examples

View source: R/functions.r

Description

Generates a sub-graph.

Usage

1
SubGraph(model=NULL,edges=NULL,v=NULL,p=0)

Arguments

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).

Details

Based on a list of vertices, generate a sub-graph.

Value

Returns a gRapHD object, in which the edge list contains only edges where both vertices are in v.

Author(s)

Gabriel Coelho Goncalves de Abreu (abreu_ga@yahoo.com.br)

Examples

1
2
3
4
5
6
7
data(dsCont)
m1 <- minForest(dsCont,homog=TRUE,forbEdges=NULL,stat="LR")
plot(m1,numIter=1000)

v <- c(1,11,21,19,30,25,22,24,34,9,20,29)
subM1 <- SubGraph(model=m1,v=v)
plot(subM1,numIter=1500)

gRapHD documentation built on Feb. 9, 2018, 6:05 a.m.

Related to SubGraph in gRapHD...