ggpmisc 0.3.5

This version (0.3.5) adds to geom_table() support for table themes compatible with gridExtra::ttheme_default(). The default table-theme can be changed with function ttheme_set() and several new ttheme constructors are also available as well as support for user defined theme constructors and themes. Changes affect the rendering of tables, and add flexibility to the handling of mapped aesthetics in geom_table()

Note: The default theme for tables in version 0.3.5 uses slightly less padding than in previous versions, and this padding is now proportional to the text’s size instead of fixed. This will not break old code but can slightly change how tables look.

The plots below make use of two of the new table theme constructors. The second plot also uses ggplot2’s theme_dark().

Note: If the full flexibility of ‘gridExtra’ and ‘grid’ are needed for a table, the table can be constructed directly with these packages and added as an inset using geom_grob().

Acknowlegement: This update was encouraged by a recent question 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.

ggpmisc 0.3.4

This version (0.3.4) adds to stat_poly_eq() the ability to return F-value and P-value in addition to the equation of the polynomial, R2, AIC and BIC available in earlier versions of ‘ggpmisc’. The package code and examples have been updated to avoid the use of functions and methods that have been deprecated in recent updates to ‘ggplot2’.

library(ggpmisc) # version >= 0.3.4 !!
ggplot(mtcars, aes(x = wt, y = mpg, colour = factor(cyl))) +
  geom_smooth(method="lm") +
  geom_point() +
  stat_poly_eq(formula = y ~ x,
               aes(label = paste(stat(f.value.label), stat(p.value.label), 
                                 sep = "*`,`~")),
               parse = TRUE,
               label.x.npc = "right") +
  theme_bw()

The code above produces the plot below.

Acknowlegement: This update as well as the very start of the development of this package has been triggered by some great questions posted at stackoverflow. These questions and answers can be found with a search for the tag [ggpmisc] at stackoverflow. When asking questions or help related to this package, please tag your question.

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.

ggpmisc 0.3.3

This version (0.3.3) fixes a bug in stat_poly_eq() introduced in ‘ggpmisc’ 0.3.2 and includes a minor revision to documentation.

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.

ggpmisc 0.3.2

This version (0.3.2) adds as new features scales and statistics that help with the creation of volcano and quadrant plots, such as used with transcriptomics and metabolomics data. A few rough edges remaining in the features added in versions 0.3.0. and 0.3.1 have been polished out. Two issues raised in Bitbucket about the documentation, highlighted some incomplete explanations. These explanations have now been expanded. One important change to the documentation of statistics whose returned values may change depending on arguments is the addition of an example of the use of geom_debug() from package ‘gginnards’ showing how to print to the R console the data returned by statistics, which is the input received by the paired geometries. The User Guide needs still some work, scheduled for the next release. Package documentation is available at https://docs.r4photobiology.info/ggpmisc/ as a web site.

Plots created using the new statistics and scales are shown below. In the quadrant plot, which observations were labelled and highlighted was decided automatically based on local 2D density. Counts for each quadrant are computed on the fly. As the plot is non-the-less created using the grammar of graphics, little if any of the flexibility of ‘ggplot2’ is lost.

Quadrant plot created with packages ‘ggplot2 (3.2.1)’, ‘ggpmisc (0.3.2)’ and ‘ggrepel (0.8.1)’.
Volcano plot created with packages ‘ggplot2’, ‘ggpmisc’ and ‘ggrepel’ (very small p-values have been squished to the top edge of the plotting area).

NOTE: The new version of ‘ggpmisc’ is on its way to CRAN.