R/rot.R

Defines functions rot

Documented in rot

#' Rotate a matrix for printing
#' 
#' Rotates a matrix so that when view is called the rows and columns appear in the 
#' same order as when looking at the matrix with print 
#' 
#' @export
#' @param m matrix
#' @return matrix that has been transposed and the columns reversed
#' 
#' @examples
#' 
#' # Normally image shows a matrix with the first entry in the bottom left
#' # With rot the image is shown in the same order as print

rot <- function(m) t(m)[,nrow(m):1,drop=F]

Try the BaTFLED3D package in your browser

Any scripts or data that you put into this service are public.

BaTFLED3D documentation built on May 2, 2019, 2:38 p.m.