Skip to contents

Adds a named function to the heading rule registry so it can be called by derive_headings via rule = "name". The function must accept (df, cols, ...) and return a data frame with columns id, time, and heading (radians).

Usage

register_heading_rule(name, fun, overwrite = FALSE)

Arguments

name

Character; unique rule name.

fun

Function with signature function(df, cols, ...).

overwrite

Logical; replace an existing rule of the same name.

Value

The rule name, invisibly.