setData {RMassBank} | R Documentation

## Set `RmbSpectrum2` data from data.frame

### Description

Sets all slots which are present as columns in the given dataframe. Optionally cleans the object, i.e. empties slots not defined in the data frame.

### Usage

    ## S4 method for signature 'RmbSpectrum2,data.frame'
    setData(s, df, clean = TRUE)

### Arguments

`s` | The `RmbSpectrum2` object to modify
`df` | The data frame with new data
`clean` | `TRUE` if slots which aren't present as columns in the data frame should be cleared.

### Value

The modified `RmbSpectrum2`.

### Author(s)

stravsmi

[Package RMassBank version 3.0.0 Index]