medianDirection: Compute the median direction

View source: R/circGLMClassFunctions.R

medianDirectionR Documentation

Compute the median direction

Description

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

Usage

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

medianDirection(rvmc(30, 0, 2))

keesmulder/CircGLMBayes documentation built on July 21, 2022, 3:43 a.m.