PrinComp-class {tofsims} | R Documentation

## 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

### 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.

### Value

object of class prinComp

### Slots

`scale`

  vector see description of `stats::princomp`

`n.obs`

  numeric see description of `stats::princomp`

`call`

  language see description of `stats::princomp`

`center`

  center see description of `stats::princomp`

`sdev`

  vector see description of `stats::princomp`

### Author(s)

Lorenz Gerber <lorenz.gerber@slu.se>

### Examples

    testImage <- MassImage('dummy')
    testImage<-prinComp(testImage)
    image(analysis(testImage, 1), comp = 1)
    ## Not run:
    library(tofsimsData)
    data(tofsimsData)
    testImage<-prinComp(testImage)
    image(analysis(testImage), 1), comp = 1)
    ## End(Not run)

[Package tofsims version 1.20.0 Index]