Learn R Programming

RMassBank (version 2.0.0)

selectSpectra: Select a subset of spectra matching properties

Description

From a list of RmbSpectraSets, returns the spectra which match a criterion (found, complete, empty as in checkSpectra). This can be returned either as a TRUE/FALSE vector, as a vector of indices for matching elements, as a vector of RmbSpectraSet objects matching the conditions, or as a vector of RmbSpectraSet objects NOT matching the conditions (sic!).

Usage

selectSpectra(s, property, value = "logical")
"selectSpectra"(s, property, value = "logical")
"selectSpectra"(s, property, value = "logical")

Arguments

s
The RmbSpectraSetList or msmsWorkspace to select RmbSpectraSets from.
property
The property to check (found, complete or empty)
value
logical if a TRUE/FALSE list should be returned; index if a vector of matching indices should be returned, object if matching objects should be returned, mismatch if mismatching objects should be returned.

Value

As described above.

Methods (by class)

  • s = RmbSpectraSetList,property = character: A method for selecting spectra from a spectra set list
  • s = msmsWorkspace,property = character: A method for selecting spectra from an msmsWorkspace