Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: -cf- problem with var named _merge

From   Phil Schumm <>
Subject   st: -cf- problem with var named _merge
Date   Wed, 13 Oct 2004 17:51:52 -0500

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
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

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.

-- Phil
* For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index