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
What makes sas stand out to be the best over other data analytics tools?
Name and describe few sas character functions that are used for data cleaning in brief.
What are types of transport files?
for what purpose would you use the retain statement? : Sas programming
What is the difference between the proc sql and data step?
explain the concepts and capabilities of business object? : Sas-bi
Differentiate between proc means and proc summary.
How we can call macros with in data step? : sas-macro
How to read an input file in sas?
how many types prompting framework can be broken down to? : Sas-bi
Difference between sum function and using “+” operator?
Explain the special input delimiters used in sas programming.
if a variable contain dates like "2015/01"---"2015/12" (yymm) ,How to add day to those dates,if them month is jan then 31 if the month is feb then 28 so on ...
Describe the function and utility of the most difficult SAS macro that you have written?
Tell e how how dealt with..