View source: R/multi_covar_pca.R
multi_covar_pca | R Documentation |
PCA plot of top two principal components using ggplot2
whose shape is defined by group and color in each plot
by iterating over each covariate.
multi_covar_pca(
object,
pheno.df,
name = "covar_pca",
grp.var = "grp",
covars = setdiff(colnames(pheno.df), grp.var),
alpha = 1,
all.size = NULL,
facet = NULL,
rm.leg.title = FALSE,
labels = FALSE,
manual.color = NULL,
manual.shape = NULL,
plot = TRUE
)
object |
Matrix-like object with features (e.g. genes) as rows and samples as columns. |
pheno.df |
Dataframe with rows as samples and columns as phenotypes. |
name |
Name of file to create. Set to |
grp.var |
Column of |
covars |
Columns of |
alpha |
Transparency, passed to |
all.size |
Passed to |
facet |
A formula with columns in |
rm.leg.title |
Logical indicating if legend title should be removed. |
labels |
Logical, should sample labels be added next to points? |
manual.color |
Vector passed to |
manual.shape |
Vector passed to |
plot |
Logical; should plot be generated? |
PCA is calculated with prcomp
.
Invisibly, a list of the first two principal components appended to pheno.df
for each covariate.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.