PomaPCA | R Documentation |
PomaPCA
performs a principal components analysis on the given SummarizedExperiment
object.
PomaPCA(
data,
outcome = NULL,
center = TRUE,
scale = TRUE,
ncomp = 4,
labels = FALSE,
ellipse = FALSE,
load_length = 1
)
data |
A |
outcome |
Character. Indicates the name of the |
center |
Logical. Indicates whether the variables should be shifted to be zero centered. Default is TRUE. |
scale |
Logical. Indicates whether the variables should be scaled to have unit variance before the analysis takes place. Default is TRUE. |
ncomp |
Numeric. Number of components to be included in the results. Default is 4. |
labels |
Logical. Indicates if sample names should be displayed. |
ellipse |
Logical. Indicates whether a 95 percent confidence interval ellipse should be displayed in score plot and biplot. Default is FALSE. |
load_length |
Numeric. Indicates the length of biplot loading arrows. Value between 1 and 2. Default is 1. |
A list
with results including plots and tables.
Pol Castellano-Escuder
data <- POMA::st000336 %>% # Example SummarizedExperiment object included in POMA
PomaImpute() %>%
PomaNorm()
## Output is a list with objects `factors` (tibble wth principal components), `eigenvalues` (tibble), `loadings` (tibble), `factors_plot` (ggplot2 object with PCA plot), `eigenvalues_plot` (ggplot2 object with eigenvalues plot), `loadings_plot` (ggplot2 object), and `biplot` (ggplot2 object)
# Default outcome (first factor variable in `colData`)
data %>%
PomaPCA(outcome = NULL,
center = TRUE,
scale = TRUE,
labels = FALSE,
ellipse = FALSE)
# Alternative outcome
data %>%
PomaPCA(outcome = "steroids",
center = TRUE,
scale = TRUE,
labels = FALSE,
ellipse = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.