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

From |
"Friedrich Huebler" <fhuebler@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Rename problem: r(110) already defined |

Date |
Wed, 13 Feb 2008 14:20:32 -0500 |

Thanks to everyone who responded to my -rename- problem. I added an IF command to the -foreach- loop and now have a solution that (a) ignores variable names that are already lowercase and (b) stops execution of the do-file if the names of two variables in the data differ only with regard to upper or lower case. ds local vars "`r(varlist)'" foreach v of local vars { local newname = lower("`v'") if "`v'" != "`newname'" rename `v' `newname' } The lines above can be replaced by a single command if -renvars- is installed. . renvars, lower Thanks again. Friedrich * * 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/

**References**:**st: Rename problem: r(110) already defined***From:*"Friedrich Huebler" <fhuebler@gmail.com>

**Re: st: Rename problem: r(110) already defined***From:*Richard Williams <Richard.A.Williams.5@ND.edu>

- Prev by Date:
**st: RE: RE: R: Moran I and spatial correleation help needed** - Next by Date:
**Re: st: problem with tab defaults in estout** - Previous by thread:
**Re: st: Rename problem: r(110) already defined** - Next by thread:
**st: RE: Rename problem: r(110) already defined** - Index(es):

© Copyright 1996–2016 StataCorp LP | Terms of use | Privacy | Contact us | What's new | Site index |