I wrote
>. foreach v of var rpy* {
>2. local new : subinstr local v "rpy" "_rpy"
>3. replace `new' = `v'
>4. } if show3 == 1
>I don't believe you typed that and got success as the
>trailing
>if show3 == 1
>is illegal.
!!! Correction (and apology!): I guess that you are using Stata 7,
and that you are seeing a bug or a limitation of Stata 7.
Stata 7 in effect ignores the code "if show3 == 1" after
the brace. Whether that's a bug or not, it belongs to history.
Stata won't fix it now. Stata 7 is frozen at its last update.
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/