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]

Re: st: Changing characters and letters in all value labels


From   Nick Cox <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: Changing characters and letters in all value labels
Date   Thu, 24 Oct 2013 10:00:15 +0100

Look in Daniel Klein's -labutil2- (SSC).
Nick
[email protected]


On 24 October 2013 09:48, maria t <[email protected]> wrote:
> Hi statalist members,
>
> I would like to remove certain letters and characters in all my value labels and replace them with other ones.
>
> I have used the following program to change the letter "z" to "a" in all the variable labels, but I can't find out how to do the same for the value labels.
>
> Foreach i of varlist_all {
>
> local a: variable label `i'
>
> local a: subinstr local a "z" "a"
>
> label var `i' "a"
>
> }
>
> I would be very grateful if any of you could help me solve this.
>
> Thanks,
>
> Maj
> *
> *   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/
*
*   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