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: the fastest way to check if unique values of a variable > 100


From   daniel klein <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: the fastest way to check if unique values of a variable > 100
Date   Mon, 26 Aug 2013 10:10:58 +0200

I do not see why such an assumption should be necessary.

If you are not happy with the expression, because you think that (for
wahtever reasons) it does not fully capture your specific problem
(which you do not clearly describe by the way), you simply modify it.
This has nothing to do with -assert- and its speed as a built-in
command.

Anyway, checking your assumption of integer values only, is just one
additional line away

cap as foo = int(foo) ,f

-- 
Assert is fun, as always, if only I could assume that the values are
always natural numbers starting at 0.
*
*   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