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(traj, traj2, tc = 0, histplot = TRUE, dmax)

Arguments

traj

an object of the class move2 which contains the time-stamped movement fixes of at least two individuals. For more information on objects of this type see help(mt_as_move2).

traj2

(optional) same as traj, but for the second group of individuals. See checkTO.

tc

time threshold for determining simultaneous fixes – see function: GetSimultaneous.

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)


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