[R] Base function for flipping matrices
gunter.berton at gene.com
Sat Dec 31 20:40:36 CET 2011
But if not, it seems to me that it should be added as an array method
to ?rev with an argument specifying which indices to rev() over.
On Sat, Dec 31, 2011 at 7:08 AM, Hadley Wickham <hadley at rice.edu> wrote:
> Hi all,
> Are there base functions that do the equivalent of this?
> fliptb <- function(x) x[nrow(x):1, ]
> fliplr <- function(x) x[, nrow(x):1]
> Obviously not hard to implement (although it needs some more checks),
> just wondering if it had already been implemented.
> Assistant Professor / Dobelman Family Junior Chair
> Department of Statistics / Rice University
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
Genentech Nonclinical Biostatistics
Internal Contact Info:
More information about the R-help