Skip to contents

Computed from the mean resultant length as sqrt(-2 * log(R)), so it grows without bound as the angles spread out rather than saturating at pi.

Usage

circ_sd(x, na_rm = TRUE)

Arguments

x

A numeric vector of angles, in radians.

na_rm

A logical value (default TRUE) determining whether missing values are removed before computing. When FALSE, any NA gives NA.

Value

A single non-negative number in radians, 0 when every angle is the same, or NA_real_ when there is nothing to summarise.

Examples

circ_sd(c(0.1, 0.2, 0.15))
#> [1] 0.04082908

# identical angles have no spread
circ_sd(rep(1.3, 5))
#> [1] 0