Normalizes peak table or list of chromatograms by specified column in sample
metadata. Metadata must first be attached to peak_table
using
attach_metadata
.
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. If no argument is provided here, the function will try to find the
chrom_list
object used to create the providedpeak_table
.- what
`peak_table` or list of chromatograms (`chrom_list`).
- by
Whether to normalize by a column in sample metadata (
meta
) or by a column in the peak table itself (peak
).
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")