Do the raster cells have a rotation?
rotated(x)
x
Logical value
rectify
r <- raster() rotated(r)
Useful links