Learn R Programming

genpathmox (version 0.5)

matrix_to_blocks: Split a matrix into blocks

Description

Split a matrix into blocks

Usage

matrix_to_blocks(Matrix, blocks, byrow = TRUE)

Arguments

Matrix

a matrix to split

blocks

either a list or a vector indicating the blocks. If blocks is a list of vectors, then the length of each vector defines the size of the blocks. If blocks is a vector, then each element represents the size of the blocks.

byrow

logical. If TRUE (the default) the matrix is split by rows, otherwise the matrix is split by columns

Value

A list of matrices

Details

Internal function.