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

st: vallist.ado


From   [email protected]
To   [email protected]
Subject   st: vallist.ado
Date   Thu, 23 Jan 2003 13:53:57 +0100

Statalisters, 

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

Thanks a lot, 

Ben Kriechel



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