diffCircular: Calculate the Circular Difference

View source: R/descriptives.R

diffCircularR Documentation

Calculate the Circular Difference

Description

Calculate the Circular Difference

Usage

diffCircular(x, y, max)

Arguments

x

Numeric or integer values

y

Numeric or integer values

max

the theoretical maximum (e.g., if degrees, 360; if hours, 24; etc.).

Value

A value with the circular difference. This will always be positive if defined.

Examples

diffCircular(330, 30, max = 360)
diffCircular(22, 1, max = 24)
diffCircular(c(22, 23, 21, 22), c(1, 1, 23, 14), max = 24)

JWileymisc documentation built on Oct. 5, 2023, 5:06 p.m.