mz-methods {Cardinal} | R Documentation

## Manipulate mass-to-charge-ratio values

### Description

This is a generic function for getting or setting 'mz' for an object with associated m/z values, or for generating a sequence of appropriate m/z values for such an object.

### Usage

    ## S4 method for signature 'missing'
    mz(from, to, by, resolution = 200, units = c("ppm", "mz"), ...)

    mz(object, ...)

    mz(object, ...) <- value

### Arguments

`object` | An object with m/z values.
`value` | The value to set the m/z values.
`from, to` | The starting amd (maximal) end values of the sequence of m/z values.
`by` | The (approximate) interval between m/z values. For `units="ppm"`, rather than an exact step size, this actually corresponds to a binwidth, where each element of the sequence is considered the center of a bin.
`resolution` | Another way to specify the interval between m/z values. For `units="mz"`, this is the same as `by`. For `units="ppm"`, this is the half-binwdith.
`units` | The units for `by` and `resolution`. Either parts-per-million or absolute m/z increments.
`...` | Additional arguments (ignored).

### Author(s)

Kylie A. Bemis

### See Also

`MassDataFrame`

### Examples

    mz(from=200, to=220, by=300, units="ppm")

[Package Cardinal version 2.4.0 Index]