| pca_analysis_dataset | R Documentation |
Auto-exported function: pca_analysis_dataset
pca_analysis_dataset(
dataset,
scale = TRUE,
center = TRUE,
write.file = FALSE,
file.out = NULL,
...
)
dataset |
Dataset to analyse. |
scale |
Logical indicating whether variables should be scaled. |
center |
Logical indicating whether variables should be centered. |
write.file |
Logical indicating whether scores and loadings should be written to files. |
file.out |
Output file prefix used when |
... |
Additional arguments passed to |
An object of class prcomp containing PCA results. The
x component stores sample scores and the rotation component
stores variable loadings.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.