shift (vars Data, var Value, int Length)
Shifts the first Length elements of Data by
one position, and fills Data[0] with Value.
Parameters:
Data |
Series or array to be shifted. |
Value |
New value for the first element. |
Length |
Number of elements to be shifted. |
Remarks
- This function can be used to shift static series,
or to double shift dynamic series.
Example:
vars Data10 = series(0,-10); // create a static series
if(SomeCondition) shift(Data10,NewValue,10);
See also:
series, diff,
rev
► latest
version online