Skip to contents

Given a (forecast) data frame, inspects the column names and returns the quantile numbers. This function does no input validation.

Usage

get_quant_percentages(df)

Arguments

df

The data frame, presumably containing columns named "val_q" followed by a number from 0 to 100.

Value

A numeric vector containing the quantiles, sorted in increasing order.

Examples

# returns c(2.5, 50, 97.5)
casteval:::get_quant_percentages(
  data.frame(time=1:3, val_q2.5=4:6, val_q50=7:9, val_q97.5=10:12)
)
#> [1]  2.5 50.0 97.5