Skip to contents

Checks that values in quantile columns are in increasing order for each time point. That is, if x < y, then df$quant_x[[i]] <= df$quant_y[[i]] must hold true for all 1 <= i <= nrow(df)

Usage

validate_quant_order(df)

Arguments

df

A forecast data frame, with a time column and 0 or more quant_* columns

Value

NULL if valid, error otherwise.

Examples

try(
  casteval:::validate_quant_order(data.frame(time=1:3, quant_25=4:6, quant_75=c(4,4,4)))
)
casteval:::validate_quant_order(data.frame(time=1:3, quant_2.5=4:6, quant_50=c(4,6,8)))