Displaying 1 result from an estimated 1 matches for "7c432".
Did you mean:
7432
2011 Apr 20
2
get cells by the combination of their column and row names
...on the combination of their column and row names.
This illustrates my problem: mtrx <- matrix(c(1,2,3,4,5,6,7,8,9), nrow=3, ncol=3, dimnames = list(c('c132','c432', 'c233'), c('r132','r233', 'r432')))> mtrx r132 r233 r432c132 1 4 7c432 2 5 8c233 3 6 9
At this point I want to compute the mean of the cells in which the column and the row names share the same suffix (i.e., the cells mtrx[1,1], mtrx[2,3], mtrx[3,2]). By suffix I mean the last three digits of the row/col name.
I need a generic code (and not vec<-c...