Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: -confirm variable- does not accept varlist (wildcards)
From
László Sándor <[email protected]>
To
[email protected]
Subject
st: -confirm variable- does not accept varlist (wildcards)
Date
Thu, 5 Sep 2013 10:18:25 -0400
Just a note about something that bit me hard in the last few days:
contrary to the help file, -confirm variable- did not take a string I
meant as a varlist in the form of "q_*" but produced an error that *
is invalid. As the typical use case is with -capture- and -if (_rc)-,
I did not notice that the wrong fork of my code was executed until
quite some time.
To be clear, I am not sure how confirm *should* work with wildcards or
multiple variables anyway, I know. And it does accept abbreviations.
So "q_" does work, and it is even clearer about my intentions. And I
should have tested the code anyway. And I probably should have used
more specific -if (_rc==)- specifications to distinguish the variable
genuinely missing from other errors.
That said, it does not feel right to be bitten by a casual "varlist"
specified in the documentation actually not complying with what
varlists are. A few weeks ago I had a similar issue with ranges of
variables in the keepusing() option of -merge-.
Thanks,
Laszlo
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/