Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Richard Moverare <richard.moverare@gmail.com> |
To | statalist <statalist@hsphsun2.harvard.edu> |
Subject | Re: st: Reshape problem |
Date | Fri, 29 Apr 2011 12:24:39 +0200 |
Oh, never mind. I realised I could create an id variable equal to _n and use i(id), and everything worked out fine. Sorry to have bothered you. All the best Richard 2011/4/29 Richard Moverare <richard.moverare@gmail.com>: > Dear all, > > I have a dataset with a number of string variables, i.e. > stringvar1-stringvar12. These variables have values that represent > cities and in many cases they have missing values, i.e. blank strings. > Now, I would like to create just one variable that have all the values > of these variables stacked under eachother. I have a dataset with 1000 > rows, so I would like a new dataset with 1000*12=12,000 rows and just > one variable. If the missing values are lost and I end up with fewer > rows, that would not be problem. > > I assume I should use -reshape-, but I have tried by looking at the > different examples, but I can't find any working solution. > > All help would be greatly appreciated. > > Richard > * > * 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/ > * * 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/