meanangle: mean angle

View source: R/directional.R

meanangleR Documentation

mean angle

Description

Computes the vector mean of a collection of circular measurements.

Usage

meanangle(trd, plg = 0, option = 0, degrees = FALSE, orientation = FALSE)

Arguments

trd

trend angle, in degrees, between 0 and 360 (if degrees=TRUE) or between 0 and (if degrees=FALSE).

plg

(optional) plunge angle, in degrees, between 0 and 90 (if degrees=TRUE) or between 0 and (if degrees=FALSE).

option

scalar. If option=0, then plg is ignored and the measurements are considered to be circular; if option=1, then trd is the azimuth and plg is the dip; if option=2, then trd is the strike and plg is the dip; if option=3 then trd is the longitude and plg is the latitude.

degrees

TRUE for degrees, FALSE for radians

orientation

logical. If TRUE, estimates the mean angle by eigen decomposition rather than by vector summation. This is the right thing to do for orientation data in which, for example, an angle of 45 degrees is equivalent to an angle of 225 degrees.

Value

a scalar of 2-element vector with the mean orientation, either in radians (if degrees=FALSE), or in degrees.

Examples

data(striations,package='geostats')
meanangle(striations,degrees=TRUE)

geostats documentation built on Jan. 7, 2023, 5:32 p.m.

Related to meanangle in geostats...