Function to identify local maxima in a vector, typically a spectrum or a chromatogram. N.B. This function belongs to the ChemometricsWithR package, developed by Ron Wehrens.

pick.peaks(x, span)

Arguments

x

Numerical vector.

span

Neighbourhood, used to define local maxima.

Value

A vector containing positions of local maxima in the input data.

References

Ron Wehrens: Chemometrics with R. Springer Verlag, Berlin Hei-delberg (2020). DOI: https://doi.org/10.1007/978-3-642-17841-2.