Learn R Programming

tofsims (version 1.0.2)

PrinComp-class: Class PrinComp

Description

Class PrinComp is a wrapper for the S3 function princomp

PrinComp is a PCA constructor function

Usage

prinComp(dataObject, ...)

Arguments

dataObject
object of class MassSpectra
...
additional args

Value

  • object of class prinComp

Details

Class PrinComp is a wrapper for the S3 function princomp

PrinComp constructor function uses call by reference. The new object is put into the analysis slot of the dataObject on which PCA was calculated.

Examples

Run this code
testImage <- MassImage('dummy')
testImage<-prinComp(testImage)
image(analysis(testImage, 1), comp = 1)
library(tofsimsData)
data(tofsimsData)
testImage<-prinComp(testImage)
image(analysis(testImage), 1), comp = 1)

Run the code above in your browser using DataLab