Learn R Programming

fb4package (version 2.0.0)

get_parameter_value: Get Parameter Value from Species Parameters

Description

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

Usage

get_parameter_value(params, param)

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).

Arguments

params

Species parameters list

param

Parameter name to retrieve

Examples

Run this code
sp <- list(consumption = list(CA = 0.303, CB = -0.275))
get_parameter_value(sp, "CA")
get_parameter_value(sp, "nonexistent")

Run the code above in your browser using DataLab