fit_peaks: Refine position and value of extremes by fitting
Description
Functions implementing fitting of peaks in a class-agnostic way. The fitting
refines the location of peaks and value of peaks based on the location of
maxima and minima supplied. This function is to be used together with
find_peaks() or find_valleys().
logical or integer Indexes into x
selecting global or local extremes.
span
odd integer The span used when refining the location of maxima or
minima of x.
x.col.name, y.col.name
character Name of the column of x on
which to operate.
method
character The method to use for the fit.
max.span
odd integer The maximum number of data points used when
when refining the location of maxima and minima.
maximum
logical A flag indicating whether to search for maxima or
minima.
keep.cols
logical Keep unrecognized columns in data frames
Value
An R object of the same class as x containing the fitted
values for the peaks, and optionally the values for at peaks.idx or
valleys.idx for other retained columns.