s*********n 发帖数: 149 | 1 First, I don't think this is a good idea to combine multiple record to one;
but if you insist to do so, you can use array or proc transpose;
for Array,
first you have to find out the max of each id has. so that you can define you
array : array age(*) $1. age1-age20;
also you need to define array for each variable.
say the data set call temp, sort by id;
data temp;
set temp;
by id;
if first.id then
dimnum = 1;
age(dimnum) = age;
else dimnum ++1;
if last.id then output;
run;
also you can creat ano |
|