Statalist


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

Re: st: Assigning labels of 1 file into another file?


From   "David Elliott" <dcelliott@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Assigning labels of 1 file into another file?
Date   Wed, 12 Sep 2007 21:34:04 -0300

Thank you, Austin.  Labmask and your code would certainly be one way
of doing it. I had known about Nick's labutilities at one point but it
was hiding among the dust-bunnies in my memory.

My method was to create an ado that:
* -preserve-d the original file
* -use-ed the code-desc file
* used -file write- to write a temporary dofile which contained
* a label definition for each unique code-desc combination
* restored the original file
* applied the label definition dofile against the codes in the original file

The plus of this method is that it doesn't involve a merge and uses
existing commands.

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