randomize_matrix {decoupleR} | R 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)

[Package decoupleR version 2.0.1 Index]