Learn R Programming

MassArray (version 1.24.0)

findPeaks: Find peaks

Description

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

Examples

Run this code
findPeaks(3.1, 6:1, res=0)
findPeaks(3.1, 6:1, res=0.2)

Run the code above in your browser using DataLab