aperm.listenv | R Documentation |
Transpose a 'listenv' array by permuting its dimensions
## S3 method for class 'listenv'
aperm(a, perm, ...)
## S3 method for class 'listenv'
t(x)
a , x |
(listenv) The list environment to be transposed |
perm |
(integer vector) An index vector of length |
... |
Additional arguments passed to |
Returns a list environment with permuted dimensions
These functions works like base::aperm()
and 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.