pca_robust: Robust PCA analysis

View source: R/pca.R

pca_robustR Documentation

Robust PCA analysis

Description

Performs robust PCA using pcaPP::PCAgrid().

Usage

pca_robust(
  dataset,
  center = "median",
  scale = "mad",
  k = 10,
  write.file = FALSE,
  file.out = NULL,
  ...
)

Arguments

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 write.file = TRUE.

...

Additional arguments passed to pcaPP::PCAgrid().

Value

An object returned by pcaPP::PCAgrid().

Examples


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)



specmine documentation built on Aug. 5, 2026, 5:06 p.m.