mat1 <- matrix(11:18, ncol=2, dimnames=list(letters[3:6],LETTERS[1:2]))
mat2 <- matrix(21:28, ncol=2, dimnames=list(letters[2:5],LETTERS[3:4]))
mat3 <- matrix(31:38, ncol=2, dimnames=list(letters[c(1,3:4,3)],LETTERS[4:5]))
mergeMatrixList(list(mat1, mat2))
mergeMatrixList(list(m1=mat1, m2=mat2, mat3), mode="union", useCol=2)
Run the code above in your browser using DataLab