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.
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')))
#> type pool_K600 err_obs_iid err_proc_acor err_proc_iid err_proc_GPP
#> 1 mle none TRUE FALSE FALSE FALSE
#> 2 night none FALSE FALSE TRUE FALSE
#> 3 bayes none TRUE FALSE TRUE FALSE
#> ode_method GPP_fun ER_fun deficit_src engine
#> 1 trapezoid linlight constant DO_mod nlm
#> 2 euler NA constant DO_obs_filter lm
#> 3 trapezoid linlight constant DO_mod stan
mm_parse_name(c(mm_name('mle'), mm_name('night'), mm_name('bayes')), expand=TRUE)
#> model_name type pool_K600 pool_K600_type pool_K600_sd
#> 1 m_np_oi_tr_plrckm.nlm mle none none fixed
#> 2 n_np_pi_eu_rckf.lm night none none fixed
#> 3 b_np_oipi_tr_plrckm.stan bayes none none fixed
#> err_obs_iid err_proc_acor err_proc_iid err_proc_GPP ode_method GPP_fun
#> 1 TRUE FALSE FALSE FALSE trapezoid linlight
#> 2 FALSE FALSE TRUE FALSE euler NA
#> 3 TRUE FALSE TRUE FALSE trapezoid linlight
#> ER_fun deficit_src engine
#> 1 constant DO_mod nlm
#> 2 constant DO_obs_filter lm
#> 3 constant DO_mod stan