randomize_matrix: Randomize matrix

View source: R/utils-randomize-matrix.R

randomize_matrixR Documentation

Randomize matrix

Description

Utility function used in functions that require permutations of the expression matrix

Usage

randomize_matrix(mat, randomize_type = c("rows", "cols_independently"))

Arguments

mat

Matrix to randomize.

randomize_type

How to randomize.

Value

Randomized matrix

Examples

## 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)

saezlab/decoupleR documentation built on Oct. 21, 2024, 8:47 a.m.