-----Original Message-----
From: David Kantor [mailto:[email protected]]
Sent: Fri 9/12/2003 8:45 AM
To: [email protected]
Cc:
Subject: st: describe
Hi everyone.
I've noticed a certain restriction in -describe-, which presented a bit of
a problem. I think I found a solution, but I just thought I'd ask for
opinions from the rest of you.
If I do
des var using file1
and var is an abbreviation (not the full name) for a variable in file1,
then the command fails. (var does not end with an asterisk.)
But if I -use- file1 and then,
des var
it works fine.
Is there a way to check that a variable exists in a file that is not
currently loaded, where the name might possibly be abbreviated? -- without
loading that file?
My solution is to append an asterisk on var:
des var* using file1
Thus it succeeds if var is a legitimate abbreviation for at least one
variable in file1, which may be a bit imprecise, but good enough for what
I'm doing.
Any other suggestions? And has anyone else find this limitation of
-describe- to be a problem?
Yes, it is a problem. However, one work around is
qui des using file1, varlist
this puts the variable names in r(varlist) where they can be searched, You could then identify if the variable was present and do des again.
Fred
<<winmail.dat>>