Learn R Programming

SPUTNIK (version 1.4.2)

createPeaksFilter: Generate a peak filter object.

Description

createPeaksFilter returns a peak.filter object.

Usage

createPeaksFilter(peaksIndices)

Value

peak.filter object.

Arguments

peaksIndices

a named array representing the selected peaks. Names correspond to the m/z values.

Author

Paolo Inglese p.inglese14@imperial.ac.uk

Details

Function to create a custom peak that can be subsequently applied using the function applyPeaksFilter-msi.dataset-method. Argument of the function is the index vector of the selected peaks named with their m/z values. The m/z values are used to check whether the indices correspond to the common m/z values in the msi.dataset-class object.

See Also

applyPeaksFilter-msi.dataset-method

Examples

Run this code
library("SPUTNIK")
mz <- seq(100, 195, 5)
mzIdx <- sample(100, 20)
names(mzIdx) <- mz
peaksFilter <- createPeaksFilter(mzIdx)

Run the code above in your browser using DataLab