Function to determine which peak(s) in a list of peaks match a given molecular weight.
Usage
findPeaks(MW, peaks, resolution = 1)
Arguments
MW
Molecular weight target (in Da)
peaks
List of molecular weights corresponding to unique peaks
resolution
Resolution (in Da), used to specify the ability to distinguish two different molecular weights. For a resolution of 1 (default), two molecular weights are considered identical if they are less than 1 Da apart.
Value
Returns the index or indices of peak(s) within the input list that have a molecular weight which matches that specified as input