scaling_mean: Mean scaling of each column

View source: R/utils.R

scaling_meanR Documentation

Mean scaling of each column

Description

Scale each variable (column) by the mean. Mean-scaling applied as (value - mean) / mean. As scaling_UV might give too much importance to flat trajectories due to the division by the standard deviation, by dividing by the mean, high intensity values will have a lower influence and the low intensity will be boosted.

Usage

scaling_mean(inputMat)

Arguments

inputMat

(Observation x Variable) data.frame of measurements, with observations as rows and different variables as columns.

Value

Matrix of measurements mean-scaled columnwise.

Examples

## Not run: 
inputMat <- data.frame(matrix(c(1,4,7, 8,4,0, 3,6,9), nrow=3))
scaling_mean(inputMat)
#          X1 X2  X3
# [1,] -0.75  1 -0.5
# [2,]  0.00  0  0.0
# [3,]  0.75 -1  0.5

## End(Not run)

santaR documentation built on May 24, 2022, 1:06 a.m.