% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/measure_heterogeneity.R
\name{measure_diverse_node}
\alias{measure_diverse_node}
\alias{node_by_richness}
\alias{node_by_diversity}
\title{Measures of nodes diversity}
\usage{
node_by_richness(.data, attribute)

node_by_diversity(
  .data,
  attribute,
  diversity = c("blau", "teachman", "variation", "gini")
)
}
\arguments{
\item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar.
For more information on the standard coercion possible,
see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.}

\item{attribute}{Name of a nodal attribute, mark, measure, or membership vector.}

\item{diversity}{Which method to use for \verb{*_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 \code{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.
}
\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:
\itemize{
\item \code{node_by_richness()} measures the number of unique categories
of an attribute to which each node is connected.
\item \code{node_by_diversity()} measures the heterogeneity of each node's
local neighbourhood.
}
}
\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")
}
\seealso{
Other diversity:
\code{\link{measure_assort_net}},
\code{\link{measure_assort_node}},
\code{\link{measure_diverse_net}}

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

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