pcainfo | R Documentation |
Perform Principal Component Analysis (PCA) on log-expression data.
pcainfo(logcounts, center, scale)
logcounts |
Numeric matrix. Log-CPM values (genes × samples), e.g., from edgeR::cpm.. |
center |
Logical. If TRUE, center variables by subtracting the mean (default: TRUE). |
scale |
Logical. If TRUE, scale variables to unit variance (default: FALSE). |
This function transposes a log-count matrix (samples as columns, genes as rows) and runs PCA using "stats::prcomp() ", with options to center and scale variables.
An object of class "prcomp " containing the PCA results, including loadings, scores, and explained variance.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.