Skip to contents

Extracts the node labels vector from a cograph_network object.

Usage

get_labels(x)

Arguments

x

A cograph_network object.

Value

A character vector of node labels.

See also

Examples

mat <- matrix(c(0, 1, 1, 1, 0, 1, 1, 1, 0), nrow = 3)
net <- as_cograph(mat)
get_labels(net)
#> [1] "1" "2" "3"