I have a raster map (a digital elevation model) that i opened in R and I need to know the value (which is the altitude) of one specific grid point knowing its geographical coordinates. I've tried to use the extract() function but it seems not to work, and I've tried to convert it into a matrix but I only know the coordinates, not the column and row numbers of the cell. this is what my raster data looks like I think this is really simple but I'm stuck here.
Any idea how to get it ?