n: Count the number of nodes or edges in a network

nR Documentation

Count the number of nodes or edges in a network

Description

Count the number of nodes or edges in a network

Usage

n_nodes(x, focused = FALSE)

n_edges(x, focused = FALSE)

Arguments

x

An object of class sfnetwork, or any other network object inheriting from igraph.

focused

Should only features that are in focus be counted? Defaults to FALSE. See focus for more information on focused networks.

Value

An integer.

Examples

net = as_sfnetwork(roxel)
n_nodes(net)
n_edges(net)


luukvdmeer/sfnetworks documentation built on Nov. 21, 2024, 4:54 a.m.