Creates and 'compiles' a function for use with numerical methods from
Name(s) of source files(s) where functions appearing in
process rates or stoichiometric factors are implemented. Can be
Name of a 'target environment'. Currently, 'deSolve' is the only supported value.
File path to be used for the generated library (without the platform specific extension). Note that any uppercase characters will be converted to lowercase. By default, the file is created in R's temporary folder under a random name.
The expected language of the external code passed in
depends on the value of
FALSE, R code is generated and made executable
parse. Auxiliary code
sources is made available via
The created R function is stored in the object.
TRUE, the external code passed in
sources must implement a module with the fixed name 'functions'.
This module must contain all user-defined functions referenced in process
rates or stoichiometric factors.
TRUE, a shared library is created. The library
is immediately loaded with
dyn.load and it is
automatically unloaded with
dyn.unload when the
finalize method is called.
The name of the library (base name without extension) as well as the name
of the function to compute the derivatives are stored in the object.
These names can be queried with the
libFunc methods, respectively.
Unless a file path is specified via the
lib argument, the library is
created in the folder returned by
tempdir under a
unique random name.
This method internally calls
1 2 3 4 5 6 7 8
data(vars, pars, funs, pros, stoi) model <- rodeo$new(vars, pars, funs, pros, stoi, dim=c(1)) # This would trigger compilation assuming that 'functionsCode.f95' contains # a Fortran implementation of all functions; see vignette for full example ## Not run: model$compile(sources="functionsCode.f95") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.