get_edges: Get Edges from Cograph Network

View source: R/class-network.R

get_edgesR Documentation

Get Edges from Cograph Network

Description

Extracts the edges data frame from a cograph_network object.

Usage

get_edges(x)

Arguments

x

A cograph_network object.

Value

A data frame with one row per edge and columns from and to (integer row numbers into the node table, not labels) and weight, plus any extra edge columns the network carries. An undirected network stores one row per unordered pair. Use as.data.frame.cograph_network or to_df for the same table with the endpoints given as node labels.

See Also

as_cograph, n_edges, get_nodes

Examples

mat <- matrix(c(0, 1, 1, 1, 0, 1, 1, 1, 0), nrow = 3)
net <- as_cograph(mat)
get_edges(net)

cograph documentation built on Sept. 30, 2026, 5:08 p.m.