Home > other >  Rookie help R language, help to see where this wrong! Urgent please
Rookie help R language, help to see where this wrong! Urgent please

Time:09-20

Mx <- matrix (nrow=2, ncol=2)
Z <- array (1:16)
For (k1 in 1:2)
{the for (k2 in 1:2)
{the for (k3 in 1:2)
{the for (k4 in 1:2)
{mx [1, 1]=k1; Mx [1, 2]=k2.
Mx (2, 1]=k3; Mx [2]=k4;
For (I in 1:2)
{the for (j in 1:2)
{the for (k in 1:2)
{if (mx [I, mx [j, k]].=mx [j, mx [I, k]])
Z [I] <0
The else
Break
}
}
}
For (m in 1:2)
{if (mx [m, 1)!=m && mx [m, 2].=m)
Z [I] <0
The else
Break
}
For (n in 1:2)
{if (mx [1, n]!=n && mx [2, n]!=n)
[I] The else
Break
}
[I] <0 if (z)
Print (mx)
The else
Break
}
}
}
}
  • Related