Skip to contents

Calculate the time according to the at/after params passed by the user. Helper for log_score() and plot_KDE().

Usage

calc_specified_time(fcst, at = NULL, after = NULL)

Arguments

fcst

A forecast object (see output of create_forecast()).

at

(Optional) See ?log_score

after

(Optional) See ?log_score

Value

A time of the same type as those in fcst

Examples

fc <- create_forecast(data.frame(time=1:3, val=4:6), forecast_time=2)
# 1
casteval:::calc_specified_time(fc, at=1)
#> [1] 1

# 2+1=3
casteval:::calc_specified_time(fc, after=1)
#> [1] 3