shift_values: Move the window of values backwards in a folded dataset row
Description
This function moves the values in t_0, t_1, ..., t_n-1 in a folded dataset row to
t_1, t_2, ..., t_n. All the variables in t_0 will be inputed with NAs and the
obtained row can be used to forecast up to any desired point.
Usage
shift_values(f_dt, row)
Value
a one row data.table the shifted values
Arguments
f_dt
a folded dataset
row
the index of the row that is going to be processed