first time user here. I am converting matrix into im object from package spatstat. However, top left value from the matrix mat[1,1] is written in the down left corner of the image e.g. the im function reads the rows of the matrix from top to bottom but writes them into im starting from bottom. Tried to specify yrow argument of im() to be seq() in reverse order but still same result.Suggestions how to fix this?
require(spatstat)
mat <- matrix(seq(1,20, by=1), nrow=4, ncol=5)
print(mat)
im <- im(mat, xcol = seq(1,5), yrow = seq(4,1))
plot(im, axes = T)