Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Converting the values of a variable into variables


From   sdm1@york.ac.uk
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Converting the values of a variable into variables
Date   Thu, 24 Nov 2005 18:31:44 -0000

Hi,

I have a data set of the form:

id datadefiniton datavalue
1   income          1000
1   age               64
1   weight           125
2   income          1500
2   age               44
2   weight           165

which I want to convert to the form:

id income age weight 
1   1000    64   125
2   1500    44   165

Any suggestions would be most welcome!

Thanks.

Steve

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index