Records the rule (and optionally the weight) to use for a named value
column, so callers of recast_geoscale() need not repeat it. Downstream
packages can register their own parameter maps at load time.
Arguments
- param
Name of the value column.
- rule
One of
GEO_RULES.- weight
Optional weight column name used by
sum(down) andweighted_mean(up).NULLmeans the Geoscale's default weight.
Examples
register_geo_rule("capacity", "sum")
register_geo_rule("eff", "weighted_mean", weight = "pop")
get_geo_rule("eff")
#> $rule
#> [1] "weighted_mean"
#>
#> $weight
#> [1] "pop"
#>