Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Re: how to DE-CAPITALISE variables?


From   nshephard <nshephard@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: Re: how to DE-CAPITALISE variables?
Date   Wed, 30 Jun 2010 02:30:22 -0700 (PDT)

Josef Montag wrote:
> 
> Hi all,
> 
> a sily/simple question: I have a dataset in which all variable names are
> in CAPITAL letters. Is there a simple way how to de-capitalise them?
> 


Out of curiosity where is your dataset coming from?

If you're -insheet-ing it from ASCII text files then the default behaviour
is to lowercase all variable names unless the -, case- option is used which
will preserve the case of variable names.

This in turn suggests another solution (although it has the drawback that
you will loose all variable labelling and value encoding/labelling).

outsheet using tmp.txt
insheet using tmp.txt

Neil
-- 
View this message in context: http://statalist.1588530.n2.nabble.com/how-to-DE-CAPITALISE-variables-tp5231402p5237445.html
Sent from the Statalist mailing list archive at Nabble.com.
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index