setForcings: Generate interpolation spline for the forcings and write into...

Description Usage Arguments Details Value Examples

Description

Generate interpolation spline for the forcings and write into list of matrices

Usage

1
setForcings(func, forcings)

Arguments

func

result from funC()

forcings

data.frame with columns name (factor), time (numeric) and value (numeric)

Details

Splines are generated for each name in forcings and both, function value and first derivative are evaluated at the time points of the data frame.

Value

list of matrices with time points and values assigned to the forcings interface of deSolve

Examples

1
2
3
4
5
6
f <- c(x = "-k*x + a - b")
func <- funC(f, forcings = c("a", "b"))
forcData <- rbind(
  data.frame(name = "a", time = c(0, 1, 10), value = c(0, 5, 2)),
  data.frame(name = "b", time = c(0, 5, 10), value = c(1, 3, 6)))
forc <- setForcings(func, forcData) 


Search within the cOde package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.