Skip to contents

Converts azimuth angles into Cardinal directions

Usage

azimuth_to_cardinal(x, n_directions = 8)

Arguments

x

angles in degree.

n_directions

either 8 for 8-point (N, NE, E, …) or 6 for 16-point (N, NNE, NE, …) cardinal version.

Value

character vector

Examples

azimuth_to_cardinal(c(0, 23, 45, 100, 190, 270, 350)) # 8-point compass
#> [1] "N"  "NE" "NE" "E"  "S"  "W"  "N" 
azimuth_to_cardinal(c(0, 23, 45, 100, 190, 270, 350), 16) # 16-point compass
#> [1] "N"   "NNE" "NE"  "E"   "S"   "W"   "N"