pca_robust: PCA analysis (robust)

Description Usage Arguments Value Examples

View source: R/pca.R

Description

Performs a robust PCA analysis.

Usage

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

Arguments

dataset

list representing the dataset from a metabolomics experiment.

center

indicates how the data is to be centered. Can be a function or a vector with the center values of each column.

scale

indicates how the data is to be rescaled. Can be a function or a vector with the scale value of each column.

k

the desired number of components to compute

write.file

boolean value that indicates if the results from PCA analysis are going to be written on a file.

file.out

name of the file that will store the results.

...

additional parameters pass to or from other functions.

Value

Returns an object of class 'princomp' with the PCA results.

Examples

1
2
3
4
5
  ## Example of performing a robust PCA analysis
  library(specmine.datasets)
  data(cachexia)
  pca.results = pca_robust(cachexia, center = "mean", scale = "mad", 
		k = 10)

specmine documentation built on Sept. 21, 2021, 5:06 p.m.