Bookmark and Share

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: Re st: destring_loop


From   Phil Clayton <[email protected]>
To   [email protected]
Subject   Re: Re st: destring_loop
Date   Sat, 18 Aug 2012 19:50:42 +1000

That also suggests a one line solution to the current problem, assuming the variables are named var1 var2 and so on:

destring var2-var`=c(k)', replace

Phil

On 18/08/2012, at 6:33 PM, daniel klein wrote:
> ...
> Even though it is not needed here, Stata stores the number of
> variables in the current dataset in c(k). A loop would look like
> 
> forv j = 2/`=c(k)' {
>   [...]
> }
> 
> 


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index