[R] Basic matrix manipulation problem

Hans Thompson hans.thompson1 at gmail.com
Tue Apr 24 22:36:25 CEST 2012

Hello, this forum was very helpful yesterday with a simple question I had on
working with tables.   What function will I need to use to do the following.

Move matrix a:

       A    B   C   D
x    1    2    3    4
y    5    6    7    8

to the mean of B&C and C&D:

      BC  CD  
x   2.5  3.5
y   6.5  7.5

and then to the mean of B&CB, C&BC, C&CD, and D&CD:

x  1.75  2.25  3.25  3.75
y  6.25  6.75  7.25  7.75

Thanks again for any help.  I'm putting in some good time after work trying
to learn this language and any help would be great.

View this message in context: http://r.789695.n4.nabble.com/Basic-matrix-manipulation-problem-tp4584734p4584734.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list