Permutes the matricized (nxmxp) array X to the matricized array Y of order (mxpxn).
permute(X,n,m,p)
Arguments
X: Matrix (or data.frame coerced to a matrix) containing the matricized array
n: Number of A-mode entities of the array X
m: Number of B-mode entities of the array X
p: Number of C-mode entities of the array X
Returns
Y: Matrix containing the permuted matricized array
References
H.A.L. Kiers (2000). Towards a standardized notation and terminology in multiway analysis. Journal of Chemometrics 14:105--122.
Examples
X <- array(1:24, c(4,3,2))dim(X)## matricize the arrayXa <- unfold(X)# matricized X with the A-mode entities in its rowsdim(Xa)Xa
## matricized X with the B-mode entities in its rowsXb <- permute(Xa,4,3,2)dim(Xb)Xb
## matricized X with the C-mode entities in its rowsXc <- permute(Xb,3,2,4)dim(Xc)Xc