rformassspectrometry / Spectra

Low level infrastructure to handle MS spectra
https://rformassspectrometry.github.io/Spectra/
34 stars 24 forks source link

Discussion: spectraData,spectraData<- to support also data.frame or other two-dimensional data structues #248

Open jorainer opened 1 year ago

jorainer commented 1 year ago

This question came up during the review for PR #247 :

Should we restrict the spectraData and spectraData<- methods to exclusively return/accept a DataFrame?

Some backends, specifically those that store the data in a data.frame or a database need to convert data to/from DataFrame which can be inefficient. Maybe it would be better to relax the definition in the MsBackend API to support more two-dimensional data structures such as data.frame, DataFrame (tibble?).