scale: generic for scale

Description Usage Arguments Value Examples

Description

generic for scale

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)


Search within the tofsims package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.