Moving or copying the library when upgrading R

Because I need to be sure that my packages work with current versions of R, I nowadays cannot skip any R update. I use many different packages, so re-installing all the packages in the library is something I would rather avoid.
Today I found that an easy way to automate this task is to use package installr, more specifically, a function with a very long, but descriptive name copy.packages.between.libraries().

copy.packages.between.libraries(ask = TRUE, keep.old = TRUE)

Will ask you to choose source and destination libraries from a list of available ones and copy without deleting them from the old library all packages. Using keep.old = FALSE, the default, will move the packages, and ask = FALSE the default will automatically select source and destination. This automatic guessing did not select the direction I expected for the case of a patched versus released version of R.
Anyway this is handy when one has, as the function itself reported some minutes ago 144 packages to move!
If you do not use patched versions of R this should be enough.


I hope this bit of advice will make less painful my decision of no-longer supporting R 3.1.X and earlier!

New package photobiologyAll

The new package photobiologyAll loads and imports all packages in the photobiology suite. Does not add any new functionality but adds convenience at the cost of increased memory use and loading time. Added on 25.04.2014: I have decided to remove package photobiologygg from those packages loaded and imported by photobiologyAll, because it in turn imports ggplot2 which may not be needed and is quite large. I will most probably change the name of package photobiologygg as it can be useful also in other contexts. Continue reading