gginnards 0.0.3

This is a documentation only update, with the following enhancements compared to ‘gginnards’ 0.0.2.

  • Expand the User Guide.
  • Revise documentation adding examples and correcting minor errors.
  • Rewrite README in R markdown adding examples.

Documentation web site at http://docs.r4photobiology.info/gginnards/ includes all help pages, with output from all examples, and vignettes in HTML format.
NOTE: The new version of the package has been submitted to CRAN.

Please raise issues concerning bugs or enhancements to this package through Bitbucket https://bitbucket.org/aphalo/gginnards/issues

gginnards 0.0.2

This is a minor update, with the following enhancements compared to ‘gginnards’ 0.0.1.

  • Implement str() method for class "ggplot" as a wrapper with tweaked default arguments.
  • Add functions mapped_vars() and data_vars() to list variables in the default data member of objects of class "gg".
  • Add function data_attributes() to list the attributes of the default data member of objects of class "gg".

Documentation web site at http://docs.r4photobiology.info/gginnards/ includes all help pages, with output from all examples, and vignettes in HTML format.
NOTE: The package is on its way to CRAN CRAN.

Please raise issues concerning bugs or enhancements to this package through Bitbucket https://bitbucket.org/aphalo/gginnards/issues

Package ‘patchwork’

Operators defined in package ‘patchwork’ can be used to combine multiple plots created with package ‘ggplot2’ or extensions to it, such as my own ‘ggpmisc’ and ‘ggspectra’. (The site ggplot2 extensions showcases at the moment more than 40 extensions to ‘ggplot2’.)

Package ‘patchwork’ has been developed by Thomas Lin Pedersen, and being relatively new, it is not yet in CRAN. It can be installed from the public Git repository at Github.

# install.packages("devtools")
devtools::install_github("thomasp85/patchwork")

The ‘ggplot2’ package provides a strong API for sequentially building up a plot, but does not concern itself with composition of multiple plots. ‘patchwork’ is a package that expands the API to allow for arbitrarily complex composition of plots by providing mathmatical operators for combining multiple plots. Other packages that address this need (but with a different approach) are ‘gridExtra’ and ‘cowplot’.

From the package’s DESCRIPTION.

Package ‘ggspectra’ provides function multiplot() for this purpose, but this function is minimalistic, with its most important handicap in its inability to independently align the plotting areas and axis labels of the composed plots.

An example using the operators / and & from ‘patchwork’ follows.

library(ggspectra)
library(patchwork)
p <- autoplot(sun.spct) / 
  autoplot(polyester.spct, range = c(280, 800)) / 
  autoplot(sun.spct * polyester.spct)
png("three-plots.png", height = 800, width = 600)
print(p) & theme_bw()
dev.off()

from Data to Viz (external link)

from data to Viz is a new web site related to data analysis and R. Its aim is to make it easier to choose among different types of data visualisations. It looks beautiful, is easy to navigate, includes “trees” displaying a classification of visualizations and multiple individual examples with the corresponding R code.  Highly recommended!

To access the website and/or to buy the printed poster visit from Data to Viz.