Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: adding the variable name to the label text


From   "Snapp, Kevin Michael" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: adding the variable name to the label text
Date   Tue, 21 Jan 2014 21:26:51 +0000

I have a large PSID file I am working on.  As many of you will know the variable names aren't the most informative.  I would like to add the current variable names (like ER360001) to the front of the variable label string.  After that is done I will go through and manually rename the variables that I want one by one.  If have been able to use the following  to display what I want in the new label's, but I can't seem to change the labels.

. foreach x of varlist _all{
  2. local u : variable label `x'
  3. display  "`x'"  " " "`u'"
  4. }

Any input is appreciated.

Kevin Snapp


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index