>>
Try this
foreach var of varlist x1 x2 x3...{
gen Z=lower(``var')
drop `var'
rename Z `var'
}
Dev
>>> [email protected] 12/10/04 1:15 pm >>>
I have a dataset containing numeric and string variables. I'm using foreach
to loop across all the variables in my dataset.
Within this loop, how do I convert the contents of the string variables to
lower case?
*
* 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/
This message has been scanned but we cannot guarantee that it and any
attachments are free from viruses or other damaging content: you are
advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.
*
* 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/