data test;
input x @@;
cards;
1 6 3 9 3 9 7 1 9 3 8 4 10 3 9 3
;
run;
data grouping;
set test;
group+(mod(_n_,8) EQ 1);
run;
The result is below,i just can't understand
Obs X GROUP
1 1 1
2 6 1
3 3 1
4 9 1
5 3 2
6 9 2
7 7 2
8 1 2
9 9 3
10 3 3
11 8 3
12 4 3
13 10 4
14 3 4
15 9 4
16 3 4