conProcess: Process contacts

View source: R/conProcess.R

conProcessR Documentation

Process contacts

Description

This function performs basic contact analysis between individuals in a group of tracked animals, or between two different groups of tracked animals.

Usage

conProcess(mtraj1, mtraj2, dc = 0, tc = 0, idcol1 = "burst", idcol2)

Arguments

mtraj1

an object of the class ltraj which contains the time-stamped movement fixes of the first group of individuals. Each individual should be stored with a unique 'id'. (see ?as.ltraj)

mtraj2

(optional) same as mtraj1, but for the second group of individuals.

dc

distance tolerance limit (in appropriate units) for defining when two fixes are spatially together.

tc

time threshold for determining simultaneous fixes – see function: GetSimultaneous.

idcol1

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

idcol2

(optional) column id associated with IDs of the second group of individuals.

Details

This function can be used to identify the nature of contacts in space and time between individuals in one or two groups.

Value

This function returns the object mtraj1 with three additional fields: contact - the number of contacts associated with each given fix. contact_id - the id(s) of the individual(s) associated with those contacts. contact_d - the distance (in the same units as mtraj1) at which the contacts occur. Note that if more than one contact occurs at a given time, the contact_id and contact_d fields will be a concatenated list of the contact IDs and distances.

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

GetSimultaneous, dcPlot, conPhase, conSummary

Examples

## Not run: 
data(does)
doecons <- conProcess(does,tc=15*60,dc=50)

## End(Not run)


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