data Var;do _n_=50, 8;set one point=_n_;output;end;stop;run;
We have to read 50th and 8th column..not observations.
proc transpose data = a out = b;var _all_;run;data bb;do _n_ = 4,1;set b point = _n_;output;end;stop;run;proc transpose data = bb out = bbb(drop = _name_);id _name_;var col1-col4;run;
to take random columns , say C3 and C5Data one;infile datalines _infile_ = X;input ;c3=scan(X,3,' ');c5=scan(X,5,' ');datalines;1 2 3 4 5 6 7 8 9 0 1 2 3 45 6 7 8 9 0 12 3 4 5 6 7 89 0 1 2 3 4 5;run;
data Var;
ReplyDeletedo _n_=50, 8;
set one point=_n_;
output;
end;
stop;
run;
We have to read 50th and 8th column..not observations.
ReplyDeleteproc transpose data = a out = b;
ReplyDeletevar _all_;
run;
data bb;
do _n_ = 4,1;
set b point = _n_;
output;
end;
stop;
run;
proc transpose data = bb out = bbb(drop = _name_);
id _name_;
var col1-col4;
run;
to take random columns , say C3 and C5
ReplyDeleteData one;
infile datalines _infile_ = X;
input ;
c3=scan(X,3,' ');
c5=scan(X,5,' ');
datalines;
1 2 3 4 5 6 7
8 9 0 1 2 3 4
5 6 7 8 9 0 1
2 3 4 5 6 7 8
9 0 1 2 3 4 5
;
run;