powered by
Extracts the node groupings from a cograph_network object.
get_groups(x)
A data frame with node groupings, or NULL if not set. The data frame has columns:
node: Node labels
node
One of layer, cluster, or group: Group assignment
layer
cluster
group
A cograph_network object.
set_groups, splot
set_groups
splot
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