photobiology 0.9.21

The main changes from version 0.9.20, the most recent CRAN release, are:

  • Fix bugs in copy_attributes() function (some attributes were not copied).
  • Add copying of attributes to conversion functions cps2irrad(), cps2Tfr() and cps2Rfr().
  • Add merge_attributes() function and fix bugs in handling of metadata attributes in maths operators, affecting operations between two spectral objects.
  • Implement copy of attributes and automatic _adjustment_ of the "multiple.wl" attribute in the Extraction operator [] for spectral objects.
  • Improve handling of attributes in objects containing multiple spectra in tidy (longitudinal) form. Revise setMultipleWl() to guess number of spectra when multiple.wl argument is NULL.
  • Add setIdFactor() and getIdFactor(), and add parameter idfactor to setGenericSpct() and equivalent functions.
  • Handle gracefully attempts to apply smooth_spct() method to spectra containing NA values. (Warn and return as is.)
  • Add parameter na.rm to peaks(), valleys() and related methods and functions.
  • Add parameter na.rm to normalize() methods.
  • Option "photobiology.verbose" is initialized to the value of R’s option "verbose" at the time the package is attached.
  • If option photobiology.verbose == TRUE, the presence of NA values in spectral data triggers warnings.

Documentation web site at includes all help pages, with output from all examples, and vignettes in HTML format.
NOTE: The updated package is available through CRAN.

Please raise issues concerning bugs or enhancements to this package through Bitbucket


The changes from version 0.2.4, the current CRAN release, are:

Track changes in package ‘photobiology’ 0.9.21:

  • Revise examples in the User Guides to use the new methods. Revise other documentation.
  • Revise to track changes in ‘photobiology’ version 0.9.21.
  • Revise plot() methods to support objects with multiple spectra in long form.
  • Revise plot() methods to not use by default calculated summaries in annotations when a plot contains multiple spectra.
  • Revise plot() methods to retrieve and validate the name of the factor used to identify multiple spectra, using as default the value stored in the attribute "idfactor" implemented in ‘photobiology’ 0.9.21.
  • Tested compatible with ‘ggplot2’ 2.3.0.

Documentation web site at

NOTE: The updated package is available at a CRAN-like repository at

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

ggpmisc + gginnards

[UPDATE 2018-0713] ‘ggplot2’ 3.0.0 and ‘gginnards’ 0.0.1 are now in CRAN, while ‘ggpmisc’ 0.3.0 will be soon on its way to CRAN becoming the only branch being maintained.

While waiting for the release of ‘ggplot2’ 3.0.0 I am keeping two parallel branches of  ‘ggpmisc’ under development.

‘ggpmisc’ 0.2.17 is in CRAN and remains unchanged. It requires the CRAN version of ‘ggplot2’.

‘ggpmisc’ is in the CRAN-like repository at this site. It is as thoroughly tested as the CRAN version but contains geom_table and the stats that use this geometry, which make use of the development version of ‘ggplot2’ from Github.  ‘ggplot2’ at commit #2620 (2018-05-17) or later is needed for ‘ggpmisc’, while and earlier versions from this branch require ‘ggplot2’ at least commit #2034 (2017-02-09).

If you install ‘ggplot2’ from Github after May 17, 2018 (selecting any commit from this day onwards) you will need this new version of  ‘ggpmisc’  or the CRAN version. If you are using ‘ggplot2’ from CRAN, or an earlier commit from Github, to use this new version you will need first to install the latest development version of ‘ggplot2’ from Github.

After ‘ggplot2’ (>= 2.3.0) makes it to CRAN, a version from this enhanced branch will be submitted to CRAN as version >= 0.3.0. Release seems to be now imminent.

Changes from version (3 June 2018)

  • Split the original package into two packages as per roadmap: debugging and and layer manipulation functions are now in pakage ‘gginnards’ while the rest of the functions remain in ‘ggmisc’.

NOTE: These versions of the packages are available from 

Documentation website is at

Documentation website is at

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