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

RE: st: another data cleaning question [correction]


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: another data cleaning question [correction]
Date   Mon, 24 Jun 2002 10:25:53 +0100

> I suggest that any test be in terms of the first three
> characters of the string equivalent.
> 
> list if string(cropcode) != substr(string(varcode,1,3))

Better as 

list if string(cropcode) != substr(string(varcode),1,3) 

> 
> More generally, whenever codes are pseudo-numeric, there
> are several advantages to holding them as strings.
 
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