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]

AW: st: minor complaint


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   AW: st: minor complaint
Date   Sun, 18 Jul 2010 22:39:43 +0200

<> 

" learn something new every day."



Me too. BTW, if you want the help for Tirthankar`s -numlist- command, you have to type -h nlist-.



HTH
Martin

-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Jeph Herrin
Gesendet: Sonntag, 18. Juli 2010 22:34
An: statalist@hsphsun2.harvard.edu
Betreff: Re: st: minor complaint

That's it - learn something new every day.

thanks,
Jeph


On 7/18/2010 2:49 PM, Tirthankar Chakravarty wrote:
> Maybe you can use numlists for this task?
>
> *********************************
>   local mylist 0.5 2.5 12 9 7 2 23 32
>   numlist "`mylist'", sort
>   di "`r(numlist)'"
> *********************************
>
>
> 2010/7/19 Jeph Herrin<stata@spandrel.net>:
>> Is there an obvious reason why the list directives
>> for locals include a -sort- for text but not a -sort-
>> for numbers?
>>
>>   local mylist 0.5 2.5 12
>>   local mylist : list sort mylist
>>   macro list _mylist
>>
>> Many tasks involve sorting lists, it would be a lot
>> easier if I did not always need to write a bubble sort.
>>
>> Or is there another way to easily sort a numeric list
>> stored in macro?
>>
>> cheers,
>> Jeph
>>
>>
>>
>>
>> *
>> *   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/
>>
>
>
>
*
*   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/


*
*   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