validityConditions: Conditions validity

validityConditionsR Documentation

Conditions validity

Description

Check the validity of conditions with respect to its structure and compatibility with a rate model for scaling time.

Usage

validityConditions(conditions, model)

Arguments

conditions

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

model

character corresponding to the name of the rate model.

Details

Variables in the model are all function inputs excluding param and control and those of conditions are the column names except time. The function test that: (1) column names include time; (2) column names exclude param and control, as those are reserved terms of the model function; (3) variable names are the same in the model and conditions; (4) conditions time have unique and increasing values (5) conditions time and variables contains no NA.

Value

Return TRUE if the conditions are compatibles with the model, return an error otherwise.

Examples

conditions <- data.frame(time = seq(0,30,length.out = 10), temp = rnorm(10, 10, 5))
validityConditions(conditions, model = "modelLinear")

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