Description Usage Arguments Value Author(s) See Also Examples
Transform a N-dimensional array a to vector. The transformation is done assuming that the last index of the array moves fastest. For instance, an array a of dimensions (2,2,2) will produce the vector v = ( a[1,1,1], a[1,1,2], a[1,1,3], a[1,2,1], a[1,2,2],…,a[3,3,3]).
1 | Array2Vector(arr)
|
arr |
The array to be transformed. |
A vector filled with the data of the input array arr
.
Thomas Suesse.
Maintainer: Johan Barthelemy johan@uow.edu.au.
The inverse transformation is performed with the function
Vector2Array
1 2 3 4 | # generating an array of dimension (3,3,3)
a <- array(seq(1:27),dim=c(3,3,3))
# transforming it into a vector
v <- Array2Vector(a)
|
Loading required package: cmm
Loading required package: Rsolnp
Loading required package: numDeriv
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.