normalize_data: Normalize peak table or chromatograms

View source: R/attach_metadata.R

normalize_dataR Documentation

Normalize peak table or chromatograms

Description

Normalizes peak table or list of chromatograms by specified column in sample meta-data. Metadata must first be attached to peak_table using attach_metadata.

Usage

normalize_data(
  peak_table,
  column,
  chrom_list,
  what = c("peak_table", "chrom_list")
)

Arguments

peak_table

A 'peak_table' object

column

The name of the column containing the weights.

chrom_list

List of chromatograms for normalization. The samples must be in same order as the peak_table.

what

'peak_table' or list of chromatograms ('chrom_list').

Value

A peak_table object where the peaks are normalized by the mass of each sample.

Author(s)

Ethan Bass

See Also

get_peaktable attach_metadata

Examples

data(pk_tab)
path <- system.file("extdata", "Sa_metadata.csv", package = "chromatographR")
meta <- read.csv(path)
pk_tab <- attach_metadata(peak_table = pk_tab, metadata = meta, column="vial")
norm <- normalize_data(pk_tab, "mass", what = "peak_table")

chromatographR documentation built on Aug. 24, 2022, 9:06 a.m.