shift_values {dbnR} | R Documentation |
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)
Arguments
f_dt |
a folded dataset |
row |
the index of the row that is going to be processed |
Value
a one row data.table the shifted values
Examples
dt <- dbnR::motor
f_dt <- dbnR::fold_dt(dt, size = 2)
s_row <- dbnR::shift_values(f_dt, row = 500)
[Package dbnR version 0.7.9 Index]