
Bins spectral data generated by Cardinal from a matter object to a Matrix object
Source:R/BinSMData.R
bin_cardinal.Rd
Bins spectral data generated by Cardinal from a matter object to a Matrix object
Arguments
- x
The spectral data to be binned, typically a matrix or data frame.
- ref
A vector of reference mass-to-charge (m/z) values for binning. If left unspecified, mass range will be used to generate reference peaks.
- spectra
Character string specifying the column name for spectral intensity values (default = "intensity").
- index
Character string specifying the column name for the m/z values (default = "mz").
- method
A character vector specifying the binning method. Options include
"sum"
,"mean"
,"max"
,"min"
,"linear"
,"cubic"
,"gaussian"
, and"lanczos"
. If not specified default method used is "sum".- resolution
Numeric value specifying the resolution for binning. If assigned as
NA
, the resolution will be automatically caculated based on the data (default = NA).- tolerance
Numeric value specifying the tolerance for m/z matching (default =
NA
).- units
Character string specifying the units for resolution. Options are
"ppm"
or"mz"
(default = "ppm").- mass.range
Numeric vector of length two specifying the lower and upper bounds of the mass range for binning. If set to NULL will use the entire range to bin (default = NULL).