Calculates the mean value of a variable among alters who both send to and receive from each ego.

egomean_sr(adj, var)

Arguments

adj

A square adjacency matrix.

var

A numeric vector of attribute values for each node.

Value

A numeric vector of egocentric means for each ego (NaN if no intersection).