avgAngle | R Documentation |
Calculate average angle.
avgAngle(h, w = 1, digits = getOption("digits"))
h |
a vector of angles, between 0 and 1 (0 is up and 0.25 is right). |
w |
a vector of weights (arbitrary scale). |
digits |
passed to |
Average angle as a number.
There are several ways to define average angle; this one uses the average of Cartesian coordinates.
Possible applications: current or tow direction, time of year, time of day, color hue.
# Average of NNW and NNE is north
avgAngle(c(0.875, 0.125))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.