DATA Step, Macro, Functions and more

transpose data set

Reply
Occasional Contributor
Posts: 6

transpose data set

 

 
Hi all,
 
How to transpose this data set which has only one column 
i.e. attribution and its data is like A. M&M Process ...etc.

attribution_transposed:
attribution
C. M&M Process
B. Supplier Design
 
thanks in advance..
PROC Star
Posts: 1,209

Re: transpose data set

Posted in reply to pritikhaire84

So you want to transpose a data set with only 1 column, so that it has only 1 observation?

 

What do you want the variable names to be?

Occasional Contributor
Posts: 6

Re: transpose data set

there is only one column (attribution) in that data set (attribution_transposed)
and want to transpose it
Super User
Posts: 6,628

Re: transpose data set

Posted in reply to pritikhaire84

You will need to learn about PROC TRANSPOSE.  Here's a basic example to get you started:

 

proc transpose data=have prefix=attribution out=attribution_transposed (drop=_name_);

var attribution;

run;

Ask a Question
Discussion stats
  • 3 replies
  • 113 views
  • 0 likes
  • 3 in conversation