Converts metric names to stable snake-case names or applies a user-supplied dictionary.
Arguments
- x
A
terra::SpatRaster, character vector, or data frame.- dictionary
Optional named character vector. Names are old metric names; values are new metric names.
Details
Standardization is conservative and does not change raster values. Use this helper to make layer names predictable before joining to the metric catalog or exporting model-ready tables.
Examples
standardize_metric_names(c("Slope (deg)", "Broad BPI"))
#> [1] "slope_deg" "broad_bpi"
