rformassspectrometry / Spectra

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

compareSpectra to always (by default) return a matrix #219

Closed jorainer closed 1 year ago

jorainer commented 2 years ago

Add a drop = FALSE parameter to compareSpectra so that results are always returned as a matrix even if the number of query or target spectra is 1. (see https://github.com/jorainer/SpectraTutorials/issues/27 for reference).

sgibb commented 2 years ago

Don't we have a SIMPLIFY argument already? Isn't it working with SIMPLIFY = FALSE? Maybe we should change the default or drop this argument at all?

jorainer commented 2 years ago

Yes, we have that argument, thanks @sgibb (I added that issue without looking into the code) And yes, maybe we could change the default - I'll look into that.