Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: How to stack data horizontally?


From   Olivia Bacha <[email protected]>
To   [email protected]
Subject   st: How to stack data horizontally?
Date   Wed, 22 Aug 2012 00:15:42 +0100

Hello all,

I have the data organized as follows:

id	v1	v2	v3	v4
1	1	2	3	4
1	5	6	7	8
1	9	10	11	12
2	13	14	15	16
2	17	18	19	20
2	21	22	23	24


And want it to be:

v1	v2	v3	v4	v5	v6	v7	v8	v9	v10	v11	v12
1	2	3	4	5	6	7	8	9	10	11	12
13	14	15	16	17	18	19	20	21	22	23	24

That is, I want to stack it horizontally by  id.
Does anyone know how to do that?

Thanks in advance.
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index