medianDirection: Compute the median direction

Description Usage Arguments Value Examples

View source: R/circGLMClassFunctions.R

Description

This function computes the median direction, which is defined as the middle observation of the shortest arc containing all observations.

Usage

1
medianDirection(th, fastMethod = TRUE)

Arguments

th

A vector of angles in radians.

fastMethod

Logical; If TRUE, the data is rotated so that the mean is pi and linear methods are applied. If FALSE, the arcs between each set of data points must be computed, which is much slower. For data that is very strongly spread out, the fast method might not give the correct value.

Value

An angle in radians, the median direction.

Examples

1
medianDirection(rvmc(30, 0, 2))

circglmbayes documentation built on Jan. 22, 2021, 5:09 p.m.