Skip to contents

Records the aggregation rule to use for a named value column, so callers of recast_calendar() need not repeat it. Downstream packages can register their own parameter maps at load time. An explicit rule= argument to recast_calendar() always wins; unregistered columns default to "weighted_mean".

Usage

register_calendar_rule(param, rule)

Arguments

param

Name of the value column.

rule

One of CALENDAR_RULES.

Value

Invisibly, the registered entry.

Examples

register_calendar_rule("energy", "sum")
register_calendar_rule("price", "weighted_mean")
get_calendar_rule("energy")
#> $rule
#> [1] "sum"
#>