View source: R/summarySpectra.R
summarySpectra | R Documentation |
This function generates a numerical summary of a collection of MassSpectrum
objects.
summarySpectra(x, digits = 4)
x |
A list of |
digits |
Integer indicating the number of decimal places to be used. |
For each MassSpectrum
on the list this function provides summary statistics of m/z points and signal intensities (number, minimum, mean, standard deviation, median, mean absolute deviation, maximum).
A data.frame
containing summary information of a collection of MassSpectrum
objects.
# Load example data data(spectra) # list of MassSpectra class objects data(type) # metadata # Summary of spectra features (results for 20 first mass spectra) summarySpectra(spectra[1:20]) # 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) names(spectra) <- type$SpectID # spectra IDs are lost with removeBaseline() # Summary of spectra features (results for positions 10 to 20) summarySpectra(spectra[10:20])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.