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

st: RE: RE: a fancier loop (correction)


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: RE: a fancier loop (correction)
Date   Fri, 11 Apr 2003 10:32:57 +0100

> Applying this to Radu's problem, we could for
> example
> 
> tokenize `T'
> local i = 1
> foreach x of local X {
> 	local y : word `i++' of `Y'
> 	forval j = 1/9 {
> 		label var `x'``j'' `"fix. ass. `t': `y'"'
> 	}
> }
> 
> but in this case we gain nothing from that. More
> generally, it is not essential for these problems.

Should be 

tokenize `T'
local i = 1
foreach x of local X {
 	local y : word `i++' of `Y'
 	forval j = 1/9 {
 		label var `x'`j' `"fix. ass. ``j'': `y'"'
 	}
}




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