search for: rook2

Displaying 1 result from an estimated 1 matches for "rook2".

Did you mean: hook2
2006 Feb 17
3
Matrix indexing in a loop
How do you specify matrix location a[i,j] (or a[i-1,j], etc.) in a "for" loop? I am looking for a flexible method of indexing neighbors over a series of lags (1,2,3...) and I may wish to extend this method to 3D arrays. Example: Data matrix > fun [,1] [,2] [,3] [1,] 1 5 9 [2,] 2 6 10 [3,] 3 7 11 [4,] 4 8 12 For each element a[i,j] in