exportComp {DASplusR}R Documentation

Add PCA Results to a Data Set

Description

Adds the scores computed in principal component analysis to the given data set.

Usage

exportComp(x, data)

Arguments

x An object of class "princomp".
data A data object of class "DASData" or "data.frame". If not supplied, the active data set of DAS+R is used.

Details

If data is the active data set of DAS+R, the active data set is reloaded into DAS+R after the scores were added.

Author(s)

Andreas Alfons <andreas.alfons@student.tuwien.ac.at>

See Also

ExportCompGUI, princompDAS.

Examples

  ## KOLA95_Moss data
  data(KOLA95_MOSS)
  princomp.obj <- princompDAS(data = KOLA95_MOSS, 
      vars = c("Cu","Mg","Mn","Ni","Rb","Th"), 
      logVars = c("Cu","Mg","Mn","Ni","Rb","Th"), 
      cor = TRUE, robust = "covMcd")
  exportComp(princomp.obj, KOLA95_MOSS)

[Package DASplusR version 0.0-2 Index]