photobiology 0.10.13

BUG FIX: Sometime during the early life of package ‘photobiology’ I decided that it was a good idea to support in collections of spectra the use of dimensions as a way of supporting spectral images and similar data. I never managed to buy a spectral camera and make use of this. So the code for dimensions was not much tested or used. As it happens, it contained a bug in the computation of dimensions that triggered odd and not easy to track errors when using negative numerical subscripts or logical subscripts with the extraction operator [ ] even with the default one-dimensional collections. I was bitten by this bug some days ago. Hopefully, you as many people usually do, have used only positive numerical values as subscripts and, thus, you have not been bitten by this nasty creature.

This bug is now squashed, and a new version of ‘photobiology’ ready to move to CRAN. It contains also a few enhancements.

Changes from version 0.10.12 the most recent CRAN release, are:

  • Bug fix: The extraction operator [ ] for collections of spectra, no longer stores wrong values in the dimension attribute ("mspct.dim") when passed as argument a vector of logical values or a vector of negative numeric values.
  • Improve handling of missing and default wavebands in irrad() and in trim_waveband().
  • Add preliminary support for filter stacks in attribute.
  • Add summary() method for collections of spectra.

The package documentation web site at includes a changelog with information for each release since version 0.1.0.

NOTE: Version 0.10.13 is on its way to CRAN.

Please raise issues concerning bugs or enhancements to this package through GitHub at

Share with

Leave a Reply