Suppose I have a list like this in R:
> L
[[1]]
[1] 0.6876619 0.7847888 0.6377801 0.2078056 0.8981001
[[2]]
[1] 0.9358160 0.8905056 0.7715877 0.8648426 0.4915060
[[3]]
[1] 0.88095630 0.08010288 0.15140700 0.35400865 0.60317717
[[4]]
[1] 0.07436267 0.85873209 0.49881141 0.92363954 0.87208334
And I want to find the correlation coefficient between each pair of vectors, e.g, cor(L[[i]],L[[j]]). Is there any solution to perform it with the apply family function?
Please take it as a specific case of a general question: What if we need to do a triple nested loop over a List() in R?