https://github.com/cran/simecol
Tip revision: 1e19d2edb4e3509bc0e783acdb6f3a936aaac510 authored by Thomas Petzoldt on 29 June 2006, 00:00:00 UTC
version 0.3-10
version 0.3-10
Tip revision: 1e19d2e
wraplsoda.R
wraplsoda <- function(obj, ...) {
#if (!require(odesolve, pos = "package:base")) {
# stop("'lsoda' requires the installation of the 'odesolve' package")
#}
inputs <- obj@inputs
if (is(obj, "odeModel")) {
init <- obj@init
times <- fromtoby(obj@times)
func <- obj@main
equations <- obj@equations
parms <- obj@parms
inputs <- obj@inputs
} else {
print("wraplsoda requires an odeModel as first argument")
}
equations <- addtoenv(equations)
environment(func) <- environment()
lsoda(init, times, func, parms, ...)
}