Learn R Programming

specmine (version 1.0)

pca_robust: PCA analysis (robust)

Description

Performs a robust PCA analysis.

Usage

pca_robust(dataset, center = "median", scale = "mad", k = 10, write.file = F, 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

Run this code
  ## Example of performing a robust PCA analysis
  data(cachexia)
  pca.results = pca_robust(cachexia, center = "mean", scale = "mad", 
		k = 10)

Run the code above in your browser using DataLab