normalize {spectralAnalysis} | R Documentation |
generic normalization function
Description
generic normalization function
Usage
normalize(object, ...)
## S4 method for signature 'SpectraInTime'
normalize(
object,
method = "normalize",
spectralRange = r(-Inf, Inf),
spectralAxisVal = NULL,
scaleFunction = "sd",
meanFunction = NULL
)
## S4 method for signature 'SpectraInTimeComp'
normalize(object, ...)
Arguments
object |
a S4 class object |
... |
additional parameters |
method |
a method for normalization or peak correction , choose from: * normalize substract |
spectralRange |
range for integration if method = |
spectralAxisVal |
reference spectral axis value (wavelength or other) for |
scaleFunction |
scale function used when method = |
meanFunction |
mean function used when method = |
Value
Examples
spectralEx <- getSpectraInTimeExample()
timeRange <- range( getTimePoints( spectralEx ))
timesToSelect <- e( seq( timeRange[1] , timeRange[2] , length.out = 5 ) )
plot( spectralEx )
plot( spectralEx[ timesToSelect , ] , type = "time" )
normalizePeak <- normalize( spectralEx , method = "peak" , spectralAxisVal = 400 )
getPreprocessing( normalizePeak )
plot( normalizePeak[ timesToSelect , ] , type = "time" )
plot( normalizePeak )
normalizeIntegration <- normalize( spectralEx , method = "integration" )
plot( normalizeIntegration[ timesToSelect , ] , type = "time" )
normalizedUser <- normalize( spectralEx , method = "normalize" , mean = "median" , scale = "sd" )
plot( normalizedUser[ timesToSelect , ] , type = "time" )
[Package spectralAnalysis version 4.3.3 Index]