ffm_complete_params: Completes a table by adding default parameters for each...

View source: R/params_functions.R

ffm_complete_paramsR Documentation

Completes a table by adding default parameters for each species as required.

Description

For each species in the input parameter table, this function checks which parameters have been provided and retrieves defaults for missing parameters from the provided lookup table of defaults.

Usage

ffm_complete_params(tbl, default.species.params)

Arguments

tbl

The input simulation parameter table (data frame).

default.species.params

A data frame with species as rows and parameters as columns giving default values to use for species parameters not specified in the input params table. Any subset of species parameters can be specified. Column names must match the parameter names in the ParamInfo table (case is ignored). An NA value indicates no default. This allows default values for a particular parameter to be provided for only a subset of species.

Details

If a species has missing parameters but either it, or one or more of the parameters, are not present in the lookup table of defaults an error is thrown. An exception is made for the parameter 'propSilicaFreeAsh' which is allowed to be missing.

Value

The completed parameter table

See Also

ffm_check_params


pzylstra/frame_r documentation built on Nov. 12, 2023, 1:55 a.m.