Re: [R] Merging Matrices

2010-03-20 Thread duncandonutz
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

[R] Merging Matrices

2010-03-19 Thread duncandonutz
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

[R] Using indexing to manipulate data

2010-03-17 Thread duncandonutz
I know one of R's advantages is it's ability to index, eliminating the need for control loops to select relevant data, so I thought this problem would be easy. I can't crack it. I have looked through past postings, but nothing seems to match this problem I have a data set with one column of act