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

st: RE: vallist.ado


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: vallist.ado
Date   Thu, 23 Jan 2003 15:42:33 -0000

[email protected]
> 
> I am using the great vallist.ado in order to read out all variable 
> values to use in a loop. However, when I try to save it in my own 
> local macro, rather than the result macro, the resulting macro is 
> truncated. 
> 
> How can I generate a local macro that stores all the values from 
> r(list)? 
> >  vallist _t
> > 13240 13270 13301 13331 13362 13393 13423 13454 13484 13515 13546
> > 13574 13605 13635 13666 13696 13727 13758 13788 13819 > 
> 13849 13880
> > 13911 13939 13970 14000 14031 14061 14092 14123 14153 14184 14214
> > 14245 14276 14304 14335 14365 14396 1442 > 6 14457 14488 
> 14518 14549
> > 14579 14610
> > 
> > . local mylist="`r(list)'"
> > 
> > . di "`r(list)'"
> > 13240 13270 13301 13331 13362 13393 13423 13454 13484 13515 13546
> > 13574 13605 13635 13666 13696 13727 13758 13788 13819 > 
> 13849 13880
> > 13911 13939 13970 14000 14031 14061 14092 14123 14153 14184 14214
> > 14245 14276 14304 14335 14365 14396 1442 > 6 14457 14488 
> 14518 14549
> > 14579 14610
> > 
> > . di "`mylist'"
> > 13240 13270 13301 13331 13362 13393 13423 13454 13484 13515 13546
> > 13574 13605 136
> 

Ben has answered his own question, which is 
a matter of limits (see [R] limits). 

However, please note that -vallist- is 
considered to be superseded by -levels- 
so long as you have 7. At least, that 
is the view of the author of -levels- 
and of the author of -vallist-. 

Nick 
[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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index