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

st: Modification to Stata's -merge- command

From   "Fred Wolfe" <>
To   <>
Subject   st: Modification to Stata's -merge- command
Date   Wed, 27 Aug 2003 17:20:23 -0500

Thanks to Kit Baum, -dmerge- is now available on SSC.

-dmerge- grew out of a discussion on the Stata list a few days ago about characteristics of Stata's merge and writing a wrapper around merge to change it's behavior. -dmerge- has the following differences.

1) It automatically sorts the master set.
2) It automatically drops _merge before merging.
3) It checks to see if the using set is correctly sorted. If not, it sorts it a temporary file, and then merges the master set with it.
4) It suppresses Stata's message about labels that come from both the master and using sets.
5) It uses ukeep() rather than keep() do to a Stata programming issue.

-dmerge- is a modification of Stata's official -merge-. In contrast to Stata's merge, -dmerge- automatically drops _merge() if it exists, automatically sorts the master set by the merging variables, automatically sorts the using data set if it is not sorted by the merging variables, and suppresses Stata's listing of variable labels used in both data sets.

-ssc install dmerge- will get the package.

Fred Wolfe

*   For searches and help try:

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