n_edges: Count the number of edges in the graph

Description Usage Arguments Value

View source: R/n_edges.R

Description

A common interface for matrix and igraph representations of graph structure.

Usage

1
2
3
4
5
6
7
n_edges(x, ...)

## S3 method for class 'matrix'
n_edges(x, count_loops = TRUE)

## S3 method for class 'igraph'
n_edges(g, count_loops = TRUE)

Arguments

x

An adjacency matrix

count_loops

Logical. Should loops (the diagonal) be included in the count?

g

An igraph object.

Value

Number of edges


crcox/latticize documentation built on Dec. 19, 2021, 6:19 p.m.