DATA Step, Macro, Functions and more

Transposing data

Accepted Solution Solved
Reply
New Contributor
Posts: 2
Accepted Solution

Transposing data

So far I got this:

DATA temp;
INPUT treatment $ Score1-Score14 @@;
DATALINES;
before 2 3 4 5
after 3 5 6 6
;
run;

How do I make it look like this?:
Before After
2 3
3 5
4 6
5 6

Thanks for your time.


Accepted Solutions
Solution
‎08-04-2014 05:04 PM
Trusted Advisor
Posts: 1,204

Re: Transposing data

proc transpose data=temp out=want(drop=_name_);

id treatment;

run;

View solution in original post


All Replies
Solution
‎08-04-2014 05:04 PM
Trusted Advisor
Posts: 1,204

Re: Transposing data

proc transpose data=temp out=want(drop=_name_);

id treatment;

run;

New Contributor
Posts: 2

Re: Transposing data

Thanks!

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 165 views
  • 0 likes
  • 2 in conversation