Ernie Adorio <adorio at math.upd.edu.ph> writes:> If not possible, is there any built-in R command to reverse the rows of a > matrix?How about Face[nrow(Face):1, ] ? -- Bj?rn-Helge Mevik
I am displaying some image of a person's head stored as a matrix, using image(Face, col=gray((0:255)/255)) but the image is flipped, the nose is above the eyes. How can I correct this without making changes to the matrix Face? If not possible, is there any built-in R command to reverse the rows of a matrix? Ernie Adorio Math Department U.P. Diliman
On Thursday 16 October 2003 03:57 pm, Bj?rn-Helge Mevik wrote:> Ernie Adorio <adorio at math.upd.edu.ph> writes: > > If not possible, is there any built-in R command to reverse the rows of a > > matrix? > > How about Face[nrow(Face):1, ] ?Many thanks! Have to use Face[, ncol(Face):1] for normal view. Ernie Adorio