foreach v of var _all {
label var `v' `"`= proper(`"`: var label `v'"')"'
Nick
[email protected]
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]]On Behalf Of Dimitriy V.
> Masterov
> Sent: 21 July 2006 22:41
> To: Statalist
> Subject: st: converting variable labels to proper case with
> apostrophes
>
>
> I am trying to convert my variable labels to proper case, so that
> instead of "government office region" I have "Government Office
> Region". I used this code:
> foreach var of varlist _all {;
> set trace on;
> lab var `var' "`=proper("`:var label `var''")'";
> };
>
> but it runs into problem when there are apostrophes in the label. I
> checked out the labutils suite, but I don't think there's a solution
> there.
>
> Any suggestions?
>
> Dimitriy Masterov
> *
> * 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/
>
*
* 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/