conTimelag: Compute time-lags from contact phases

View source: R/conTimelag.R

conTimelagR Documentation

Compute time-lags from contact phases

Description

Computes the time-lag from the nearest contact phase.

Usage

conTimelag(traj, def = "all")

Arguments

traj

an object of the class move2 which should be output from the function conPhase.

def

how to define the point-of-contact. The default is to define it as all fixes in a phase def = 'all', alternatively contacts can be defined as a single point along the phase defined as one of: 'first','last','minDist','minTime', which corresponds to the first fix int he contact phase, the last fix in the contact phase, the fix with the minimum time difference and the fix with the closest contact distance.

Details

This function is used following the conphase function. One should choose how to define the contact point (i.e., the parameter contact) depending on the research question.

Value

A move2 object with an additional column contact_timelag with the time to the nearest (in time) contact phase. Negative values indicate times prior to the nearest contact phase and postive values indicate times after the nearest contact phase. If an individual has no contacts, the contact time-lag is NA.

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

conPhase, conProcess, conDisplacement

Examples


## Not run: 
data(does)
doecons <- conProcess(does,tc=15*60,dc=50)
doephas <- conPhase(doecons,pc=60*60)
conTL_first <- conTimelag(doephas,def='first')
conTL_all <- conTimelag(doephas,def='all')

## End(Not run)


jedalong/wildlifeDI documentation built on April 13, 2024, 2:20 p.m.