next

Syntax

next(X)

Arguments

X is a vector/matrix/table.

Details

Shift the elements of a vector to the left for one position. In comparison, prev shifts the elements of a vector to the right for one position; move shifts the elements of a vector for multiple positions.

Examples

x = 1..5;
next(x);
// output: [2,3,4,5,]
x = matrix(1 2 3 4 5);
next(x)
#0
2
3
4
5
t=table(1 2 3 as a, `x`y`z as b, 10.8 7.6 3.5 as c);
next(t)
a b c
2 y 7.6
3 z 3.5