My new book was published on 28 July. Within the next few days I will make available on-line supplementary material, and explain how I created in R the word cloud in the front cover of the book. The word list I used is that for the R index from the book. I typeset the book using LaTeX. It is currently available from the publisher through the book’s web page.
photobiologySensors 0.5.0
Package documentation web site at: https://docs.r4photobiology.info/photobiologySensors/
The main changes from version 0.4.0, the current CRAN version:
New
- Rename member spectra by prepending suppliers’ names and rebuild sensors.mspct with ‘photobiology’ (0.10.5) which is now required.
- Add data for angular responses saved in a list of data frames named
diffusers.lst. - Update the User Guide.
Backward incompatibilities
Code breaking because of renaming of members of the collection of sensor response spectra.
NOTE: The updated package has been submitted to CRAN.
Please raise issues concerning bugs or enhancements to this package through Bitbucket at https://bitbucket.org/aphalo/photobiologySensors/issues
photobiologyFilters 0.5.2
Package documentation web site at: https://docs.r4photobiology.info/photobiologyFilters/
The main changes from version 0.5.1, the current CRAN version, released 10 months ago are:
New
- Add data for some Chinese absorptive filters from Yixing Purshee Optical Elements Co., Ltd.
- Add thickness metadata for several photography filters.
- Add reflectance data for various materials (previously contained in package ‘photobiologyReflectors’.
- Add refraction index data.
- Update the User Guide.
Fixed
- Correct wrong thickness metadata in PC and PET_G sheet spectra.
Backward incompatibilities
Use of package ‘photobiologyReflectors’, which was never released through CRAN, is deprecated as the same data are now contained in ‘photobiologyFilters’ (>= 5.2).
NOTE: The updated package has been submitted to CRAN.
Please raise issues concerning bugs or enhancements to this package through Bitbucket at https://bitbucket.org/aphalo/photobiologyfilters/issues
ggspectra 0.3.7
Package documentation web site at: https://docs.r4photobiology.info/ggspectra/
The changes from version 0.3.6, the current CRAN release, are:
New
- Track and profit from updated ‘photobiology’ (>= 0.10.4), with (>= 0.10.5) now required.
- Use performance-optimized computation for colors from wavelengths.
- Improve
stat_wl_strip()performance by simplifying data before plotting. - Add support for plotting action spectra (preliminary).
- Update y-axis scales to support scaled and normalized data.
- Update y-scales to generate more compact axis labels and use IUPAC-recommended symbols.
- Update x-axis- and y-axis scales to allow users to override the default label text.
- Implement
scale_y_Afr_continuous()for absorptance spectra. - Implement
scale_y_mult_continuous()for calibration spectra. - Implement
scale_y_Tfr_continuous()for transmittance spectra, to complement the internal and total versions earlier available. - Implement
scale_y_A_continuous()for absorbance spectra, to complement the internal and total versions earlier available. - Implement
scale_y_Rfr_continuous()for reflectance spectra, to complement the specular and total versions earlier available. - Update
autoplot()methods to generate more compact axis labels (preliminary). - Update
autoplot()methods to to natively support facets (partial). - Update
stat_wb_box()adding parameter box.height (default behavior unchanged).
Bugs fixed
- Fix a documentation example that stopped working because of changes to ‘ggplot2’.
Backward incompatibilities
- Although this update should not break any code, the plots created will in some cases differ slighttly from those created with earlier versions. These changes affect the formatting of axis labels, and are readily visible.
- Colors may differ very slightly while
stat_wl_strip()draws fewer rectangles (in most cases these changes are barely visible).
NOTE: The updated package is on its way to CRAN.
Please raise issues concerning bugs or enhancements to this package through Bitbucket at https://bitbucket.org/aphalo/ggspectra/issues
ggpmisc 0.3.6
Package ‘ggpmisc’ focuses mainly on plot annotations. The new features added in this version required quite minor code changes but add features that I hope will be found useful.
Package documentation web site at: https://docs.r4photobiology.info/ggpmisc/
Changes from version 0.3.5 the most recent CRAN release, are:
New
Annotations using NPC coordinates
NPC or native plot coordinates, are very useful for annotations. On the other hand, they are not of any use for plotting actual data. The geometries using this kind of position coordinates defined in ‘ggpmisc’ make it possible to have different annotations in the different panels when using facets. Traditional annotations in ‘ggplot2’ do not use the data, but instead take as arguments constant values for the aesthetics, and consequently add identical annotations to all panels. Annotations in ‘ggplot2’ use data coordinates. In many cases, the desired position of annotations is unrelated to the data, but instead related to the native coordinates of the plotting viewport. Using NPC coordinates for annotations allows consistent positioning, which is very important from the graphical design perspective.
Starting from version 0.3.6 ‘ggpmisc’ exports a modified definition of annotate() from ‘ggplot2’. The modification adds support of the position aesthetics npcx and npcy retaining all other functionality unaltered. As a consequence geometries "text_npc", "label_npc", "table_npc", "plot_npc", and "grob_npc" can now be used as the first argument to annotate(). In addition single ggplots, data frames and grobs as well as lists of such objects are accepted arguments to label.
library(ggpmisc) # plot to be inset p <- ggplot(mtcars, aes(factor(cyl), mpg, colour = factor(cyl))) + stat_boxplot() + labs(y = NULL) + theme_bw(9) + theme(legend.position = "none") # main plot with p as an inset ggplot(mtcars, aes(wt, mpg, colour = factor(cyl))) + geom_point() + annotate("plot_npc", npcx = "left", npcy = "bottom", label = p) + expand_limits(y = 0, x = 0)

Tagging equations with group labels (experimental)
Starting from version 0.3.6 stat_poly_eq() supports use of grouping with equations and identifying them by using labels. Previously use of the color aesthetic was the only way of “linking” equations to plotted curves, which is frequently distracting or unavailable for printing. After some past failed attempts at implementing this, I recently realized that using a pseudo-aesthetic made implementation very easy and its use flexible and straightforward. The catch is that this relies on undocumented behavior of ‘ggplot2’ and will not necessarily work with future versions of ‘ggplot2’. Statistic stat_poly_eq() now copies grp.label from its input into its returned value. One can map any variable to the pseudo-aesthetic grp.label to achieve this. Values are passed to the output only if all values within the group are the same, otherwise grp.label is filled with NA. The signature of stat_poly_eq() remains unchanged.
library(ggpmisc) my.formula <- y ~ x ggplot(mtcars, aes(wt, mpg, linetype = factor(cyl), shape = factor(cyl), grp.label = factor(cyl))) + geom_point() + stat_smooth(formula = my.formula, method = "lm", colour = "black") + stat_poly_eq(aes(label = stat(paste("bold(\"cyl\"~~", grp.label, "*':')~~~", eq.label, sep = ""))), formula = my.formula, label.x = "right", parse = TRUE) + theme_classic()

Marking and or labeling group centroids
The new stat_centroid() and stat_summary_xy(). stat_centroid() applies the same function to x and y and this function defaults to mean(). In the case of stat_summary_xy() the functions applied to x and y are passed as separate arguments, and they both default to simply copying their input.
Markdown
Starting from version 0.3.6, statistic stat_poly_eq() can optionally generate character strings encoded in markdown suitable for geom_richtext() from package ‘ggtext’.
Acknowlegement: This update was encouraged by recent questions at stackoverflow. The tag [ggpmisc] is in use at stackoverflow for questions related to this package.
Documentation web site at http://docs.r4photobiology.info/ggpmisc/ includes all help pages, with output from all examples, and vignettes in HTML format.
NOTE: The new version of the package is on its way to CRAN.
Please raise issues concerning bugs or enhancements to this package through Bitbucket https://bitbucket.org/aphalo/ggpmisc/issues.

