measure_diverse_node: Measures of nodes diversity

measure_diverse_nodeR Documentation

Measures of nodes diversity

Description

These functions offer ways to measure the heterogeneity of an attribute across a network, within groups of a network, or the distribution of ties across this attribute:

  • node_by_richness() measures the number of unique categories of an attribute to which each node is connected.

  • node_by_diversity() measures the heterogeneity of each node's local neighbourhood.

Usage

node_by_richness(.data, attribute)

node_by_diversity(
  .data,
  attribute,
  diversity = c("blau", "teachman", "variation", "gini")
)

Arguments

.data

A network object of class mnet, igraph, tbl_graph, network, or similar. For more information on the standard coercion possible, see manynet::as_tidygraph().

attribute

Name of a nodal attribute, mark, measure, or membership vector.

diversity

Which method to use for ⁠*_diversity()⁠. Either "blau" (Blau's index) or "teachman" (Teachman's index) for categorical attributes, or "variation" (coefficient of variation) or "gini" (Gini coefficient) for numeric attributes. Default is "blau". If an incompatible method is chosen for the attribute type, a suitable alternative will be used instead with a message.

Value

A node_measure numeric vector the length of the nodes in the network, providing the scores for each node. If the network is labelled, then the scores will be labelled with the nodes' names.

See Also

Other diversity: measure_assort_net, measure_assort_node, measure_diverse_net

Other measures: measure_assort_net, measure_assort_node, measure_breadth, measure_broker_node, measure_broker_tie, measure_brokerage, measure_central_between, measure_central_close, measure_central_degree, measure_central_eigen, measure_centralities_between, measure_centralities_close, measure_centralities_degree, measure_centralities_eigen, measure_closure, measure_closure_node, measure_cohesion, measure_core, measure_diffusion_infection, measure_diffusion_net, measure_diffusion_node, measure_diverse_net, measure_features, measure_fragmentation, measure_hierarchy, measure_periods

Other nodal: mark_core, mark_degree, mark_diff, mark_nodes, mark_select_node, measure_assort_node, measure_broker_node, measure_brokerage, measure_central_between, measure_central_close, measure_central_degree, measure_central_eigen, measure_closure_node, measure_core, measure_diffusion_node, member_brokerage, member_cliques, member_community, member_community_hier, member_community_non, member_components, member_core, member_diffusion, member_equivalence, motif_brokerage_node, motif_exposure, motif_node, motif_path

Examples

node_by_richness(ison_networkers, "Discipline")
marvel_friends <- to_unsigned(to_uniplex(fict_marvel, "relationship"), "positive")
node_by_diversity(marvel_friends, "Gender")
node_by_diversity(marvel_friends, "Attractive")

netrics documentation built on July 24, 2026, 5:07 p.m.