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

From: Duncan Murdoch <murdoch_at_stats.uwo.ca>
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



R-help_at_stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html 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 https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.