| pca_scoresplot3D_rgl | R Documentation |
Creates an interactive 3D PCA scores plot.
pca_scoresplot3D_rgl(
dataset,
pca.result,
column.class = NULL,
pcas = c(1, 2, 3),
size = 1,
labels = FALSE
)
dataset |
Dataset used in the PCA. |
pca.result |
PCA result object. |
column.class |
Optional metadata column used for colouring groups. |
pcas |
Principal components to plot. |
size |
Point size. |
labels |
Logical indicating whether sample labels should be shown. |
No return value, called for its side effect of plotting.
datamat <- matrix(
rnorm(20),
nrow = 4,
dimnames = list(paste0("x", 1:4), paste0("s", 1:5))
)
metadata <- data.frame(class = factor(c("A", "A", "B", "B", "A")))
dataset <- list(data = datamat, metadata = metadata)
pca_res <- pca_analysis_dataset(dataset)
pca_scoresplot3D_rgl(dataset, pca_res, column.class = "class")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.