t.array: transpose an array

Description Usage Arguments Examples

View source: R/dim2.R

Description

transpose an array

Usage

1
2
## S3 method for class 'array'
t(x)

Arguments

x

an array

This reverses the dimensions of an array

Examples

1
2
3
4
5
x <- array(1:27, c(3,3,3))
tx <- t(x)
for (i in 1:3)
  for(j in 1:3)
    stopifnot(x[,j,i] == tx[i,j,])

listarrays documentation built on March 26, 2020, 6:10 p.m.