flatten_mxlists_to_array: Convert a list of lists of matrices to an array, as follows:...

View source: R/MatrixUtil.r

flatten_mxlists_to_arrayR Documentation

Convert a list of lists of matrices to an array, as follows: flatten each matrix into a single row, align the single rows within each list, then combine the rows into a single matrix per list align each single matrix and combine them into the z dimension of an array Preserves names and meta attribute.

Description

Convert a list of lists of matrices to an array, as follows: flatten each matrix into a single row, align the single rows within each list, then combine the rows into a single matrix per list align each single matrix and combine them into the z dimension of an array

Preserves names and meta attribute.

Usage

flatten_mxlists_to_array(lol.mx)

Arguments

lol.mx

a list of lists of matrices, eg: List of 2 $ year1:List of 2 ..$ 1: 'table' int [1:2, 1:3] 1 2 3 4 5 6 ..$ 2: 'table' int [1:2, 1:3] 21 22 23 24 25 26 $ year2:List of 2 ..$ 1: 'table' int [1:2, 1:3] 31 32 33 34 35 36 ..$ 2: 'table' int [1:2, 1:3] 41 42 43 44 45 46

NB: matrices can have different dimensions and are aligned first within a list, and then between the lists.

Value

an array

See Also

align.by.name.list.mx


kcha193/simarioV2 documentation built on April 8, 2024, 4:51 p.m.