dcPlot {wildlifeDI} | R 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 |
traj2 |
(optional) same as traj, but for the second group of individuals. See |
tc |
time threshold for determining simultaneous fixes – see function: |
histplot |
(logical) whether to output a histogram, along with a list of the natural breaks in the histogram ( |
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)