normalize: generic normalization function

Description Usage Arguments Examples

Description

generic normalization function

Usage

1
2
3
4
5
6
normalize(object, ...)

## S4 method for signature 'SpectraInTime'
normalize(object, method = "normalize",
  wavelengthRange = r(-Inf, Inf), wavelength = NULL, scaleFunction = "sd",
  meanFunction = NULL)

Arguments

object

a S4 class object

...

additional parameters

method

a method for normalization or peak correction , choose from: * normalize substract mean and divide by scale * peak scale by reference wavelength * integrate scale by integrating over wavelengthRange

wavelengthRange

range for integration if method = integration , defaults to complete range

wavelength

reference wavelength for peak regresssion

scaleFunction

scale function used when method = normalize defaults to sd

meanFunction

mean function used when method = normalize defaults to mean

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 spectralEx            <-  getSpectraInTimeExample()
 timeRange                        <-  range( getTimePoints( spectralEx ))
 timesToSelect                    <-  e(  seq( timeRange[1] , timeRange[2] , length.out = 5  )   )
 ## Not run: 
 plot( spectralEx )
 plot( spectralEx[ timesToSelect ,  ] , type = "time" )

## End(Not run)
 normalizePeak         <-  normalize( spectralEx , method = "peak" , wavelength = 400 )
 getPreprocessing( normalizePeak )
## Not run: 
 plot( normalizePeak[ timesToSelect ,  ] , type = "time" )
 plot( normalizePeak )

## End(Not run)
 normalizeIntegration  <-  normalize( spectralEx , method = "integration" )
## Not run: 
 plot( normalizeIntegration[ timesToSelect ,  ] , type = "time" )

## End(Not run)
 normalizedUser  <-  normalize( spectralEx , method = "normalize" , mean = "median" , scale = "sd" )
## Not run: 
 plot( normalizedUser[ timesToSelect ,  ] , type = "time" ) 

## End(Not run)

spectralAnalysis documentation built on June 12, 2018, 5:04 p.m.