Date: Wed, 5 Nov 2003 23:27:22 -0000
Reply-To: ma015 b8234 <ma015b8234@BLUEYONDER.CO.UK>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: ma015 b8234 <ma015b8234@BLUEYONDER.CO.UK>
Subject: Question-Tranpose and Arrays
In-Reply-To: <DE7408C714122F4BB5221C1E73A135D10E1C42@remailw2k2.westat.com>
Content-Type: text/plain; charset="iso-8859-1"
Dear SAS-L Constributors:
I need to rearrange a dataset which looks like:
City Category Freq
Bm A1 2
Bm B1 3
Bm C1 1
Bm D1 4
Br B1 1
Br C2 3
Br D2 2
Ca C1 1
Ca D1 4
Ca C3 2
Ca B2 3
Ca E1 5
I want to rearrange it like this
City A1 B1 B2 C1 C2 C3 D1 D2 E1
Bm 2 3 1 4
Br 1 3 2
Ca 3 1 2 4 5
How can I do using Proc Transpose and arrays?
Thanks in advance for your help.
John