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)

Example output

Loading required package: Rcpp
Loading required package: igraph

Attaching package: 'igraph'

The following objects are masked from 'package:stats':

    decompose, spectrum

The following object is masked from 'package:base':

    union

Loading required package: MCL
Loading required package: linkcomm
Loading required package: RColorBrewer

Welcome to linkcomm version 1.0-11

For a step-by-step guide to using linkcomm functions:
   > vignette(topic = "linkcomm", package = "linkcomm")
To run an interactive demo:
   > demo(topic = "linkcomm", package = "linkcomm")
To cite, see:
   > citation("linkcomm")
NOTE: To use linkcomm, you require read and write permissions in the current directory (see: help("getwd"), help("setwd"))

ProNet documentation built on May 30, 2017, 2:02 a.m.