met.ri {ANTs} R Documentation

## R-Index

### Description

Calculates the node metric R-Index for all vertices.

### Usage

met.ri(M, df = NULL, dfid = NULL)


### Arguments

 M a square adjacency matrix, or a list of square adjacency matrices, or an output of ANT functions stat.ds.grp, stat.df.focal, stat.net.lk. df a data frame of same length as the input matrix or a list of data frames if argument M is a list of matrices or an output of ANT functions stat.ds.grp, stat.df.focal, stat.net.lk. dfid an integer or a string indicating the column with individual ids in argument df.

### Details

R-Index of vertex i is the outstrength of node i divided by the met.strength of node i. This node metric aims to measure if an individual is more likely to receive or emit edges.

### Value

• An integer vector of nodes R-index if argument df is NULL.

• A list of integer vectors of nodes R-index if argument M is a list of matrices and if argument df is NULL.

• A list of arguments df with a new column for nodes R-index titled 'R-index', if argument df is not NULL.

• A list of arguments df with a new column for nodes R-index if 1) argument df is not NULL, 2) argument M is an output from ANT functions stat.ds.grp, stat.df.focal, stat.net.lk for multiple matrices permutations, and 3) argument df is a list of data frames of same length as argument M. The name of the column of each element of the list is adapted according to argument value binary.

### Author(s)

Sebastian Sosa, Ivan Puga-Gonzalez.

### References

Liao, Z., Sosa, S., Wu, C., & Zhang, P. (2017). The influence of age on wild rhesus macaques' affiliative social interactions. American journal of primatology.

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

### Examples

met.ri(sim.m)