conPairs: Identify contact pairs

View source: R/conPairs.R

conPairsR Documentation

Identify contact pairs

Description

Create a dataframe where each row represents a single contact pair.

Usage

conPairs(ltraj)

Arguments

ltraj

an object of the class ltraj which is output from the function conProcess or conPhase.

Details

This function is used to extract contact pairs following use of the conProcess or conPhase function. The returned data frame has two new columns: contact_orig_rowid - the original row id of that particular fix, and contact_pair_id - a unique identifier to show which two fixes are represented by a pair of contacts. The number of unique pairs of contacts is then the highest number in this column, and will be equal to half the number of rows in the data frame.

Value

A data frame, where each row represents one of the two fixes in each unique contact pair.

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

conProcess, conPhase

Examples

## Not run: 
data(does)
doecons <- conProcess(does,tc=15*60,dc=50)
doephas <- conPhase(doecons,pc=60*60)
prs <- conPairs(doephas)
head(prs)

## End(Not run)


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