Description Usage Arguments Value Examples
View source: R/plotInteractivePCA.R
Returns an interactive PCA plot.
1 2 3 4 5 6 7 8 9 |
data |
numerical matrix or data frame, raw, normalized or transformed. Samples must be in rows and variables in columns |
meta |
data frame containing meta data |
group |
meta data columns to be represented in the plot |
model |
plots a "2D" (default) or "3D" version |
title |
plot's title |
colors |
character vector of custom colors |
inverse |
boolean vector to decide which component plot in reverse, the order is PC1, PC2, PC3 |
plotly object containing plot data
1 2 3 4 5 6 7 8 9 10 11 | Get the result and store it in an object
x <- plotInteractivePCA(combinedData, metaDF, c('Treatment', 'Week'), title="Treatment-week interaction")
direct plot with custom color
plotInteractivePCA(combinedData, metaDF, c('Treatment'), title="Treatment", colors = c("#F8766D", "#00BFC4", "#56B4E9"))
reverse PC1
plotInteractivePCA(combinedData, metaDF, c('Treatment', 'Week'), title="Treatment-week interaction", inverse = c(T,F,F))
3D version
plotInteractivePCA(combinedData, metaDF, c('Treatment', 'Week'), title="Treatment-week interaction", inverse = c(T,F,F), model="3D")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.