peak.finder: Peaks identification

Description Usage Arguments Value Examples

View source: R/peak.finder.R

Description

The function identifies peaks based on local maxima. The function returns a list of the peaks and a plot with the peaks labeled. Missing values (NA) are removed.

Usage

1
peak.finder(spectrum, threshold=0, m=5, max.peak=0)

Arguments

spectrum

A dataframe/matrix with only two columns: the first column must report the frequency values; the second column must report the intensity values.

threshold

Numeric. It indicates the value on y-axis that the peak intensity must exceed to be considered a peak. This can be helpful in case of noisy Raman spectrum. The default value is 0.

m

Numeric. It indicates the interval on x-axis for the determination of the interval for the calculation of the peak. Default value is 5.

max.peak

Numberic. It indicates the number of peaks that should be displayed. The default is 0, which indicates that all peaks are showed.

Value

Return the normalised spectra: the first column represent the frequency data, the second the intensity values normalised by Z-score

Examples

1
2
data("MPdatabase")
peak.data<-peak.finder(MPdatabase[,c(1,7)], threshold = 500, m=7)

RamanMP documentation built on July 9, 2021, 9:07 a.m.

Related to peak.finder in RamanMP...