These functions extract certain attributes from given network data:
net_name() returns the name of the network, if it has one.
net_nodes() returns the total number of nodes (of any mode) in a network.
net_ties() returns the number of ties in a network.
net_dims() returns the dimensions of a network in a vector
as long as the number of modes in the network.
net_node_names() returns a vector of the names of the nodes in a network,
if they have been defined.
net_node_attributes() returns a vector of nodal attributes in a network.
net_tie_names() returns a vector of the names of the ties in a network,
if they have been defined.
net_tie_attributes() returns a vector of tie attributes in a network.
These functions are also often used as helpers within other functions.
net_name(.data, prefix = NULL)
net_nodes(.data)
net_ties(.data)
net_dims(.data)
net_node_names(.data)
net_node_attributes(.data)
net_tie_names(.data)
net_tie_attributes(.data)An object of a manynet-consistent class:
matrix (adjacency or incidence) from {base} R
edgelist, a data frame from {base} R or tibble from {tibble}
igraph, from the {igraph} package
network, from the {network} package
tbl_graph, from the {tidygraph} package
An optional string to be added before the name of the network.
net_*() functions always relate to the overall graph or network,
usually returning a scalar.
net_dims() 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.
net_*_attributes() returns a string vector with the names
of all node or tie attributes in the network.
Other measures:
measure_attributes_nodes,
measure_attributes_ties,
measure_central_between,
measure_central_close,
measure_central_degree,
measure_central_eigen,
measure_closure,
measure_cohesion,
measure_diffusion_infection,
measure_diffusion_net,
measure_diffusion_node,
measure_features,
measure_heterogeneity,
measure_hierarchy,
measure_holes,
measure_periods,
member_diffusion
net_name(ison_southern_women)
#> [1] "Southern Women Data"
net_nodes(ison_southern_women)
#> [1] 32
net_ties(ison_southern_women)
#> [1] 89
net_dims(ison_southern_women)
#> [1] 18 14
net_dims(to_mode1(ison_southern_women))
#> [1] 18
net_node_names(ison_algebra)
#> NULL
net_node_attributes(fict_lotr)
#> [1] "name" "Race"
net_tie_names(ison_algebra)
#> NULL
net_tie_attributes(ison_algebra)
#> [1] "type" "weight"