transpose an array

# S3 method for array
t(x)

Arguments

x

an array

This reverses the dimensions of an array

Examples

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,])