partition | R Documentation |
This function split a matrix into a list of blocks (either by rows and columns).
partition(Matrix, nrows, ncols)
Matrix |
a matrix to split . |
nrows |
positive integer indicating the number of rows blocks. |
ncols |
positive integer indicating the number of columns blocks. |
a list of partitioned submatrices
Mat = matrix(c(1,0.5,0,0,
0.5,2,0,0,
0,0,3,0.2,
0, 0, 0.2,4), nrow = 4, ncol = 4, byrow = TRUE)
partition(Matrix = Mat, nrows = 2, ncols = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.