normalizeAverage.matrix {aroma.light} | R Documentation |
Rescales channel vectors to get the same average.
## S3 method for class 'matrix': normalizeAverage(x, baseline=1, avg=median, targetAvg=2200, ...)
x |
A numeric NxK matrix (or list of length K). |
baseline |
An integer in [1,K] specifying which channel should be
the baseline. |
avg |
A function for calculating the average of one channel. |
targetAvg |
The average that each channel should have afterwards.
If NULL , the baseline column sets the target average. |
... |
Additional arguments passed to the avg function . |
Returns a normalized numeric
NxK matrix
(or list
of length K).
Henrik Bengtsson (http://www.braju.com/R/)