Closed aphalo closed 1 year ago
Implemented by supporting collections of spectra as input to subset2mspct()
and supporting spct
objects containing multiple spectra as members of mspct
objects passed as input to rbindspct()
. No new functions or change in function signatures was needed.
Collections of spectra containing spct objects with multiple spectra in long form trigger errors in summary functions like
q_irrad()
,q_ratio()
, etc. The error message from plyr::ldply() is obscure, and unhelpful. At the very least an informative message is needed. Best solution would be to write a function to unnest these spectra, by replacing the spct object by multiple spct objects within the collection. This could be an exported function. By default, applied with a warnig or message. See also #12 as they both affect similar use cases and the solution should solve also mixed cases.