normalizeAverage: Rescales channel vectors to get the same average

normalizeAverageR Documentation

Rescales channel vectors to get the same average

Description

Rescales channel vectors to get the same average.

Usage

## S3 method for class 'matrix'
normalizeAverage(x, baseline=1, avg=stats::median, targetAvg=2200, ...)
## S3 method for class 'list'
normalizeAverage(x, baseline=1, avg=stats::median, targetAvg=2200, ...)

Arguments

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.

Value

Returns a normalized numeric NxK matrix (or list of length K).

Author(s)

Henrik Bengtsson


HenrikBengtsson/aroma.light documentation built on July 3, 2023, 1:57 a.m.