conMatrix: conMatrix

Description Usage Arguments Details Value See Also Examples

View source: R/conMatrix.R

Description

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

Usage

1
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.

See Also

conProcess, conPairs

Examples

1
2
3
4
5
6
7
## 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 June 16, 2021, 5:07 p.m.