Returns the number of nodes in a cograph_network.
Examples
mat <- matrix(c(0, 1, 1, 1, 0, 1, 1, 1, 0), nrow = 3)
net <- as_cograph(mat)
n_nodes(net) # 3
#> [1] 3
Returns the number of nodes in a cograph_network.
mat <- matrix(c(0, 1, 1, 1, 0, 1, 1, 1, 0), nrow = 3)
net <- as_cograph(mat)
n_nodes(net) # 3
#> [1] 3