How to traverse matrix in diagonal strips and return the index of each position?
<p>Have a matrix N x N and I want to traverse this matrix in diagonal strips and return the index position. </p>

<p>If I have a matrix 4x4 the code should return (1,1); (1,2); (2,1); (1,3); (2,2); (3,1); (1,4); (2,3); (3,2); (4,1); and so on</p>

<p>I'm trying to do this in R Studio</p>