split_matrix | R Documentation |
This function splits a matrix into multiple smaller matrices by column or row. It is useful for processing large matrices in chunks, such as when performing analysis on a single computer with limited memory.
split_matrix(matrix, chunk_size, column = TRUE)
matrix |
A numeric or logical matrix to be split. |
chunk_size |
The number of columns or rows to include in each smaller matrix. |
column |
Divided by column(default is |
A list of smaller matrices, each with chunk_size
columns or rows.
library(easybio)
split_matrix(mtcars, chunk_size = 2)
split_matrix(mtcars, chunk_size = 5, column = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.