% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/scale_matrix.R
\name{scale_matrix}
\alias{scale_matrix}
\title{Scale and Manipulate a Matrix}
\usage{
scale_matrix(matrix, log2matrix = TRUE, manipulate = TRUE)
}
\arguments{
\item{matrix}{Numeric matrix with genes as rows and samples as columns.}

\item{log2matrix}{Logical indicating whether to apply log2 transformation
using [log2eset()]. Default is `TRUE`.}

\item{manipulate}{Logical indicating whether to perform feature manipulation
to remove problematic features. Default is `TRUE`.}
}
\value{
A scaled matrix (genes as rows, samples as columns).
}
\description{
Scales a gene expression matrix, optionally applies logarithmic
transformation, and performs feature manipulation to remove problematic
variables (e.g., genes with zero variance or missing values).
}
\examples{
set.seed(123)
test_matrix <- matrix(
  rlnorm(100),
  ncol = 5,
  dimnames = list(paste0("Gene", 1:20), paste0("Sample", 1:5))
)
eset2 <- scale_matrix(test_matrix, log2matrix = FALSE, manipulate = TRUE)
head(eset2)
}
\author{
Dongqiang Zeng
}
