Skip to contents

Extracts the nodes data frame from a cograph_network object.

Usage

get_nodes(x)

Arguments

x

A cograph_network object.

Value

A node metadata data frame, usually with id and label columns, plus layout or other metadata columns when present.

Examples

mat <- matrix(c(0, 1, 1, 1, 0, 1, 1, 1, 0), nrow = 3)
net <- as_cograph(mat)
get_nodes(net)
#>   id label name  x  y
#> 1  1     1    1 NA NA
#> 2  2     2    2 NA NA
#> 3  3     3    3 NA NA