Statalist The Stata Listserver


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

Re:st: RE: converting variable labels to proper case with apostrophes


From   Joseph Coveney <[email protected]>
To   Statalist <[email protected]>
Subject   Re:st: RE: converting variable labels to proper case with apostrophes
Date   Sun, 23 Jul 2006 14:03:44 +0900

". . . Dimitriy's problem might yield to an approach using regular
expressions."

Come to think of it, it might yield to something like

foreach var of varlist _all {
local variable_label : variable label `var'
local variable_label = subinstr(proper("`variable_label '"), ///
"'S", "'s", .)
label variable `var' "`variable_label '"
}

It should work for English possessive case, if that's where Dimitriy's apostrophe problem lies.

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