threeDarr {BurStFin} | R Documentation |
Combine matrices into 3D array
Description
Returns a three-dimensional array given one or more matrices and instructions on how to combine them.
Usage
threeDarr(..., rep = 1, union = TRUE, slicenames = NULL)
Arguments
... |
one or more matrices. |
rep |
an integer saying how many times to replicate the slices. |
union |
logical value: if |
slicenames |
a character vector with length equal to the number of slices in the resulting array. |
Value
an array with the first two dimensions being the union or intersection of the first two dimensions of the input matrices, and third dimension equal to the number of input matrices times the number of replications.
Details
The full name of arguments rep
, union
and slicenames
must be given (no abbreviations)
because they come after the three-dots construct.
Revision
This help was last revised 2012 January 22.
See Also
More general functionality of this sort can be found in the
abind
package.
Examples
## Not run:
multiple.var <- threeDarr(var1, var2, slicenames=c("standardVar", "crashVar"))
reparr <- threeDarr(matrix1, rep=3)
## End(Not run)