addPeaks {tofsims} | R Documentation |
This method will allow user to plot and add peaks manually. This method will take all parameters of PeakList plot method.
addPeaks(object, mzs, width, ...) ## S4 method for signature 'PeakList,missing,numeric' addPeaks(object, mzs, width, ...) ## S4 method for signature 'PeakList,numeric,numeric' addPeaks(object, mzs, width, ...)
object |
PeakList object |
mzs |
numeric vector M/z's where peaks shall be added |
width |
fixed value to add (m/z) |
... |
further args |
object updated PeakList object
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)) plot(testPeakList, mzRange=c(25,32), type = 'l') testPeakList<-addPeaks(testPeakList, mzs=26:31, width=0.4) plot(testPeakList, mzRange=c(25,32), type = 'l')