Greetings.
Suppose I have a large Stata dataset (e.g. 3,000,000 observations) and I
only with to read in the first, say, 100 observations.
I have tried the code, which works:
use mydata if ( _N<100 )
However, evidently, this code goes through ALL 3 million observations to
evaluate the expression in parentheses, which can be very time consuming
(and sort of defeats the purpose). Is there a way to only read the
first 100 observations without having to evaluate the entire dataset?
Perhaps some application of the "set obs 100"? But I have not been
successful.
Thank you.
-Mark
----------------------------------------------
Mark Rodini
[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/