Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Drop in a do file


From   Joseph Trubisz <jtrubisz@mac.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: Drop in a do file
Date   Sat, 18 Nov 2006 17:33:02 -0800

Hi...

I am automating a bunch of commands in a do file, so I can rerun the do file, just changing the argument.

If I have a:

drop km*

in my do file, the first time thru, it fails because it can't drop it.

No problem, since I can run as: do clusterk 4, nostop 
and it goes fine.

However, if I rerun the next time thru as: do clusterk 6, nostop, it fails with error number 198,
saying that variable km2 exists. You can see that the drop works though, since it disappears
from the variables window.

What am I doing wrong?

TIA,
Joe
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index