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: Minor bug in -labvalclone- by NJC


From   Nick Cox <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: Minor bug in -labvalclone- by NJC
Date   Mon, 25 Nov 2013 11:00:03 +0000

In principle, yes. In practice, -ssc desc labutil- does give an overview.
Nick
[email protected]


On 25 November 2013 10:29, Roger B. Newson <[email protected]> wrote:
> Thanks to Nick for the -labutil- package. It might be even better if there
> was a unified help file -labutil.sthlp-, so users could see a list of all
> the modules, and what they do, in one place.
>
> Best wishes
>
> Roger
>
> Roger B Newson BSc MSc DPhil
> Lecturer in Medical Statistics
> Respiratory Epidemiology, Occupational Medicine
> and Public Health Group
> National Heart and Lung Institute
> Imperial College London
> Royal Brompton Campus
> Room 33, Emmanuel Kaye Building
> 1B Manresa Road
> London SW3 6LR
> UNITED KINGDOM
> Tel: +44 (0)20 7352 8121 ext 3381
> Fax: +44 (0)20 7351 8322
> Email: [email protected]
> Web page: http://www.imperial.ac.uk/nhli/r.newson/
> Departmental Web page:
> http://www1.imperial.ac.uk/medicine/about/divisions/nhli/respiration/popgenetics/reph/
>
> Opinions expressed are those of the author, not of the institution.
>
>
> On 23/11/2013 16:10, Nick Cox wrote:
>>
>> <>
>>
>> The bug Sergiy reported is now fixed in the version of -labvalclone-
>> on SSC. (-labvalclone- is part of the -labutil- package.)
>>
>> Thanks to Sergiy for pointing this out and Kit Baum for putting it up.
>> Nick
>> [email protected]
>>
>>
>> On 22 November 2013 01:04, Nick Cox <[email protected]> wrote:
>>>
>>> Thanks to Sergiy for the public heads-up.
>>>
>>> I will get it fixed.
>>> Nick
>>> [email protected]
>>>
>>>
>>> On 22 November 2013 00:45, Sergiy Radyakin <[email protected]>
>>> wrote:
>>>>
>>>> Bug in -labvalclone- by NJC
>>>> http://fmwww.bc.edu/repec/bocode/l/labvalclone.ado
>>>>
>>>> ===Example:
>>>> clear
>>>> label define a 1 "US" 2 "UK" 3 "UA"
>>>> labvalclone a aa
>>>>
>>>> ===Output:
>>>> unrecognized command:  laabel
>>>> r(199);
>>>>
>>>> ===Why does it happen:
>>>> Because replacing blindly code is not safe. Nick is trying to check
>>>> for this problem by having a safety check of the old argument earlier
>>>> in the program:
>>>> if "`old'" == "label" | "`old'" == "define"
>>>> but later is doing a replacement of a SUBSTRING, not a WORD-by-word
>>>> replacement.
>>>>
>>>> ===Suggested fix:
>>>> Simply flank both args (old and new) with spaces:
>>>> local line: subinstr local line " `old' " " `new' "
>>>>
>>>> Best,
>>>>     Sergiy Radyakin
>>>> *
>>>> *   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/
>>
> *
> *   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