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]
Re: st: varlist for keepus option of merge limited?
From
daniel klein <[email protected]>
To
"[email protected]" <[email protected]>
Subject
Re: st: varlist for keepus option of merge limited?
Date
Wed, 28 Aug 2013 17:09:21 +0200
I do not think this would be considered a bug, but I agree that
documentatin is a bit missleading in this case. Another place where
this behavior is documented is -describe-.
Speculating on the reasons in the case of -merge-, I suspect the
problem is, Stata cannot access the using dataset at the time you call
-merge-, because the master dataset is in memory at that time.
Therefore, in -merge.ado- specifying the argument of the
-keepusing()- option as a varlist would abort with an error most of
the time (whenever a variable specified is not found in the _master_
dataset). Stata programmers therefore declare the argument to be a
string and probably the built-in command _merge, to which this
argument is passed, does not treat and expand it as a variable list
when checking the using dataset.
I agree that it would be nice if either this fact was indicated in the
help file or the code of -merge.ado- would be changed to allow a
varlist specifying ranges with the - chracter.
Best
Daniel
--
Hi,
This might be a bug in the Stata/MP 12.1 for Windows I am running, but
I specified a range of variables for the keepus option
("keepus(PNR-edulvl)") and got an error that "variable PNR-edulvl" was
not found in using dataset.
Where is it documented that what syntax I can use with keepus() and what not?
*
* 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/