calibPointNew: Generic method calibPointNew that modifies slot calibPoints

Description Usage Arguments Details Value Examples

Description

Generic method calibPointNew that modifies slot calibPoints

calibPointNew is a method to set a new mass calibration point

Usage

1
2
3
4
5
calibPointNew(object, mz, reset = FALSE, value = NULL)

## S4 method for signature 'MassSpectra,numeric'
calibPointNew(object, mz, reset = FALSE,
  value = NULL)

Arguments

object

MassSpectra object

mz

the m/z value to be specified with a TOF value

reset

shall the list of calibration points be reset

value

TOF value to be assigned to mz

Details

calibPointNew ia a method to set a new mass calibration point. When value is not provided as arguemnt, the TOF for the chosen mz value has to be chosen interactively by mouse.

Value

call by reference, hence MassSpectra object with new calib point

object MassSpectra with added/updated calibration points

Examples

1
2
3
4
5
6
7
8
9
library(tofsimsData)
data(tofsimsData)
testSpectra <- calibPointNew(testSpectra, mz = 15, value = 15.01551)
testSpectra <- calibPointNew(testSpectra, mz = 181, value = 181.0228)
calibPoints(testSpectra)
par(mfcol=c(1,2))
plot(testSpectra,mzRange=c(38.5,40.5),type='l')
testSpectra <- recalibrate(testSpectra)
plot(testSpectra, mzRange=c(38.5,40.5), type='l')

tofsims documentation built on April 29, 2020, 5:20 a.m.