peakfit | R Documentation |
Fitting of a single spectral line by lineshape functions with variable parameters.
peakfit(
x,
profile = "voigt",
wL = NULL,
wG = NULL,
A = NULL,
wlgth.min = NULL,
wlgth.max = NULL,
id = NULL,
max.iter = 200
)
x |
A data frame or tibble |
profile |
A character specifying the lineshape function to be used: "lorentzian", "gaussian" or "voigt" |
wL |
A numeric specifying the Lorentzian full width at half maximum (initial guess) |
wG |
A numeric specifying the Gaussian full width at half maximum (initial guess) |
A |
A numeric specifying the peak area (initial guess) |
wlgth.min |
A numeric specifying the lower bound of the wavelength subset |
wlgth.max |
A numeric specifying the upper bound of the wavelength subset |
id |
A character specifying the spectra id (optional) |
max.iter |
A numeric specifying the maximum number of iteration (200 by default) |
The function uses minpack.lm::nlsLM
, which is based on the Levenberg-Marquardt
algorithm for searching the minimum value of the square of the sum of the residuals.
Fitted value and the estimated parameters along with the corresponding errors
Christian L. Goueguel
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.