I got some questions about linking 2 matrix in R.
I got a matrix with depth associated to latitudes (rows, i) and longitudes (col, j) within a lagoon. Here is an example of the data :
[,1] [,2] [,3]
[1,] 2.28 3.80 4.55
[2,] 1.35 5.70 2.88
[3,] 3.79 4.40 3.24
I got a list of couples of coordinates (i,j) indicating areas of interest within the lagoon. For example :
1,2, 3,3, 2,1
etc.
What I need to do is to replace the coordinates of the list by the corresponding depth values of the first matrix.