romicsPCA: romicsPCA()

View source: R/07_Grouping.R

romicsPCAR Documentation

romicsPCA()

Description

Calculate the PCA of the data layer of the romics_object using the package FactoMineR. If the data layer contains some missing values those will be imputed using the missMDA::imputePCA() method (see the documentation of this function for more details). This function will return the PCA results and not a romics_object

Usage

romicsPCA(
  romics_object,
  ncp = 5,
  scale = TRUE,
  method = c("Regularized", "EM"),
  ncp.min = 0,
  ncp.max = 5,
  method.cv = c("gcv", "loo", "Kfold"),
  ...
)

Arguments

romics_object

has to be a log transformed romics_object created using romicsCreateObject() and transformed using the function log2transform() or log10transform()

ncp

inherited from missmda::imputePCA().

scale

inherited from missmda::imputePCA(). boolean. TRUE implies a same weight for each variable

method

inherited from missmda::imputePCA(). "Regularized" by default or "EM". TRUE implies a same weight for each variable

ncp.min

used only if ncp is not set. inherited from missmda::estim_ncpPCA().integer corresponding to the minimum number of components to test

ncp.max

used only if ncp is not set. inherited from missmda::estim_ncpPCA().integer corresponding to the minimum number of components to test

...

further arguments passed to or from other methods

row.w

inherited from missmda::imputePCA(). row weights (by default, a vector of 1 for uniform row weights)

Details

This function uses the dist() and hclust() functions to calculate the hierachical clustering and then plots the hclust with colors based on the current main_factor of the romics_object.

Value

Return the results of the PCA performed on the current version of the romics_object

Author(s)

Geremy Clair


PNNL-Comp-Mass-Spec/RomicsProcessor documentation built on March 18, 2023, 5:14 a.m.