You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a matrix is indexed like A[:4,], it returns four values (0..3)
It is confusing that the same does not apply to for loop ranges, for (i in 0:4) iterates five times/ five values 0..4
a single iteration needs for (i in 0:0) which is unintuitive
A = as.matrix([0,1,2,3,4,5,6]);
print(transpose(A[:4,]));
for (i in 0:4) {
print(A[i,]);
}
The text was updated successfully, but these errors were encountered:
When a matrix is indexed like A[:4,], it returns four values (0..3)
It is confusing that the same does not apply to for loop ranges,
for (i in 0:4)
iterates five times/ five values 0..4a single iteration needs
for (i in 0:0)
which is unintuitiveThe text was updated successfully, but these errors were encountered: