Takes a list where each element is a group of rows that have been spanned by a multirow row and combines it into one large matrix.

simplifyDims(x)

Arguments

x

list of spanned rows

Details

All rows must have the same number of columns. This is used to format the list for printing.

Value

a matrix that contains all of the spanned rows.

Author

Charles Dupont

See also

Examples

a <- list(a = matrix(1:25, ncol=5), b = matrix(1:10, ncol=5), c = 1:5)

simplifyDims(a)
#>   [,1] [,2] [,3] [,4] [,5]
#>      1    6   11   16   21
#>      2    7   12   17   22
#>      3    8   13   18   23
#>      4    9   14   19   24
#>      5   10   15   20   25
#>      1    3    5    7    9
#>      2    4    6    8   10
#> c    1    2    3    4    5