由买买提看人间百态

topics

全部话题 - 话题: dimnum
(共0页)
s*********n
发帖数: 149
1
来自主题: Mathematics版 - Re: 大家有没有用sas
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
(共0页)