Version 0.4.4 includes enhancements. An issue raised in GitHub and a question in StackOverflow asked for the possibility of changing how fitted lines are plotted based on the “goodness” of the fit. In addition an old question in StackOverflow highlighted the need of more intuitive support for annotations based on stats::cor.test()
. In addition to implementing these enhancements we continued adding support for flipping of statistics controlled through formal parameter orientation
as implemented in ‘ggplot2’ since version 3.3.0.
Changes compared to version 0.4.3, the previous version in CRAN are:
- Add new function
stat_correlation()
to annotate plots with correlation estimates, their P-value, a test statistic and n computed withstats::cor.test()
. In addition to formatted character strings, numeric values are included in the returned data frame to facilitate conditional display. - Update
stat_poly_line()
to optionally add columnsn
,p.value
,r.squared
,adj.r.squared
andmethod
to the returned data frame. Code breaking: This statistic no longer supports fitting of splines with methods such asloess
. This could potentially break user code, in which case the solution is to usestat_smooth()
. - Update
stat_ma_line()
to optionally add columnsn
,p.value
,r.squared
andmethod
to the returned data frame. (As only a slope can be fitted,adj.r.squared
is irrelevant.) - Update
stat_quant_line()
andstat_quant_band()
to optionally addn
andmethod
columns to the returned data frame. (No exact equivalent ofr.squared
exists for quantile regression.) - Update
stat_fit_residuals()
to optionally return weighted
residuals. - Update
stat_peaks()
andstat_valleys()
to allow flipping with new parameterorientation
.
Documentation web site at http://docs.r4photobiology.info/ggpmisc/ includes all help pages, with output from all examples, vignettes as well as a changelog in HTML format.
NOTE: Version 0.4.4 is on its way to CRAN.
Please raise issues concerning bugs or enhancements to this package through GitHub https://github.com/aphalo/ggpmisc/issues