conMatrix: conMatrix

View source: R/conMatrix.R

conMatrixR Documentation

conMatrix

Description

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

Usage

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

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.

Value

A matrix, with the contact rates between individuals.

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

## Not run: 
data(does)
doecons <- conProcess(does,tc=15*60,dc=50)
doemat <- conMatrix(doecons)
doemat_rate <- conMatrix(doecons,output='rate')

## End(Not run)


wildlifeDI documentation built on Nov. 14, 2023, 1:09 a.m.