powered by
An algorithm with primary smoothing and repeated baseline suppressions and regressions with 2nd derivative constraint
baseline.irls(spectra, lambda1 = 5, lambda2 = 9, maxit = 200, wi = 0.05)
Matrix with spectra in rows
2nd derivative constraint for primary smoothing
2nd derivative constraint for secondary smoothing
Maximum number of iterations
Weighting of positive residuals
Matrix of baselines corresponding to spectra spectra
spectra
Matrix of baseline corrected spectra
Matrix of primary smoothed spectra
# NOT RUN { data(milk) bc.irls <- baseline(milk$spectra[1,, drop=FALSE], method='irls') # } # NOT RUN { plot(bc.irls) # }
Run the code above in your browser using DataLab