Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: RE: changing variable names


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: RE: changing variable names
Date   Wed, 11 Jan 2006 22:10:49 -0000

(Often repeated internet advice is 
never to announce that your problem 
is "very trivial", "easy", etc. This 
is all too likely to be met with two
thoughts, namely: 

1. You should be able to work out
the answer then with a bit more effort. 

2. Why then do you imagine that 
we will find your problem interesting?) 

Anyway, -tolower- sounded familiar, and indeed 
a quick examination shows that I wrote the 
program kindly recommended by Tom. It 
certainly applies to the question, but 
I'd recommend instead the more general 
command -renvars-, written by Jeroen 
Weesie and myself, and last updated 
via SJ 5(4) 2005, in view of its 
potential use for future renaming problems. 

You may well ask why a program that is 
apparently superseded remains in 
circulation. There are at least two 
reasons. First, someone might come 
across mentions of -tolower- and 
want to download a copy. Second, 
-tolower- requires only version 6 
and therefore is of some possible 
use to those using Stata 6 or 7 
and thus unable to make use of 
the latest -renvars-. 

Following Statalist conventions, Lia
is presumed to be using Stata 9.1
and so will be able to use -renvars-. 

Nevertheless, this will not apply 
to all readers of this thread. 

Nick 
[email protected] 

Steichen, Thomas J.
 
> Lia Orfei writes:

> > I have a very trivial problem:
> > 
> > I need to attach the variable labels taken from one dataset 
> > to another 
> > one, and the problem is that the two datasets have the same 
> variable 
> > names but in one the names are in lower case and upper case 
> > in the other.
> > 
> > Does anyone know a quick way of changing the case of the 
> > variable names 
> > by any chance?
> > 
> > I dont seem to be able to find the way
> 
> Get package tolower from http://fmwww.bc.edu/RePEc/bocode/t
> -------------------------------------------------------------
> 
> TITLE
>       'TOLOWER': module to rename variables with lower case names
> 
> DESCRIPTION/AUTHOR(S)
>       
>       tolower varlist makes all variable names in the varlist 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/



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