[R] spinning and flipping arrays

Thomas Lumley tlumley at u.washington.edu
Tue May 27 16:04:47 CEST 2003

On Mon, 26 May 2003, Bill Rising wrote:

> Hello people,
> Is there some simple way of spinning and/or flipping arrays in R?
> Here's what I mean.

I don't think there's a built-in solution.

I would try constructing the permutation of indices, probably using
aperm() to move the index of interest to first or last place, whichever is

This sort of thing might well be worth coding at least partly in C.


More information about the R-help mailing list