scale_matrix: scale_matrix - Scale and manipulate a matrix

View source: R/scale_matrix.R

scale_matrixR Documentation

scale_matrix - Scale and manipulate a matrix

Description

This function scales a given matrix and optionally performs additional manipulation. It can apply a logarithmic transformation (base 2) to the matrix, center and scale the values, and optionally manipulate the features based on a specified criteria.

Usage

scale_matrix(matrix, log2matrix = TRUE, manipulate = TRUE)

Arguments

matrix

The matrix to be scaled and manipulated.

log2matrix

Whether to apply a logarithmic transformation to the matrix. Default is TRUE. If set to TRUE, the matrix will be transformed using the log2eset function from the IOBR package.

manipulate

Whether to perform additional manipulation on the matrix. Default is FALSE. If set to TRUE, the function will use the feature_manipulation function to manipulate the matrix based on specified criteria.

Author(s)

Dongqiang Zeng

Examples

data("eset_gse62254", package = "IOBR")
head(eset_gse62254)
eset2<- scale_matrix(eset_gse62254, log2matrix = FALSE, manipulate = TRUE)
head(eset2)

IOBR/IOBR documentation built on May 5, 2024, 2:34 p.m.