attach_ref_spectra: Attach reference spectra

View source: R/attach_metadata.R

attach_ref_spectraR Documentation

Attach reference spectra

Description

Gathers reference spectra and attaches them to peak_table object. Reference spectra are defined either as the spectrum with the highest intensity ( max.int) or as the spectrum with the highest average correlation to the other spectra in the peak_table (max.cor).

Usage

attach_ref_spectra(peak_table, chrom_list, ref = c("max.cor", "max.int"))

Arguments

peak_table

Peak table from get_peaktable.

chrom_list

A list of chromatograms in matrix form (timepoints x wavelengths).

ref

What criterion to use to select reference spectra. Current options are maximum correlation (max.cor) or maximum signal intensity (max.int).

Value

A peak_table object with reference spectra attached in the $ref_spectra slot.

Author(s)

Ethan Bass

See Also

get_peaks get_peaktable

Examples

data(pk_tab)
pk_tab <- attach_ref_spectra(pk_tab, ref="max.int")
pk_tab <- attach_ref_spectra(pk_tab, ref = "max.cor")

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