Skip to contents

Convert a list of peaks to a data.frame

Usage

peaks2df(peaks)

Arguments

peaks

(list of) MALDIquant::MassPeaks

Value

Data.frame with peak data

Examples

data(Blank2022peaks)

peakdf <- peaks2df(Blank2022peaks[1:2])
head(peakdf)
#>   ID plotIdx peakIdx       mz  int        SNR
#> 1  0       2     2_1 407.0157 3644 100.477834
#> 2  0       2     2_2 408.0435  329   9.067815
#> 3  0       2     2_3 409.1093  376  10.358639
#> 4  0       2     2_4 422.9992  679  18.316389
#> 5  0       2     2_5 424.0283  233   6.268098
#> 6  0       2     2_6 428.1196 2857  75.987790