plotPeaks {andurinha} | R Documentation |
This function makes a graphic representation of the peaks over the second derivative and/or absorbance sum spectra.
plotPeaks(peaksWN, data_abs, data_ndd, fontFamily = NULL)
peaksWN |
A vector with the peaks wave numbers. |
data_abs |
A data frame, which contains in the first column the wave numbers and in the following columns the samples absorbances. |
data_ndd |
A data frame, which contains in the first column the wave numbers and in the following columns the samples second derivative values. |
fontFamily |
The desired graphic font family. |
importSpectra
, findPeaks
and
gOverview
# Plot the peaks found by findPeaks()
# 1. Based on absorbance sum spectrum
fp.abs <- findPeaks(andurinhaData, ndd = FALSE)
plotPeaks(fp.abs[[3]]$WN, fp.abs$dataZ)
# 2. Based on second derivative spectrum
fp.ndd <- findPeaks(andurinhaData, cutOff = 0.25)
plotPeaks(fp.ndd[[4]]$WN, fp.ndd$dataZ, fp.ndd$secondDerivative)