dominant_height_method_registry: Build the active dominant-height method registry

dominant_height_method_registryR Documentation

Build the active dominant-height method registry

Description

Return the registry of dominant-height methods used by nfiMetrics() and related metric workflows.

Usage

dominant_height_method_registry(methods = get0("dominant_height_methods", 
    inherits = TRUE, 
    ifnotfound = NULL))

Arguments

methods

Optional named list of method definitions. Each element should follow the structure returned by new_dominant_height_method().

Details

The returned registry is built in three steps. First,

default_dominant_height_methods() provides the bundled

definitions. Second, methods replaces or extends those

defaults. Third, named entries in option

"basifoR.dominant_height_methods" override both. This

mirrors the volume-method registry pattern and lets users inspect

or replace the dominant-height method without editing package code.

Value

A named list of dominant-height method definitions.

Author(s)

Wilson Lara [aut, cre] (ORCID: <https://orcid.org/0000-0003-3527-1380>), Cristobal Ordonez [aut] (ORCID: <https://orcid.org/0000-0001-5354-3760>), Aitor Vázquez-Veloso [aut] (ORCID: <https://orcid.org/0000-0003-0227-506X>), Felipe Bravo [aut] (ORCID: <https://orcid.org/0000-0001-7348-6695>)

Examples

reg <- dominant_height_method_registry()
names(reg)
reg$Hd$equation

custom <- list(
    Hd = new_dominant_height_method(
        fun_name = "domheight_strict",
        equation = "Hd = sum(h_i * n_i) / sum(n_i)",
        selection_rule = "Use the largest trees until n reaches 100 trees ha-1.",
        fallback = "Return NA if the threshold is not reached."
    )
)
dominant_height_method_registry(custom)$Hd$fallback

basifoR documentation built on Aug. 26, 2026, 9:06 a.m.