Sorry I cannot type Chinese in my office.
Original data set is:
id
1
2
3
4
.
.,
want it to be
id
1
1
1
2
2
2
3
3
3
4
4
4
How can I do that? Thanks a lot for help.
m****r 发帖数: 202
2
try this
data orginal;
input id;
datalines;
1
2
3
4
;
data expect (keep=id);
set orginal;
do i=1 to 3;
id2=id;
output;
end;
run;
proc print;run;
h********o 发帖数: 103
3
DATA TEST;
INPUT ID @@;
DO Y = 1 TO 3;
OUTPUT;
END;
DROP Y;
CARDS;
1 2 3 4
RUN;