Skip to contents

Package overview

ggpmisc ggpmisc-package
ggpmisc: Miscellaneous Extensions to 'ggplot2'

Scales

Scales control de mapping of data to aesthetics.

scale_x_logFC() scale_y_logFC()
Position scales for log fold change data
scale_colour_logFC() scale_color_logFC() scale_fill_logFC()
Colour and fill scales for log fold change data
FC_format() FC_plain()
Formatter for fold change tick labels
FC_name()
Fold change- axis labels
scale_y_Pvalue() scale_y_FDR() scale_x_Pvalue() scale_x_FDR()
Convenience scale for P-values
scale_colour_outcome() scale_color_outcome() scale_fill_outcome()
Colour and fill scales for ternary outcomes
scale_shape_outcome()
Shape scale for ternary outcomes
outcome2factor() threshold2factor()
Convert numeric ternary outcomes into a factor
xy_outcomes2factor() xy_thresholds2factor()
Convert two numeric ternary outcomes into a factor
symmetric_limits()
Expand a range to make it symmetric

Statistics

It is often useful to summarize data before plotting, and that is what these transformations do.

stat_peaks() stat_valleys()
Local maxima (peaks) or minima (valleys)
stat_poly_line()
Predicted line from linear model fit
stat_poly_eq()
Equation, p-value, \(R^2\), AIC and BIC of fitted polynomial
stat_ma_line()
Predicted line from major axis linear fit
stat_ma_eq()
Equation, p-value, R^2 of major axis regression
stat_quant_line()
Predicted line from quantile regression fit
stat_quant_band()
Predicted band from quantile regression fits
stat_quant_eq()
Equation, rho, AIC and BIC from quantile regression
stat_correlation()
Annotate plot with correlation test
stat_fit_tb()
Model-fit summary or ANOVA
stat_fit_tidy()
One row data frame with fitted parameter estimates
stat_fit_glance()
One row summary data frame for a fitted model
stat_fit_augment()
Augment data with fitted values and statistics
stat_fit_deviations() stat_fit_fitted()
Residuals from model fit as segments
stat_fit_residuals()
Residuals from a model fit
stat_multcomp()
Labels for pairwise multiple comparisons
use_label()
Assemble label and map it

Utilities

Low level functions used to build some of the functions above, but possibly useful also in other contexts.

sprintf_dm() value2char()
Format numeric values as strings
plain_label() italic_label() bold_label() p_value_label() f_value_label() t_value_label() r_label() rr_label() adj_rr_label() rr_ci_label() r_ci_label()
Format numbers as character labels
coefs2poly_eq()
Format a polynomial as an equation
poly2character()
Convert a polynomial into character string
typeset_numbers()
Typeset/format numbers preserving trailing zeros
find_peaks()
Find local maxima or global maximum (peaks)
coef(<lmodel2>)
Extract Model Coefficients
confint(<lmodel2>)
Confidence Intervals for Model Parameters
predict(<lmodel2>)
Model Predictions
check_poly_formula()
Validate model formula as a polynomial
keep_tidy() keep_glance() keep_augment()
Tidy, glance or augment an object keeping a trace of its origin
swap_xy()
Swap x and y in a formula

Changes

List of geometries, statistics and functions moved to package ‘gginnards’.