unfold {rrcov3way} | R Documentation |
Matrix unfolding
Description
Conducts matricizations of a three-way array into matrices according to the selected mode.
Usage
unfold(x, mode=c("A", "B", "C"))
Arguments
x |
Array to be unfolded |
mode |
the selected mode for unfolding |
Value
A matrix represnting the input array, according to the selected mode:
Mode=A:
B
-mode entities are nested withinC
-mode entities (all the frontal slices of the array next to each other) item Mode=B:C
-mode entities nested withinA
-mode entities (all the horizontal slices of the array next to each other) item Mode C:A
-mode entities nested withinB
-mode entities (all the lateral slices of the array next to each other)
Author(s)
Valentin Todorov valentin.todorov@chello.at
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 array
## matricized X with the A-mode entities in its rows
## all the frontal slices of the array next to each other
##
(Xa <- unfold(X))
dim(Xa)
## matricized X with the B-mode entities in its rows
## all the horizontal slices of the array next to each other
##
(Xb <- unfold(X, mode="B"))
dim(Xb)
## matricized X with the C-mode entities in its rows
## all the lateral slices of the array next to each other
##
(Xc <- unfold(X, mode="C"))
dim(Xc)
[Package rrcov3way version 0.5-0 Index]