sum.MassArraySpectrum {MassArray} | R Documentation |
Function to collapse multiple MassArraySpectrum objects into a single MassArraySpectrum representing the sum of each
## S3 method for class 'MassArraySpectrum' sum(x, ..., trim = 0, na.rm = TRUE)
x |
One or multiple MassArraySpectrum objects to include in sum |
... |
Any additional MassArraySpectrum objects to include in sum |
trim |
Numerical value between 0 and 0.5 specifying the proportion of spectra to remove from consideration on a per peak basis, such that the SNR of each peak is calculated as the trimmed mean of the same peak across all included spectra. |
na.rm |
Logical value passed to |
Returns a single MassArraySpectrum
object that represents the union of all unique peaks from the component MassArraySpectrum objects, with SNR for each peak representing the average value of that peak across all spectra
Reid F. Thompson (rthompso@aecom.yu.edu), John M. Greally (jgreally@aecom.yu.edu)
See Also as MassArraySpectrum
data(MassArray.example.data) MassArray.example.data$samples[[1]]$peaks[[11]]$height MassArray.example.data$samples[[1]] <- sum.MassArraySpectrum(MassArray.example.data$samples[[1]], MassArray.example.data$samples[[2]]) MassArray.example.data$samples[[1]]$peaks[[11]]$height