removePeaks {tofsims} | R Documentation |
generic method removePeaks
removePeaks for PeakList Class allows removing peaks below a certain treshhold of ioncounts. the threshhold is not calculated as area, but just from the peak height (ion count at peak center)
removePeaks for PeakList Class allows removing peaks manually
removePeaks for PeakList Class allows removing peaks manually
removePeaks(object, mzs, operator, limit, nLocator, ...) ## S4 method for signature 'PeakList,missing,missing,numeric,missing' removePeaks(object, mzs, operator, limit, nLocator, ...) ## S4 method for signature 'PeakList,missing,missing,missing,numeric' removePeaks(object, mzs, operator, limit, nLocator, ...) ## S4 method for signature 'PeakList,numeric,missing,missing,missing' removePeaks(object, mzs, operator, limit, nLocator, ...) ## S4 method for signature 'PeakList,missing,character,numeric,missing' removePeaks(object, mzs, operator, limit, nLocator, ...)
object |
object of class PeakList |
mzs |
M/z's of peaks to be removed |
operator |
Accept ">", "<", "==", "<=", ">=", "!=" |
limit |
numeric limit for peaks to be removed |
nLocator |
numeric how many peaks to remove with visual selection |
... |
additional args |
object of class PeakList with removed/updated peaks
library(tofsimsData) data(tofsimsData) testPeakList<-PeakList(analysisName = analysisName(testSpectra), instrument = instrument(testSpectra), nz = nz(testSpectra), calibration = calibration(testSpectra), calibPoints = calibPoints(testSpectra), mz = mz(testSpectra), peakIDs = NULL, peakMzs = NULL) par(mfcol=c(1,2)) testPeakList<-addPeaks(testPeakList, mzs = 26:31, width=0.4) plot(testPeakList, mzRange = c(25,32), type = 'l') testPeakList<-removePeaks(testPeakList, mzs = 27) plot(testPeakList, mzRange = c(25,32), type = 'l')