Displaying 1 result from an estimated 1 matches for "tryuli".
Did you mean:
tryuly
2009 Jul 14
5
Nested for loops
Hi,
I have spent some time locating a quite subtle (at least in my
opinion) bug in my code. I want two nested for loops traversing the
above-diagonal part of a square matrix. In pseudo code it would
something like
for i = 1 to 10
{
for j = i+1 to 10
{
// do something
}
}
However, trying to do the same in R, my first try was
for (i in 1:10)
{
for (j in (i+1):10)
{
//