Description Usage Arguments Value Examples
View source: R/stan_ode_function.R
Create Stan ODE function
1 2 3 4 5 6 7 | stan_ode_function(
filepath,
func_name,
pars = NULL,
const_list = NULL,
extra_funs = NULL
)
|
filepath |
A string that indicates a path to a file with extension .stmx or .xmile. Vensim files (.mdl) are not xmile files. They must be exported from Vensim with extension .xmile |
func_name |
A string for naming the ODE function |
pars |
A character vector that indicates which constants will be considered as parameters in the ODE function |
const_list |
A list in which each element's name is the name of the constant to override and the element's value correspond to the new value. |
extra_funs |
A vector of strings. Each string corresponds to a user-defined function. |
A string with the code containing a function with the model's equations in the format required by cmdstan 2.24+.
1 2 | path <- system.file("models", "SIR.stmx", package = "readsdr")
stan_ode_function(path, "my_model")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.