3
I need to create a matrix that has all the coordinates for a 128x128 matrix in R
if it were a 3x3 matrix, ex:
1 2 3
1 a b c
2 d e f
3 g h i
I would need the following matrix
x y
1 1 1
2 1 2
3 1 3
4 2 1
5 2 2
6 2 3
7 3 1
8 3 2
9 3 3
how can I make a repeat code to reproduce this?
How are your data? You only need the coordinates of the matrix (i.e., row and column numbers) or the names of the columns and rows are coordinates (e.g., geographical coordinates)?
– Carlos Eduardo Lagosta