createSpec: Create a 'MassSpectrum' from a POS or ATO

View source: R/rapt_file.R

createSpecR Documentation

Create a MassSpectrum from a POS or ATO

Description

createSpec generates a MassSpectrum object with a specified resolution from an ATO or POS data frame (like that created by readPOS).

Usage

createSpec(pos, res = 0.05, clip = NULL)

Arguments

pos

A POS or ATO data frame.

res

numeric. The bin width of the mass spectrum.

clip

numeric of length two. The minimum and maximum mass values to be included in the mass spectrum. If NULL (the default), all values are included.

Details

The input POS or ATO is binned by mass values; the res parameter sets the width of the mass bins used in hist to create the input to the createMassSpectrum call, and also acts as a tolerance around the spectrum minimum and maximum mass. The minimum of the mass value is zero unless clip is set.

Value

A MassSpectrum from the mass field of the POS or ATO, with the resolution set by res.

See Also

readPOS, readATO, MassSpectrum

Other APT data transformation functions: createDet(), createSpat()


aproudian2/rapt documentation built on Dec. 15, 2022, 4:24 a.m.