Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re st: destring_loop

From   Phil Clayton <>
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


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:

© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index