summaryPeaks | R Documentation |
This function generates a numerical summary of a collection of MassPeaks
objects.
summaryPeaks(x, digits = 4)
x |
A list of |
digits |
Integer indicating the number of decimal places to be used. |
For each MassPeaks
on the list this function provides summary statistics of m/z points, peak intensities and SNR thresholds (number, minimum, mean, standard deviation, median, mean absolute deviation, maximum).
A data.frame
containing summary information of a collection of MassPeaks
objects.
# Load example data
data(spectra) # list of MassSpectra class objects
data(type) # metadata
# Some pre-processing
sc.results <- screenSpectra(spectra, meta = type)
spectra <- sc.results$fspectra
type <- sc.results$fmeta
spectra <- transformIntensity(spectra, method = "sqrt")
spectra <- wavSmoothing(spectra)
spectra <- removeBaseline(spectra)
peaks <- detectPeaks(spectra)
names(peaks) <- type$SpectID # spectra IDs are lost after removeBaseline()
# Summary of peak profile features (results for positions 10 to 20)
summaryPeaks(peaks[10:20])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.