mat2Brick: tranform a matrix into a Brick of Data

View source: R/brick2Mat.R

mat2BrickR Documentation

tranform a matrix into a Brick of Data

Description

mat2Brick: Unfold an (I*K) by J data matrix into an I by J by K brick of data (i.e., array).

Usage

mat2Brick(aMat, nBlocks, names4Rows = NULL, names4Blocks = NULL)

Arguments

aMat

an (I*K) by J data matrix.

nBlocks

number of blocks (i.e., 3rd dimension of the output array). No default.

names4Rows

(Default: NULL) a I element vector for the row names of the output array. When NULL, the row names are created as I-1 to I-I.

names4Blocks

(Default: NULL) a K element vector for the names of 3rd-dimension of the output array. When NULL, the row names are created as B-1 to B-K.

Value

an I by J by K brick of data (i.e., array).


HerveAbdi/PTCA4CATA documentation built on July 17, 2022, 5:41 a.m.