Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Transpose of an matrix/array in SAS

Status
Not open for further replies.

hcs301080

Programmer
Jun 5, 2003
3
US
Hi!,

Can anyone suggest me how to get transpose of matrix/ array in SAS.

I want to map data in 5 columns and 2 rows...into 2 columns and 5 rows.


say the data is
a b c d e f
12 14 16 1 2 1

22 34 23 44 6 1


and I want to change it to ...

a b
12 22
14 34
16 23
1 44
2 1
6 1


Thanks in advance!


 
data new;
set old(keep = a b) old(keep = b c) old (keep = e f);
run;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top