hdg_mean: Heading arithmetic

Description Usage Arguments Examples

View source: R/heading.R

Description

These functions provide basic summary statistics for headings that are commonly used. For more advanced statistics on circular data, use hdg_circular() and the circular package.

Usage

1
2
3
4
5
hdg_mean(hdg, weights = 1, na.rm = FALSE)

hdg_diff(hdg, hdg_ref)

hdg_sd(hdg, weights = NULL, na.rm = FALSE, bootstrap_n = 100)

Arguments

hdg

A heading in degrees, where 0 is north, 90 is east, 180 is south, and 270 is west. Values outside the range [0-360) are coerced to this range using hdg_norm().

weights

Optional weights for each value. Note that for hdg_sd() this will trigger a bootstrap estimation as there is no clear way to apply a weighted standard deviation to circular data.

na.rm

Use TRUE to remove missing values

hdg_ref

A reference heading against which to compare hdg.

bootstrap_n

For weighted standard deviation, the number of bootstrap replicates.

Examples

1
2
3
4
hdg_mean(-10:10)
hdg_mean(c(350, 10))

hdg_diff(350:370, 0)

paleolimbot/headings documentation built on April 14, 2021, 8:33 a.m.