checkTO: Check for temporal overlap

View source: R/checkTO.R

checkTOR Documentation

Check for temporal overlap

Description

The function checkTO is a simple function for identifying if, and for how long, two telemetry datasets overlap (temporally) with each other. The function returns a list with three pieces of information: a logical variable indicating if the two trajectories overlap temporally, and timings of the beginning and end of the overlap period.

Usage

checkTO(traj1, traj2)

Arguments

traj1

an object of the class ltraj which contains the time-stamped movement fixes of the first object. Note this object must be a type II ltraj object. For more information on objects of this type see help(ltraj).

traj2

same as traj1.

Details

The function checkTO can be used to identify if, when, and for how long two telemetry datasets overlap temporally.

Value

A list of with three pieces of information, whether the two trajectories overlap ($TO) a logical vector, the beginning ($TOstart), and end ($TOend) of the overlap period, stored as POSIX objects.

See Also

GetSimultaneous, GetTO

Examples

data(deer)
deer37 <- deer[1]
deer38 <- deer[2]
spts <- checkTO(deer37, deer38)


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