[R] merging more than 2 data frames

Henrique Dallazuanna wwwhsd at gmail.com
Tue Feb 12 17:34:46 CET 2008


Try this:

data1 <- data.frame(Id=LETTERS[1:5], Value=sample(5))
data2 <- data.frame(Id=data1$Value, Value=c(10,20,30,40,50))
data3 <- data.frame(Id=data2$Value, Value=rnorm(5))

merge(merge(data1, data2, by.x="Value", by.y="Id"), data3,
by.x="Value.1", by.y="Id")



On 12/02/2008, joseph <jdsandjd at yahoo.com> wrote:
> Hi
> merge() takes only 2 data frames. What can you do to it to make take more than two data frames? or is there another function that does that?
> Thanks
> joseph
>
>
>
>
>       ____________________________________________________________________________________
> Looking for last minute shopping deals?
>
>         [[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



More information about the R-help mailing list