validityScaledPeriod: Scaled period validity

validityScaledPeriodR Documentation

Scaled period validity

Description

Check that adding a period in the scaled domain from a time vector (x1), return a vector of time the range of conditions time. Also check that x1 ans scaledPeriod have the same length.

Usage

validityScaledPeriod(
  x1,
  scaledPeriod,
  model,
  conditions,
  param = list(),
  control = list(),
  interpolation = "constant"
)

Arguments

x1

numeric vector of initial time from which evaluate the scaling

scaledPeriod

numeric vector of period in the scaled domain to add to x1.

model

character corresponding to the name of the rate model.

conditions

data.frame with columns named time and variables expected to correspond to those of the model.

param

list parameters of the model.

control

list of arguments that control the behaviour of the model.

interpolation

character corresponding to the name of the interpolating method for conditions. Available methods only include constant at the moment and is the default value.

Value

Return TRUE if the condition is respected and an error otherwise.

Examples

conditions <- data.frame(time = seq(0,30,length.out = 10), temp = rnorm(10, 10, 5))
condModel <- interpolateCond(conditions, method = "linear")
model <- "modelLinear"
param = list(a = 1, T0 = 10)
x1 = seq(1,10,length.out = 10)
scaledPeriod = rep(10,10)
validityScaledPeriod(x1, scaledPeriod, model = model, conditions = conditions, param = param)

aleblancbio/timescale documentation built on Aug. 27, 2022, 3:01 p.m.