countPeaks | R Documentation |
MassPeaks
objects
This function provides the number of peaks of each element of a list of MassPeaks
objects.
countPeaks(x)
x |
A list of |
A vector consisting of the number of peaks for each peak profile in x
.
# Load example data
data(spectra) # list of MassSpectra class objects
# Some pre-processing
spectra <- screenSpectra(spectra)$fspectra
spectra <- transformIntensity(spectra, method = "sqrt")
spectra <- wavSmoothing(spectra)
spectra <- removeBaseline(spectra)
peaks <- detectPeaks(spectra)
# Count peaks
npeaks <- countPeaks(peaks)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.