calibPointNew {tofsims} | R Documentation

## Generic method calibPointNew that modifies slot calibPoints

### Description

Generic method calibPointNew that modifies slot calibPoints

`calibPointNew` is a method to set a new mass calibration point

### Usage

    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

    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')

[Package tofsims version 1.8.0 Index]