R/rotateMatrix180.r

#' rotate180.matrix
#' 
#' Rotate a matrix 180 degrees clockwise.
#' 
#' From http://www1.maths.lth.se/help/R/image/
#'
#' @param x The input matrix.
#'
#' @return The rotated matrix
#'
#' @keywords keywords
#'
#' @export
rotate180.matrix <- function(x) { 
  xx <- rev(x)
  dim(xx) <- dim(x)
  return(xx)
}
jrminter/rXEDS documentation built on May 19, 2019, 11:55 p.m.