[R] left transpose

Vokey, John vokey at uleth.ca
Tue Oct 22 03:52:53 CEST 2013


useRs,
  I frequently require the following transform of a matrix that I call a leftTranspose:

  -- transposes x such that the last items of each row become
  -- the first items in each column.  E.g.,
  --      a b c d
  --      e f g h
  -- becomes:
  -- d h
  -- c g
  -- b f
  -- a e

because it is a leftward rotation.  I have written my own function, but I was wondering whether I was reinventing the wheel here.  Does such a transpose already exist in R (or matlab/octave/FreeMat, for that matter)?


--
Please avoid sending me Word or PowerPoint attachments.
See <http://www.gnu.org/philosophy/no-word-attachments.html>

-Dr. John R. Vokey



More information about the R-help mailing list