Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: label to lower case


From   Marcos Delprato <[email protected]>
To   [email protected]
Subject   Re: st: label to lower case
Date   Tue, 6 Nov 2012 15:40:48 +0100


On Tue, Nov 6, 2012 at 3:25 PM, Nick Cox <[email protected]> wrote:
> Not so.
>
> The -proper()- function [not command, as Richard made clear] can be
> applied to all values simultaneously.
>
> gen newvar = proper(oldvar)
>
> Nick
>
> On Tue, Nov 6, 2012 at 2:21 PM, Marcos Delprato <[email protected]> wrote:
>
>> Thanks Richard. The proper command works fine. The problem is that I
>> have numerous labels in the variable and I would need a loop to access
>> each label and made the ABCD to Abcd in each of them by applying the
>> proper command.
>
>> On Tue, Nov 6, 2012 at 2:55 PM, Richard Goldstein
>
>>> you cannot label string variables so I assume you are talking about the
>>> values; use the "proper" function; a direct way to this is -h proper-,
>>> but you could have found it by looking under string functions after
>>> typing -h function-
>
> On 11/6/12 8:51 AM, Marcos Delprato wrote:
>
>>>> I want to change several capital letter labels of a string variable to
>>>> lower case except from the first letter. That is, from ABCDE to Abcde.
>>>> Is it any command or shortcut to do this?
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/statalist-faq/
> *   http://www.ats.ucla.edu/stat/stata/
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index