I\'ve been reading the docs for R image() but I don\'t get it. Why does this matrix:
image()
> mat1 [,1] [,2] [,3] [1,] 1 0 1 [2,] 0
when viewing a matrix as image using something like this:
m <- some matrix
image(m) R turns it upside down. After some small headaches, I found this quick fix.
image(m)
image(m[,nrow(m):1])
nrow(m) gives the number of rows of your matrix
nrow(m)
nrow(m):1 makes a sequence backwards
nrow(m):1