how to shift the rows to cols?
eg:
i have like
field1 field2 field3
10 20 20
this should be displayed as
field1 10
field2 20
field3 30
(without the obs col)
how do this?can i use transpose or tell me suitable way to
do this?
Answer Posted / haritha
by using proc transpose procedure
ur data should be like this
data hyd;
input a$ b$ c$;
datalines;
field1 field2 field3
10 20 30
;
run;
solution will be like this:
proc tranpose data=hyd out=mum;
var a b c;
run;
proc print data=mum noobs;
run;
| Is This Answer Correct ? | 5 Yes | 2 No |
Post New Answer View All Answers
How necessary is it to be creative in your work?
If you could design your ideal job, what would it look like?
What would you change about your job?
What is auto call macro and how to create a auto call macro? What is the use of it? How to use it in sas with macros? : sas-macro
How do you convert basic cube to transaction cube and transaction cube to basic cube?
What are the data types does SAS contain?
How would you include common or reuse to be processed along with your statements?
Mention what are the data types does SAS contain?
what is sas metadata server? : Sas-di
Are you involved in writing the inferential analysis plan? Tables specfications?
How to read an input file in sas?
How can you limit the variables written to output dataset in data step?
Are you sensitive to code walk-throughs peer review or QC review?
Differentiate between ceil and floor functions.
Which are the statements whose placement in the data step is critical?