Re: [R] what is "better" when combining data frames? merge vs. rbind & cbind

From: Duncan Murdoch <>
Date: Fri, 22 Jun 2007 06:40:23 -0400

On 21/06/2007 3:36 PM, Thomas Pujol wrote:
> I often need to "combine" data frames, sometimes "vertically" and other times "horizontally".
> When it "better" to use merge? When is it better to use rbind or cbind?
> Are there clear pros and cons of each approach?

If rbind or cbind work, use them. They are much simpler, but much less flexible.

Duncan Murdoch mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Fri 22 Jun 2007 - 10:44:41 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 22 Jun 2007 - 11:32:18 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.