View source: R/circ.distances.R
circ.distances | R Documentation |
This function determines the Euclidean and Hausdorff distances between two sets of points on the unit circle.
circ.distances(x, y)
x |
Numeric vector of angles in radians determining a set of points on the unit circle. |
y |
Numeric vector of angles in radians determining a set of points on the unit circle. |
If x
and y
corresponds to two HDRs boundaries, this function returns the Euclidean and Hausdorff distances between the HDRs frontiers, but the function computes the Euclidean and Hausdorff distance for two sets of points on the circle, no matter their nature. See Saavedra-Nieves and Crujeiras (2021) for more details on these two distances.
A list with two components:
dE |
Euclidean distance. |
dH |
Hausdorff distance. |
Paula Saavedra-Nieves and Rosa M. Crujeiras.
Saavedra-Nieves, P. and Crujeiras, R. M. (2021). Nonparametric estimation of directional highest density regions. Advances in Data Analysis and Classification, 1-36.
# Distances between boundaries of two plug-in HDR estimators for orientations of saltator specie data(sandhoppers) attach(sandhoppers) #Orientations in October saltatorO<-angle[(species=="salt")&(time=="afternoon")&(sex=="M")&(month=="October")] hdr1<-circ.plugin.hdr(sample=saltatorO,tau=0.8,plot.hdrconf=FALSE)$hdr #Orientations in April saltatorA<-angle[(species=="salt")&(time=="afternoon")&(sex=="M")&(month=="April")] hdr2<-circ.plugin.hdr(sample=saltatorA,tau=0.8,plot.hdrconf=FALSE)$hdr circ.distances(hdr1,hdr2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.