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.