timeModel | R Documentation |
Compose the function of the model and the interpolating functions representing its variables.
timeModel( model, conditions, param = list(), control = list(), interpolation = "constant" )
model |
|
conditions |
|
param |
|
control |
|
interpolation |
|
Return a new function that only depend on time (represented as time
).
#Example of a rate model in function of time (instead of the original variable(s)) conditions <- data.frame(time = seq(0,30,length.out = 10), temp = rnorm(10, 10, 5)) model <- "modelLinear" param = list(a = 1, T0 = 10) #Get the function representing the model, can be evaluated at any time within those of conditions f <- timeModel(model = model, conditions = conditions, param = param) x <- seq(0,30,length.out = 20) f(x) #Plot x <- seq(0,30,length.out = 1000) plot(conditions$time,f(conditions$time)) lines(x,f(x))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.