

   AArrrraayy TTrraannssppoossiittiioonn

        aperm(a, perm, resize=TRUE)

   AArrgguummeennttss::

          a: the array to be transposed.

       perm: the subscript permutation vector.

     resize: a flag indicating whether the vector should be
             resized as well as having its elements reordered
             (default `TRUE'.)

   VVaalluuee::

        A transposed version of array `a', with subscripts per-
        muted as indicated by the array `perm'.  If `resize' is
        `TRUE', the matrix is reshaped as well as having its
        elements permuted.

        The function `t' provides a faster and more convenient
        way of transposing matrices.

   SSeeee AAllssoo::

        `t'.

   EExxaammpplleess::

        # interchange the first two subscripts on a 3-way array x
        x  <- array(1:24, 2:4)
        xt <- aperm(x, c(2,1,3))
        all( t(xt[,,2]) == x[,,2] )

