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.
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 thespectrapply()
function.