mean_degrees: Mean angle in degrees

mean_degreesR Documentation

Mean angle in degrees

Description

Mean angle in degrees

Usage

mean_degrees(x, seed = 1, ...)

Arguments

x

numeric vector of angles in degrees.

seed

numeric value used as a random seed for reproducibility. This seed affects the random value added to x in the form rnorm(length(x)) * 1e-6.

...

additional arguments are ignored.

Details

Simple utility function to calculate the mean angle in degrees using vector directional logic. For each angle, a unit vector is created with radius 1, then the mean point is used to define the new angle.

A small random value is added to each input value to reduce the effect of having identical opposite angles. In that case, the output is a right angle to the input angles.

Value

numeric angle in degrees representing the mean angle of input angles in degrees from x. An attribute "radius" included with the unit radius from the mean unit vectors. This radius may be useful as a sort of weight factor.

See Also

Other venndir spatial: degrees_to_adj(), diff_degrees(), display_angles(), mean_degree_arc(), rescale_coordinates(), spread_degrees()

Examples

mean_degrees(c(355, 15))

mean_degrees(c(355, 15, 10))

mean_degrees(c(0, 180))

mean_degrees(c(0, 270))


jmw86069/venndir documentation built on Nov. 14, 2024, 10:12 a.m.