hi guys ...i have one query...
data abc;
input s w k g o t a m;
cards;
1 2 3 4 5 6 7 8
2 3 4 5 6 7 8 9
;
run;
i want the output to be the sorted order(only
variables).observations should not be changed..
Answer Posted / hetal bhalani
data abc;
input s w k g o t a m;
cards;
1 2 3 4 5 6 7 8
2 3 4 5 6 7 8 9
;
run;
**Transpose your data by listing all the variables you want
to transpose in the VAR statement**
proc transpose data =abc ;
var s w k g o t a m;
run;
**Now you have to sort the values in _name_ variable in asc
**
proc sort data=data1;
by _name_ ;
run;
**now transpose again using _name_ in the ID statement**
proc transpose data=data1 out=data2(drop=_name_);
id _name_;
run;
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is the role of unrestrictive users? : sas-grid-administration
what is the difference between: x=a+b+c+d; and x=sum (of a, b, c ,d);? : Sas programming
Explain the purpose of retain statement.
What is the function of output statement in a SAS Program?
explain the proc in sas? : Sas-administrator
Explain the use of proc gplot? : sas-grid-administration
what do the sas log messages "numeric values have been converted to character" mean? What are the implications? : Sas programming
Difference between nodup and nodupkey options?
what is the effect of the options statement errors=1? : Sas programming
What is the difference between INPUT and INFILE ?
how many display types available in sas bi dashboard? : Sas-bi
How are numeric and character missing values represented internally?
Will it bother you if the guy at the next desk times the frequency and duration of your bathroom or coffee breaks on the grounds that ?you are getting paid twice as much as he is??
what is the difference between floor and ceil functions in sas? : Sas-administrator
Differentiate between ceil and floor functions.