|
In case you want a third approach:
proc sort data=one;
by subject;
run;
proc summary data=one;
by subject;
var score;
output out=two (drop=_freq_ _type_) sum=;
run;
----------------
Jinrui Cui <jcui@UCLA.EDU> wrote in message
news:200203290013.QAA07439@serval.noc.ucla.edu...
> Hi,
>
> I have a data set (a), how to transfrom it into (b)?
>
> (a) (b)
> ------------- ------------------
> A 15 A 30
> A 5 B 10
> A 10 C 15
> B 10 ------------------
> C 5
> C 10
> -------------
>
> Thanks!
>
> Henry
|