I have a matrix, R of the following form.
0 0.44 0.77 0.88 0.99
0 1.00 0.75 0.50 0.25 0
0.5 0.75 0.75 0.50 0.25 0
0.6 0.50 0.50 0.25 0.25 0
0.8 0.00 0.00 0.00 0.00 0
here,
colnames(R)
[1] "0" "0.44" "0.77" "0.88" "0.99"
and
rownames(R)
[1] "0" "0.5" "0.6" "0.8"
I would like to create different submatrixes based on different combinations of the colnames and rownames of R. For example, a matrix like
0 0.44
0 1.00 0.75
0.5 0.75 0.75
0.6 0.50 0.50
OR
0 0.44 0.77 0.88
0 1.00 0.75 0.50 0.25
0.5 0.75 0.75 0.50 0.25
Thanks.