Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | daniel klein <klein.daniel.81@gmail.com> |
To | "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |
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/