shuffle_matrix: Shuffle matrix.

View source: R/pca.R

shuffle_matrixR Documentation

Shuffle matrix.

Description

Each row or column is shuffled separately. To reproduce the result, set the seed before running the function.

Usage

shuffle_matrix(x, margin = c("column", "row"))

Arguments

x

A matrix.

margin

A character scalar, either "row" or "column". Default to "column", because columns are usually used as features.

Value

A matrix.


markgene/yamatClassifier documentation built on Oct. 14, 2024, 2:36 a.m.