combine_peaks: Combine peaks in peak table

View source: R/combine_peaks.R

combine_peaksR Documentation

Combine peaks in peak table

Description

Utility function to combine duplicate peaks in peak table, i.e. peaks that were integrated at more than one wavelength or component. Specify tolerance (tol) for retention time matching and minimum spectral correlation (min.cor) for a match.

Usage

combine_peaks(peak_table, tol = 0.01, min.cor = 0.9, choose = "max")

Arguments

peak_table

Peak table from get_peaktable.

tol

Tolerance for matching retention times (maximum retention time difference).

min.cor

Minimum spectral correlation to confirm a match.

choose

If "max" will retain peak with highest intensity. Otherwise, the first column in the data.frame will be retained.

Value

A peak table similar to the input peak table, but with duplicate columns combined according to the specified criteria.

Author(s)

Ethan Bass

See Also

get_peaks

Examples

data(pk_tab)
data(Sa_warp)
pk_tab <- attach_ref_spectra(pk_tab)
combine_peaks(pk_tab, tol = .02, min.cor = .9)

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