Learn R Programming

ClusTorus (version 0.2.2)

ang.dist: Angular distance

Description

ang.dist computes element-wise angular distance between two angular values in \([0,2\pi)\).

Usage

ang.dist(x, y)

Arguments

x, y

angular data(both scalar or vector) whose elements are in \([0, 2\pi)\)

Value

angular data (scalar or vector) whose elements are in \([0, 2\pi)\)

References

Jung, S., Park, K., & Kim, B. (2021). Clustering on the torus by conformal prediction. The Annals of Applied Statistics, 15(4), 1583-1603.

Examples

Run this code
# NOT RUN {
x <- c(pi/3, 0)
y <- c(pi/4, pi/2)

ang.dist(x, y)
# }

Run the code above in your browser using DataLab