I have 3 data frames of unequal sizes which I would like to merge together (by row) according to their column labels.
a = matrix(c(1,2,3,4,5,6),nrow=2,ncol=3)
b = matrix(c(1,3,4,5,6,7,8,9),nrow=2,ncol=4)
c = matrix(c(2,4,4,5,6,7),nrow=2,ncol=3)
a = data.frame(a)
b = data.frame(b)
c = data.frame(c)
colnames(a) <- c('Apples','Pears','Oranges')
colnames(b) <- c('Apples','Oranges','Peaches','Pears')
colnames(c) <- c('Apples','Pears','Peaches')
So I'm after a merged matrix of 6 rows x 4 columns with all the Apple, Pear, Orange and Peach data in the same columns.
How do I do this?