Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: RE: list command


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: RE: list command
Date   Mon, 4 Aug 2008 16:31:19 +0100

Very easily -- by using dictionary or alphanumeric order. Otherwise you
could not ever -sort- a string variable. 

di ("3" > "2") 

will display 1 (for true). It is also true that ("10" > "2") is false.
Whether this is what Daniel wants I don't know. 

Hence I can't advise: except that >= sounds nearer the mark than >. 

Nick
[email protected] 

Martin Weiss

Well, how is Stata supposed to figure out whether string "2" is greater
than
string "3"? Numbers in the format of string have no natural order. Just
-destring- them.

Daniel Sepulveda-Adams

I have a question about list command; this is what I'm doing:

list ndc old_ndc e49_ gpi g64_ if gpi>"2"

gpi is a str variable (it is a 14 digit code) & I know is wrong but I
can
not figure it out how I can ask the program give me all ndc that has 2
or
more gpi.Thanks


*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index