To clarify, the two matrices might look like this: A B C D E F A 1 2 3 4 5 6 B 2 4 6 8 10 12 C 0 0 0 0 0 0 D 0 1 0 1 0 1 E 3 6 9 11 13 15 F 2 2 2 2 2 2
B D E B 4 9 13 D 9 8 7 E 1 0 1 I would like this: A B C D E F A 1 2 3 4 5 6 B 2 8 6 17 23 12 C 0 0 0 0 0 0 D 0 10 0 9 7 1 E 3 7 9 11 14 15 F 2 2 2 2 2 2 Thanks. -- View this message in context: http://n4.nabble.com/Merging-Matrices-tp1605474p1636943.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@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.