These functions extract certain attributes from given network data:
net_nodes() returns the total number of nodes (of any mode) in a network.
net_ties() returns the number of ties in a network.
mode_nodes() returns the dimensions of a network in a vector
as long as the number of modes in the network.
net_layers() returns the number of layers in a multiplex network.
layer_ties() returns the number of ties in a vector
as long as the number of layers in the network.
net_waves() returns the number of waves/panels in a longitudinal network,
see is_longitudinal().
These functions are also often used as helpers within other functions.
net_nodes(.data)
net_modes(.data)
net_ties(.data)
net_layers(.data)
layer_ties(.data)
net_waves(.data)
mode_nodes(.data)
net_dims(.data)An object of a {manynet}-consistent class:
adjacency or incidence matrix from {base} R
edgelist data.frame from {base} R or tbl/tbl_df from {tibble}
stocnet stocnet, from the {manynet} package
igraph igraph, from the {igraph} package
network network, from the {network} package
tidygraph tbl_graph, from the {tidygraph} package
net_*() functions always relate to the overall graph or network,
usually returning a scalar.
mode_nodes() returns an integer of the number of nodes in a one-mode network,
or two integers representing the number of nodes in each nodeset
in the case of a two-mode network.
layer_ties() returns an integer of the number of ties in a single-layer
network, or one integer per layer (in layer_names() order)
in the case of a multiplex network.
Other measures:
measure_attributes_nodes,
measure_attributes_ties
net_nodes(ison_southern_women)
#> [1] 32
net_modes(ison_southern_women)
#> [1] 2
net_ties(ison_southern_women)
#> [1] 89
net_layers(ison_southern_women)
#> [1] 1
layer_ties(fict_marvel)
#> [1] 558 683
net_waves(ison_monks)
#> [1] 3
mode_nodes(ison_southern_women)
#> [1] 18 14
mode_nodes(to_mode1(ison_southern_women))
#> [1] 18