rformassspectrometry / Spectra

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

fix: `bin` function #305

Closed philouail closed 7 months ago

philouail commented 7 months ago

This is related to issue #303, this pull request add the argument zero.rm with TRUE as a default.

The code and documentation updated. I had to fiddle with the test files because the tests were made with the assumptions that the 0 would be kept. For now I just added zero.rm = FALSE and added code chunk to check that the bins of intensity 0 are being removed. See the comment for one thing that I am a bit confused about.

I can also change all the tests if you think it's better.

philouail commented 7 months ago

The vignette is updated and the unit test are all good for the bin functions.

So the PR is ready for merging !