
Spectral binning of intensity values stored in a Matrix object, converted from matter.
Source:R/BinSMData.R
spectral_binning.RdSpectral binning of intensity values stored in a Matrix object, converted from matter.
Usage
spectral_binning(
matrix,
ref,
index,
method = c("sum", "mean", "max", "min"),
tolerance
)Arguments
- matrix
matter matrix object containing the intensity values to be binned.
- 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.
- 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". If not specified default method used is "sum".- tolerance
Numeric value specifying the tolerance for m/z matching (default =
NA).