Re: [R] An R clause to bind dataframes under certain contions

From: Henrique Dallazuanna <wwwhsd_at_gmail.com>
Date: Sat, 26 Jan 2008 18:22:43 -0200

Try this:

merge(x, y, all=T)

On 26/01/2008, zhihuali <lzhtom_at_hotmail.com> wrote:
>
> Hi netters,
> Suppose I have two data frames X and Y. X has three colnames A, B and C. Y has three colnames A,B and D.
>
> I want to combine them into one matrix, joining the rows having the same A and B values (X$A==Y$A and X$B = Y$B). So the resulting dataframe has four variables/columns: A,B,C and D.
>
> I was wondering what's the best way to do it in R. Could anyone give me some advice?
>
> Thanks!
>
> Zhihua Li
>
>
> _________________________________________________________________
> 手机也能上 MSN 聊天了,快来试试吧!
>
> [[alternative HTML version deleted]]
>
>
> ______________________________________________
> R-help_at_r-project.org 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.
>
>

-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O
______________________________________________
R-help_at_r-project.org 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 Sat 26 Jan 2008 - 23:45: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 Sun 27 Jan 2008 - 00:30:09 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.

list of date sections of archive