Calculate the time according to the at/after params passed by the user.
Helper for log_score() and plot_KDE().
Arguments
- fcst
A forecast object (see output of
create_forecast()).- at
(Optional) See
?log_score- after
(Optional) See
?log_score
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