Converts angles to the nearest label among labels. Angles are interpreted
as bearings by default: zero is north and angles increase clockwise.
Usage
rad_to_compass(x, labels = c("N", "NE", "E", "SE", "S", "SW", "W", "NW"))See also
Other angle utilities:
angular_difference(),
angular_distance(),
check_angle(),
compass_to_rad(),
deg_to_rad(),
hour_to_rad(),
is_angle(),
normalize_angle(),
rad_to_deg(),
rad_to_hour()
Examples
rad_to_compass(c(0, pi / 2, pi))
#> [1] "N" "E" "S"