Learn R Programming

arrayhelpers (version 1.1-0)

ta: Transpose arrays

Description

This function provides transposing of arrays or vectors as swapping their first two dimensions. t (array) can be enabled via setMethod, see the example.

Usage

ta(x)

Arguments

x

an array

Value

the array with the first two dimensions swapped.

See Also

t

Examples

Run this code
# NOT RUN {
a <- array (1 : 24, 4:2)
a
ta (a)

setMethod ("t", "array", ta)
t (a)
removeMethod ("t", "array")

# }

Run the code above in your browser using DataLab