extraction: Subnetwork extraction

Description Usage Arguments Value Examples

View source: R/extraction.R

Description

Extract a sub network from the original one.

Usage

1
2
extraction(graph, mode = c("exact", "sample"), sample.number = 10,
  nodes = NULL, vertex.name = NULL, vertex.expression = NULL, ...)

Arguments

graph

An igraph object.

mode

Extraction mode, either be exact or sample.

sample.number

Sampled nodes if mode is sample, no more than the total nodes in the network. Default value is 10.

nodes

A vector of vertex id to extract the subnetwork if mode is exact.

vertex.name

A vector of vertex name to extract the subnetwork if mode is exact.

vertex.expression

Attribute used to choose the vertex and extract the subnetwork.

...

Other vertex or edge atrributes.

Value

An igraph object.

Examples

1
2
g<-graph.ring(100)
g1<-extraction(g,mode="sample",sample.number=5)

ProNet documentation built on May 20, 2017, 12:01 a.m.

Search within the ProNet package
Search all R packages, documentation and source code