R tips 3: ggpmisc adds new stats to ‘ggplot2’

Aim of the package

  1. Make it possible to use the grammar of graphics in some cases for which until now ad-hoc solutions were needed.
  2. Show how easy it can be to write new statistics for ‘ggplot2 (>= 2.0.0)’.

Case 1 (Stackoverflow question)

“Adding a 3rd order polynomial and its equation to a ggplot in r”

Re-stated problem

“Adding a label with the R^2 or adjusted R^2 value from any lm() fit for each group and panel of a ggplot”

“Adding a polynomial of any degree and its equation for each group and panel of a ggplot”

Continue reading

Updates

ggpmisc 0.2.4 (new functionality)

Improve handling of time zones in try_data_frame().
Revise documentation and vignette.

The vignette includes code examples with minimal explanations.

Please, report any problems you encounter, and suggest possible changes or additions to the functionality!

NOTE: Sources, and Windows binaries for R 3.2.x, are now available in the R repository.

Updates

ggpmisc 0.2.3 (new functionality)

stat_poly_eq() now includes the lhs (left hand side) of the equation by default.

The vignette includes code examples with minimal explanations.

Please, report any problems you encounter, and suggest possible changes or additions to the functionality!

[2016-01-27] Now it is really in both repositories!

NOTE: Sources, and Windows binaries for R 3.2.x, are now available in the R repository.

Updates

ggpmisc 0.2.2 (new functionality)

stat_peaks() and stat_valleys()  can now correctly handle times and dates mapped to the x aesthetic.

New function try_data_frame() converts time series objects (of classes ts, xts, timeSeries, irts, its, or fts) into data frames suitable for plotting with ggplot().

The vignette includes code examples with minimal explanations.

ggspectra 0.1.5 (minor documentation update)

Code itself is unchanged, only fixed indexing of documentation so that internal objects are no longer listed in the help index.

The vignette includes code examples with explanations.

Please, report any problems you encounter, and suggest possible changes or additions to the functionality!

NOTE: Sources, and Windows binaries for R 3.2.x, are now available in the R repository.

Update

rOmniDriver 0.1.9 (minor update)

Add script examples to the installed package. Updated documentation with a description of the defaults for the indexes used to select the spectrometer and the channel to address.

NOTE: Sources, and Windows binaries for R 3.2.x, are now available in the R repository.