selectSpectra {RMassBank} | R Documentation

## Select a subset of spectra matching properties

### Description

From a list of `RmbSpectraSet`s, 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")

    ## S4 method for signature 'RmbSpectraSetList,character'
    selectSpectra(s, property,
      value = "logical")

    ## S4 method for signature 'msmsWorkspace,character'
    selectSpectra(s, property,
      value = "logical")

### Arguments

`s` | The `RmbSpectraSetList` or `msmsWorkspace` to select `RmbSpectraSet`s 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

### Author(s)

stravsmi

[Package RMassBank version 2.10.1 Index]