[R] Merging Matrices
duncandonutz
dwadswor at unm.edu
Fri Mar 19 21:11:42 CET 2010
I have two symmetric matrices, but of different dimensions. The entries are
identified by specific labels some of which are shared by both matrices. I
would like to sum the two matrices, but retain the union of the two. In
other words, I want the result to be the same size as the larger of the two
matrices, but with the entries that they share added together.
cbind() and rbind() don't work since the matrices are different sizes
(symmetrically). Merge doesn't want to cooperate, although it might be
because I can't understand the documentation. I tried the package "reshape"
but didn't get very far with that either. I tried simply adding (+) them,
but that was a stupid first try.
Any help is appreciated!
--
View this message in context: http://n4.nabble.com/Merging-Matrices-tp1605474p1605474.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list