powered by
Transpose a 'listenv' array by permuting its dimensions
# S3 method for listenv aperm(a, perm, ...)# S3 method for listenv t(x)
# S3 method for listenv t(x)
Returns a list environment with permuted dimensions
(listenv) The list environment to be transposed
(integer vector) An index vector of length dim(a)
dim(a)
Additional arguments passed to base::aperm().
base::aperm()
These functions works like base::aperm() and base::t().
base::t()
x <- as.listenv(1:6) dim(x) <- c(2, 3) dimnames(x) <- list(letters[1:2], LETTERS[1:3]) print(x) x <- t(x) print(x) x <- aperm(x, perm = 2:1) print(x)
Run the code above in your browser using DataLab