Learn R Programming

ProNet (version 1.0.0)

extraction: Subnetwork extraction

Description

Extract a sub network from the original one.

Usage

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

Run this code
g<-graph.ring(100)
g1<-extraction(g,mode="sample",sample.number=5)

Run the code above in your browser using DataLab