Вы можете попробовать код ниже
cs <- combn(ncol(R),2,FUN = function(v) v[1]:v[2],simplify = F)
rs <- combn(nrow(R),2,FUN = function(v) v[1]:v[2],simplify = F)
lst <- Map(function(p) Map(function(q) R[p,q],cs),rs)
так, чтобы
> head(lst,1)
[[1]]
[[1]][[1]]
0 0.44
0 1.00 0.75
0.5 0.75 0.75
[[1]][[2]]
0 0.44 0.77
0 1.00 0.75 0.5
0.5 0.75 0.75 0.5
[[1]][[3]]
0 0.44 0.77 0.88
0 1.00 0.75 0.5 0.25
0.5 0.75 0.75 0.5 0.25
[[1]][[4]]
0 0.44 0.77 0.88 0.99
0 1.00 0.75 0.5 0.25 0
0.5 0.75 0.75 0.5 0.25 0
[[1]][[5]]
0.44 0.77
0 0.75 0.5
0.5 0.75 0.5
[[1]][[6]]
0.44 0.77 0.88
0 0.75 0.5 0.25
0.5 0.75 0.5 0.25
[[1]][[7]]
0.44 0.77 0.88 0.99
0 0.75 0.5 0.25 0
0.5 0.75 0.5 0.25 0
[[1]][[8]]
0.77 0.88
0 0.5 0.25
0.5 0.5 0.25
[[1]][[9]]
0.77 0.88 0.99
0 0.5 0.25 0
0.5 0.5 0.25 0
[[1]][[10]]
0.88 0.99
0 0.25 0
0.5 0.25 0
ДАННЫЕ
R <- structure(c(1, 0.75, 0.5, 0, 0.75, 0.75, 0.5, 0, 0.5, 0.5, 0.25,
0, 0.25, 0.25, 0.25, 0, 0, 0, 0, 0), .Dim = 4:5, .Dimnames = list(
c("0", "0.5", "0.6", "0.8"), c("0", "0.44", "0.77", "0.88",
"0.99")))