Learn R Programming

cograph (version 2.0.0)

get_groups: Get Node Groups from Cograph Network

Description

Extracts the node groupings from a cograph_network object.

Usage

get_groups(x)

Value

A data frame with node groupings, or NULL if not set. The data frame has columns:

  • node: Node labels

  • One of layer, cluster, or group: Group assignment

Arguments

x

A cograph_network object.

See Also

set_groups, splot

Examples

Run this code
mat <- matrix(runif(25), 5, 5)
rownames(mat) <- colnames(mat) <- LETTERS[1:5]
net <- as_cograph(mat)
net <- set_groups(net, list(G1 = c("A", "B"), G2 = c("C", "D", "E")))
get_groups(net)

Run the code above in your browser using DataLab