Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: RE: surprising behaviour in -lookfor-?


From   David Elliott <[email protected]>
To   [email protected]
Subject   Re: st: RE: surprising behaviour in -lookfor-?
Date   Mon, 26 Jan 2009 21:22:01 -0400

2009/1/26 Jeph Herrin <[email protected]>:

>> And yes, I have used -lookfor- in -do-files before, it is a
>> handy way of grabbing a list of variables and storing them in
>> a local.
In this case, I abbreviated -fullnames- to -fu-, and was finding
variables that in no way matched -myvar-. Took me a while to
puzzle out.

Note, of course, that -lookfor- can bite you by returning a variable
name that has the search string in its label.

Options like varonly or labonly would increase -lookfor-'s utility in
this context.  I think the second quote by Heinlein below is very
apropos...

-- 
David Elliott

Everything is theoretically impossible, until it is done.
Progress is made by lazy men looking for easier ways to do things.
 -- Robert A. Heinlein (American science-fiction Writer, 1907-1988)
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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