Learn R Programming

QuACN (version 1.8.0)

getLargestSubgraph: A function to extract the largest subgraph from a graphNEL object

Description

In QuACN most methods depend on the analyzed graph to be connected. This function extracts the largest connected component from a graphNEL object.

Usage

getLargestSubgraph(g)

Arguments

g
A graphNEL object of which the largest connected component has to be extracted.

Value

The largest connected graphNEL object from g

References

Florian Hahne, Wolfgang Huber, Robert Gentleman, Seth Falcon "Bioconductor Case Studies", Springer, 2008

Examples

Run this code
set.seed(667)
g <- randomGraph(paste("A",1:100, sep=""), 1:4, p=0.03, weights=FALSE)
lcc <- getLargestSubgraph(g)
lcc

Run the code above in your browser using DataLab