mergeTolerance {CluMSID} | R Documentation

## Merge spectra with m/z tolerance

### Description

`mergeTolerance()` merges two spectra by identifying common peaks with a given m/z tolerance. It can be used with `Reduce()` to merge more than two spectra.

### Usage

    mergeTolerance(x, y, tolerance = 1e-05)

### Arguments

`x, y` | MS2 spectra as objects of class `matrix` with m/z in the first column and intensity in the second.
`tolerance` | The m/z tolerance used for merging. If two peaks are within tolerance, they are regarded as the same. Defaults to `1e-5`, i.e. 10ppm.

### Value

A matrix with m/z in the first column and separate columns for intensities in the respective spectra. If peaks were merged, their m/z corresponds to the mean of the two original m/z.

[Package CluMSID version 1.2.1 Index]