find_peak_boundaries {IsoCor} | R Documentation |
find_peak_boundaries
Description
find_peak_boundaries
will find the start and end point
of a peak based on curve derivative.
Usage
find_peak_boundaries(
int = NULL,
p = which.max(int),
k = 3,
min_scans = 3,
noise = 0
)
Arguments
int |
Numeric vector (of intensity values). |
p |
Index of peak position (usually 'which.max(int)). |
k |
Number of scans at peak boarder to confirm peak valley. |
min_scans |
Minimum number of scans in front or tail. |
noise |
A threshold value. All Values below or equal to noise will be set to zero. |
Details
This function provides a simple detection algorithm for peak boundaries. It will accept a numeric vector as input and determine relative to the global maximum (or a user provided local maximum) the left and right border where intensity decrease ends and intensity is increasing again.
Value
A numeric vector of length 2 giving the indexes of peak start and peak end.
Examples
## Not run:
x <- sin(seq(-pi,2*pi,0.01))+1
plot(x)
abline(v=find_peak_boundaries(x))
## End(Not run)
[Package IsoCor version 0.2.8 Index]