Learn R Programming

wildlifeDI (version 0.5.1)

conMatrix: conMatrix

Description

Create a matrix that can be used for social network analysis.

Usage

conMatrix(mtraj, idcol = "burst", output = "count")

Value

A matrix, with the contact rates between individuals.

Arguments

mtraj

an object of the class ltraj which is output from the function conProcess.

idcol

column id associated with IDs of the individuals, default is the 'burst'

output

('count' or 'rate') whether to compute the counts of contacts in the contact matrix (default) or the contact-rate.

Details

This function is used to calculate the contact rates between individuals and output them in the form of a matrix. NOTE: This function is designed to be used only when a single ltraj object is input into the conProcess function. I.e., single-species contact networks.

References

Long, JA, Webb, SL, Harju, SM, Gee, KL (2022) Analyzing Contacts and Behavior from High Frequency Tracking Data Using the wildlifeDI R Package. Geographical Analysis. 54, 648--663.

See Also

conProcess, conPairs

Examples

Run this code
if (FALSE) {
data(does)
doecons <- conProcess(does,tc=15*60,dc=50)
doemat <- conMatrix(doecons)
doemat_rate <- conMatrix(doecons,output='rate')
}

Run the code above in your browser using DataLab