numberEdgesIn: Extract Node Community Membership by Edges

Description Usage Arguments Value Author(s) References Examples

View source: R/OCG_main.R

Description

This function returns the number of edges node(s) contain in each community.

Usage

1
numberEdgesIn(x, clusterids = 1:x$numbers[3], nodes)

Arguments

x

An object of class linkcomm or OCG.

clusterids

An integer vector of community IDs. Defaults to all communities.

nodes

A character vector specifying node(s) for which edge membership should be returned.

Value

A named list of named integer vectors specifying the number of edges in each community a node belongs in. Names of the integer vectors are community IDs, and names of the list are node names.

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.

Examples

1
2
3
4
5
6
## Generate graph and extract OCG communities.
g <- swiss[,3:4]
oc <- getOCG.clusters(g)

## Get edges from community 1.
numberEdgesIn(oc, nodes = 1)

alextkalinka/linkcomm documentation built on Feb. 11, 2021, 4:53 a.m.