Skip to contents

Merges the specified peaks, by selecting the largest value from each column. Utility function to combine split peaks into a single column of the peak table.

Usage

merge_peaks(peak_table, peaks, method = c("max", "sum"))

Arguments

peak_table

Peak table from get_peaktable.

peaks

A vector specifying the names or indices of peaks to be merged.

method

Method to merge peaks. Either max to select the largest peak from each sample or sum to sum the peaks together.

Value

A peak table similar to the input peak table, but where the specified columns are combined.

Author

Ethan Bass

Examples

data(pk_tab)
pk_tab <- merge_peaks(peak_table = pk_tab, peaks=c("V10","V11"))