The figure below depicts the idea of the Spectra framework. For a detailed description, read (RforMassSpectrometry Package Maintainer, Laurent Gatto, Johannes Rainer, Sebastian Gibb 2020).