Get a TMB model specification from a model library.
Arguments
- ...
File path components pointing to a directory that contains an R script that creates an object called
spec
, which is produced bymp_tmb_model_spec
.- package
If
NULL
,file.path
is used to put together the...
components but ifpackage
is the name of a package (as a character string) thensystem.file
is used to put together the...
components.- alternative_specs
If
TRUE
, return a list of alternative specification objects. For models without alternatives this will cause the return value to be a list with one element containing a spec object.
Examples
mp_tmb_library(
"starter_models"
, "si"
, package = "macpan2"
)
#> ---------------------
#> Default values:
#> ---------------------
#> matrix row col value
#> N 100.0
#> beta 0.2
#> I 1.0
#>
#> ---------------------
#> Before the simulation loop (t = 0):
#> ---------------------
#> 1: S ~ N - 1
#>
#> ---------------------
#> At every iteration of the simulation loop (t = 1 to T):
#> ---------------------
#> 1: mp_per_capita_flow(from = "S", to = "I", rate = "beta * I / N",
#> abs_rate = "infection")
#>