Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: RE: putting files together

From   David Kantor <>
Subject   Re: st: RE: putting files together
Date   Wed, 28 Mar 2007 10:02:32 -0400

At 08:01 AM 3/28/2007, Maarten L. Buis wrote:
In other words, -append- adds rows, and -merge-
adds columns.
I would say that the primary purpose of -append- is to add rows, and the primary purpose of -merge-is to add columns, but both of these can add both rows and columns, depending on the circumstances.

Maarten already stated some of this, but I will add my own thoughts:
To the extent that there are variables not common to both datasets, -append- will add columns.
To the extent that there are unmatched observations, -merge- will add rows.

In a -merge-, if there are no matches at all (no _merge==3 cases), then the results of -append- and -merge- are the same.

-merge- may possibly not add columns, if the set of variables are the same. -append- always adds rows.


* For searches and help try:

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