zero_one_scale: Zero to One scaling

View source: R/normalize_zero_one.R

zero_one_scaleR Documentation

Zero to One scaling

Description

Re-scales the data to be between 0 and 1

Usage

zero_one_scale(e_data, edata_id)

Arguments

e_data

e_data a p \times n + 1 data.frame, where p is the number of peptides, lipids, or metabolites and n is the number of samples. Each row corresponds to data for a peptide, protein, lipid, or metabolite, with one column giving the biomolecule identifier name.

edata_id

character string indicating the name of the peptide, protein, lipid, or metabolite identifier. Usually obtained by calling attr(omicsData, "cnames")$edata_cname.

Details

The sample-wise minimum of the features is subtracted from each feature in e_data, then divided by the difference between the sample-wise minimum and maximum of the features to get the normalized data. The location estimates are not applicable for this data and the function returns a NULL list element as a placeholder. The scale estimates are the sample-wise feature ranges. All NA values are replcaed with zero.

Value

List containing two elements: norm_params is list with two elements:

scale Range of each sample used in scaling
location NULL

backtransform_params is a list with two elements:

scale NULL
location NULL

The transformed data is returned as a third list item.

Author(s)

Lisa Bramer, Kelly Stratton, Rachel Richardson


pmartR documentation built on Oct. 15, 2024, 1:06 a.m.