Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: how to copy rows according to comma separated variable


From   "FUKUGAWA, N." <[email protected]>
To   [email protected]
Subject   st: how to copy rows according to comma separated variable
Date   Thu, 21 Dec 2006 18:16:12 +0900

dear all,
i need to transform the data as follows.

the current data
id	x
1	100; 105
2	245
3	2119; 309; 1054
4	3
5	30006; 14

the modified data
id	x
1	100
1	105
2	245
3	2119
3	309
3	1054
4	3
5	30006
5	14

the data has several variables (string and numerical) and "x" is
only variable that is comma separated.
information of other variables needs to be retained after
modification.
thank you in advance.
--
FUKUGAWA Nobuya, Ph.D.
[email protected]

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index