control control case control case
AA AA AA AA AA
BB BB BB BB BB
BB BB BB AB AB
AA AB AB AA AB
BB BB BB NoCall BB
BB BB BB BB BB
BB BB BB BB BB
AB AB BB BB AB
BB AB BB AB AB
想行列转换后变成这种格式:
control A A B B A B B B B B B B
control A A B B B B B B B B B B
case A A B B A B A B B B B B
control A A B B B B A A B B B B
case A A B B B B A B B B B B
请教如何操作?
谢谢!
data a;
input control $ control2 $ case $ control3 $ case2 $ ;
cards;
AA AA AA AA AA
BB BB BB BB BB
BB BB BB AB AB
AA AB AB AA AB
BB BB BB NoCall BB
BB BB BB BB BB
BB BB BB BB BB
AB AB BB BB AB
BB AB BB AB AB
;
run;
proc TRANSPOSE data=a out=b;
var _all_;
run;