R: Find Nested Structures in Communities

getNestedHierarchies {linkcomm} | R Documentation

## Find Nested Structures in Communities

### Description

This function determines whether a particular community is nested within any other communities.

### Usage

    getNestedHierarchies(x, clusid = 1, verbose = TRUE, plot = TRUE, ids = FALSE)

### Arguments

`x` | An object of class `linkcomm`.
`clusid` | An integer value indicating the community ID whose nesting structure will be tested. Defaults to 1.
`verbose` | Logical, whether to display a warning that a particular community is not nested in any other communities on the screen. Defaults to FALSE.
`plot` | Logical, whether to plot a graph layout of the nested community.
`ids` | Logical, whether to return only the community IDs that the community is nested in, or the node names also. Defaults to FALSE.

### Value

Either a list of character vectors, each giving the nodes that the community is nested in, or an integer vector of community IDs that the community is nested in.

### Author(s)

Alex T. Kalinka alex.t.kalinka@gmail.com

### References

Kalinka, A.T. and Tomancak, P. (2011). linkcomm: an R package for the generation, visualization, and analysis of link communities in networks of arbitrary size and type. Bioinformatics 27, 2011-2012.

### See Also

`getAllNestedComm`

### Examples

    ## Generate graph and extract link communities.
    g <- swiss[,3:4]
    lc <- getLinkCommunities(g)

    ## Determine if community 1 is nested in any other communities.
    getNestedHierarchies(lc, clusid = 1)

[Package linkcomm version 1.0-14 Index]