Phil Schumm <[email protected]> wrote:
> I believe I may have found a small problem with -cf- when one or both
> of the files being compared contains a variable named _merge.
> Consider the following:
>
> input y
> 1
> 2
> 3
> end
> save foo
> gen _merge = y
>
> If I now use -cf- to compare the data in memory to the file "foo", I get:
>
> . cf _all using foo
> _merge: 2 mismatches
>
> when in principle I should get:
>
> . cf _all using foo
> _merge: does not exist in using
>
> Alternatively, if I save the file again and then compare it against
> itself, I get:
>
> . save foo, replace
> file foo.dta saved
>
> . cf _all using foo
> _merge already defined
> r(110);
>
> A quick look at cf.ado suggests that the problem is caused by -cf-'s
> use of -merge-, and that using the _merge option to specify a
> temporary variable would be one way to solve the problem.
I have looked into this and see that Peter has found a bug in -cf-. I
have modified the code. The fix should be available in the next ado-file
update.
--Shannon Driver
[email protected]
*
* 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/