snfi_volume_method_registry: Assemble the active SNFI volume-method registry

snfi_volume_method_registryR Documentation

Assemble the active SNFI volume-method registry

Description

Return the final registry of SNFI volume methods after merging package defaults, optional user definitions, and session-level option overrides.

Usage

snfi_volume_method_registry(equations = get0("snfi_volume_equations", 
    inherits = TRUE, 
    ifnotfound = NULL))

Arguments

equations

Optional named list of SNFI method definitions to merge with the defaults; top-level names identify outputs such as "V", "VCC", or "VSC".

Details

Each registry entry is a named list that typically contains descriptive

fields such as label, equation, reference, and

description, together with computational fields such as

output, fun_name, unit, raw_unit,

scale_to_m3, build_args, and fallback. The

function checks only that the supplied registry is a named list;

downstream functions validate and use the individual fields.

When overriding a computational method, also override its descriptive

metadata so reported equations and references remain accurate.

Value

A named list of SNFI volume-method definitions.

Names usually correspond to requested parameters such as "V",

"VCC", and "VSC".

Each element describes one computation pathway and commonly includes:

label

Human-readable name of the volume method.

equation

Concise description of the equation or computation.

reference

Source associated with the method.

description

Short explanation of the returned quantity.

output

Name of the output column returned by the method.

fun_name

Name of the equation helper called at run time, or NULL for direct passthrough methods.

unit

Returned unit after scaling, usually "m3 tree-1".

raw_unit

Unit returned by the underlying equation before scaling.

scale_to_m3

Multiplier applied to raw outputs to express them in cubic metres.

build_args

Function that builds the argument list for the equation helper.

fallback

Function used when coefficients are missing or a method cannot compute the requested output.

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 <- snfi_volume_method_registry()
names(reg)
reg$VCC$output

custom <- list(VCC = list(output = "vcc_m3"))
reg2 <- snfi_volume_method_registry(custom)
reg2$VCC$output

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