Statalist The Stata Listserver


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

Re: st: recoding "long" variable to text


From   "Michael S. Hanson" <[email protected]>
To   [email protected]
Subject   Re: st: recoding "long" variable to text
Date   Sun, 6 May 2007 17:39:41 -0400

On May 6, 2007, at 5:29 PM, Marcos Feldman wrote:

can anyone help me figure this out? i am trying to create a new variable based on an existing variable containing zoning codes. i actually have two variables with the zoning codes, one is string format another is long format. the codes (values) in both look like this: 0001, 0004, 0072, 9001, etc. I want to replace these codes with their descriptors, e.g., convert 0001 to "single-family residential," and so on.
	[snip]

is there some other way to accomplish this transformation?
I would recommend you label your variables, rather than "replacing" them with text. See -help label- and the examples there of labeling variables. The printed documentation is particularly informative in this case. Hope this helps.

-- Mike

*
* 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