condensing for loops?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

condensing for loops?

bmarconi
Hi, I wanted to condense a series of nested for loops with apply/dply, but still lost on how.

i have a matrix (i_n) x (k) and each column in a row will depend on diagonal column/row entry. so essentially i'd like to condense the following:

[code]
for(i_1 in 1:k){
   for(i_2 in i_1:k){
      etc...}}
[/code]