View source: R/dt_modification.R
shift_values | R Documentation |
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.
shift_values(f_dt, row)
f_dt |
a folded dataset |
row |
the index of the row that is going to be processed |
a one row data.table the shifted values
dt <- dbnR::motor
f_dt <- dbnR::fold_dt(dt, size = 2)
s_row <- dbnR::shift_values(f_dt, row = 500)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.