Learn R Programming

deSolve (version 1.2-1)

deSolve-package: General solvers for ordinary differential equations (ODE) and for differential algebraic equations (DAE)

Description

Functions that solve a system of first-order ordinary differential equations (ODE) and of differential algebraic equations (DAE). The functions provide an interface to the FORTRAN functions lsoda, lsodar, lsode, lsodes, dvode and daspk. The package also contains routines designed for solving uni-and multicomponent 1-D and 2-D reactive transport models.

Arguments

Details

ll{ Package: deSolve Type: Package Version: 1.1-2 Date: 2008-07-17 License: GNU Public License 2 or above } The system of ODE's is written as an Rfunction or be defined in compiled code that has been dynamically loaded, see package vignette (vignette(compiledCode)) for details. The solvers may be used as part of a modeling package for differential equations, or for parameter estimation using any appropriate modeling tool for non-linear models in Rsuch as optim, nls, nlm or nlme.

See Also

ode, lsoda, lsode, lsodes, lsodar, vode, daspk, rk.

Examples

Run this code
## show examples (see respective help pages for details)
example(aquaphy)
example(lsoda)
example(ode.band)
example(ode.1D)
example(ode.2D)

## run demos
demo("rk_solvers") # comparison of lsoda with Runge-Kutta-Type Solvers
demo("CCL4model")  # a model fitting example (this will take some time)

## open the directory with source code of demos
browseURL(paste(system.file(package="deSolve"), "/demo", sep=""))

## open the directory with R sourcecode examples
browseURL(paste(system.file(package="deSolve"), "/examples", sep=""))
## open the directory with C and FORTRAN sourcecode examples
browseURL(paste(system.file(package="deSolve"), "/dynload", sep=""))

## show package vignette with tutorial about how to use compiled models
## + source code of the vignette
## + directory with C and FORTRAN sources
vignette("compiledCode")
edit(vignette("compiledCode"))
browseURL(paste(system.file(package="deSolve"), "/doc", sep=""))

Run the code above in your browser using DataLab