Learn R Programming

cograph (version 1.5.2)

n_edges: Get Number of Edges

Description

Returns the number of edges in a cograph_network.

Usage

n_edges(x)

Value

Integer: number of edges.

Arguments

x

A cograph_network object.

See Also

as_cograph, n_nodes

Examples

Run this code
mat <- matrix(c(0, 1, 1, 1, 0, 1, 1, 1, 0), nrow = 3)
net <- as_cograph(mat)
n_edges(net)  # 3

Run the code above in your browser using DataLab