met.degree.single: Degree on single matrix

View source: R/met.degree.single.R

met.degree.singleR Documentation

Degree on single matrix

Description

Calculate for all the vertices the node metric call degree.

Usage

met.degree.single(M, sym = TRUE, df = NULL, dfid = NULL)

Arguments

M

a square adjacency matrix.

sym

if TRUE, then it symmetrizes the matrix, and computes the sums of the presencence/abscence of an edge between the focal node and it's alters without acounting for direction (i.e. it computes the number of alters). Otherwise, it computes the sum of the presencence/abscence of the indegrees and outdegrees between the focal node and it's alters.

df

a data frame of same length of the input matrix.

dfid

an integer indicating the column of individual ids in argument df

Details

met.degree of vertice i is the number of edges of i.

Value

Integer vector of each vertices met.degree.

Author(s)

Sebastian Sosa, Ivan Puga-Gonzalez.

References

Barrat, A., Barthelemy, M., Pastor-Satorras, R., & Vespignani, A. (2004). The architecture of complex weighted networks. Proceedings of the National Academy of Sciences of the United States of America, 101(11), 3747-3752.

Sosa, S. (2018). Social Network Analysis, in: Encyclopedia of Animal Cognition and Behavior. Springer.


SebastianSosa/ant documentation built on Sept. 23, 2023, 7:06 a.m.