| pca_robust | R Documentation |
Performs robust PCA using pcaPP::PCAgrid().
pca_robust(
dataset,
center = "median",
scale = "mad",
k = 10,
write.file = FALSE,
file.out = NULL,
...
)
dataset |
Dataset to analyse. |
center |
Centering method. |
scale |
Scaling method. |
k |
Number of principal components to compute. |
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 returned by pcaPP::PCAgrid().
datamat <- matrix(
rnorm(30),
nrow = 6,
dimnames = list(paste0("x", 1:6), paste0("s", 1:5))
)
metadata <- data.frame(class = factor(c("A", "A", "B", "B", "A")))
dataset <- list(data = datamat, metadata = metadata)
pca_robust(dataset, k = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.