scale: generic for scale

Description Usage Arguments Value Examples

Description

scale autoscaling method for MassSpectra object. Scaling is along the mass channels. Therefore more than one spectra is needed for scaling.

Usage

1
2
3
4
scale(x, center = TRUE, scale = TRUE)

## S4 method for signature 'MassSpectra'
scale(x, center = TRUE, scale = TRUE)

Arguments

x

object object of class MassSpectra

center

boolean should data be centered

scale

boolean should data be scaled

Value

object of class MassSpectra with scaled mass spectra

object of class MassSpectra

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## autoscaling of dummy image data
testImage<-MassImage('dummy')
par(mfcol=c(2,2))
plot(testImage,type='l')
image(testImage)
testImage <- scale(testImage)
plot(testImage,type='l')
image(testImage)
## Not run: 
## autoscaling of real spectral data
library(tofsimsData)
data(tofsimsData)
par(mfcol=c(2,2))
plot(testImage,type='l')
image(testImage)
testImage <- scale(testImage)
plot(testImage,type='l')
image(testImage)
## End(Not run)

tofsims documentation built on Nov. 8, 2020, 5:10 p.m.