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

st: Limit of numlist


From   Alan Neustadtl <[email protected]>
To   [email protected]
Subject   st: Limit of numlist
Date   Thu, 6 Oct 2005 09:56:53 -0400

I am trying to writre formatted text output from a Stata data file and
wrote a program based on the examples in the Stat manual and the UCLA
Web site (http://www.ats.ucla.edu/stat/stata/faq/outform.htm).

Some of the code is shown below.  I am getting an error "invalid
numlist has too many elements  r(123)".  I have 17,915 observations. 
If I limit my dataset to a smaller number of observations (using drop
or keep) to, say 1,000, or hardwire a smaller number, the program
sucessfully writes out the data.

After searching the documentation I cannot find a limit to the number
stored in numlist.  Is there such a limit?  If so, can it be
increased?

TIA,
Alan

*** Stata Code Follows ***
  quietly count;
  local l = r(N);
  foreach i of numlist 1/`l'{;
    file write temp
     _col(1)  %5.0f  (frm_id1[`i'])
     _col(8)  %5.0f  (co_id1[`i'])
     _col(14) %9.1f  (est_rnd_amt_fund[`i'])
    _newline;
  };

*
*   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