Skip to contents

Retrieves a specific parameter value from species parameter lists, searching across all parameter categories.

Usage

get_parameter_value(params, param)

Arguments

params

Species parameters list

param

Parameter name to retrieve

Value

The value associated with param in the first category of params where it is found, or NULL if param is not present in any category. The type of the returned value matches the stored parameter (typically a numeric scalar).

Examples

sp <- list(consumption = list(CA = 0.303, CB = -0.275))
get_parameter_value(sp, "CA")
#> [1] 0.303
get_parameter_value(sp, "nonexistent")
#> NULL