Convert decimal degrees to Compass direction.

cimis_degrees_to_compass(x)

Arguments

x

A vector of directions in decimal degrees.

Value

A factor vector of compass directions.

Details

Degrees are labeled with their corresponding Primary InterCardinal compass direction, following the convention of the CIMIS daily wind data items.

Examples

cimis_degrees_to_compass(c(30, 83, 120, 140, 190, 240, 300, 330))
#> [1] NNE ENE ESE SSE SSW WSW WNW NNW
#> Levels: NNE ENE ESE SSE SSW WSW WNW NNW
cimis_degrees_to_compass(cimis_compass_to_degrees(c("NNE", "ENE",
  "ESE", "SSE", "SSW", "WSW", "WNW", "NNW")))
#> [1] NNE ENE ESE SSE SSW WSW WNW NNW
#> Levels: NNE ENE ESE SSE SSW WSW WNW NNW