mm_parse_name: Parse a model name into its features

View source: R/mm_parse_name.R

mm_parse_nameR Documentation

Parse a model name into its features

Description

Returns a data.frame with one column per model structure detail and one row per 'model_name' supplied to this function. See ?mm_name for a description of each of the data.frame columns that is returned.

Usage

mm_parse_name(model_name, expand = FALSE)

Arguments

model_name

character: the model name

expand

logical: should additional columns such as model_name and pool_K600_type be added? If expand=TRUE then the result cannot be passed directly back into mm_name, but the additional columns may be helpful for interpreting the model structure.

Details

Custom model files (for MCMC) may have additional characters after an underscore at the end of the name and before the prefix. For example, 'b_np_pcpi_eu_ko.stan' and 'b_np_pcpi_eu_ko_v2.stan' are parsed the same; the _v2 is ignored by this function.

See Also

The converse of this function is mm_name.

Examples

mm_parse_name(c(mm_name('mle'), mm_name('night'), mm_name('bayes')))
mm_parse_name(c(mm_name('mle'), mm_name('night'), mm_name('bayes')), expand=TRUE)

USGS-R/streamMetabolizer documentation built on Aug. 15, 2023, 7:50 a.m.