normalize: Normalize data

Description Usage Arguments Details Value Examples

Description

Normalize data (area under the curve = 1)

Usage

1
normalize(EEM_uf)

Arguments

EEM_uf

Unfolded EEM matrix where columns are wavelength condition and rows are samples

Details

The unfolded EEM data can be normalized by dividing each variable by the sum of the absolute value of all variables in a sample, such that the summation of absolute values of all variables in each sample was equal to 1. This is can be used to reduce the scaling difference,which is common in spectroscopic applications. This difference is usually caused by the scattering effect, source/detector variation and instrumental sensitivity.

Value

A matrix of normalized data

Examples

1
2
3
4
5
6
7
data(applejuice)
applejuice_uf <- unfold(applejuice) # unfold list into matrix
applejuice_uf_norm <- normalize(applejuice_uf) # normalize data

rowSums(abs(applejuice_uf_norm), na.rm = TRUE) # the absolute sum of each row equal to 1

  

Example output

 Aomori-Fuji-1-1  Aomori-Fuji-1-2  Aomori-Fuji-2-1  Aomori-Fuji-2-2 
               1                1                1                1 
 Aomori-Jona-1-1  Aomori-Jona-1-2  Aomori-Jona-2-1  Aomori-Jona-2-2 
               1                1                1                1 
Aomori-Ohrin-1-1 Aomori-Ohrin-1-2 Aomori-Ohrin-2-1 Aomori-Ohrin-2-2 
               1                1                1                1 
     NZ-Envy-1-1      NZ-Envy-1-2      NZ-Envy-2-1      NZ-Envy-2-2 
               1                1                1                1 
     NZ-Fuji-1-1      NZ-Fuji-1-2      NZ-Fuji-2-1      NZ-Fuji-2-2 
               1                1                1                1 
     NZ-Jazz-1-1      NZ-Jazz-1-2      NZ-Jazz-2-1      NZ-Jazz-2-2 
               1                1                1                1 

EEM documentation built on May 2, 2019, 5:58 a.m.

Related to normalize in EEM...