View source: R/utils-randomize-matrix.R
randomize_matrix | R Documentation |
Utility function used in functions that require permutations of the expression matrix
randomize_matrix(mat, randomize_type = c("rows", "cols_independently"))
mat |
Matrix to randomize. |
randomize_type |
How to randomize. |
Randomized matrix
## Not run:
mat <- matrix(seq_len(9), ncol = 3)
mat
set.seed(42)
randomize_matrix(mat, randomize_type = "rows")
set.seed(42)
randomize_matrix(mat, randomize_type = "cols_independently")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.