conContext | R Documentation |
Extracts the variables associated with var
before, during, and after contact phases, based on some specified time-lag.
conContext(
ltraj,
var = "dist",
def = "all",
idcol = "burst",
nrand = 0,
nlag = 0,
lag = 0,
gap = 0,
phaid
)
ltraj |
an object of the class |
var |
name(s) (as character) of columns (possibly from |
def |
how to define the point-of-contact. The default is to define it as all fixes in a phase |
idcol |
column id associated with IDs of individuals, default is the 'burst'. |
nrand |
number of random fixes to be selected (default = 0). |
nlag |
number of lags to compute in the before and after phases of a contact. If lag = 0 then only contacts are used. |
lag |
time (in seconds) for defining the lags in before and after periods of a contact. |
gap |
time (in seconds) for excluding the lags in before and after periods of a contact. |
phaid |
(optional) id(s) of the contact phase upon which to examine (default is all). |
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. In most typical cases (with regular interval tracking data) the lag time should be set to the tracking interval and the gap should be set to 1/2 the tracking interval.
A dataframe that can be used to examine behaviour/context before, during, and after contact phases.
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.
conPhase
## Not run:
data(does)
doecons <- conProcess(does,tc=15*60,dc=50)
doephas <- conPhase(doecons,pc=60*60)
cc <- conContext(var='dist',def='first',nlag=3,lag=30*60,gap=15*60)
head(cc)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.