ooacquire 0.2.2

During the last two years development has continued at a slow pace. Most changes are to the functions for interactive acquisition of spectra, correction of bugs and tracking to changes in packages from which imports are made. Testing was done with new OmniDriver releases. Some data examples have been added and also replaced. Some progress with the vignettes has been done. However, the documentation still needs work.

One visible change is the move of the Git repository from Bitbucket to GitHub. Package ‘rOmniDriver’ has also been moved to GitHub and its documentation updated to reflect this.

Starting from this release, the changelog is included in the online documentation at http://docs.r4photobiology.info/ooacquire/.

Please raise issues concerning bugs or enhancements to this package through GitHub at https://github.com/aphalo/ooacquire/issues

NOTE: This package is NOT available through CRAN.

This package is available through the r4photobiology repository  and through GitHub.

INSTALLATION:

  1. From the binary or source packages of the released version from the CRAN-compatible repository at http://r.r4photobiology.info/.
  2. From sources of the under development version retrieved from the Git repository at GitHub.

devtools::install_github("aphalo/romnidriver")
devtools::install_github("aphalo/ooacquire")

R 4.0.3

A minor update to R was released recently as version 4.0.3. As always it is recommended to keep R up-to-date. R for photobiology packages and their dependencies are not affected by this are previous updates and pass checks on R >= 3.6.0.

Performance of package ‘photobiology’

In recent updates I have been trying to remove performance bottlenecks in the package. For plotting spectra with ‘ggspectra’ an obvious performance bottleneck has been the computation of color definitions from wavelengths. The solution to this problem was to use pre-computed color definitions in the most common case, that of human vision. Many functions and operators as well as assignments were repeatedly checking the validity of spectral data. Depending on the logic of the code, several of these checks were redundant. It is now possible to enable and disable checks both internally and in users’ code. This has been used within the package to avoid redundant or unnecessary checks when the logic of the computations ensures that results are valid.

In addition changes in some of the ‘tidyverse’ packages like ‘tibble’, ‘dplyr’, ‘vctrs’ and ‘rlang’ seem to have also improved performance of ‘photobiology’ very significantly. If we consider the time taken to run the test cases as an indication of performance, the gain has been massive, with runtime decreasing to nearly 1/3 of what it was a few months ago. This happened in spite of an increase in the number of test cases from about 3900 to 4270. Currently the 4270 test cases run on my laptop in 23.4 s. Updates ‘rlang’ (0.4.7) and/or ‘tibble’ (3.0.3) appearing this week in CRAN seem to have reduced runtime by about 30% compared to the previous versions.

The take home message is that even though there is a small risk of package updates breaking existing scripts, there is usually an advantage in keeping your installed R packages and R itself up to date. If some results change after an update it is important to investigate which one is correct, as it is both possible that earlier bugs have been fixed or new ones introduced. When needed it is possible, although slightly more cumbersome, to install superseded versions from the source-package archive at CRAN, which keeps every single version of the packages earlier available through CRAN. With respect to R itself, multiple versions can coexist on the same computer so it is not necessary to uninstall the version currently in use to test another one, either older or newer.

Back to Top