findMainPeak {refineR} | R Documentation |
Helper function to find the main peak of a distribution
Description
The function uses a combination of the area under the curve between valleys and the peak height to detect the main peak.
Usage
findMainPeak(x, ab, mStart, withHeight = FALSE, prevPeak = NULL)
Arguments
x |
(numeric) vector of data points |
ab |
(numeric) vector specifying the lower and higher truncation limit of density estimation |
mStart |
(integer) specifying the width of the smoothing kernel(s) used for density estimation |
withHeight |
(logical) specifying if only the area under the curve (FALSE) or a combination of AUC and peak height (TRUE) should be used to detect the main peak |
prevPeak |
(numeric) specifying the modEst of the previously estimated peak |
Value
(list) with the two numeric values peakInd, modEst, and a density list
Author(s)
Tatjana Ammer tatjana.ammer@roche.com
[Package refineR version 1.6.1 Index]