kuwisdelu / Cardinal

Mass spectrometry imaging toolbox
http://www.cardinalmsi.org
Artistic License 2.0
42 stars 14 forks source link

Default spectrapply() should not include index #45

Closed kuwisdelu closed 2 months ago

kuwisdelu commented 3 months ago

The current defaults for spectrapply() pass along an index/domain variable as the second argument. For MSI, the default is "mz", and for generic spectra it is a dummy ordinal index.

This requires creating wrappers for basic summary functions like sum() that will include all unnamed variables passed to them in their computation. Obviously, needing wrappers for basic summarization adds unnecessary complexity.

We should change the default to index=NULL not passing any additional variables to the spectrapply() function.