I am trying to rearrange my data but am having a difficult time. The data I have looks something like this:
date a b c
====================
1996 5 7 8
1997 4 2 3
1998 1 9 6
what I want is to rearrange the data (presumably using arrays) to get this:
date val var
=============
1996 5 a
1997 4 a
1998 1 a
1996 7 b
1997 2 b
1998 9 b
1996 8 c
1997 3 c
1997 6 c
So that I've essentially stacked the variables (a,b,c) along with the corresponding date and name of the variable.
Thanks in advance!