selectPeaks {RMassBank} | R Documentation

## Select peaks from aggregate table

### Description

Selects peaks from aggregate table according to different criteria.

### Usage

    selectPeaks(o, ...)

    ## S4 method for signature 'data.frame'
    selectPeaks(o, good = FALSE, bad = FALSE,
      cleaned = FALSE, best = FALSE)

    ## S4 method for signature 'msmsWorkspace'
    selectPeaks(o, ...)

### Arguments

`o` | `msmsWorkspace` or aggregate `data.frame` from a workspace.
`...` | no additional parameters
`good` | if `TRUE`, include good (matched within filter criteria) peaks.
`bad` | if `TRUE`, include bad (not matched within filter criteria) peaks. Note: `good` and `bad` can be combined, both are returned in that case.
`cleaned` | if `TRUE`, return only peaks which passed the noise filter. Note: If the noise filter was not applied, the parameter has no effect. Also, a `noise` column is in any case added to the output, even if not present before.
`best` | if `TRUE`, only select the best match for each peak (i.e. the formula with smallest delta ppm). Otherwise multiple matches can be returned.

### Value

Peak dataframe according to the specified criteria.

### Methods (by class)

- `data.frame`: A method to retrieve the specified peaks from the "aggregated" slot (a data.frame object) in an msmsWorkSpace

- `msmsWorkspace`: A method to retrieve the specified peaks from an msmsWorkSpace

### Author(s)

stravsmi

[Package RMassBank version 2.8.0 Index]