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

st: RE: RE: referencing variables


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: RE: referencing variables
Date   Thu, 9 Jan 2003 18:25:48 -0000

Daniel M�ller

> foreach m in 2 3 6 8 {
> 	gen y = x`m' + 1
> }

Second time around the loop,
it will fail, as y already exists.

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