Closed HenrikBengtsson closed 3 years ago
Currently,
> x <- as.list(1:6); dim(x) <- c(2,3) > aperm(x, 2:1) [,1] [,2] [1,] 1 2 [2,] 3 4 [3,] 5 6 > y <- as.listenv(x) > aperm(y, 2:1) Error in aperm.default(y, 2:1) : invalid first argument, must be an array > is.array(y) [1] TRUE
aperm() is a generic function, so should be possible to write one for list environments.
aperm()
Shuffling around dimensions should be fairly cheap, because it would only require shuffling around elements in the internal variable map accordingly.
Currently,
aperm()
is a generic function, so should be possible to write one for list environments.