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

st: RE: RE: Re: sorting a string variable, but not alphabetically


From   TEWODAJ MOGUES <[email protected]>
To   Stata _ <[email protected]>
Subject   st: RE: RE: Re: sorting a string variable, but not alphabetically
Date   Tue, 21 Dec 2004 23:37:18 -0500

Nick,

I'm glad you responded the way you did, since I had thought I had to 
adapt your lines to fit, for example, the dog-cat-mouse data example, 
but clearly it runs as is and I can use the mystringsort command after 
that with the simple syntax. 

Great, thanks!

   Date: Mon, 20 Dec 2004 20:33:42 -0000
   From: "Nick Cox" <[email protected]>
Subject: st: RE: RE: Re: sorting a string variable, but not 
alphabetically

I'm not sure what there is to chew on. 
The example shows that the program works, 
although it lacks a help file. it should 
also display an error message if no 
sorting tokens are given. 

The syntax is 

mystringsort <strvar> <token1> [<token2> [<token3 ... ]] 

so that -mystringsort- so that occurrences of 
<token1> come first, and so forth. 

Nick 
[email protected]
*
*   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