dcPlot: Contact distance plot

View source: R/dcPlot.R

dcPlotR Documentation

Contact distance plot

Description

This function is an exploratory tool to examine the pairwise distances between individuals within a large telemetry dataset.

Usage

dcPlot(mtraj1, mtraj2, tc = 0, idcol1 = "burst", idcol2, histplot = TRUE, dmax)

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.

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.

histplot

(logical) whether to output a histogram, along with a list of the natural breaks in the histogram (histplot = TRUE) or the dataframe of all paired distances used to construct the histogram (histplot=FALSE) to be used for further analysis.

dmax

(optional) distance value to 'cut-off' the distance histogram.

Details

The dcPlot function can be used to study the frequency distribution of pairwise distances between individual in a large telemetry dataset. It can be applied to a single group (if mtraj2 is ignored) or two-groups of individuals. The code attempts to find natural breaks (local minima) in the frequency histogram using an approach based on the peaks function attributed to B. Ripley (see https://stackoverflow.com/questions/6324354/add-a-curve-that-fits-the-peaks-from-a-plot-in-r ). This tool is meant to be used for exploratory data analysis.

Value

If histplot = TRUE a list of the natural breaks (local minima) identified from the frequency histogram and a plot of the frequency histogram. If histplot = FALSE a dataframe containing all the pairwise and simultaneous distances between all individuals in the trajectory dataset.

See Also

GetSimultaneous, conProcess, Prox, Don, IAB

Examples


## Not run: 
data(does)
dcPlot(does,tc=15*60,dmax=1000)

## End(Not run)


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