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
"Eric A. Booth" <[email protected]>
To
[email protected]
Subject
Re: st: the fastest way to check if unique values of a variable > 100
Date
Sun, 25 Aug 2013 13:01:28 -0500
<>
Try -unique- or -distinct- from SSC.
On Sun, Aug 25, 2013 at 11:18 AM, László Sándor <[email protected]> wrote:
> Hi,
> Currently I think it is worth a quiet -cap tab- to catch the error
> r(134) or r(r). But it still can be a wasteful operation, as tabbing
> does work for many thousands of observations. And of course it does
> more than simply count the unique values.
>
> However, -inspect- or -codebook- are even worse as they keep counting
> even if I mistakenly throw in a continuous variable, plus they also
> calculate many things extra.
>
> Is there a fast approach I am not aware of?
>
> Thanks,
>
> Laszlo
> *
> * 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/
*
* 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/