diff --git a/CRAN-RELEASE b/CRAN-RELEASE new file mode 100644 index 00000000..925c0b48 --- /dev/null +++ b/CRAN-RELEASE @@ -0,0 +1,2 @@ +This package was submitted to CRAN on 2020-06-27. +Once it is accepted, delete this file and tag the release (commit 7ca7d83936). diff --git a/DESCRIPTION b/DESCRIPTION index 97175ab7..b1cfeba3 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: ggpubr Type: Package Title: 'ggplot2' Based Publication Ready Plots -Version: 0.3.0.999 -Date: 2020-05-03 +Version: 0.4.0 +Date: 2020-06-27 Authors@R: c( person("Alboukadel", "Kassambara", role = c("aut", "cre"), email = "alboukadel.kassambara@gmail.com")) Description: The 'ggplot2' package is excellent and flexible for elegant data @@ -33,7 +33,7 @@ Imports: glue, polynom, rlang, - rstatix (>= 0.4.0), + rstatix (>= 0.6.0), tibble, magrittr Suggests: @@ -118,4 +118,5 @@ Collate: 'text_grob.R' 'theme_pubr.R' 'theme_transparent.R' + 'utils-geom-signif.R' 'utils-pipe.R' diff --git a/NEWS.md b/NEWS.md index 210d3f7f..5b4e1960 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,5 @@ -# ggpubr 0.3.0.999 +# ggpubr 0.4.0 -To DO: merging two legends in ggarrange, discussion: https://community.rstudio.com/t/how-to-combine-two-separate-legends-side-by-side/9480/5 ## New features diff --git a/R/annotate_figure.R b/R/annotate_figure.R index 4eb74462..d601ee4e 100644 --- a/R/annotate_figure.R +++ b/R/annotate_figure.R @@ -3,7 +3,7 @@ NULL #'Annotate Arranged Figure #' #'@description Annotate figures including: i) ggplots, ii) arranged ggplots from -#' \code{\link{ggarrange}()}, \code{\link[gridExtra]{grid.arrange}()} and +#' \code{\link{ggarrange}()}, \code{\link[gridExtra:arrangeGrob]{grid.arrange}()} and #' \code{\link[cowplot]{plot_grid}()}. #'@param p (arranged) ggplots. #'@param top,bottom,left,right optional string, or grob. diff --git a/R/as_ggplot.R b/R/as_ggplot.R index bb5b5c0b..8979ac25 100644 --- a/R/as_ggplot.R +++ b/R/as_ggplot.R @@ -2,11 +2,11 @@ NULL #' Storing grid.arrange() arrangeGrob() and plots #' -#' @description Transform the output of \code{\link[gridExtra]{arrangeGrob}()} -#' and \code{\link[gridExtra]{grid.arrange}()} to a an object of class ggplot. +#' @description Transform the output of \code{\link[gridExtra:arrangeGrob]{arrangeGrob}()} +#' and \code{\link[gridExtra:arrangeGrob]{grid.arrange}()} to a an object of class ggplot. #' @param x an object of class gtable or grob as returned by the functions -#' \code{\link[gridExtra]{arrangeGrob}()} and -#' \code{\link[gridExtra]{grid.arrange}()}. +#' \code{\link[gridExtra:arrangeGrob]{arrangeGrob}()} and +#' \code{\link[gridExtra:arrangeGrob]{grid.arrange}()}. #' @return an object of class ggplot. #' #' @examples diff --git a/R/font.R b/R/font.R index fe19616d..d3188ff3 100644 --- a/R/font.R +++ b/R/font.R @@ -2,7 +2,7 @@ #' #'@description Change the appearance of the main title, subtitle, caption, axis #' labels and text, as well as the legend title and texts. Wrapper around -#' \code{\link[ggplot2]{element_text}()}. +#' \code{\link[ggplot2:element]{element_text}()}. #' #'@param object character string specifying the plot components. Allowed values #' include: \itemize{ \item \code{"title"} for the main title \item @@ -23,7 +23,7 @@ #' "bold.italic"}). #'@param family the font family. #'@param ... other arguments to pass to the function -#' \code{\link[ggplot2]{element_text}()}. +#' \code{\link[ggplot2:element]{element_text}()}. #' #'@examples #'# Load data diff --git a/R/get_breaks.R b/R/get_breaks.R index 454bb2c2..197f669b 100644 --- a/R/get_breaks.R +++ b/R/get_breaks.R @@ -1,8 +1,8 @@ #' Easy Break Creation for Numeric Axes #' #' @description Creates breaks for numeric axes to be used in the functions -#' \code{\link[ggplot2]{scale_x_continuous}()} and -#' \code{\link[ggplot2]{scale_y_continuous}()}. Can be used to increase the +#' \code{\link[ggplot2:scale_continuous]{scale_x_continuous}()} and +#' \code{\link[ggplot2:scale_continuous]{scale_y_continuous}()}. Can be used to increase the #' number of x and y ticks by specifying the option \code{n}. It's also #' possible to control axis breaks by specifying a step between ticks. For #' example, if \code{by = 5}, a tick mark is shown on every 5. diff --git a/R/get_palette.R b/R/get_palette.R index b59a10ed..57ad16d0 100644 --- a/R/get_palette.R +++ b/R/get_palette.R @@ -4,7 +4,7 @@ #' palettes and custom color palettes. Useful to extend RColorBrewer and ggsci to support more colors. #'@param palette Color palette. Allowed values include: \itemize{ \item #' \strong{Grey color palettes}: "grey" or "gray"; \item \strong{RColorBrewer -#' palettes}, see \code{\link[RColorBrewer]{brewer.pal}} and details section. +#' palettes}, see \code{\link[RColorBrewer:ColorBrewer]{brewer.pal}} and details section. #' Examples of palette names include: "RdBu", "Blues", "Dark2", "Set2", ...; #' \item \strong{Custom color palettes}. For example, palette = c("#00AFBB", #' "#E7B800", "#FC4E07"); \item \strong{ggsci scientific journal palettes}, diff --git a/R/ggscatter.R b/R/ggscatter.R index dfb05ba3..e92deaec 100644 --- a/R/ggscatter.R +++ b/R/ggscatter.R @@ -29,7 +29,7 @@ NULL #' #' \itemize{ \item \code{"convex"}: plot convex hull of a set o points. \item #' \code{"confidence"}: plot confidence ellipses arround group mean points as -#' \code{\link[FactoMineR]{coord.ellipse}()}[in FactoMineR]. \item \code{"t"}: +#' \code{FactoMineR::coord.ellipse()}. \item \code{"t"}: #' assumes a multivariate t-distribution. \item \code{"norm"}: assumes a #' multivariate normal distribution. \item \code{"euclid"}: draws a circle with #' the radius equal to level, representing the euclidean distance from the diff --git a/R/ggscatterhist.R b/R/ggscatterhist.R index 0b18d53e..b004678d 100644 --- a/R/ggscatterhist.R +++ b/R/ggscatterhist.R @@ -12,7 +12,7 @@ NULL #'@param margin.plot the type of the marginal plot. Default is "hist". #'@param margin.params parameters to be applied to the marginal plots. #'@param margin.ggtheme the theme of the marginal plot. Default is -#' \code{\link[ggplot2]{theme_void}()}. +#' \code{\link[ggplot2:ggtheme]{theme_void}()}. #'@param margin.space logical value. If TRUE, adds space between the main plot #' and the marginal plot. #'@param bins Number of histogram bins. Defaults to 30. Pick a better value that diff --git a/R/ggsummarystats.R b/R/ggsummarystats.R index 912a4074..cf3cc7b9 100644 --- a/R/ggsummarystats.R +++ b/R/ggsummarystats.R @@ -4,7 +4,7 @@ NULL #' GGPLOT with Summary Stats Table Under the Plot #' #' @description Create a ggplot with summary stats (n, median, mean, iqr) table -#' under the plot. +#' under the plot. Read more: \href{https://www.datanovia.com/en/blog/how-to-create-a-beautiful-plots-in-r-with-summary-statistics-labels/}{How to Create a Beautiful Plots in R with Summary Statistics Labels}. #' @inheritParams ggboxplot #' @param digits integer indicating the number of decimal places (round) to be #' used. @@ -79,14 +79,7 @@ NULL #' #' # Facet #' #:::::::::::::::::::::::::::::::::::::::::::::::: -#' -#' ggsummarystats( -#' df, x = "dose", y = "len", -#' ggfunc = ggboxplot, add = "jitter", -#' color = "dose", palette = "npg", -#' facet.by = c("supp", "qc") -#' ) -#' # Specify labeller +#' # Specify free.panels = TRUE for free panels #' ggsummarystats( #' df, x = "dose", y = "len", #' ggfunc = ggboxplot, add = "jitter", @@ -95,15 +88,6 @@ NULL #' labeller = "label_both" #' ) #' -#' # Free panels -#' ggsummarystats( -#' df, x = "dose", y = "len", -#' ggfunc = ggboxplot, add = "jitter", -#' color = "dose", palette = "npg", -#' facet.by = c("supp", "qc"), -#' free.panels = TRUE, labeller = "label_both" -#' ) -#' #' @describeIn ggsummarystats Create a table of summary stats #' @export ggsummarytable <- function(data, x, y, digits = 0, size = 3, color = "black", palette = NULL, diff --git a/R/reexports.R b/R/reexports.R index 6988ba45..c89be3af 100644 --- a/R/reexports.R +++ b/R/reexports.R @@ -4,9 +4,6 @@ dplyr::mutate #' @importFrom dplyr group_by #' @export dplyr::group_by -#' @importFrom ggsignif geom_signif -#' @export -ggsignif::geom_signif #' @importFrom rstatix get_summary_stats #' @export rstatix::get_summary_stats diff --git a/R/rotate_axis_text.R b/R/rotate_axis_text.R index b86890d9..20a07f50 100644 --- a/R/rotate_axis_text.R +++ b/R/rotate_axis_text.R @@ -10,7 +10,7 @@ #'@param hjust horizontal justification (in [0, 1]). #'@param vjust vertical justification (in [0, 1]). #'@param ... other arguments to pass to the function -#' \code{\link[ggplot2]{element_text}()}. +#' \code{\link[ggplot2:element]{element_text}()}. #' #'@examples #'# Load data diff --git a/R/stat_central_tendency.R b/R/stat_central_tendency.R index 6babe44d..e5679878 100644 --- a/R/stat_central_tendency.R +++ b/R/stat_central_tendency.R @@ -13,7 +13,7 @@ NULL #' For continuous variable, we can consider using mean or median as the #' measures of the central tendency. #' @inheritParams ggplot2::layer -#' @param ... other arguments to pass to \code{\link[ggplot2]{geom_line}}. +#' @param ... other arguments to pass to \code{\link[ggplot2:geom_path]{geom_line}}. #' @param na.rm If FALSE (the default), removes missing values with a warning. #' If TRUE silently removes missing values. #' @param type the type of central tendency measure to be used. Possible values diff --git a/R/stat_compare_means.R b/R/stat_compare_means.R index a66f80a7..75002654 100644 --- a/R/stat_compare_means.R +++ b/R/stat_compare_means.R @@ -41,7 +41,7 @@ NULL #'@param step.increase numeric vector with the increase in fraction of total #' height for every additional comparison to minimize overlap. #'@param ... other arguments to pass to \code{\link[ggplot2]{geom_text}} or -#' \code{\link[ggplot2]{geom_label}}. +#' \code{\link[ggplot2:geom_text]{geom_label}}. #'@param na.rm If FALSE (the default), removes missing values with a warning. If #' TRUE silently removes missing values. #'@seealso \code{\link{compare_means}} diff --git a/R/stat_conf_ellipse.R b/R/stat_conf_ellipse.R index 32f5353b..0e8219f8 100644 --- a/R/stat_conf_ellipse.R +++ b/R/stat_conf_ellipse.R @@ -2,7 +2,7 @@ NULL #' Plot confidence ellipses. #' @description Plot confidence ellipses around barycenters. The method for -#' computing confidence ellipses has been modified from FactoMineR::coord.ellipse. +#' computing confidence ellipses has been modified from \code{FactoMineR::coord.ellipse()}. #' @inheritParams ggplot2::layer #' @inheritParams ggplot2::stat_ellipse #' @param level confidence level used to construct the ellipses. By diff --git a/R/stat_cor.R b/R/stat_cor.R index 74e7c3c1..573e6890 100644 --- a/R/stat_cor.R +++ b/R/stat_cor.R @@ -39,7 +39,7 @@ NULL #' precision for the p-value. Default is NULL. Use (e.g.) 0.0001 to show 4 #' decimal places of precision. If specified, then \code{p.digits} is ignored. #'@param ... other arguments to pass to \code{\link[ggplot2]{geom_text}} or -#' \code{\link[ggplot2]{geom_label}}. +#' \code{\link[ggplot2:geom_text]{geom_label}}. #'@param na.rm If FALSE (the default), removes missing values with a warning. If #' TRUE silently removes missing values. #'@seealso \code{\link{ggscatter}} diff --git a/R/stat_overlay_normal_density.R b/R/stat_overlay_normal_density.R index a3ce4012..2647ed89 100644 --- a/R/stat_overlay_normal_density.R +++ b/R/stat_overlay_normal_density.R @@ -6,7 +6,7 @@ NULL #' density distribution of 'x'. This is useful for visually inspecting the #' degree of deviance from normality. #' @inheritParams ggplot2::layer -#' @param ... other arguments to pass to \code{\link[ggplot2]{geom_line}}. +#' @param ... other arguments to pass to \code{\link[ggplot2:geom_path]{geom_line}}. #' @param na.rm If FALSE (the default), removes missing values with a warning. #' If TRUE silently removes missing values. #' @seealso \code{\link{ggdensity}} diff --git a/R/stat_regline_equation.R b/R/stat_regline_equation.R index e95aee6a..ac4f179c 100644 --- a/R/stat_regline_equation.R +++ b/R/stat_regline_equation.R @@ -21,7 +21,7 @@ NULL #' for absolute positioning of the label. If too short they will be recycled. #'@param output.type character One of "expression", "latex" or "text". #'@param ... other arguments to pass to \code{\link[ggplot2]{geom_text}} or -#' \code{\link[ggplot2]{geom_label}}. +#' \code{\link[ggplot2:geom_text]{geom_label}}. #'@param na.rm If FALSE (the default), removes missing values with a warning. If #' TRUE silently removes missing values. #'@seealso \code{\link{ggscatter}} diff --git a/R/text_grob.R b/R/text_grob.R index 9b71fc6b..a7512697 100644 --- a/R/text_grob.R +++ b/R/text_grob.R @@ -3,7 +3,7 @@ NULL #' Create a Text Graphical object #' @description Create easily a customized text grob (graphical object). Wrapper around -#' \code{\link[grid]{textGrob}}. +#' \code{\link[grid:grid.text]{textGrob}}. #' @inheritParams grid::grid.text #' @param color text font color. #' @param face font face. Allowed values include one of \code{"plain", "bold", @@ -11,7 +11,7 @@ NULL #' @param size font size (e.g.: size = 12) #' @param lineheight line height (e.g.: lineheight = 2). #' @param family font family. -#' @param ... other arguments passed to \link[grid]{textGrob}. +#' @param ... other arguments passed to \link[grid:grid.text]{textGrob}. #' @return a text grob. #' @examples #'text <- paste("iris data set gives the measurements in cm", diff --git a/R/utils-geom-signif.R b/R/utils-geom-signif.R new file mode 100644 index 00000000..0f9c1607 --- /dev/null +++ b/R/utils-geom-signif.R @@ -0,0 +1,10 @@ +#' geom_signif exported from ggsignif package +#' +#' See \code{ggsignif::\link[ggsignif:stat_signif]{geom_signif}} for details. +#' +#' @name geom_signif +#' @rdname geom_signif +#' @keywords internal +#' @export +#' @importFrom ggsignif geom_signif +NULL diff --git a/_pkgdown.yml b/_pkgdown.yml index f6591dc7..06673f52 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -86,6 +86,10 @@ reference: - ggexport - annotate_figure - background_image + - title: Make Programming Easy with GGPlot2 + contents: + - geom_exec + - create_aes - title: Helpers contents: - facet @@ -93,8 +97,6 @@ reference: - ggadd - get_palette - as_ggplot - - geom_exec - - create_aes - title: Data contents: - diff_express diff --git a/cran-comments.md b/cran-comments.md index 43092d71..57893609 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,5 +1,5 @@ ## Test environments -* local OS X install, R 3.3.2 +* local OS X install, R 3.6.0 * win-builder * Travis @@ -13,5 +13,5 @@ All packages that I could install passed. ## Update -This is an update version 0.3.0 (see NEWS.md). +This is an update version 0.4.0 (see NEWS.md). diff --git a/docs/404.html b/docs/404.html index e69a2028..22b5a880 100644 --- a/docs/404.html +++ b/docs/404.html @@ -8,23 +8,29 @@ Page not found (404) • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,10 +40,12 @@ + + @@ -51,7 +59,7 @@ - +
@@ -84,9 +92,13 @@ Changelog -
@@ -107,6 +119,12 @@

Page not found (404)

+ + @@ -117,7 +135,7 @@

Page not found (404)

-

Site built with pkgdown 1.4.1.

+

Site built with pkgdown 1.5.1.

diff --git a/docs/authors.html b/docs/authors.html index 78eed785..7da66e56 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -8,23 +8,29 @@ Authors • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,10 +40,12 @@ + + @@ -51,7 +59,7 @@ - +
@@ -84,9 +92,13 @@ Changelog -
@@ -122,7 +134,7 @@

Authors

-

Site built with pkgdown 1.4.1.

+

Site built with pkgdown 1.5.1.

diff --git a/docs/bootstrap-toc.css b/docs/bootstrap-toc.css new file mode 100644 index 00000000..5a859415 --- /dev/null +++ b/docs/bootstrap-toc.css @@ -0,0 +1,60 @@ +/*! + * Bootstrap Table of Contents v0.4.1 (http://afeld.github.io/bootstrap-toc/) + * Copyright 2015 Aidan Feldman + * Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */ + +/* modified from https://github.com/twbs/bootstrap/blob/94b4076dd2efba9af71f0b18d4ee4b163aa9e0dd/docs/assets/css/src/docs.css#L548-L601 */ + +/* All levels of nav */ +nav[data-toggle='toc'] .nav > li > a { + display: block; + padding: 4px 20px; + font-size: 13px; + font-weight: 500; + color: #767676; +} +nav[data-toggle='toc'] .nav > li > a:hover, +nav[data-toggle='toc'] .nav > li > a:focus { + padding-left: 19px; + color: #563d7c; + text-decoration: none; + background-color: transparent; + border-left: 1px solid #563d7c; +} +nav[data-toggle='toc'] .nav > .active > a, +nav[data-toggle='toc'] .nav > .active:hover > a, +nav[data-toggle='toc'] .nav > .active:focus > a { + padding-left: 18px; + font-weight: bold; + color: #563d7c; + background-color: transparent; + border-left: 2px solid #563d7c; +} + +/* Nav: second level (shown on .active) */ +nav[data-toggle='toc'] .nav .nav { + display: none; /* Hide by default, but at >768px, show it */ + padding-bottom: 10px; +} +nav[data-toggle='toc'] .nav .nav > li > a { + padding-top: 1px; + padding-bottom: 1px; + padding-left: 30px; + font-size: 12px; + font-weight: normal; +} +nav[data-toggle='toc'] .nav .nav > li > a:hover, +nav[data-toggle='toc'] .nav .nav > li > a:focus { + padding-left: 29px; +} +nav[data-toggle='toc'] .nav .nav > .active > a, +nav[data-toggle='toc'] .nav .nav > .active:hover > a, +nav[data-toggle='toc'] .nav .nav > .active:focus > a { + padding-left: 28px; + font-weight: 500; +} + +/* from https://github.com/twbs/bootstrap/blob/e38f066d8c203c3e032da0ff23cd2d6098ee2dd6/docs/assets/css/src/docs.css#L631-L634 */ +nav[data-toggle='toc'] .nav > .active > ul { + display: block; +} diff --git a/docs/bootstrap-toc.js b/docs/bootstrap-toc.js new file mode 100644 index 00000000..1cdd573b --- /dev/null +++ b/docs/bootstrap-toc.js @@ -0,0 +1,159 @@ +/*! + * Bootstrap Table of Contents v0.4.1 (http://afeld.github.io/bootstrap-toc/) + * Copyright 2015 Aidan Feldman + * Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */ +(function() { + 'use strict'; + + window.Toc = { + helpers: { + // return all matching elements in the set, or their descendants + findOrFilter: function($el, selector) { + // http://danielnouri.org/notes/2011/03/14/a-jquery-find-that-also-finds-the-root-element/ + // http://stackoverflow.com/a/12731439/358804 + var $descendants = $el.find(selector); + return $el.filter(selector).add($descendants).filter(':not([data-toc-skip])'); + }, + + generateUniqueIdBase: function(el) { + var text = $(el).text(); + var anchor = text.trim().toLowerCase().replace(/[^A-Za-z0-9]+/g, '-'); + return anchor || el.tagName.toLowerCase(); + }, + + generateUniqueId: function(el) { + var anchorBase = this.generateUniqueIdBase(el); + for (var i = 0; ; i++) { + var anchor = anchorBase; + if (i > 0) { + // add suffix + anchor += '-' + i; + } + // check if ID already exists + if (!document.getElementById(anchor)) { + return anchor; + } + } + }, + + generateAnchor: function(el) { + if (el.id) { + return el.id; + } else { + var anchor = this.generateUniqueId(el); + el.id = anchor; + return anchor; + } + }, + + createNavList: function() { + return $(''); + }, + + createChildNavList: function($parent) { + var $childList = this.createNavList(); + $parent.append($childList); + return $childList; + }, + + generateNavEl: function(anchor, text) { + var $a = $(''); + $a.attr('href', '#' + anchor); + $a.text(text); + var $li = $('
  • '); + $li.append($a); + return $li; + }, + + generateNavItem: function(headingEl) { + var anchor = this.generateAnchor(headingEl); + var $heading = $(headingEl); + var text = $heading.data('toc-text') || $heading.text(); + return this.generateNavEl(anchor, text); + }, + + // Find the first heading level (`

    `, then `

    `, etc.) that has more than one element. Defaults to 1 (for `

    `). + getTopLevel: function($scope) { + for (var i = 1; i <= 6; i++) { + var $headings = this.findOrFilter($scope, 'h' + i); + if ($headings.length > 1) { + return i; + } + } + + return 1; + }, + + // returns the elements for the top level, and the next below it + getHeadings: function($scope, topLevel) { + var topSelector = 'h' + topLevel; + + var secondaryLevel = topLevel + 1; + var secondarySelector = 'h' + secondaryLevel; + + return this.findOrFilter($scope, topSelector + ',' + secondarySelector); + }, + + getNavLevel: function(el) { + return parseInt(el.tagName.charAt(1), 10); + }, + + populateNav: function($topContext, topLevel, $headings) { + var $context = $topContext; + var $prevNav; + + var helpers = this; + $headings.each(function(i, el) { + var $newNav = helpers.generateNavItem(el); + var navLevel = helpers.getNavLevel(el); + + // determine the proper $context + if (navLevel === topLevel) { + // use top level + $context = $topContext; + } else if ($prevNav && $context === $topContext) { + // create a new level of the tree and switch to it + $context = helpers.createChildNavList($prevNav); + } // else use the current $context + + $context.append($newNav); + + $prevNav = $newNav; + }); + }, + + parseOps: function(arg) { + var opts; + if (arg.jquery) { + opts = { + $nav: arg + }; + } else { + opts = arg; + } + opts.$scope = opts.$scope || $(document.body); + return opts; + } + }, + + // accepts a jQuery object, or an options object + init: function(opts) { + opts = this.helpers.parseOps(opts); + + // ensure that the data attribute is in place for styling + opts.$nav.attr('data-toggle', 'toc'); + + var $topContext = this.helpers.createChildNavList(opts.$nav); + var topLevel = this.helpers.getTopLevel(opts.$scope); + var $headings = this.helpers.getHeadings(opts.$scope, topLevel); + this.helpers.populateNav($topContext, topLevel, $headings); + } + }; + + $(function() { + $('nav[data-toggle="toc"]').each(function(i, el) { + var $nav = $(el); + Toc.init($nav); + }); + }); +})(); diff --git a/docs/docsearch.json b/docs/docsearch.json index f06be93e..52a7aa83 100644 --- a/docs/docsearch.json +++ b/docs/docsearch.json @@ -74,7 +74,7 @@ "selector": ".contents h2, .contents h3", "default_value": "Context" }, - "text": ".contents p, .contents li, .tempate-article .contents .pre" + "text": ".contents p, .contents li" } }, "selectors_exclude": [ diff --git a/docs/index.html b/docs/index.html index e9e0ac5e..6d141f5f 100644 --- a/docs/index.html +++ b/docs/index.html @@ -6,10 +6,11 @@ ggplot2 Based Publication Ready Plots • ggpubr - - - - + + + + + - - +
    @@ -81,93 +88,93 @@

    -
    install.packages("ggpubr")
    +
    install.packages("ggpubr")
    -
    # Install
    -if(!require(devtools)) install.packages("devtools")
    -devtools::install_github("kassambara/ggpubr")
    +
    # Install
    +if(!require(devtools)) install.packages("devtools")
    +devtools::install_github("kassambara/ggpubr")

    Distribution

    - +
    library(ggpubr)
    +#> Loading required package: ggplot2
    +#> Loading required package: magrittr
    +# Create some data format
    +# :::::::::::::::::::::::::::::::::::::::::::::::::::
    +set.seed(1234)
    +wdata = data.frame(
    +   sex = factor(rep(c("F", "M"), each=200)),
    +   weight = c(rnorm(200, 55), rnorm(200, 58)))
    +head(wdata, 4)
    +#>   sex   weight
    +#> 1   F 53.79293
    +#> 2   F 55.27743
    +#> 3   F 56.08444
    +#> 4   F 52.65430
    +
    +# Density plot with mean lines and marginal rug
    +# :::::::::::::::::::::::::::::::::::::::::::::::::::
    +# Change outline and fill colors by groups ("sex")
    +# Use custom palette
    +ggdensity(wdata, x = "weight",
    +   add = "mean", rug = TRUE,
    +   color = "sex", fill = "sex",
    +   palette = c("#00AFBB", "#E7B800"))

    - +
    # Histogram plot with mean lines and marginal rug
    +# :::::::::::::::::::::::::::::::::::::::::::::::::::
    +# Change outline and fill colors by groups ("sex")
    +# Use custom color palette
    +gghistogram(wdata, x = "weight",
    +   add = "mean", rug = TRUE,
    +   color = "sex", fill = "sex",
    +   palette = c("#00AFBB", "#E7B800"))

    Box plots and violin plots

    - +
    # Load data
    +data("ToothGrowth")
    +df <- ToothGrowth
    +head(df, 4)
    +#>    len supp dose
    +#> 1  4.2   VC  0.5
    +#> 2 11.5   VC  0.5
    +#> 3  7.3   VC  0.5
    +#> 4  5.8   VC  0.5
    +
    +# Box plots with jittered points
    +# :::::::::::::::::::::::::::::::::::::::::::::::::::
    +# Change outline colors by groups: dose
    +# Use custom color palette
    +# Add jitter points and change the shape by groups
    + p <- ggboxplot(df, x = "dose", y = "len",
    +                color = "dose", palette =c("#00AFBB", "#E7B800", "#FC4E07"),
    +                add = "jitter", shape = "dose")
    + p

    -
     
    - # Add p-values comparing groups
    - # Specify the comparisons you want
    -my_comparisons <- list( c("0.5", "1"), c("1", "2"), c("0.5", "2") )
    -p + stat_compare_means(comparisons = my_comparisons)+ # Add pairwise comparisons p-value
    -  stat_compare_means(label.y = 50)                   # Add global p-value
    +
    + # Add p-values comparing groups
    + # Specify the comparisons you want
    +my_comparisons <- list( c("0.5", "1"), c("1", "2"), c("0.5", "2") )
    +p + stat_compare_means(comparisons = my_comparisons)+ # Add pairwise comparisons p-value
    +  stat_compare_means(label.y = 50)                   # Add global p-value

    -
    
    - 
    -# Violin plots with box plots inside
    -# :::::::::::::::::::::::::::::::::::::::::::::::::::
    -# Change fill color by groups: dose
    -# add boxplot with white fill color
    -ggviolin(df, x = "dose", y = "len", fill = "dose",
    -         palette = c("#00AFBB", "#E7B800", "#FC4E07"),
    -         add = "boxplot", add.params = list(fill = "white"))+
    -  stat_compare_means(comparisons = my_comparisons, label = "p.signif")+ # Add significance levels
    -  stat_compare_means(label.y = 50)                                      # Add global the p-value 
    +
    +
    +# Violin plots with box plots inside
    +# :::::::::::::::::::::::::::::::::::::::::::::::::::
    +# Change fill color by groups: dose
    +# add boxplot with white fill color
    +ggviolin(df, x = "dose", y = "len", fill = "dose",
    +         palette = c("#00AFBB", "#E7B800", "#FC4E07"),
    +         add = "boxplot", add.params = list(fill = "white"))+
    +  stat_compare_means(comparisons = my_comparisons, label = "p.signif")+ # Add significance levels
    +  stat_compare_means(label.y = 50)                                      # Add global the p-value 

    @@ -177,45 +184,45 @@

    Demo data set

    Load and prepare data:

    - +
    # Load data
    +data("mtcars")
    +dfm <- mtcars
    +# Convert the cyl variable to a factor
    +dfm$cyl <- as.factor(dfm$cyl)
    +# Add the name colums
    +dfm$name <- rownames(dfm)
    +# Inspect the data
    +head(dfm[, c("name", "wt", "mpg", "cyl")])
    +#>                                name    wt  mpg cyl
    +#> Mazda RX4                 Mazda RX4 2.620 21.0   6
    +#> Mazda RX4 Wag         Mazda RX4 Wag 2.875 21.0   6
    +#> Datsun 710               Datsun 710 2.320 22.8   4
    +#> Hornet 4 Drive       Hornet 4 Drive 3.215 21.4   6
    +#> Hornet Sportabout Hornet Sportabout 3.440 18.7   8
    +#> Valiant                     Valiant 3.460 18.1   6

    Ordered bar plots

    Change the fill color by the grouping variable “cyl”. Sorting will be done globally, but not by groups.

    - +
    ggbarplot(dfm, x = "name", y = "mpg",
    +          fill = "cyl",               # change fill color by cyl
    +          color = "white",            # Set bar border colors to white
    +          palette = "jco",            # jco journal color palett. see ?ggpar
    +          sort.val = "desc",          # Sort the value in dscending order
    +          sort.by.groups = FALSE,     # Don't sort inside each group
    +          x.text.angle = 90           # Rotate vertically x axis texts
    +          )

    Sort bars inside each group. Use the argument sort.by.groups = TRUE.

    - +
    ggbarplot(dfm, x = "name", y = "mpg",
    +          fill = "cyl",               # change fill color by cyl
    +          color = "white",            # Set bar border colors to white
    +          palette = "jco",            # jco journal color palett. see ?ggpar
    +          sort.val = "asc",           # Sort the value in dscending order
    +          sort.by.groups = TRUE,      # Sort inside each group
    +          x.text.angle = 90           # Rotate vertically x axis texts
    +          )

    @@ -223,45 +230,45 @@

    Deviation graphs

    The deviation graph shows the deviation of quantitatives values to a reference value. In the R code below, we’ll plot the mpg z-score from the mtcars dataset.

    Calculate the z-score of the mpg data:

    - +
    # Calculate the z-score of the mpg data
    +dfm$mpg_z <- (dfm$mpg -mean(dfm$mpg))/sd(dfm$mpg)
    +dfm$mpg_grp <- factor(ifelse(dfm$mpg_z < 0, "low", "high"),
    +                     levels = c("low", "high"))
    +# Inspect the data
    +head(dfm[, c("name", "wt", "mpg", "mpg_z", "mpg_grp", "cyl")])
    +#>                                name    wt  mpg      mpg_z mpg_grp cyl
    +#> Mazda RX4                 Mazda RX4 2.620 21.0  0.1508848    high   6
    +#> Mazda RX4 Wag         Mazda RX4 Wag 2.875 21.0  0.1508848    high   6
    +#> Datsun 710               Datsun 710 2.320 22.8  0.4495434    high   4
    +#> Hornet 4 Drive       Hornet 4 Drive 3.215 21.4  0.2172534    high   6
    +#> Hornet Sportabout Hornet Sportabout 3.440 18.7 -0.2307345     low   8
    +#> Valiant                     Valiant 3.460 18.1 -0.3302874     low   6

    Create an ordered barplot, colored according to the level of mpg:

    - +
    ggbarplot(dfm, x = "name", y = "mpg_z",
    +          fill = "mpg_grp",           # change fill color by mpg_level
    +          color = "white",            # Set bar border colors to white
    +          palette = "jco",            # jco journal color palett. see ?ggpar
    +          sort.val = "asc",           # Sort the value in ascending order
    +          sort.by.groups = FALSE,     # Don't sort inside each group
    +          x.text.angle = 90,          # Rotate vertically x axis texts
    +          ylab = "MPG z-score",
    +          xlab = FALSE,
    +          legend.title = "MPG Group"
    +          )

    Rotate the plot: use rotate = TRUE and sort.val = “desc”

    - +
    ggbarplot(dfm, x = "name", y = "mpg_z",
    +          fill = "mpg_grp",           # change fill color by mpg_level
    +          color = "white",            # Set bar border colors to white
    +          palette = "jco",            # jco journal color palett. see ?ggpar
    +          sort.val = "desc",          # Sort the value in descending order
    +          sort.by.groups = FALSE,     # Don't sort inside each group
    +          x.text.angle = 90,          # Rotate vertically x axis texts
    +          ylab = "MPG z-score",
    +          legend.title = "MPG Group",
    +          rotate = TRUE,
    +          ggtheme = theme_minimal()
    +          )

    @@ -273,13 +280,13 @@

    Lollipop chart

    Lollipop chart is an alternative to bar plots, when you have a large set of values to visualize.

    Lollipop chart colored by the grouping variable “cyl”:

    -
    ggdotchart(dfm, x = "name", y = "mpg",
    -           color = "cyl",                                # Color by groups
    -           palette = c("#00AFBB", "#E7B800", "#FC4E07"), # Custom color palette
    -           sorting = "ascending",                        # Sort value in descending order
    -           add = "segments",                             # Add segments from y = 0 to dots
    -           ggtheme = theme_pubr()                        # ggplot2 theme
    -           )
    +
    ggdotchart(dfm, x = "name", y = "mpg",
    +           color = "cyl",                                # Color by groups
    +           palette = c("#00AFBB", "#E7B800", "#FC4E07"), # Custom color palette
    +           sorting = "ascending",                        # Sort value in descending order
    +           add = "segments",                             # Add segments from y = 0 to dots
    +           ggtheme = theme_pubr()                        # ggplot2 theme
    +           )

    -
    ggdotchart(dfm, x = "name", y = "mpg",
    -           color = "cyl",                                # Color by groups
    -           palette = c("#00AFBB", "#E7B800", "#FC4E07"), # Custom color palette
    -           sorting = "descending",                       # Sort value in descending order
    -           add = "segments",                             # Add segments from y = 0 to dots
    -           rotate = TRUE,                                # Rotate vertically
    -           group = "cyl",                                # Order by groups
    -           dot.size = 6,                                 # Large dot size
    -           label = round(dfm$mpg),                        # Add mpg values as dot labels
    -           font.label = list(color = "white", size = 9, 
    -                             vjust = 0.5),               # Adjust label parameters
    -           ggtheme = theme_pubr()                        # ggplot2 theme
    -           )
    +
    ggdotchart(dfm, x = "name", y = "mpg",
    +           color = "cyl",                                # Color by groups
    +           palette = c("#00AFBB", "#E7B800", "#FC4E07"), # Custom color palette
    +           sorting = "descending",                       # Sort value in descending order
    +           add = "segments",                             # Add segments from y = 0 to dots
    +           rotate = TRUE,                                # Rotate vertically
    +           group = "cyl",                                # Order by groups
    +           dot.size = 6,                                 # Large dot size
    +           label = round(dfm$mpg),                        # Add mpg values as dot labels
    +           font.label = list(color = "white", size = 9,
    +                             vjust = 0.5),               # Adjust label parameters
    +           ggtheme = theme_pubr()                        # ggplot2 theme
    +           )

    Deviation graph:

    -
    ggdotchart(dfm, x = "name", y = "mpg_z",
    -           color = "cyl",                                # Color by groups
    -           palette = c("#00AFBB", "#E7B800", "#FC4E07"), # Custom color palette
    -           sorting = "descending",                       # Sort value in descending order
    -           add = "segments",                             # Add segments from y = 0 to dots
    -           add.params = list(color = "lightgray", size = 2), # Change segment color and size
    -           group = "cyl",                                # Order by groups
    -           dot.size = 6,                                 # Large dot size
    -           label = round(dfm$mpg_z,1),                        # Add mpg values as dot labels
    -           font.label = list(color = "white", size = 9, 
    -                             vjust = 0.5),               # Adjust label parameters
    -           ggtheme = theme_pubr()                        # ggplot2 theme
    -           )+
    -  geom_hline(yintercept = 0, linetype = 2, color = "lightgray")
    +
    ggdotchart(dfm, x = "name", y = "mpg_z",
    +           color = "cyl",                                # Color by groups
    +           palette = c("#00AFBB", "#E7B800", "#FC4E07"), # Custom color palette
    +           sorting = "descending",                       # Sort value in descending order
    +           add = "segments",                             # Add segments from y = 0 to dots
    +           add.params = list(color = "lightgray", size = 2), # Change segment color and size
    +           group = "cyl",                                # Order by groups
    +           dot.size = 6,                                 # Large dot size
    +           label = round(dfm$mpg_z,1),                        # Add mpg values as dot labels
    +           font.label = list(color = "white", size = 9,
    +                             vjust = 0.5),               # Adjust label parameters
    +           ggtheme = theme_pubr()                        # ggplot2 theme
    +           )+
    +  geom_hline(yintercept = 0, linetype = 2, color = "lightgray")

    Cleveland’s dot plot

    Color y text by groups. Use y.text.col = TRUE.

    -
    ggdotchart(dfm, x = "name", y = "mpg",
    -           color = "cyl",                                # Color by groups
    -           palette = c("#00AFBB", "#E7B800", "#FC4E07"), # Custom color palette
    -           sorting = "descending",                       # Sort value in descending order
    -           rotate = TRUE,                                # Rotate vertically
    -           dot.size = 2,                                 # Large dot size
    -           y.text.col = TRUE,                            # Color y text by groups
    -           ggtheme = theme_pubr()                        # ggplot2 theme
    -           )+
    -  theme_cleveland()                                      # Add dashed grids
    +
    ggdotchart(dfm, x = "name", y = "mpg",
    +           color = "cyl",                                # Color by groups
    +           palette = c("#00AFBB", "#E7B800", "#FC4E07"), # Custom color palette
    +           sorting = "descending",                       # Sort value in descending order
    +           rotate = TRUE,                                # Rotate vertically
    +           dot.size = 2,                                 # Large dot size
    +           y.text.col = TRUE,                            # Color y text by groups
    +           ggtheme = theme_pubr()                        # ggplot2 theme
    +           )+
    +  theme_cleveland()                                      # Add dashed grids

    @@ -357,12 +364,14 @@

    -

    -

    +

    ggpubr 0.2.5 2020-02-13

    -
    +

    -Minor changes

    +Minor changes
      -
    • New arguments cor.coef.name in the function stat_cor(). Can be one of “R” (pearson coef), “rho” (spearman coef) and “tau” (kendall coef). Uppercase and lowercase are allowed (@andhamel, #216).
    • -
    • New arguments digits, r.digits, p.digits in the function stat_cor(). Integer indicating the number of decimal places (round) or significant digits (signif) to be used for the correlation coefficient and the p-value (@raedevan6, #216).
    • +
    • New arguments cor.coef.name in the function stat_cor(). Can be one of “R” (pearson coef), “rho” (spearman coef) and “tau” (kendall coef). Uppercase and lowercase are allowed (@andhamel, #216).
    • +
    • New arguments digits, r.digits, p.digits in the function stat_cor(). Integer indicating the number of decimal places (round) or significant digits (signif) to be used for the correlation coefficient and the p-value (@raedevan6, #216).
    • -compare_means() adapted to tidyr v>= 1.0.0 by specifying cols in the unnest() function (@Youguang, #216).
    • +compare_means() adapted to tidyr v>= 1.0.0 by specifying cols in the unnest() function (@Youguang, #216).
    -

    +

    ggpubr 0.2.4 2019-11-14

    @@ -185,35 +305,35 @@

    -

    +

    ggpubr 0.2.3 2019-09-03

    -
    +

    -New features

    +New features
    • New function stat_central_tendency() to add central tendency measures (mean, median, mode) to density and histogram plots
    • New function stat_overlay_normal_density() to overlay normal density plot (with the same mean and SD) to the density distribution of ‘x’.
    -
    +

    -Minor changes

    +Minor changes
    -
    +

    -Bug fixes

    +Bug fixes
    -

    +

    ggpubr 0.2.2 2019-08-07

    @@ -223,12 +343,12 @@

  • New function geom_bracket() for adding brackets with label annotation to a ggplot. Helpers for adding p-value or significance levels to a plot.
  • -
    +

    -Minor changes

    +Minor changes
    -
    +

    -Bug fixes

    +Bug fixes
      -
    • Bug fixes in gghistogram(). Works now when the x variable is R keyword, such as var, mean, etc. (#192)
    • -
    • In ggline(), error bars now react automatically to grouping by line type (#191)
    • +
    • Bug fixes in gghistogram(). Works now when the x variable is R keyword, such as var, mean, etc. (#192)
    • +
    • In ggline(), error bars now react automatically to grouping by line type (#191)
    -

    +

    ggpubr 0.2.1 2019-06-23

    -
    +

    -Minor changes

    +Minor changes
    -
    +

    -Bug fixes

    +Bug fixes
    -

    +

    ggpubr 0.2 2018-11-15

    -
    +

    -Bug fixes

    +Bug fixes
      -
    • P-value for multiple comparisons by group (stat_compare_means()) are now correctly displayed (@elisheva100, #135).
    • +
    • P-value for multiple comparisons by group (stat_compare_means()) are now correctly displayed (@elisheva100, #135).
    -

    +

    ggpubr 0.1.9 2018-11-11

    -
    +

    -Minor changes

    +Minor changes
      -
    • ggsci palettes have been updated to add new palettes: nejm, jama, ucscgb, d3, locuszoom, igv, startrek, tron, futurama, simpsons (@cbrueffer, #118 +
    • ggsci palettes have been updated to add new palettes: nejm, jama, ucscgb, d3, locuszoom, igv, startrek, tron, futurama, simpsons (@cbrueffer, #118
    -
    +

    -Bug fixes

    +Bug fixes
      -
    • The option ref.group was only considered when the grouping variable contains more than two levels. In that case, each level is compared against the specified reference group. Now, ref.group option is also considereded in two samples mean comparisons (@OwenDonohoe, #118)

    • -
    • Now, ggqqplot() reacts to the argument conf.int.level (@vsluydts, #123 +
    • The option ref.group was only considered when the grouping variable contains more than two levels. In that case, each level is compared against the specified reference group. Now, ref.group option is also considereded in two samples mean comparisons (@OwenDonohoe, #118)

    • +
    • Now, ggqqplot() reacts to the argument conf.int.level (@vsluydts, #123
    • -
    • Added error bar color is now inherited from the main plot (@JesseRop, #109

    • +
    • Added error bar color is now inherited from the main plot (@JesseRop, #109

    -

    +

    ggpubr 0.1.8 2018-08-30

    -
    +

    -New features

    +New features
    -
    +

    -Minor changes

    +Minor changes
    -
    +

    -Bug fixes

    +Bug fixes
    -

    +

    ggpubr 0.1.7 2018-06-23

    -
    +

    -New features

    +New features
    -
    +

    -Minor changes

    +Minor changes
    -
    +

    -Bug fixes

    +Bug fixes
    • In ggscatterhist() the x variable was plotted two times, on both the plot x & y margins, instead of having, as expected, a) the x variable on the main plot x margin and 2) the y variable on the main plot y margin. This has been now fixed.
    • -
    • In previous version, ggdotchart() sorted automatically within groups when the color argument is specified, even when groups = NULL. This default behaviour has been now removed. Sorting withi groups is performed only when the argument group is specified (@sfeds, #90).
    • -
    • Now, yticks.by and xticks.by work with NAs (@j3ypi, #89).
    • +
    • In previous version, ggdotchart() sorted automatically within groups when the color argument is specified, even when groups = NULL. This default behaviour has been now removed. Sorting withi groups is performed only when the argument group is specified (@sfeds, #90).
    • +
    • Now, yticks.by and xticks.by work with NAs (@j3ypi, #89).
    -

    +

    ggpubr 0.1.6 2017-11-14

    -
    +

    -New features

    +New features
    • New function ggballoonplot() added to visualize a contingency table.

    • -
    • ggdotchart() can be now used to plot multiple groups with position = position_dodge() (@ManuelSpinola, #45).

    • +
    • ggdotchart() can be now used to plot multiple groups with position = position_dodge() (@ManuelSpinola, #45).

    • New function ggscatterhist() to create a scatter plot with marginal histograms, density plots and box plots.

    • New theme theme_pubclean(): a clean theme without axis lines, to direct more attention to the data.

    • -
    • New arguments in ggarrange() to customize plot labels (@G-Thomson, #41): +
    • New arguments in ggarrange() to customize plot labels (@G-Thomson, #41):
      • font.label
      • label.x and label.y
      • hjust and vjust
    • -
    • New argument method.args added to stat_compare_means(). A list of additional arguments used for the test method. For example one might use method.args = list(alternative = “greater”) for wilcoxon test (@Nicktz, #41).

    • +
    • New argument method.args added to stat_compare_means(). A list of additional arguments used for the test method. For example one might use method.args = list(alternative = “greater”) for wilcoxon test (@Nicktz, #41).

    • New argument symnum.args added to stat_compare_means(). A list of arguments to pass to the function symnum for symbolic number coding of p-values. For example, symnum.args <- list(cutpoints = c(0, 0.0001, 0.001, 0.01, 0.05, 1), symbols = c("****", "***", "**", "*", "ns"))

    • -
    • New functions table_cell_font() and table_cell_bg() to easily access and change the text font and the background of ggtexttable() cells (@ProbleMaker, #29).

    • -
    • New argument numeric.x.axis in ggline(). logical. If TRUE, x axis will be treated as numeric. Default is FALSE. (@mdphan, #35)

    • -
    • New argument lab.nb.digits in ggbarplot(). Integer indicating the number of decimal places (round) to be used (#28). Example: lab.nb.digits = 2.

    • +
    • New functions table_cell_font() and table_cell_bg() to easily access and change the text font and the background of ggtexttable() cells (@ProbleMaker, #29).

    • +
    • New argument numeric.x.axis in ggline(). logical. If TRUE, x axis will be treated as numeric. Default is FALSE. (@mdphan, #35)

    • +
    • New argument lab.nb.digits in ggbarplot(). Integer indicating the number of decimal places (round) to be used (#28). Example: lab.nb.digits = 2.

    • New argument tip.length in stat_compare_means(). Numeric vector with the fraction of total height that the bar goes down to indicate the precise column. Default is 0.03. Can be of same length as the number of comparisons to adjust specifically the tip lenth of each comparison. For example tip.length = c(0.01, 0.03).

    -
    +

    -Minor changes

    +Minor changes
    • Now get_legend() returns NULL when the plot doesn’t have legend.
    -
    +

    -Bug fixes

    +Bug fixes
    -

    +

    ggpubr 0.1.5 2017-08-22

    -
    +

    -Minor changes

    +Minor changes
    • In ggpar(), now legend.title can be either a character vector, e.g.: legend.title = “Species” or a list, legend.title = list(color = "Species", linetype = "Species", shape = "Species").

    • New argument ellipse.border.remove in ggscatter() to remove ellipse border lines.

    - +
    ggscatter(mtcars, x = "mpg", y = "wt",
    +          color = "cyl",
    +          ellipse = TRUE, mean.point = TRUE,
    +          ellipse.border.remove = TRUE)
    -
    +

    -Bug fixes

    +Bug fixes
    -

    +

    ggpubr 0.1.4 2017-06-28

    -
    +

    -New features

    +New features
    • New helper functions:
        @@ -498,9 +618,9 @@

      • New theme function theme_transparent() to create a ggplot with transparent background.
    -
    +

    -Minor changes

    +Minor changes
    • In gghistogram(), density curve and rug react to the fill color.
    • @@ -515,12 +635,12 @@

    -

    +

    ggpubr 0.1.3 2017-06-06

    -
    +

    -New features

    +New features
    • New functions:
        @@ -567,7 +687,7 @@

      • New helper functions:
        • -facet() added to create multi-panel plots (#5).
        • +facet() added to create multi-panel plots (#5).
        • add_summary() to add summary statistics.
        • @@ -578,9 +698,9 @@

        • New arguments in ggpar(): x.text.angle and y.text.angle

    -
    +

    -Major changes

    +Major changes
    -
    +

    -Minor changes

    +Minor changes
    • Now, the argument palette Can be also a numeric vector of length(groups); in this case a basic color palette is created using the function grDevices::palette().
    -

    +

    ggpubr 0.1.2 2017-03-14

    -
    +

    -New features

    +New features
    • New function get_palette() to generate a palette of k colors from ggsci palettes, RColorbrewer palettes and custom color palettes. Useful to extend RColorBrewer and ggsci to support more colors.
    -
    +

    -Minor changes

    +Minor changes
    • Now the ggpar() function can handle a list of ggplots.
    • Now the default legend position is right.
    • @@ -645,18 +765,18 @@

      Bug fixed

        -
      • The mean within group for ggdensity (gghistogram) are now shown if data have NA values @chunkaowang, #1 +
      • The mean within group for ggdensity (gghistogram) are now shown if data have NA values @chunkaowang, #1
    -

    +

    ggpubr 0.1.1 2016-12-05

    -
    +

    -New features

    +New features
    • New function ggtext() for textual annotation.
    • New argument star.plot in ggscatter(). A logical value. If TRUE, a star plot is generated.
    • @@ -670,9 +790,9 @@

    • New function theme_classic2() added. Classic theme with axis lines.
    -
    +

    -Minor changes

    +Minor changes
    -

    +

    ggpubr 0.1.0 2016-07-20

    @@ -760,29 +880,10 @@

    - @@ -794,7 +895,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/pkgdown.css b/docs/pkgdown.css index 91459581..c01e5923 100644 --- a/docs/pkgdown.css +++ b/docs/pkgdown.css @@ -17,6 +17,10 @@ html, body { height: 100%; } +body { + position: relative; +} + body > .container { display: flex; height: 100%; @@ -67,6 +71,10 @@ summary { margin-top: calc(-60px + 1em); } +dd { + margin-left: 3em; +} + /* Section anchors ---------------------------------*/ a.anchor { @@ -100,29 +108,132 @@ a.anchor { margin-top: -40px; } +/* Navbar submenu --------------------------*/ + +.dropdown-submenu { + position: relative; +} + +.dropdown-submenu>.dropdown-menu { + top: 0; + left: 100%; + margin-top: -6px; + margin-left: -1px; + border-radius: 0 6px 6px 6px; +} + +.dropdown-submenu:hover>.dropdown-menu { + display: block; +} + +.dropdown-submenu>a:after { + display: block; + content: " "; + float: right; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; + border-width: 5px 0 5px 5px; + border-left-color: #cccccc; + margin-top: 5px; + margin-right: -10px; +} + +.dropdown-submenu:hover>a:after { + border-left-color: #ffffff; +} + +.dropdown-submenu.pull-left { + float: none; +} + +.dropdown-submenu.pull-left>.dropdown-menu { + left: -100%; + margin-left: 10px; + border-radius: 6px 0 6px 6px; +} + /* Sidebar --------------------------*/ -#sidebar { +#pkgdown-sidebar { margin-top: 30px; position: -webkit-sticky; position: sticky; top: 70px; } -#sidebar h2 { + +#pkgdown-sidebar h2 { font-size: 1.5em; margin-top: 1em; } -#sidebar h2:first-child { +#pkgdown-sidebar h2:first-child { margin-top: 0; } -#sidebar .list-unstyled li { +#pkgdown-sidebar .list-unstyled li { margin-bottom: 0.5em; } +/* bootstrap-toc tweaks ------------------------------------------------------*/ + +/* All levels of nav */ + +nav[data-toggle='toc'] .nav > li > a { + padding: 4px 20px 4px 6px; + font-size: 1.5rem; + font-weight: 400; + color: inherit; +} + +nav[data-toggle='toc'] .nav > li > a:hover, +nav[data-toggle='toc'] .nav > li > a:focus { + padding-left: 5px; + color: inherit; + border-left: 1px solid #878787; +} + +nav[data-toggle='toc'] .nav > .active > a, +nav[data-toggle='toc'] .nav > .active:hover > a, +nav[data-toggle='toc'] .nav > .active:focus > a { + padding-left: 5px; + font-size: 1.5rem; + font-weight: 400; + color: inherit; + border-left: 2px solid #878787; +} + +/* Nav: second level (shown on .active) */ + +nav[data-toggle='toc'] .nav .nav { + display: none; /* Hide by default, but at >768px, show it */ + padding-bottom: 10px; +} + +nav[data-toggle='toc'] .nav .nav > li > a { + padding-left: 16px; + font-size: 1.35rem; +} + +nav[data-toggle='toc'] .nav .nav > li > a:hover, +nav[data-toggle='toc'] .nav .nav > li > a:focus { + padding-left: 15px; +} + +nav[data-toggle='toc'] .nav .nav > .active > a, +nav[data-toggle='toc'] .nav .nav > .active:hover > a, +nav[data-toggle='toc'] .nav .nav > .active:focus > a { + padding-left: 15px; + font-weight: 500; + font-size: 1.35rem; +} + +/* orcid ------------------------------------------------------------------- */ + .orcid { - height: 16px; + font-size: 16px; + color: #A6CE39; /* margins are required by official ORCID trademark and display guidelines */ margin-left:4px; margin-right:4px; diff --git a/docs/pkgdown.js b/docs/pkgdown.js index 087a7622..7e7048fa 100644 --- a/docs/pkgdown.js +++ b/docs/pkgdown.js @@ -9,11 +9,6 @@ $('body').css('padding-top', $('.navbar').height() + 10); }); - $('body').scrollspy({ - target: '#sidebar', - offset: 60 - }); - $('[data-toggle="tooltip"]').tooltip(); var cur_path = paths(location.pathname); diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 8999c6fe..2af7b79b 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -1,5 +1,6 @@ pandoc: 2.3.1 -pkgdown: 1.4.1 +pkgdown: 1.5.1 pkgdown_sha: ~ articles: [] +last_built: 2020-06-27T10:55Z diff --git a/docs/reference/add_summary.html b/docs/reference/add_summary.html index 91be9806..111128be 100644 --- a/docs/reference/add_summary.html +++ b/docs/reference/add_summary.html @@ -8,23 +8,29 @@ Add Summary Statistics onto a ggplot. — add_summary • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,10 +40,10 @@ - + - + @@ -54,7 +60,7 @@ - +
    @@ -87,9 +93,13 @@ Changelog -
    @@ -104,14 +114,12 @@
    -

    add summary statistics onto a ggplot.

    -
    add_summary(
    @@ -141,10 +149,14 @@ 

    Add Summary Statistics onto a ggplot.

    median_iqr(x, error.limit = "both") +median_hilow_(x, ci = 0.95, error.limit = "both") + +median_q1q3(x, error.limit = "both") + median_mad(x, error.limit = "both") median_range(x, error.limit = "both")
    - +

    Arguments

    @@ -157,7 +169,7 @@

    Arg

    +"median_hilow", "median_q1q3", "median_mad", "median_range".

    @@ -233,7 +245,7 @@

    Arg error interval.

    a function that is given the complete data and should return a data frame with variables ymin, y, and ymax. Allowed values are one of: "mean", "mean_se", "mean_sd", "mean_ci", "mean_range", "median", "median_iqr", -"median_mad", "median_range".

    error.plot
    - +

    Functions

    @@ -249,33 +261,38 @@

    Fun range = max - min.

  • median_iqr: returns the median and the error limits defined by the interquartile range.

  • +
  • median_hilow_: computes the sample median and a selected pair of +outer quantiles having equal tail areas. This function is a reformatted +version of Hmisc::smedian.hilow(). The confidence limits are computed +as follow: lower.limits = (1-ci)/2 percentiles; upper.limits = +(1+ci)/2 percentiles. By default (ci = 0.95), the 2.5th and the +97.5th percentiles are used as the lower and the upper confidence limits, +respectively. If you want to use the 25th and the 75th percentiles as the +confidence limits, then specify ci = 0.5 or use the function +median_q1q3().

  • +
  • median_q1q3: computes the sample median and, the 25th and 75th +percentiles. Wrapper around the function median_hilow_() using +ci = 0.5.

  • median_mad: returns the median and the error limits defined by the median absolute deviation.

  • median_range: returns the median and the error limits defined by the range = max - min.

  • -

    Examples

    # Basic violin plot p <- ggviolin(ToothGrowth, x = "dose", y = "len", add = "none") p
    -# Add median_iqr +# Add mean_sd add_summary(p, "mean_sd")
    - @@ -286,7 +303,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/annotate_figure-1.png b/docs/reference/annotate_figure-1.png index 5003bb6c..9b4db829 100644 Binary files a/docs/reference/annotate_figure-1.png and b/docs/reference/annotate_figure-1.png differ diff --git a/docs/reference/annotate_figure.html b/docs/reference/annotate_figure.html index 2879b8d8..020ec23c 100644 --- a/docs/reference/annotate_figure.html +++ b/docs/reference/annotate_figure.html @@ -8,23 +8,29 @@ Annotate Arranged Figure — annotate_figure • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,12 +40,12 @@ - + - + @@ -56,7 +62,7 @@ - +
    @@ -89,9 +95,13 @@ Changelog -
    @@ -106,16 +116,14 @@
    -

    Annotate figures including: i) ggplots, ii) arranged ggplots from ggarrange(), grid.arrange() and plot_grid().

    -
    annotate_figure(
    @@ -130,7 +138,7 @@ 

    Annotate Arranged Figure

    fig.lab.size, fig.lab.face )
    - +

    Arguments

    @@ -162,11 +170,10 @@

    Arg include: "plain", "bold", "italic", "bold.italic".

    - +

    See also

    -

    Examples

    data("ToothGrowth") @@ -191,24 +198,16 @@

    Examp bottom = text_grob("Data source: \n ToothGrowth data set", color = "blue", hjust = 1, x = 1, face = "italic", size = 10), left = text_grob("Figure arranged using ggpubr", color = "green", rot = 90), - right = "I'm done, thanks :-)!", + right = text_grob(bquote("Superscript: ("*kg~NH[3]~ha^-1~yr^-1*")"), rot = 90), fig.lab = "Figure 1", fig.lab.face = "bold" )

    - @@ -219,7 +218,7 @@

    Author

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/as_ggplot.html b/docs/reference/as_ggplot.html index ee4f7be3..a188dd38 100644 --- a/docs/reference/as_ggplot.html +++ b/docs/reference/as_ggplot.html @@ -8,23 +8,29 @@ Storing grid.arrange() arrangeGrob() and plots — as_ggplot • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,11 +40,11 @@ - + - + @@ -55,7 +61,7 @@ - +
    @@ -88,9 +94,13 @@ Changelog -
    @@ -105,19 +115,17 @@
    -

    Transform the output of arrangeGrob() and grid.arrange() to a an object of class ggplot.

    -
    as_ggplot(x)
    - +

    Arguments

    @@ -128,11 +136,10 @@

    Arg grid.arrange().

    - +

    Value

    an object of class ggplot.

    -

    Examples

    # Creat some plots @@ -149,16 +156,10 @@

    Examp as_ggplot(gt)

    - @@ -169,7 +170,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/axis_scale.html b/docs/reference/axis_scale.html index d4c5d55c..52049dc8 100644 --- a/docs/reference/axis_scale.html +++ b/docs/reference/axis_scale.html @@ -8,23 +8,29 @@ Change Axis Scale: log2, log10 and more — axis_scale • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,14 +40,14 @@ - + - + @@ -58,7 +64,7 @@ - +
    @@ -91,9 +97,13 @@ Changelog -
    @@ -108,24 +118,22 @@
    -

    Change axis scale.

    • xscale: change x axis scale.

    • yscale: change y axis scale.

    -
    xscale(.scale, .format = FALSE)
     
     yscale(.scale, .format = FALSE)
    - +

    Arguments

    @@ -140,7 +148,7 @@

    Arg when .scale = "log2" or "log10".

    - +

    Examples

    # Basic scatter plots @@ -150,14 +158,10 @@

    Examp # Set log scale p + yscale("log2", .format = TRUE)

    - @@ -168,7 +172,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/background_image.html b/docs/reference/background_image.html index 99760106..8b6b880c 100644 --- a/docs/reference/background_image.html +++ b/docs/reference/background_image.html @@ -8,23 +8,29 @@ Add Background Image to ggplot2 — background_image • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,10 +40,10 @@ - + - + @@ -54,7 +60,7 @@ - +
    @@ -87,9 +93,13 @@ Changelog -
    @@ -104,18 +114,16 @@
    -

    Add background image to ggplot2.

    -
    background_image(raster.img)
    - +

    Arguments

    @@ -125,7 +133,7 @@

    Arg readPNG()[in png package] and readJPEG() [in jpeg package].

    - +

    Examples

    if (FALSE) { @@ -143,16 +151,10 @@

    Examp fill_palette("jco") }

    - @@ -163,7 +165,7 @@

    Author

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/bgcolor.html b/docs/reference/bgcolor.html index d8673bc9..af0d469e 100644 --- a/docs/reference/bgcolor.html +++ b/docs/reference/bgcolor.html @@ -8,23 +8,29 @@ Change ggplot Panel Background Color — bgcolor • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,10 +40,10 @@ - + - + @@ -54,7 +60,7 @@ - +
    @@ -87,9 +93,13 @@ Changelog -
    @@ -104,18 +114,16 @@
    -

    Change ggplot panel background color.

    -
    bgcolor(color)
    - +

    Arguments

    @@ -124,11 +132,10 @@

    Arg

    background color.

    - +

    See also

    -

    Examples

    # Load data @@ -143,16 +150,10 @@

    Examp bgcolor("#BFD5E3")+ border("#BFD5E3")

    - @@ -163,7 +164,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/border.html b/docs/reference/border.html index 9e598f59..8169cd7e 100644 --- a/docs/reference/border.html +++ b/docs/reference/border.html @@ -8,23 +8,29 @@ Set ggplot Panel Border Line — border • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,10 +40,10 @@ - + - + @@ -54,7 +60,7 @@ - +
    @@ -87,9 +93,13 @@ Changelog -
    @@ -104,18 +114,16 @@
    -

    Change or set ggplot panel border.

    -
    border(color = "black", size = 0.8, linetype = NULL)
    - +

    Arguments

    @@ -133,7 +141,7 @@

    Arg dotted, dotdash, longdash, twodash). Sess show_line_types.

    - +

    Examples

    # Load data @@ -146,14 +154,10 @@

    Examp # Add border p + border()

    - @@ -164,7 +168,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/compare_means.html b/docs/reference/compare_means.html index c68ec8cf..cd315943 100644 --- a/docs/reference/compare_means.html +++ b/docs/reference/compare_means.html @@ -8,23 +8,29 @@ Comparison of Means — compare_means • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,10 +40,10 @@ - + - + @@ -54,7 +60,7 @@ - +
    @@ -87,9 +93,13 @@ Changelog -
    @@ -104,14 +114,12 @@
    -

    Performs one or multiple mean comparisons.

    -
    compare_means(
    @@ -125,7 +133,7 @@ 

    Comparison of Means

    p.adjust.method = "holm", ... )
    - +

    Arguments

    @@ -203,7 +211,7 @@

    Arg

    Other arguments to be passed to the test function.

    - +

    Value

    return a data frame with the following columns:

      @@ -217,7 +225,6 @@

      Value

    • method: the statistical test used to compare groups.

    -

    Examples

    # Load data @@ -227,75 +234,69 @@

    Examp # One-sample test #::::::::::::::::::::::::::::::::::::::::: -compare_means(len ~ 1, df, mu = 0)

    #> # A tibble: 1 x 8 +compare_means(len ~ 1, df, mu = 0)
    #> # A tibble: 1 x 8 #> .y. group1 group2 p p.adj p.format p.signif method -#> <chr> <dbl> <chr> <dbl> <dbl> <chr> <chr> <chr> -#> 1 len 1 null model 1.66e-11 1.70e-11 1.7e-11 **** Wilcoxon
    +#> <chr> <dbl> <chr> <dbl> <dbl> <chr> <chr> <chr> +#> 1 len 1 null model 1.66e-11 1.70e-11 1.7e-11 **** Wilcoxon
    # Two-samples unpaired test #::::::::::::::::::::::::::::::::::::::::: -compare_means(len ~ supp, df)
    #> # A tibble: 1 x 8 +compare_means(len ~ supp, df)
    #> # A tibble: 1 x 8 #> .y. group1 group2 p p.adj p.format p.signif method -#> <chr> <chr> <chr> <dbl> <dbl> <chr> <chr> <chr> -#> 1 len OJ VC 0.0645 0.064 0.064 ns Wilcoxon
    +#> <chr> <chr> <chr> <dbl> <dbl> <chr> <chr> <chr> +#> 1 len OJ VC 0.0645 0.064 0.064 ns Wilcoxon
    # Two-samples paired test #::::::::::::::::::::::::::::::::::::::::: -compare_means(len ~ supp, df, paired = TRUE)
    #> # A tibble: 1 x 8 +compare_means(len ~ supp, df, paired = TRUE)
    #> # A tibble: 1 x 8 #> .y. group1 group2 p p.adj p.format p.signif method -#> <chr> <chr> <chr> <dbl> <dbl> <chr> <chr> <chr> -#> 1 len OJ VC 0.00431 0.0043 0.0043 ** Wilcoxon
    +#> <chr> <chr> <chr> <dbl> <dbl> <chr> <chr> <chr> +#> 1 len OJ VC 0.00431 0.0043 0.0043 ** Wilcoxon
    # Compare supp levels after grouping the data by "dose" #:::::::::::::::::::::::::::::::::::::::: -compare_means(len ~ supp, df, group.by = "dose")
    #> # A tibble: 3 x 9 +compare_means(len ~ supp, df, group.by = "dose")
    #> # A tibble: 3 x 9 #> dose .y. group1 group2 p p.adj p.format p.signif method -#> <dbl> <chr> <chr> <chr> <dbl> <dbl> <chr> <chr> <chr> -#> 1 0.5 len OJ VC 0.0232 0.046 0.023 * Wilcoxon -#> 2 1 len OJ VC 0.00403 0.012 0.004 ** Wilcoxon -#> 3 2 len OJ VC 1 1 1.000 ns Wilcoxon
    +#> <dbl> <chr> <chr> <chr> <dbl> <dbl> <chr> <chr> <chr> +#> 1 0.5 len OJ VC 0.0232 0.046 0.023 * Wilcoxon +#> 2 1 len OJ VC 0.00403 0.012 0.004 ** Wilcoxon +#> 3 2 len OJ VC 1 1 1.000 ns Wilcoxon
    # pairwise comparisons #:::::::::::::::::::::::::::::::::::::::: # As dose contains more thant two levels ==> # pairwise test is automatically performed. -compare_means(len ~ dose, df)
    #> # A tibble: 3 x 8 +compare_means(len ~ dose, df)
    #> # A tibble: 3 x 8 #> .y. group1 group2 p p.adj p.format p.signif method -#> <chr> <chr> <chr> <dbl> <dbl> <chr> <chr> <chr> -#> 1 len 0.5 1 0.00000702 0.000014 7.0e-06 **** Wilcoxon -#> 2 len 0.5 2 0.0000000841 0.00000025 8.4e-08 **** Wilcoxon -#> 3 len 1 2 0.000177 0.00018 0.00018 *** Wilcoxon
    +#> <chr> <chr> <chr> <dbl> <dbl> <chr> <chr> <chr> +#> 1 len 0.5 1 0.00000702 0.000014 7.0e-06 **** Wilcoxon +#> 2 len 0.5 2 0.0000000841 0.00000025 8.4e-08 **** Wilcoxon +#> 3 len 1 2 0.000177 0.00018 0.00018 *** Wilcoxon
    # Comparison against reference group #:::::::::::::::::::::::::::::::::::::::: -compare_means(len ~ dose, df, ref.group = "0.5")
    #> # A tibble: 2 x 8 +compare_means(len ~ dose, df, ref.group = "0.5")
    #> # A tibble: 2 x 8 #> .y. group1 group2 p p.adj p.format p.signif method -#> <chr> <chr> <chr> <dbl> <dbl> <chr> <chr> <chr> -#> 1 len 0.5 1 0.00000702 0.000007 7.0e-06 **** Wilcoxon -#> 2 len 0.5 2 0.0000000841 0.00000017 8.4e-08 **** Wilcoxon
    +#> <chr> <chr> <chr> <dbl> <dbl> <chr> <chr> <chr> +#> 1 len 0.5 1 0.00000702 0.000007 7.0e-06 **** Wilcoxon +#> 2 len 0.5 2 0.0000000841 0.00000017 8.4e-08 **** Wilcoxon
    # Comparison against all #:::::::::::::::::::::::::::::::::::::::: -compare_means(len ~ dose, df, ref.group = ".all.")
    #> # A tibble: 3 x 8 +compare_means(len ~ dose, df, ref.group = ".all.")
    #> # A tibble: 3 x 8 #> .y. group1 group2 p p.adj p.format p.signif method -#> <chr> <chr> <chr> <dbl> <dbl> <chr> <chr> <chr> -#> 1 len .all. 0.5 0.0000508 0.000150 5.1e-05 **** Wilcoxon -#> 2 len .all. 1 0.764 0.76 0.76404 ns Wilcoxon -#> 3 len .all. 2 0.000179 0.00036 0.00018 *** Wilcoxon
    +#> <chr> <chr> <chr> <dbl> <dbl> <chr> <chr> <chr> +#> 1 len .all. 0.5 0.0000508 0.000150 5.1e-05 **** Wilcoxon +#> 2 len .all. 1 0.764 0.76 0.76404 ns Wilcoxon +#> 3 len .all. 2 0.000179 0.00036 0.00018 *** Wilcoxon
    # Anova and kruskal.test #:::::::::::::::::::::::::::::::::::::::: -compare_means(len ~ dose, df, method = "anova")
    #> # A tibble: 1 x 6 +compare_means(len ~ dose, df, method = "anova")
    #> # A tibble: 1 x 6 #> .y. p p.adj p.format p.signif method -#> <chr> <dbl> <dbl> <chr> <chr> <chr> -#> 1 len 9.53e-16 9.50e-16 9.5e-16 **** Anova
    compare_means(len ~ dose, df, method = "kruskal.test")
    #> # A tibble: 1 x 6 +#> <chr> <dbl> <dbl> <chr> <chr> <chr> +#> 1 len 9.53e-16 9.50e-16 9.5e-16 **** Anova
    compare_means(len ~ dose, df, method = "kruskal.test")
    #> # A tibble: 1 x 6 #> .y. p p.adj p.format p.signif method -#> <chr> <dbl> <dbl> <chr> <chr> <chr> -#> 1 len 0.00000000148 0.0000000015 1.5e-09 **** Kruskal-Wallis
    +#> <chr> <dbl> <dbl> <chr> <chr> <chr> +#> 1 len 0.00000000148 0.0000000015 1.5e-09 **** Kruskal-Wallis
    - @@ -306,7 +307,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/create_aes-1.png b/docs/reference/create_aes-1.png new file mode 100644 index 00000000..61388524 Binary files /dev/null and b/docs/reference/create_aes-1.png differ diff --git a/docs/reference/create_aes.html b/docs/reference/create_aes.html new file mode 100644 index 00000000..624447a5 --- /dev/null +++ b/docs/reference/create_aes.html @@ -0,0 +1,184 @@ + + + + + + + + +Create Aes Mapping from a List — create_aes • ggpubr + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + +
    + +
    +
    + + +
    +

    Create aes mapping to make programming easy with ggplot2.

    +
    + +
    create_aes(.list, parse = FALSE)
    + +

    Arguments

    + + + + + + + + + + +
    .list

    a list of aesthetic arguments; for example .list = list(x = "dose", y = "len", color = "dose").

    parse

    logical. If TRUE, parse the input as an expression.

    + + +

    Examples

    +
    # Simple aes creation +create_aes(list(x = "Sepal.Length", y = "Petal.Length" ))
    #> Aesthetic mapping: +#> * `x` -> `Sepal.Length` +#> * `y` -> `Petal.Length`
    +# Parse an expression +x <- "log2(Sepal.Length)" +y <- "log2(Petal.Length)" +create_aes(list(x = x, y = y ), parse = TRUE)
    #> Aesthetic mapping: +#> * `x` -> `log2(Sepal.Length)` +#> * `y` -> `log2(Petal.Length)`
    +# Create a ggplot +mapping <- create_aes(list(x = x, y = y ), parse = TRUE) +ggplot(iris, mapping) + + geom_point()
    +
    +
    + +
    + + +
    + + +
    +

    Site built with pkgdown 1.5.1.

    +
    + +
    +
    + + + + + + + + diff --git a/docs/reference/desc_statby.html b/docs/reference/desc_statby.html index 0585595d..b856a6f9 100644 --- a/docs/reference/desc_statby.html +++ b/docs/reference/desc_statby.html @@ -8,23 +8,29 @@ Descriptive statistics by groups — desc_statby • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,10 +40,10 @@ - + - + @@ -54,7 +60,7 @@ - +
    @@ -87,9 +93,13 @@ Changelog -
    @@ -104,18 +114,16 @@
    -

    Computes descriptive statistics by groups for a measure variable.

    -
    desc_statby(data, measure.var, grps, ci = 0.95)
    - +

    Arguments

    @@ -136,7 +144,7 @@

    Arg

    the percent range of the confidence interval (default is 0.95).

    - +

    Value

    A data frame containing descriptive statistics, such as:

      @@ -155,7 +163,6 @@

      Value

    • var: variance, sd^2

    -

    Examples

    # Load data @@ -173,16 +180,10 @@

    Examp #> 6 2.0 VC 10 18.5 33.9 25.95 26.14 5.425 4.59606 4.797731

    - @@ -193,7 +194,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/diff_express.html b/docs/reference/diff_express.html index 69f78e8a..fc02a639 100644 --- a/docs/reference/diff_express.html +++ b/docs/reference/diff_express.html @@ -8,23 +8,29 @@ Differential gene expression analysis results — diff_express • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,11 +40,11 @@ - + - + @@ -55,7 +61,7 @@ - +
    @@ -88,9 +94,13 @@ Changelog -
    @@ -105,29 +115,27 @@
    -

    Differential gene expression analysis results obtained from comparing the RNAseq data of two different cell populations using DESeq2

    -
    data("diff_express")
    - + +

    Format

    -

    A data frame with 36028 rows and 5 columns.

    +

    A data frame with 36028 rows and 5 columns.

    name

    gene names

    baseMean

    mean expression signal across all samples

    log2FoldChange

    log2 fold change

    padj

    Adjusted p-value

    detection_call

    a numeric vector specifying whether the genes is expressed (value = 1) or not (value = 0).

    -

    Examples

    data(diff_express) @@ -154,15 +162,10 @@

    Examp ggtheme = ggplot2::theme_minimal())

    - @@ -173,7 +176,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/facet.html b/docs/reference/facet.html index b75de245..27c5ff5e 100644 --- a/docs/reference/facet.html +++ b/docs/reference/facet.html @@ -8,23 +8,29 @@ Facet a ggplot into Multiple Panels — facet • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,11 +40,11 @@ - + - + @@ -55,7 +61,7 @@ - +
    @@ -88,9 +94,13 @@ Changelog -
    @@ -105,15 +115,13 @@
    -

    Create multi-panel plots of a data set grouped by one or two grouping variables. Wrapper around facet_wrap

    -
    facet(
    @@ -132,7 +140,7 @@ 

    Facet a ggplot into Multiple Panels

    strip.position = "top", ... )
    - +

    Arguments

    @@ -209,7 +217,7 @@

    Arg

    not used

    - +

    Examples

    p <- ggboxplot(ToothGrowth, x = "dose", y = "len", @@ -222,14 +230,10 @@

    Examp panel.labs.background = list(fill = "steelblue", color = "steelblue") )

    - @@ -240,7 +244,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/font.html b/docs/reference/font.html index 1f1948d7..d657660a 100644 --- a/docs/reference/font.html +++ b/docs/reference/font.html @@ -8,23 +8,29 @@ Change the Appearance of Titles and Axis Labels — font • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,12 +40,12 @@ - + - + @@ -56,7 +62,7 @@ - +
    @@ -89,9 +95,13 @@ Changelog -
    @@ -106,20 +116,18 @@
    -

    Change the appearance of the main title, subtitle, caption, axis labels and text, as well as the legend title and texts. Wrapper around - element_text().

    - + element_text().

    font(object, size = NULL, color = NULL, face = NULL, family = NULL, ...)
    - +

    Arguments

    @@ -166,10 +174,10 @@

    Arg

    +element_text().

    ...

    other arguments to pass to the function -element_text().

    - +

    Examples

    # Load data @@ -196,14 +204,10 @@

    Examp font("legend.text", color = "red")

    - @@ -214,7 +218,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/gene_citation-1.png b/docs/reference/gene_citation-1.png index 290809f8..7358b361 100644 Binary files a/docs/reference/gene_citation-1.png and b/docs/reference/gene_citation-1.png differ diff --git a/docs/reference/gene_citation.html b/docs/reference/gene_citation.html index 6f11d76c..5a7e8c70 100644 --- a/docs/reference/gene_citation.html +++ b/docs/reference/gene_citation.html @@ -8,23 +8,29 @@ Gene Citation Index — gene_citation • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,12 +40,12 @@ - + - + @@ -56,7 +62,7 @@ - +
    @@ -89,9 +95,13 @@ Changelog -
    @@ -106,27 +116,25 @@
    -

    Contains the mean citation index of 66 genes obtained by assessing PubMed abstracts and annotations using two key words i) Gene name + b cell differentiation and ii) Gene name + plasma cell differentiation.

    -
    data("gene_citation")
    - + +

    Format

    -

    A data frame with 66 rows and 2 columns.

    +

    A data frame with 66 rows and 2 columns.

    gene

    gene names

    citation_index

    mean citation index

    -

    Examples

    data(gene_citation) @@ -149,15 +157,10 @@

    Examp )

    - @@ -168,7 +171,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/geom_bracket.html b/docs/reference/geom_bracket.html index eb7c47b0..4d781801 100644 --- a/docs/reference/geom_bracket.html +++ b/docs/reference/geom_bracket.html @@ -8,23 +8,29 @@ Add Brackets with Labels to a GGPlot — stat_bracket • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,11 +40,11 @@ - + - + @@ -55,7 +61,7 @@ - +
    @@ -88,9 +94,13 @@ Changelog -
    @@ -105,15 +115,13 @@
    -

    add brackets with label annotation to a ggplot. Helpers for adding p-value or significance levels to a plot.

    -
    stat_bracket(
    @@ -131,6 +139,8 @@ 

    Add Brackets with Labels to a GGPlot

    step.increase = 0, step.group.by = NULL, tip.length = 0.03, + bracket.nudge.y = 0, + bracket.shorten = 0, size = 0.3, label.size = 3.88, family = "", @@ -154,13 +164,16 @@

    Add Brackets with Labels to a GGPlot

    step.increase = 0, step.group.by = NULL, tip.length = 0.03, + bracket.nudge.y = 0, + bracket.shorten = 0, size = 0.3, label.size = 3.88, family = "", vjust = 0, + coord.flip = FALSE, ... )
    - +

    Arguments

    @@ -248,6 +261,17 @@

    Arg

    + + + + + + + + @@ -276,9 +300,17 @@

    Arg

    + + + +
    tip.length

    numeric vector with the fraction of total height that the bar goes down to indicate the precise column

    bracket.nudge.y

    Vertical adjustment to nudge brackets by. Useful to +move up or move down the bracket. If positive value, brackets will be moved +up; if negative value, brackets are moved down.

    bracket.shorten

    a small numeric value in [0-1] for shortening the with +of bracket.

    sizestat

    The statistical transformation to use on the data for this layer, as a string.

    coord.flip

    logical. If TRUE, flip x and y coordinates so that +horizontal becomes vertical, and vertical, horizontal. When adding the +p-values to a horizontal ggplot (generated using +coord_flip()), you need to specify the option +coord.flip = TRUE.

    - +

    Examples

    df <- ToothGrowth @@ -330,14 +362,10 @@

    Examp data = stat.test, y.position = c(32, 35, 38) )

    - @@ -348,7 +376,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/geom_exec.html b/docs/reference/geom_exec.html index 3a81f0a0..ea38edc4 100644 --- a/docs/reference/geom_exec.html +++ b/docs/reference/geom_exec.html @@ -8,23 +8,29 @@ Execute ggplot2 functions — geom_exec • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,13 +40,13 @@ - + - + @@ -57,7 +63,7 @@ - +
    @@ -90,9 +96,13 @@ Changelog -
    @@ -107,21 +117,19 @@
    -

    A helper function used by ggpubr functions to execute any geom_* functions in ggplot2. Useful only when you want to call a geom_* function without carrying about the arguments to put in aes(). Basic users of ggpubr don't need this function.

    -
    geom_exec(geomfunc = NULL, data = NULL, position = NULL, ...)
    - +

    Arguments

    @@ -143,12 +151,11 @@

    Arg

    arguments accepted by the function

    - +

    Value

    return a plot if geomfunc!=Null or a list(option, mapping) if geomfunc = NULL.

    -

    Examples

    if (FALSE) { @@ -156,16 +163,10 @@

    Examp x = "mpg", y = "wt", size = "cyl", color = "cyl") }

    - @@ -176,7 +177,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/geom_signif.html b/docs/reference/geom_signif.html new file mode 100644 index 00000000..0e474b85 --- /dev/null +++ b/docs/reference/geom_signif.html @@ -0,0 +1,155 @@ + + + + + + + + +geom_signif exported from ggsignif package — geom_signif • ggpubr + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + +
    + +
    +
    + + +
    +

    See ggsignif::geom_signif for details.

    +
    + + + + +
    + +
    + + +
    + + +
    +

    Site built with pkgdown 1.5.1.

    +
    + +
    +
    + + + + + + + + diff --git a/docs/reference/get_breaks-1.png b/docs/reference/get_breaks-1.png new file mode 100644 index 00000000..5ab61fbb Binary files /dev/null and b/docs/reference/get_breaks-1.png differ diff --git a/docs/reference/get_breaks-2.png b/docs/reference/get_breaks-2.png new file mode 100644 index 00000000..4a493a7d Binary files /dev/null and b/docs/reference/get_breaks-2.png differ diff --git a/docs/reference/get_breaks-3.png b/docs/reference/get_breaks-3.png new file mode 100644 index 00000000..2616d5ea Binary files /dev/null and b/docs/reference/get_breaks-3.png differ diff --git a/docs/reference/get_breaks.html b/docs/reference/get_breaks.html new file mode 100644 index 00000000..b929edd8 --- /dev/null +++ b/docs/reference/get_breaks.html @@ -0,0 +1,217 @@ + + + + + + + + +Easy Break Creation for Numeric Axes — get_breaks • ggpubr + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + +
    + +
    +
    + + +
    +

    Creates breaks for numeric axes to be used in the functions + scale_x_continuous() and + scale_y_continuous(). Can be used to increase the + number of x and y ticks by specifying the option n. It's also + possible to control axis breaks by specifying a step between ticks. For + example, if by = 5, a tick mark is shown on every 5.

    +
    + +
    get_breaks(n = NULL, by = NULL, from = NULL, to = NULL)
    + +

    Arguments

    + + + + + + + + + + + + + + + + + + +
    n

    number of breaks.

    by

    number: the step between breaks.

    from

    the starting value of breaks. By default, 0 is used for positive +variables

    to

    the end values of breaks. This corresponds generally to the maximum +limit of the axis.

    + +

    Value

    + +

    a break function

    + +

    Examples

    +
    +# Generate 5 breaks for a variable x +get_breaks(n = 5)(x = 1:100)
    #> [1] 0 25 50 75 100
    +# Generate breaks using an increasing step +get_breaks(by = 10)(x = 1:100)
    #> [1] 0 10 20 30 40 50 60 70 80 90 100
    +# Combine with ggplot scale_xx functions +library(ggplot2) + +# Create a basic plot +p <- ggscatter(mtcars, x = "wt", y = "mpg") +p
    +# Increase the number of ticks +p + + scale_x_continuous(breaks = get_breaks(n = 10)) + + scale_y_continuous(breaks = get_breaks(n = 10))
    +# Set ticks according to a specific step, starting from 0 +p + scale_x_continuous( + breaks = get_breaks(by = 1.5, from = 0), + limits = c(0, 6) +) + + scale_y_continuous( + breaks = get_breaks(by = 10, from = 0), + limits = c(0, 40) + )
    +
    +
    + +
    + + +
    + + +
    +

    Site built with pkgdown 1.5.1.

    +
    + +
    +
    + + + + + + + + diff --git a/docs/reference/get_legend.html b/docs/reference/get_legend.html index fddff7b3..edccc694 100644 --- a/docs/reference/get_legend.html +++ b/docs/reference/get_legend.html @@ -8,23 +8,29 @@ Extract Legends from a ggplot object — get_legend • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,10 +40,10 @@ - + - + @@ -54,7 +60,7 @@ - +
    @@ -87,9 +93,13 @@ Changelog -
    @@ -104,18 +114,16 @@
    -

    Extract the legend labels from a ggplot object.

    -
    get_legend(p, position = NULL)
    - +

    Arguments

    @@ -130,11 +138,10 @@

    Arg legend = "none".

    - +

    Value

    an object of class gtable.

    -

    Examples

    # Create a scatter plot @@ -149,16 +156,10 @@

    Examp as_ggplot(leg)

    - @@ -169,7 +170,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/get_palette.html b/docs/reference/get_palette.html index 02642cd5..327d12b6 100644 --- a/docs/reference/get_palette.html +++ b/docs/reference/get_palette.html @@ -8,23 +8,29 @@ Generate Color Palettes — get_palette • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,11 +40,11 @@ - + - + @@ -55,7 +61,7 @@ - +
    @@ -88,9 +94,13 @@ Changelog -
    @@ -105,19 +115,17 @@
    -

    Generate a palette of k colors from ggsci palettes, RColorbrewer palettes and custom color palettes. Useful to extend RColorBrewer and ggsci to support more colors.

    -
    get_palette(palette = "default", k)
    - +

    Arguments

    @@ -140,11 +148,10 @@

    Arg

    the number of colors to generate.

    - +

    Value

    Returns a vector of color palettes.

    -

    Details

    RColorBrewer palettes: To display all available color @@ -162,7 +169,6 @@

    Details Set1, Set2, Set3.

    -

    Examples

    data("iris") @@ -195,18 +201,10 @@

    Examp

    - @@ -217,7 +215,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/ggadd-1.png b/docs/reference/ggadd-1.png index 5bff7c87..53fb3e29 100644 Binary files a/docs/reference/ggadd-1.png and b/docs/reference/ggadd-1.png differ diff --git a/docs/reference/ggadd-2.png b/docs/reference/ggadd-2.png index f3ea5b6a..28acc096 100644 Binary files a/docs/reference/ggadd-2.png and b/docs/reference/ggadd-2.png differ diff --git a/docs/reference/ggadd.html b/docs/reference/ggadd.html index 40ee18f6..70ac3222 100644 --- a/docs/reference/ggadd.html +++ b/docs/reference/ggadd.html @@ -8,23 +8,29 @@ Add Summary Statistics or a Geom onto a ggplot — ggadd • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,10 +40,10 @@ - + - + @@ -54,7 +60,7 @@ - +
    @@ -87,9 +93,13 @@ Changelog -
    @@ -104,14 +114,12 @@
    -

    Add summary statistics or a geometry onto a ggplot.

    -
    ggadd(
    @@ -135,7 +143,7 @@ 

    Add Summary Statistics or a Geom onto a ggplot

    position = position_dodge(0.8), p_geom = "" )
    - +

    Arguments

    @@ -148,7 +156,7 @@

    Arg

    +"median", "median_iqr", "median_hilow", "median_q1q3", "median_mad", "median_range".

    @@ -239,7 +247,7 @@

    Arg NULL, the geometry is extracted from p. Used only by ggline().

    character vector specifying other plot elements to be added. Allowed values are one or the combination of: "none", "dotplot", "jitter", "boxplot", "point", "mean", "mean_se", "mean_sd", "mean_ci", "mean_range", -"median", "median_iqr", "median_mad", "median_range".

    color
    - +

    Examples

    # Basic violin plot @@ -252,14 +260,10 @@

    Examp p %>% ggadd(c("boxplot", "jitter"), color = "dose")

    - @@ -270,7 +274,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/ggarrange.html b/docs/reference/ggarrange.html index 7672cfdb..3809678c 100644 --- a/docs/reference/ggarrange.html +++ b/docs/reference/ggarrange.html @@ -8,23 +8,29 @@ Arrange Multiple ggplots — ggarrange • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,14 +40,14 @@ - + - + @@ -58,7 +64,7 @@ - +
    @@ -91,9 +97,13 @@ Changelog -
    @@ -108,18 +118,16 @@
    -

    Arrange multiple ggplots on the same page. Wrapper around plot_grid(). Can arrange multiple ggplots over multiple pages, compared to the standard plot_grid(). Can also create a common unique legend for multiple plots.

    -
    ggarrange(
    @@ -140,7 +148,7 @@ 

    Arrange Multiple ggplots

    common.legend = FALSE, legend.grob = NULL )
    - +

    Arguments

    @@ -231,16 +239,14 @@

    Arg legend.

    - +

    Value

    return an object of class ggarrange, which is a ggplot or a list of ggplot.

    -

    See also

    -

    Examples

    data("ToothGrowth") @@ -265,20 +271,10 @@

    Examp

    - @@ -289,7 +285,7 @@

    Author

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/ggballoonplot-6.png b/docs/reference/ggballoonplot-6.png index 3bab6400..90de0f9b 100644 Binary files a/docs/reference/ggballoonplot-6.png and b/docs/reference/ggballoonplot-6.png differ diff --git a/docs/reference/ggballoonplot.html b/docs/reference/ggballoonplot.html index c883ba29..1d51a9e3 100644 --- a/docs/reference/ggballoonplot.html +++ b/docs/reference/ggballoonplot.html @@ -8,23 +8,29 @@ Ballon plot — ggballoonplot • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,12 +40,12 @@ - + - + @@ -56,7 +62,7 @@ - +
    @@ -89,9 +95,13 @@ Changelog -
    @@ -106,16 +116,14 @@
    -

    Plot a graphical matrix where each cell contains a dot whose size reflects the relative magnitude of the corresponding component. Useful to visualize contingency table formed by two categorical variables.

    -
    ggballoonplot(
    @@ -134,7 +142,7 @@ 

    Ballon plot

    ggtheme = theme_minimal(), ... )
    - +

    Arguments

    @@ -218,7 +226,7 @@

    Arg

    other arguments passed to the function ggpar

    - +

    Examples

    # Define color palette @@ -276,22 +284,22 @@

    Examp Value=datavals ) car_data

    #> Car Color Value -#> 1 bmw red 148.0 -#> 2 renault red 171.4 -#> 3 mercedes red -1.4 -#> 4 seat red 174.4 -#> 5 bmw white 93.5 -#> 6 renault white 93.0 -#> 7 mercedes white 111.0 -#> 8 seat white 176.8 -#> 9 bmw silver -3.6 -#> 10 renault silver 201.4 -#> 11 mercedes silver 130.2 -#> 12 seat silver 251.7 -#> 13 bmw green 132.9 -#> 14 renault green 114.3 -#> 15 mercedes green 37.1 -#> 16 seat green 177.7
    +#> 1 bmw red 86.2 +#> 2 renault red 193.5 +#> 3 mercedes red 104.2 +#> 4 seat red 107.8 +#> 5 bmw white 202.9 +#> 6 renault white 127.7 +#> 7 mercedes white 24.1 +#> 8 seat white 58.8 +#> 9 bmw silver 73.3 +#> 10 renault silver 173.4 +#> 11 mercedes silver 121.6 +#> 12 seat silver 124.0 +#> 13 bmw green 106.6 +#> 14 renault green 66.6 +#> 15 mercedes green 207.2 +#> 16 seat green 129.9
    ggballoonplot(car_data, x = "Car", y = "Color", size = "Value", fill = "Value") + scale_fill_gradientn(colors = my_cols) + @@ -323,14 +331,10 @@

    Examp

    - @@ -341,7 +345,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/ggbarplot-12.png b/docs/reference/ggbarplot-12.png index 590d627d..e81644dc 100644 Binary files a/docs/reference/ggbarplot-12.png and b/docs/reference/ggbarplot-12.png differ diff --git a/docs/reference/ggbarplot-13.png b/docs/reference/ggbarplot-13.png index 9b84e185..31faac1e 100644 Binary files a/docs/reference/ggbarplot-13.png and b/docs/reference/ggbarplot-13.png differ diff --git a/docs/reference/ggbarplot-15.png b/docs/reference/ggbarplot-15.png index c7ddc35e..7d50b1a8 100644 Binary files a/docs/reference/ggbarplot-15.png and b/docs/reference/ggbarplot-15.png differ diff --git a/docs/reference/ggbarplot-16.png b/docs/reference/ggbarplot-16.png index 4a0a4e4f..a1f0a20d 100644 Binary files a/docs/reference/ggbarplot-16.png and b/docs/reference/ggbarplot-16.png differ diff --git a/docs/reference/ggbarplot-17.png b/docs/reference/ggbarplot-17.png index 2fa578f2..c5f38094 100644 Binary files a/docs/reference/ggbarplot-17.png and b/docs/reference/ggbarplot-17.png differ diff --git a/docs/reference/ggbarplot.html b/docs/reference/ggbarplot.html index da55d511..32ee5cdb 100644 --- a/docs/reference/ggbarplot.html +++ b/docs/reference/ggbarplot.html @@ -8,23 +8,29 @@ Bar plot — ggbarplot • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,10 +40,10 @@ - + - + @@ -54,7 +60,7 @@ - +
    @@ -87,9 +93,13 @@ Changelog -
    @@ -104,14 +114,12 @@
    -

    Create a bar plot.

    -
    ggbarplot(
    @@ -151,7 +159,7 @@ 

    Bar plot

    ggtheme = theme_pubr(), ... )
    - +

    Arguments

    @@ -248,8 +256,9 @@

    Arg

    +"mean_ci", "mean_range", "median", "median_iqr", "median_hilow", +"median_q1q3", "median_mad", "median_range"; see ?desc_statby for more +details.

    @@ -329,7 +338,7 @@

    Arg

    character vector for adding another plot element (e.g.: dot plot or error bars). Allowed values are one or the combination of: "none", "dotplot", "jitter", "boxplot", "point", "mean", "mean_se", "mean_sd", -"mean_ci", "mean_range", "median", "median_iqr", "median_mad", -"median_range"; see ?desc_statby for more details.

    add.params

    other arguments to be passed to be passed to ggpar().

    - +

    Details

    The plot can be easily customized using the function ggpar(). Read @@ -347,11 +356,9 @@

    Details = c("vertical", "horizontal", "reverse")

    -

    See also

    -

    Examples

    # Data @@ -460,18 +467,10 @@

    Examp

    - @@ -482,7 +481,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/ggboxplot-5.png b/docs/reference/ggboxplot-5.png index 58a5f817..81ad87af 100644 Binary files a/docs/reference/ggboxplot-5.png and b/docs/reference/ggboxplot-5.png differ diff --git a/docs/reference/ggboxplot-9.png b/docs/reference/ggboxplot-9.png index f32d1845..5afa14ae 100644 Binary files a/docs/reference/ggboxplot-9.png and b/docs/reference/ggboxplot-9.png differ diff --git a/docs/reference/ggboxplot.html b/docs/reference/ggboxplot.html index aa732ea6..0885f6bc 100644 --- a/docs/reference/ggboxplot.html +++ b/docs/reference/ggboxplot.html @@ -8,23 +8,29 @@ Box plot — ggboxplot • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,11 +40,11 @@ - + - + @@ -55,7 +61,7 @@ - +
    @@ -88,9 +94,13 @@ Changelog -
    @@ -105,15 +115,13 @@
    -

    Create a box plot with points. Box plots display a group of numerical data through their quartiles.

    -
    ggboxplot(
    @@ -137,6 +145,7 @@ 

    Box plot

    size = NULL, width = 0.7, notch = FALSE, + outlier.shape = 19, select = NULL, remove = NULL, order = NULL, @@ -151,7 +160,7 @@

    Box plot

    ggtheme = theme_pubr(), ... )
    - +

    Arguments

    @@ -258,6 +267,12 @@

    Arg TRUE, make a notched box plot. Notches are used to compare groups; if the notches of two boxes do not overlap, this suggests that the medians are significantly different.

    + +

    + + @@ -276,8 +291,9 @@

    Arg

    +"mean_ci", "mean_range", "median", "median_iqr", "median_hilow", +"median_q1q3", "median_mad", "median_range"; see ?desc_statby for more +details.

    @@ -345,7 +361,7 @@

    Arg facet.

    outlier.shape

    point shape of outlier. Default is 19. To hide outlier, +specify outlier.shape = NA. When jitter is added, then outliers will +be automatically hidden.

    select

    character vector for adding another plot element (e.g.: dot plot or error bars). Allowed values are one or the combination of: "none", "dotplot", "jitter", "boxplot", "point", "mean", "mean_se", "mean_sd", -"mean_ci", "mean_range", "median", "median_iqr", "median_mad", -"median_range"; see ?desc_statby for more details.

    add.params
    - +

    Details

    The plot can be easily customized using the function ggpar(). Read @@ -363,17 +379,14 @@

    Details c("vertical", "horizontal", "reverse")

    -

    Suggestions for the argument "add"

    Suggested values are one of c("dotplot", "jitter").

    -

    See also

    -

    Examples

    # Load data @@ -429,20 +442,10 @@

    Examp palette = c("#00AFBB", "#E7B800"))

    - @@ -453,7 +456,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/ggdensity.html b/docs/reference/ggdensity.html index 8bb1c9c3..261d55c1 100644 --- a/docs/reference/ggdensity.html +++ b/docs/reference/ggdensity.html @@ -8,23 +8,29 @@ Density plot — ggdensity • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,10 +40,10 @@ - + - + @@ -54,7 +60,7 @@ - +
    @@ -87,9 +93,13 @@ Changelog -
    @@ -104,14 +114,12 @@
    -

    Create a density plot.

    -
    ggdensity(
    @@ -143,7 +151,7 @@ 

    Density plot

    ggtheme = theme_pubr(), ... )
    - +

    Arguments

    @@ -297,7 +305,7 @@

    Arg geom_density and ggpar.

    - +

    Details

    The plot can be easily customized using the function ggpar(). Read @@ -315,11 +323,9 @@

    Details = c("vertical", "horizontal", "reverse")

    -

    See also

    -

    Examples

    # Create some data format @@ -352,18 +358,10 @@

    Examp

    - @@ -374,7 +372,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/ggdonutchart.html b/docs/reference/ggdonutchart.html index bafe863c..43c93648 100644 --- a/docs/reference/ggdonutchart.html +++ b/docs/reference/ggdonutchart.html @@ -8,23 +8,29 @@ Donut chart — ggdonutchart • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,10 +40,10 @@ - + - + @@ -54,7 +60,7 @@ - +
    @@ -87,9 +93,13 @@ Changelog -
    @@ -104,14 +114,12 @@
    -

    Create a donut chart.

    -
    ggdonutchart(
    @@ -129,7 +137,7 @@ 

    Donut chart

    ggtheme = theme_pubr(), ... )
    - +

    Arguments

    @@ -194,7 +202,7 @@

    Arg

    other arguments to be passed to be passed to ggpar().

    - +

    Details

    The plot can be easily customized using the function ggpar(). Read @@ -212,11 +220,9 @@

    Details c("vertical", "horizontal", "reverse")

    -

    See also

    -

    Examples

    @@ -264,18 +270,10 @@

    Examp

    - @@ -286,7 +284,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/ggdotchart.html b/docs/reference/ggdotchart.html index 634c78e7..08dbce42 100644 --- a/docs/reference/ggdotchart.html +++ b/docs/reference/ggdotchart.html @@ -8,23 +8,29 @@ Cleveland's Dot Plots — ggdotchart • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,10 +40,10 @@ - + - + @@ -54,7 +60,7 @@ - +
    @@ -87,9 +93,13 @@ Changelog -
    @@ -104,14 +114,12 @@
    -

    Draw a Cleveland dot plot.

    -
    ggdotchart(
    @@ -125,7 +133,7 @@ 

    Cleveland's Dot Plots

    shape = 19, size = NULL, dot.size = size, - sorting = c("ascending", "descending"), + sorting = c("ascending", "descending", "none"), add = c("none", "segment"), add.params = list(), x.text.col = TRUE, @@ -150,7 +158,7 @@

    Cleveland's Dot Plots

    ) theme_cleveland(rotate = TRUE)
    - +

    Arguments

    @@ -196,7 +204,7 @@

    Arg

    @@ -205,8 +213,9 @@

    Arg

    +"mean_ci", "mean_range", "median", "median_iqr", "median_hilow", +"median_q1q3", "median_mad", "median_range"; see ?desc_statby for more +details.

    @@ -323,7 +332,7 @@

    Arg and ggpar.

    sorting

    a character vector for sorting into ascending or descending -order. Allowed values are one of "descending" and "ascending". Partial +order. Allowed values are one of "descending", "ascending" and "none". Partial match are allowed (e.g. sorting = "desc" or "asc"). Default is "descending".

    character vector for adding another plot element (e.g.: dot plot or error bars). Allowed values are one or the combination of: "none", "dotplot", "jitter", "boxplot", "point", "mean", "mean_se", "mean_sd", -"mean_ci", "mean_range", "median", "median_iqr", "median_mad", -"median_range"; see ?desc_statby for more details.

    add.params
    - +

    Details

    The plot can be easily customized using the function ggpar(). Read @@ -341,11 +350,9 @@

    Details = c("vertical", "horizontal", "reverse")

    -

    See also

    -

    Examples

    # Load data @@ -394,18 +401,10 @@

    Examp

    - @@ -416,7 +415,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/ggdotplot.html b/docs/reference/ggdotplot.html index f312d73e..fffa4197 100644 --- a/docs/reference/ggdotplot.html +++ b/docs/reference/ggdotplot.html @@ -8,23 +8,29 @@ Dot plot — ggdotplot • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,10 +40,10 @@ - + - + @@ -54,7 +60,7 @@ - +
    @@ -87,9 +93,13 @@ Changelog -
    @@ -104,14 +114,12 @@
    -

    Create a dot plot.

    -
    ggdotplot(
    @@ -145,7 +153,7 @@ 

    Dot plot

    ggtheme = theme_pubr(), ... )
    - +

    Arguments

    @@ -251,8 +259,9 @@

    Arg

    +"mean_ci", "mean_range", "median", "median_iqr", "median_hilow", +"median_q1q3", "median_mad", "median_range"; see ?desc_statby for more +details.

    @@ -320,7 +329,7 @@

    Arg facet.

    character vector for adding another plot element (e.g.: dot plot or error bars). Allowed values are one or the combination of: "none", "dotplot", "jitter", "boxplot", "point", "mean", "mean_se", "mean_sd", -"mean_ci", "mean_range", "median", "median_iqr", "median_mad", -"median_range"; see ?desc_statby for more details.

    add.params
    - +

    Details

    The plot can be easily customized using the function ggpar(). Read @@ -338,12 +347,10 @@

    Details = c("vertical", "horizontal", "reverse")

    -

    See also

    -

    Examples

    # Load data @@ -383,18 +390,10 @@

    Examp

    - @@ -405,7 +404,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/ggecdf.html b/docs/reference/ggecdf.html index 9f92a1c0..9e23d723 100644 --- a/docs/reference/ggecdf.html +++ b/docs/reference/ggecdf.html @@ -8,23 +8,29 @@ Empirical cumulative density function — ggecdf • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,10 +40,10 @@ - + - + @@ -54,7 +60,7 @@ - +
    @@ -87,9 +93,13 @@ Changelog -
    @@ -104,14 +114,12 @@
    -

    Empirical Cumulative Density Function (ECDF).

    -
    ggecdf(
    @@ -132,7 +140,7 @@ 

    Empirical cumulative density function

    ggtheme = theme_pubr(), ... )
    - +

    Arguments

    @@ -223,7 +231,7 @@

    Arg stat_ecdf and ggpar.

    - +

    Details

    The plot can be easily customized using the function ggpar(). Read @@ -241,11 +249,9 @@

    Details = c("vertical", "horizontal", "reverse")

    -

    See also

    -

    Examples

    # Create some data format @@ -268,18 +274,10 @@

    Examp palette = c("#00AFBB", "#E7B800"))

    - @@ -290,7 +288,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/ggerrorplot-3.png b/docs/reference/ggerrorplot-3.png index 115ce700..cd1d4d86 100644 Binary files a/docs/reference/ggerrorplot-3.png and b/docs/reference/ggerrorplot-3.png differ diff --git a/docs/reference/ggerrorplot-4.png b/docs/reference/ggerrorplot-4.png index 2c217ca4..0557f4ac 100644 Binary files a/docs/reference/ggerrorplot-4.png and b/docs/reference/ggerrorplot-4.png differ diff --git a/docs/reference/ggerrorplot-6.png b/docs/reference/ggerrorplot-6.png index c0da5cc4..e842521f 100644 Binary files a/docs/reference/ggerrorplot-6.png and b/docs/reference/ggerrorplot-6.png differ diff --git a/docs/reference/ggerrorplot.html b/docs/reference/ggerrorplot.html index 227b3851..9950c07d 100644 --- a/docs/reference/ggerrorplot.html +++ b/docs/reference/ggerrorplot.html @@ -8,23 +8,29 @@ Visualizing Error — ggerrorplot • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,10 +40,10 @@ - + - + @@ -54,7 +60,7 @@ - +
    @@ -87,9 +93,13 @@ Changelog -
    @@ -104,14 +114,12 @@
    -

    Visualizing error.

    -
    ggerrorplot(
    @@ -119,6 +127,7 @@ 

    Visualizing Error

    x, y, desc_stat = "mean_se", + numeric.x.axis = FALSE, combine = FALSE, merge = FALSE, color = "black", @@ -143,7 +152,7 @@

    Visualizing Error

    ggtheme = theme_pubr(), ... )
    - +

    Arguments

    @@ -159,7 +168,11 @@

    Arg

    +"median", "median_iqr", "median_hilow", "median_q1q3", "median_mad", "median_range"; see desc_statby for more details.

    + + + + @@ -239,15 +252,16 @@

    Arg

    - + +"mean_ci", "mean_range", "median", "median_iqr", "median_hilow", +"median_q1q3", "median_mad", "median_range"; see ?desc_statby for more +details.

    @@ -283,7 +297,7 @@

    Arg

    desc_stat

    descriptive statistics to be used for visualizing errors. Default value is "mean_se". Allowed values are one of , "mean", "mean_se", "mean_sd", "mean_ci", "mean_range", -"median", "median_iqr", "median_mad", "median_range"; see desc_statby for more details.

    numeric.x.axis

    logical. If TRUE, x axis will be treated as numeric. Default is FALSE.

    combine
    order

    character vector specifying the order of items.

    character vector specifying the order of items. Considered only when x axis is a factor variable.

    add

    character vector for adding another plot element (e.g.: dot plot or error bars). Allowed values are one or the combination of: "none", "dotplot", "jitter", "boxplot", "point", "mean", "mean_se", "mean_sd", -"mean_ci", "mean_range", "median", "median_iqr", "median_mad", -"median_range"; see ?desc_statby for more details.

    add.params

    other arguments to be passed to be passed to ggpar().

    - +

    Details

    The plot can be easily customized using the function ggpar(). Read @@ -301,11 +315,9 @@

    Details = c("vertical", "horizontal", "reverse")

    -

    See also

    -

    Examples

    @@ -357,18 +369,10 @@

    Examp

    - @@ -379,7 +383,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/ggexport.html b/docs/reference/ggexport.html index 36b3dc2f..08f4f48b 100644 --- a/docs/reference/ggexport.html +++ b/docs/reference/ggexport.html @@ -8,23 +8,29 @@ Export ggplots — ggexport • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,10 +40,10 @@ - + - + @@ -54,7 +60,7 @@ - +
    @@ -87,9 +93,13 @@ Changelog -
    @@ -104,14 +114,12 @@
    -

    Export ggplots

    -
    ggexport(
    @@ -126,7 +134,7 @@ 

    Export ggplots

    res = NA, verbose = TRUE )
    - +

    Arguments

    @@ -173,7 +181,7 @@

    Arg

    logical. If TRUE, show message.

    - +

    Examples

    if (FALSE) { @@ -201,16 +209,10 @@

    Examp ggexport(filename = "test.png") }

    - @@ -221,7 +223,7 @@

    Author

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/gghistogram-5.png b/docs/reference/gghistogram-5.png new file mode 100644 index 00000000..0ba65863 Binary files /dev/null and b/docs/reference/gghistogram-5.png differ diff --git a/docs/reference/gghistogram.html b/docs/reference/gghistogram.html index 01df85fc..1d62e5c6 100644 --- a/docs/reference/gghistogram.html +++ b/docs/reference/gghistogram.html @@ -8,23 +8,29 @@ Histogram plot — gghistogram • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,10 +40,10 @@ - + - + @@ -54,7 +60,7 @@ - +
    @@ -87,9 +93,13 @@ Changelog -
    @@ -104,14 +114,12 @@
    -

    Create a histogram plot.

    -
    gghistogram(
    @@ -120,6 +128,7 @@ 

    Histogram plot

    y = "..count..", combine = FALSE, merge = FALSE, + weight = NULL, color = "black", fill = NA, palette = NULL, @@ -147,7 +156,7 @@

    Histogram plot

    ggtheme = theme_pubr(), ... )
    - +

    Arguments

    @@ -177,6 +186,10 @@

    Arg (TRUE) and "flip". If merge = "flip", then y variables are used as x tick labels and the x variable is used as grouping variable.

    +

    + + + @@ -320,7 +333,7 @@

    Arg geom_histogram and ggpar.

    weight

    a variable name available in the input data for creating a weighted histogram.

    color, fill

    histogram line color and fill color.

    - +

    Details

    The plot can be easily customized using the function ggpar(). Read @@ -338,11 +351,9 @@

    Details = c("vertical", "horizontal", "reverse")

    -

    See also

    ggdensity and ggpar

    -

    Examples

    # Create some data format @@ -378,21 +389,13 @@

    Examp add = "mean", rug = TRUE, fill = "sex", palette = c("#00AFBB", "#E7B800"), add_density = TRUE)

    #> Warning: Using `bins = 30` by default. Pick better value with the argument `bins`.
    - -
    +# Weighted histogram +gghistogram(iris, x = "Sepal.Length", weight = "Petal.Length")
    #> Warning: Using `bins = 30` by default. Pick better value with the argument `bins`.
    - @@ -403,7 +406,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/ggline-10.png b/docs/reference/ggline-10.png index e8a61253..9341bf12 100644 Binary files a/docs/reference/ggline-10.png and b/docs/reference/ggline-10.png differ diff --git a/docs/reference/ggline-11.png b/docs/reference/ggline-11.png index 8623711c..1fd2c3cc 100644 Binary files a/docs/reference/ggline-11.png and b/docs/reference/ggline-11.png differ diff --git a/docs/reference/ggline-12.png b/docs/reference/ggline-12.png index d985ce35..46695318 100644 Binary files a/docs/reference/ggline-12.png and b/docs/reference/ggline-12.png differ diff --git a/docs/reference/ggline-13.png b/docs/reference/ggline-13.png index 7da28fa4..a3994751 100644 Binary files a/docs/reference/ggline-13.png and b/docs/reference/ggline-13.png differ diff --git a/docs/reference/ggline-6.png b/docs/reference/ggline-6.png index b701ab11..bcc227ad 100644 Binary files a/docs/reference/ggline-6.png and b/docs/reference/ggline-6.png differ diff --git a/docs/reference/ggline-8.png b/docs/reference/ggline-8.png index 37f7ed8b..76cfe89f 100644 Binary files a/docs/reference/ggline-8.png and b/docs/reference/ggline-8.png differ diff --git a/docs/reference/ggline-9.png b/docs/reference/ggline-9.png index ca57b37f..979fcded 100644 Binary files a/docs/reference/ggline-9.png and b/docs/reference/ggline-9.png differ diff --git a/docs/reference/ggline.html b/docs/reference/ggline.html index ff999bed..0d151d4f 100644 --- a/docs/reference/ggline.html +++ b/docs/reference/ggline.html @@ -8,23 +8,29 @@ Line plot — ggline • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,10 +40,10 @@ - + - + @@ -54,7 +60,7 @@ - +
    @@ -87,9 +93,13 @@ Changelog -
    @@ -104,14 +114,12 @@
    -

    Create a line plot.

    -
    ggline(
    @@ -128,6 +136,7 @@ 

    Line plot

    plot_type = c("b", "l", "p"), size = 0.5, shape = 19, + stroke = NULL, point.size = size, point.color = color, title = NULL, @@ -148,10 +157,11 @@

    Line plot

    repel = FALSE, label.rectangle = FALSE, show.line.label = FALSE, + position = "identity", ggtheme = theme_pubr(), ... )
    - +

    Arguments

    @@ -217,6 +227,10 @@

    Arg

    + + + + @@ -275,8 +289,9 @@

    Arg

    +"mean_ci", "mean_range", "median", "median_iqr", "median_hilow", +"median_q1q3", "median_mad", "median_range"; see ?desc_statby for more +details.

    @@ -335,6 +350,11 @@

    Arg

    + + + +
    shape

    point shapes.

    stroke

    point stroke. Used only for shapes 21-24 to control the thickness of points border.

    point.size

    point size.

    character vector for adding another plot element (e.g.: dot plot or error bars). Allowed values are one or the combination of: "none", "dotplot", "jitter", "boxplot", "point", "mean", "mean_se", "mean_sd", -"mean_ci", "mean_range", "median", "median_iqr", "median_mad", -"median_range"; see ?desc_statby for more details.

    add.paramsshow.line.label

    logical value. If TRUE, shows line labels.

    position

    Position adjustment, either as a string, or the result of +a call to a position adjustment function.

    ggtheme

    function, ggplot2 theme name. Default value is theme_pubr(). @@ -346,7 +366,7 @@

    Arg

    other arguments to be passed to geom_dotplot.

    - +

    Details

    The plot can be easily customized using the function ggpar(). Read @@ -364,11 +384,9 @@

    Details = c("vertical", "horizontal", "reverse")

    -

    See also

    ggpar, ggbarplot

    -

    Examples

    # Data @@ -462,18 +480,10 @@

    Examp

    - @@ -484,7 +494,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/ggmaplot-1.png b/docs/reference/ggmaplot-1.png index a8cbc8c3..bf61f46b 100644 Binary files a/docs/reference/ggmaplot-1.png and b/docs/reference/ggmaplot-1.png differ diff --git a/docs/reference/ggmaplot-2.png b/docs/reference/ggmaplot-2.png index 673873bd..3c62e0c9 100644 Binary files a/docs/reference/ggmaplot-2.png and b/docs/reference/ggmaplot-2.png differ diff --git a/docs/reference/ggmaplot-3.png b/docs/reference/ggmaplot-3.png new file mode 100644 index 00000000..b5e7ec97 Binary files /dev/null and b/docs/reference/ggmaplot-3.png differ diff --git a/docs/reference/ggmaplot.html b/docs/reference/ggmaplot.html index aaf1e107..b87369c4 100644 --- a/docs/reference/ggmaplot.html +++ b/docs/reference/ggmaplot.html @@ -8,23 +8,29 @@ MA-plot from means and log fold changes — ggmaplot • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,11 +40,13 @@ + + - - @@ -55,7 +63,7 @@ - +
    @@ -88,9 +96,13 @@ Changelog -
    @@ -105,15 +117,15 @@
    - -

    Make MA-plot which is a scatter plot of log2 fold changes (on - the y-axis) versus the mean expression signal (on the x-axis).

    - +

    Make MA-plot which is a scatter plot of log2 fold changes (M, on + the y-axis) versus the average expression signal (A, on the x-axis). M + = log2(x/y) and A = (log2(x) + log2(y))/2 = log2(xy)*1/2, where x + and y are respectively the mean of the two groups being compared.

    ggmaplot(
    @@ -123,30 +135,43 @@ 

    MA-plot from means and log fold changes

    genenames = NULL, detection_call = NULL, size = NULL, + alpha = 1, font.label = c(12, "plain", "black"), label.rectangle = FALSE, palette = c("#B31B21", "#1465AC", "darkgray"), top = 15, select.top.method = c("padj", "fc"), + label.select = NULL, main = NULL, xlab = "Log2 mean expression", ylab = "Log2 fold change", ggtheme = theme_classic(), ... )
    - +

    Arguments

    @@ -162,13 +187,13 @@

    Arg

    - + - @@ -176,12 +201,17 @@

    Arg

    + + + + - + @@ -198,7 +228,8 @@

    Arg

    - + @@ -206,6 +237,10 @@

    Arg values include "padj" and "fc" for selecting by adjusted p values or fold changes, respectively.

    + + + + @@ -231,11 +266,10 @@

    Arg

    data

    an object of class DESeqResults, get_diff, DE_Results, matrix or -data frame containing the columns baseMean, log2FoldChange, and padj. Rows -are genes.

      -
    • baseMean: the mean expression of genes in the -two groups.

    • -
    • log2FoldChange: the log2 fold changes of group 2 compared -to group 1

    • + data frame containing the columns baseMean (or baseMeanLog2), + log2FoldChange, and padj. Rows are genes.

      +

      Two possible formats are accepted for the input data:

        +
      • 1/ + baseMean | log2FoldChange | padj. This is a typical output from + DESeq2 pipeline. Here, we'll use log2(baseMean) as the x-axis variable.

      • +
      • 2/ baseMeanLog2 | log2FoldChange | padj. Here, baseMeanLog2 is + assumed to be the mean of logged values; so we'll use it as the x-axis + variable without any transformation. This is the real A in MA plot. In other + words, it is the average of two log-scales values: A = (log2(x) + + log2(y))/2 = log2(xy)*1/2

      • +
      + +

      Terminology:

      +

        +
      • baseMean: the mean expression of genes in the two groups.

      • +
      • log2FoldChange: the log2 fold changes of group 2 compared to group 1

      • padj: the adjusted p-value of the used statiscal test.

    genenames

    a character vector of length nrow(data) specifying gene -names corresponding to each row. Used for point labels.

    a character vector of length nrow(data) specifying gene names +corresponding to each row. Used for point labels.

    detection_call

    a numeric vector with length = nrow(data), specifying -if the genes is expressed (value = 1) or not (value = 0). For example +

    a numeric vector with length = nrow(data), specifying if +the genes is expressed (value = 1) or not (value = 0). For example detection_call = c(1, 1, 0, 1, 0, 1). Default is NULL. If detection_call column is available in data, it will be used.

    size

    points size.

    alpha

    numeric value betwenn 0 an 1 specifying point alpha for +controlling transparency. For example, use alpha = 0.5.

    font.label

    a vector of length 3 indicating respectively the size -(e.g.: 14), the style (e.g.: "plain", "bold", "italic", "bold.italic") and -the color (e.g.: "red") of point labels. For example font.label = -c(14, "bold", "red").

    a vector of length 3 indicating respectively the size (e.g.: +14), the style (e.g.: "plain", "bold", "italic", "bold.italic") and the +color (e.g.: "red") of point labels. For example font.label = c(14, +"bold", "red").

    label.rectangle
    top

    the number of top genes to be shown on the plot. Use top = 0 to hide to gene labels.

    the number of top genes to be shown on the plot. Use top = 0 to +hide to gene labels.

    select.top.method
    label.select

    character vector specifying some labels to show.

    main

    plot main title.

    other arguments to be passed to ggpar.

    - +

    Value

    returns a ggplot.

    -

    Examples

    data(diff_express) @@ -259,18 +293,21 @@

    Examp font.label = c("bold", 11), label.rectangle = TRUE, font.legend = "bold", font.main = "bold", - ggtheme = ggplot2::theme_minimal())

    + ggtheme = ggplot2::theme_minimal())
    +# Select specific genes to show +# set top = 0, then specify genes using label.select argument +ggmaplot(diff_express, main = expression("Group 1" %->% "Group 2"), + fdr = 0.05, fc = 2, size = 0.4, + genenames = as.vector(diff_express$name), + ggtheme = ggplot2::theme_minimal(), + top = 0, label.select = c("BUB1", "CD83") +)
    +
    - @@ -281,7 +318,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/ggpaired.html b/docs/reference/ggpaired.html index d8374499..b30a534b 100644 --- a/docs/reference/ggpaired.html +++ b/docs/reference/ggpaired.html @@ -8,23 +8,29 @@ Plot Paired Data — ggpaired • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,10 +40,10 @@ - + - + @@ -54,7 +60,7 @@ - +
    @@ -87,9 +93,13 @@ Changelog -
    @@ -104,14 +114,12 @@
    -

    Plot paired data.

    -
    ggpaired(
    @@ -128,6 +136,7 @@ 

    Plot Paired Data

    point.size = 1.2, line.size = 0.5, line.color = "black", + linetype = "solid", title = NULL, xlab = "Condition", ylab = "Value", @@ -142,7 +151,7 @@

    Plot Paired Data

    ggtheme = theme_pubr(), ... )
    - +

    Arguments

    @@ -199,6 +208,10 @@

    Arg

    + + + + @@ -282,7 +295,7 @@

    Arg

    line.color

    line color.

    linetype

    line type.

    title

    plot main title.

    other arguments to be passed to be passed to ggpar().

    - +

    Examples

    @@ -301,14 +314,10 @@

    Examp palette = "npg")

    - @@ -319,7 +328,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/ggpar.html b/docs/reference/ggpar.html index 75b45d63..bf3009ce 100644 --- a/docs/reference/ggpar.html +++ b/docs/reference/ggpar.html @@ -8,23 +8,29 @@ Graphical parameters — ggpar • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,10 +40,10 @@ - + - + @@ -54,7 +60,7 @@ - +
    @@ -87,9 +93,13 @@ Changelog -
    @@ -104,14 +114,12 @@
    -

    Graphical parameters

    -
    ggpar(
    @@ -157,7 +165,7 @@ 

    Graphical parameters

    ggtheme = NULL, ... )
    - +

    Arguments

    @@ -306,7 +314,7 @@

    Arg

    not used

    - +

    Examples

    # Load data @@ -372,14 +380,10 @@

    Examp font.legend = c(10, "bold", "red"))

    - @@ -390,7 +394,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/ggparagraph-1.png b/docs/reference/ggparagraph-1.png index 776361d5..6c028add 100644 Binary files a/docs/reference/ggparagraph-1.png and b/docs/reference/ggparagraph-1.png differ diff --git a/docs/reference/ggparagraph.html b/docs/reference/ggparagraph.html index 9195dbd0..37d349e5 100644 --- a/docs/reference/ggparagraph.html +++ b/docs/reference/ggparagraph.html @@ -8,23 +8,29 @@ Draw a Paragraph of Text — ggparagraph • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,12 +40,12 @@ - + - + @@ -56,7 +62,7 @@ - +
    @@ -89,9 +95,13 @@ Changelog -
    @@ -106,16 +116,14 @@
    -

    Draw a paragraph o text. Splits a long text into multiple lines (by inserting line breaks) so that the output will fit within the current viewport.

    -
    ggparagraph(
    @@ -129,7 +137,7 @@ 

    Draw a Paragraph of Text

    # S3 method for splitText drawDetails(x, recording)
    - +

    Arguments

    @@ -168,7 +176,7 @@

    Arg the display list or redrawn from the display list.

    - +

    Examples

    # Density plot @@ -189,16 +197,10 @@

    Examp heights = c(1, 0.3))

    - @@ -209,7 +211,7 @@

    Author

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/ggpie.html b/docs/reference/ggpie.html index ab58b49c..4478b1af 100644 --- a/docs/reference/ggpie.html +++ b/docs/reference/ggpie.html @@ -8,23 +8,29 @@ Pie chart — ggpie • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,10 +40,10 @@ - + - + @@ -54,7 +60,7 @@ - +
    @@ -87,9 +93,13 @@ Changelog -
    @@ -104,14 +114,12 @@
    -

    Create a pie chart.

    -
    ggpie(
    @@ -129,7 +137,7 @@ 

    Pie chart

    ggtheme = theme_pubr(), ... )
    - +

    Arguments

    @@ -194,7 +202,7 @@

    Arg

    other arguments to be passed to be passed to ggpar().

    - +

    Details

    The plot can be easily customized using the function ggpar(). Read @@ -212,11 +220,9 @@

    Details c("vertical", "horizontal", "reverse")

    -

    See also

    ggpar, ggline

    -

    Examples

    @@ -264,18 +270,10 @@

    Examp

    - @@ -286,7 +284,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/ggpubr_args.html b/docs/reference/ggpubr_args.html index 3f84ab27..e185d48b 100644 --- a/docs/reference/ggpubr_args.html +++ b/docs/reference/ggpubr_args.html @@ -8,23 +8,29 @@ ggpubr General Arguments Description — ggpubr_args • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,10 +40,10 @@ - + - + @@ -54,7 +60,7 @@ - +
    @@ -87,9 +93,13 @@ Changelog -
    @@ -104,17 +114,15 @@
    -

    ggpubr General Arguments Description

    -
    - +

    Arguments

    @@ -232,16 +240,14 @@

    Arg theme_minimal(), theme_classic(), theme_void(), ....

    - -
    - + @@ -251,7 +257,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/ggqqplot.html b/docs/reference/ggqqplot.html index df5c91b3..d9c6035a 100644 --- a/docs/reference/ggqqplot.html +++ b/docs/reference/ggqqplot.html @@ -8,23 +8,29 @@ QQ Plots — ggqqplot • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,10 +40,10 @@ - + - + @@ -54,7 +60,7 @@ - +
    @@ -87,9 +93,13 @@ Changelog -
    @@ -104,14 +114,12 @@
    -

    Quantile-Quantile plot.

    -
    ggqqplot(
    @@ -136,7 +144,7 @@ 

    QQ Plots

    ggtheme = theme_pubr(), ... )
    - +

    Arguments

    @@ -244,7 +252,7 @@

    Arg

    other arguments to be passed to ggpar.

    - +

    Details

    The plot can be easily customized using the function ggpar(). Read @@ -262,11 +270,9 @@

    Details = c("vertical", "horizontal", "reverse")

    -

    See also

    ggpar

    -

    Examples

    # Create some data format @@ -288,18 +294,10 @@

    Examp color = "sex", palette = c("#00AFBB", "#E7B800"))

    - @@ -310,7 +308,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/ggscatter.html b/docs/reference/ggscatter.html index 65c41538..b35d788a 100644 --- a/docs/reference/ggscatter.html +++ b/docs/reference/ggscatter.html @@ -8,23 +8,29 @@ Scatter plot — ggscatter • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,10 +40,10 @@ - + - + @@ -54,7 +60,7 @@ - +
    @@ -87,9 +93,13 @@ Changelog -
    @@ -104,14 +114,12 @@
    -

    Create a scatter plot.

    -
    ggscatter(
    @@ -154,6 +162,7 @@ 

    Scatter plot

    label.select = NULL, repel = FALSE, label.rectangle = FALSE, + parse = FALSE, cor.coef = FALSE, cor.coeff.args = list(), cor.method = "pearson", @@ -164,7 +173,7 @@

    Scatter plot

    ggtheme = theme_pubr(), ... )
    - +

    Arguments

    @@ -294,7 +303,7 @@

    Arg

    + + + + @@ -411,7 +425,7 @@

    Arg and ggpar.

    label.rectangle

    logical value. If TRUE, add rectangle underneath the text, making it easier to read.

    parse

    If TRUE, the labels will be parsed into expressions and +displayed as described in ?plotmath.

    cor.coef
    - +

    Details

    The plot can be easily customized using the function ggpar(). Read @@ -429,11 +443,9 @@

    Details = c("vertical", "horizontal", "reverse")

    -

    See also

    stat_cor, stat_stars, stat_conf_ellipse and ggpar.

    -

    Examples

    # Load data @@ -489,18 +501,10 @@

    Examp

    - @@ -511,7 +515,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/ggscatterhist-4.png b/docs/reference/ggscatterhist-4.png new file mode 100644 index 00000000..7fca3dbf Binary files /dev/null and b/docs/reference/ggscatterhist-4.png differ diff --git a/docs/reference/ggscatterhist.html b/docs/reference/ggscatterhist.html index aa553db4..062c9c28 100644 --- a/docs/reference/ggscatterhist.html +++ b/docs/reference/ggscatterhist.html @@ -8,23 +8,29 @@ Scatter Plot with Marginal Histograms — ggscatterhist • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,10 +40,11 @@ + + - - @@ -54,7 +61,7 @@ - +
    @@ -87,9 +94,13 @@ Changelog -
    @@ -104,14 +115,13 @@
    - -

    Create a scatter plot with marginal histograms, density plots or box plots.

    - +

    Create a scatter plot with marginal histograms, density plots or + box plots.

    ggscatterhist(
    @@ -137,9 +147,21 @@ 

    Scatter Plot with Marginal Histograms

    ylab = NULL, legend = "top", ggtheme = theme_pubr(), + print = TRUE, + ... +) + +# S3 method for ggscatterhist +print( + x, + margin.space = FALSE, + main.plot.size = 2, + margin.plot.size = 1, + title = NULL, + legend = "top", ... )
    - +

    Arguments

    @@ -149,7 +171,7 @@

    Arg

    - + @@ -192,8 +214,8 @@

    Arg

    - + @@ -205,11 +227,13 @@

    Arg

    - + - + @@ -235,18 +259,32 @@

    Arg

    - + - + + + + +
    x

    x and y variables for drawing.

    an object of class ggscatterhist.

    y
    bins

    Number of histogram bins. Defaults to 30. Pick a better value -that fit to your data.

    Number of histogram bins. Defaults to 30. Pick a better value that +fit to your data.

    margin.plot
    margin.ggtheme

    the theme of the marginal plot. Default is theme_void().

    the theme of the marginal plot. Default is +theme_void().

    margin.space

    logical value. If TRUE, adds space between the main plot and the marginal plot.

    logical value. If TRUE, adds space between the main plot +and the marginal plot.

    main.plot.size
    legend

    specify the legend position. Allowed values include: "top", "bottom", "left", "right".

    specify the legend position. Allowed values include: "top", +"bottom", "left", "right".

    ggtheme

    the theme to be used for the scatter plot. Default is theme_pubr().

    the theme to be used for the scatter plot. Default is +theme_pubr().

    print

    logical value. If TRUE (default), print the plot.

    ...

    other arguments passed to the function ggscatter().

    - + +

    Value

    + +

    an object of class ggscatterhist, which is list of ggplots, + including the following elements:

    .

    +

    User can modify each of plot before printing.

    Examples

    # Basic scatter plot with marginal density plot @@ -268,16 +306,19 @@

    Examp palette = c("#00AFBB", "#E7B800", "#FC4E07"), margin.plot = "boxplot", ggtheme = theme_bw() -)

    +)
    +# Add vertical and horizontal line to a ggscatterhist +plots <- ggscatterhist(iris, x = "Sepal.Length", y = "Sepal.Width", print = FALSE) +plots$sp <- plots$sp + + geom_hline(yintercept = 3, linetype = "dashed", color = "blue") + + geom_vline(xintercept = 6, linetype = "dashed", color = "red") +plots
    +
    - @@ -288,7 +329,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/ggstripchart-1.png b/docs/reference/ggstripchart-1.png index 84df819e..09340712 100644 Binary files a/docs/reference/ggstripchart-1.png and b/docs/reference/ggstripchart-1.png differ diff --git a/docs/reference/ggstripchart-2.png b/docs/reference/ggstripchart-2.png index 20aa47de..49aee498 100644 Binary files a/docs/reference/ggstripchart-2.png and b/docs/reference/ggstripchart-2.png differ diff --git a/docs/reference/ggstripchart-3.png b/docs/reference/ggstripchart-3.png index d4222261..7fc916e8 100644 Binary files a/docs/reference/ggstripchart-3.png and b/docs/reference/ggstripchart-3.png differ diff --git a/docs/reference/ggstripchart-4.png b/docs/reference/ggstripchart-4.png index 93fd32e4..643abcb7 100644 Binary files a/docs/reference/ggstripchart-4.png and b/docs/reference/ggstripchart-4.png differ diff --git a/docs/reference/ggstripchart-5.png b/docs/reference/ggstripchart-5.png index cd5b725c..95343316 100644 Binary files a/docs/reference/ggstripchart-5.png and b/docs/reference/ggstripchart-5.png differ diff --git a/docs/reference/ggstripchart-6.png b/docs/reference/ggstripchart-6.png index b56b2251..910820ef 100644 Binary files a/docs/reference/ggstripchart-6.png and b/docs/reference/ggstripchart-6.png differ diff --git a/docs/reference/ggstripchart-8.png b/docs/reference/ggstripchart-8.png index ba8f3aa8..2c0e0673 100644 Binary files a/docs/reference/ggstripchart-8.png and b/docs/reference/ggstripchart-8.png differ diff --git a/docs/reference/ggstripchart-9.png b/docs/reference/ggstripchart-9.png index 055e13ce..a68fb0d0 100644 Binary files a/docs/reference/ggstripchart-9.png and b/docs/reference/ggstripchart-9.png differ diff --git a/docs/reference/ggstripchart.html b/docs/reference/ggstripchart.html index 2dd64144..4f664e9e 100644 --- a/docs/reference/ggstripchart.html +++ b/docs/reference/ggstripchart.html @@ -8,23 +8,29 @@ Stripcharts — ggstripchart • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,12 +40,12 @@ - + - + @@ -56,7 +62,7 @@ - +
    @@ -89,9 +95,13 @@ Changelog -
    @@ -106,16 +116,14 @@
    -

    Create a stripchart, also known as one dimensional scatter plots. These plots are suitable compared to box plots when sample sizes are small.

    -
    ggstripchart(
    @@ -151,7 +159,7 @@ 

    Stripcharts

    ggtheme = theme_pubr(), ... )
    - +

    Arguments

    @@ -256,8 +264,9 @@

    Arg

    +"mean_ci", "mean_range", "median", "median_iqr", "median_hilow", +"median_q1q3", "median_mad", "median_range"; see ?desc_statby for more +details.

    @@ -335,7 +344,7 @@

    Arg facet.

    character vector for adding another plot element (e.g.: dot plot or error bars). Allowed values are one or the combination of: "none", "dotplot", "jitter", "boxplot", "point", "mean", "mean_se", "mean_sd", -"mean_ci", "mean_range", "median", "median_iqr", "median_mad", -"median_range"; see ?desc_statby for more details.

    add.params
    - +

    Details

    The plot can be easily customized using the function ggpar(). Read @@ -353,12 +362,10 @@

    Details = c("vertical", "horizontal", "reverse")

    -

    See also

    ggpar, ggviolin, ggdotplot and ggboxplot.

    -

    Examples

    # Load data @@ -418,18 +425,10 @@

    Examp add = "boxplot", add.params = list(color = "black") )

    - @@ -440,7 +439,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/ggsummarystats-2.png b/docs/reference/ggsummarystats-2.png index 34560467..abaca341 100644 Binary files a/docs/reference/ggsummarystats-2.png and b/docs/reference/ggsummarystats-2.png differ diff --git a/docs/reference/ggsummarystats-3.png b/docs/reference/ggsummarystats-3.png index 38dc8ae4..b3a8b1f4 100644 Binary files a/docs/reference/ggsummarystats-3.png and b/docs/reference/ggsummarystats-3.png differ diff --git a/docs/reference/ggsummarystats-4.png b/docs/reference/ggsummarystats-4.png index c6f64648..05b6b43b 100644 Binary files a/docs/reference/ggsummarystats-4.png and b/docs/reference/ggsummarystats-4.png differ diff --git a/docs/reference/ggsummarystats-5.png b/docs/reference/ggsummarystats-5.png index 219318d8..0336e327 100644 Binary files a/docs/reference/ggsummarystats-5.png and b/docs/reference/ggsummarystats-5.png differ diff --git a/docs/reference/ggsummarystats.html b/docs/reference/ggsummarystats.html index 311845e2..94186a37 100644 --- a/docs/reference/ggsummarystats.html +++ b/docs/reference/ggsummarystats.html @@ -8,23 +8,29 @@ GGPLOT with Summary Stats Table Under the Plot — ggsummarytable • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,11 +40,11 @@ - + - + under the plot. Read more: How to Create a Beautiful Plots in R with Summary Statistics Labels." /> + @@ -55,7 +61,7 @@ - +
    @@ -88,9 +94,13 @@ Changelog -
    @@ -105,15 +115,13 @@
    -

    Create a ggplot with summary stats (n, median, mean, iqr) table - under the plot.

    - + under the plot. Read more: How to Create a Beautiful Plots in R with Summary Statistics Labels.

    ggsummarytable(
    @@ -153,7 +161,7 @@ 

    GGPLOT with Summary Stats Table Under the Plot

    # S3 method for ggsummarystats_list print(x, heights = c(0.8, 0.2), legend = NULL, ...)
    - +

    Arguments

    @@ -254,7 +262,7 @@

    Arg legend = "none".

    - +

    Functions

    @@ -262,7 +270,6 @@

    Fun
  • ggsummarytable: Create a table of summary stats

  • ggsummarystats: Create a ggplot with a summary stat table under the plot.

  • -

    Examples

    # Data preparation @@ -276,12 +283,12 @@

    Examp df$qc <- as.factor(sample(qc, 60)) # Inspect the data head(df)

    #> len supp dose qc -#> 1 4.2 VC 0.5 fail +#> 1 4.2 VC 0.5 pass #> 2 11.5 VC 0.5 pass -#> 3 7.3 VC 0.5 fail -#> 4 5.8 VC 0.5 pass +#> 3 7.3 VC 0.5 pass +#> 4 5.8 VC 0.5 fail #> 5 6.4 VC 0.5 pass -#> 6 10.0 VC 0.5 pass
    +#> 6 10.0 VC 0.5 fail
    # Basic summary stats #:::::::::::::::::::::::::::::::::::::::::::::::: @@ -289,12 +296,12 @@

    Examp summary.stats <- df %>% group_by(dose) %>% get_summary_stats(type = "common") -summary.stats

    #> # A tibble: 3 x 11 +summary.stats
    #> # A tibble: 3 x 11 #> dose variable n min max median iqr mean sd se ci -#> <fct> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> -#> 1 0.5 len 20 4.2 21.5 9.85 5.03 10.6 4.5 1.01 2.11 -#> 2 1 len 20 13.6 27.3 19.2 7.12 19.7 4.42 0.987 2.07 -#> 3 2 len 20 18.5 33.9 26.0 4.3 26.1 3.77 0.844 1.77
    +#> <fct> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> +#> 1 0.5 len 20 4.2 21.5 9.85 5.03 10.6 4.5 1.01 2.11 +#> 2 1 len 20 13.6 27.3 19.2 7.12 19.7 4.42 0.987 2.07 +#> 3 2 len 20 18.5 33.9 26.0 4.3 26.1 3.77 0.844 1.77
    # Visualize summary table ggsummarytable( summary.stats, x = "dose", y = c("n", "median", "iqr"), @@ -322,40 +329,20 @@

    Examp )

    # Facet #:::::::::::::::::::::::::::::::::::::::::::::::: - -ggsummarystats( - df, x = "dose", y = "len", - ggfunc = ggboxplot, add = "jitter", - color = "dose", palette = "npg", - facet.by = c("supp", "qc") -)
    # Specify labeller +# Specify free.panels = TRUE for free panels ggsummarystats( df, x = "dose", y = "len", ggfunc = ggboxplot, add = "jitter", color = "dose", palette = "npg", facet.by = c("supp", "qc"), labeller = "label_both" -)
    -# Free panels -ggsummarystats( - df, x = "dose", y = "len", - ggfunc = ggboxplot, add = "jitter", - color = "dose", palette = "npg", - facet.by = c("supp", "qc"), - free.panels = TRUE, labeller = "label_both" -)
    -
    +)
    #> Warning: production de NaN
    +
    - @@ -366,7 +353,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/ggtext-1.png b/docs/reference/ggtext-1.png index e5859ee1..06b42c1f 100644 Binary files a/docs/reference/ggtext-1.png and b/docs/reference/ggtext-1.png differ diff --git a/docs/reference/ggtext-2.png b/docs/reference/ggtext-2.png index 75b7f511..a340b322 100644 Binary files a/docs/reference/ggtext-2.png and b/docs/reference/ggtext-2.png differ diff --git a/docs/reference/ggtext.html b/docs/reference/ggtext.html index 141fe5e6..b1583bbb 100644 --- a/docs/reference/ggtext.html +++ b/docs/reference/ggtext.html @@ -8,23 +8,29 @@ Text — ggtext • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,10 +40,10 @@ - + - + @@ -54,7 +60,7 @@ - +
    @@ -87,9 +93,13 @@ Changelog -
    @@ -104,14 +114,12 @@
    -

    Add text to a plot.

    -
    ggtext(
    @@ -128,13 +136,14 @@ 

    Text

    label.select = NULL, repel = FALSE, label.rectangle = FALSE, + parse = FALSE, grouping.vars = NULL, position = "identity", ggp = NULL, ggtheme = theme_pubr(), ... )
    - +

    Arguments

    @@ -178,9 +187,9 @@

    Arg

    - + @@ -207,6 +216,11 @@

    Arg

    + + + + @@ -233,7 +247,7 @@

    Arg

    show.legend

    logical. Should text be included in the legends? NA, -the default, includes if any aesthetics are mapped. FALSE never includes, -and TRUE always includes.

    logical. Should text be included in the legends? NA, the +default, includes if any aesthetics are mapped. FALSE never includes, and +TRUE always includes.

    label.selectlabel.rectangle

    logical value. If TRUE, add rectangle underneath the text, making it easier to read.

    parse

    If TRUE, the labels will be parsed into expressions and +displayed as described in ?plotmath.

    grouping.vars

    other arguments to be passed to ggpar.

    - +

    Details

    The plot can be easily customized using the function ggpar(). Read @@ -249,11 +263,9 @@

    Details labels and position: legend = "right"

    -

    See also

    ggpar

    -

    Examples

    # Load data @@ -277,18 +289,10 @@

    Examp

    - @@ -299,7 +303,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/ggtexttable-10.png b/docs/reference/ggtexttable-10.png index 43c92e14..f90e18df 100644 Binary files a/docs/reference/ggtexttable-10.png and b/docs/reference/ggtexttable-10.png differ diff --git a/docs/reference/ggtexttable-11.png b/docs/reference/ggtexttable-11.png new file mode 100644 index 00000000..2384de9d Binary files /dev/null and b/docs/reference/ggtexttable-11.png differ diff --git a/docs/reference/ggtexttable-12.png b/docs/reference/ggtexttable-12.png new file mode 100644 index 00000000..c6b91ebe Binary files /dev/null and b/docs/reference/ggtexttable-12.png differ diff --git a/docs/reference/ggtexttable-13.png b/docs/reference/ggtexttable-13.png new file mode 100644 index 00000000..ba91783c Binary files /dev/null and b/docs/reference/ggtexttable-13.png differ diff --git a/docs/reference/ggtexttable-14.png b/docs/reference/ggtexttable-14.png new file mode 100644 index 00000000..a0edc634 Binary files /dev/null and b/docs/reference/ggtexttable-14.png differ diff --git a/docs/reference/ggtexttable-15.png b/docs/reference/ggtexttable-15.png new file mode 100644 index 00000000..8ec1f27f Binary files /dev/null and b/docs/reference/ggtexttable-15.png differ diff --git a/docs/reference/ggtexttable-16.png b/docs/reference/ggtexttable-16.png new file mode 100644 index 00000000..43c92e14 Binary files /dev/null and b/docs/reference/ggtexttable-16.png differ diff --git a/docs/reference/ggtexttable-3.png b/docs/reference/ggtexttable-3.png index e29e2df3..fbe38c1b 100644 Binary files a/docs/reference/ggtexttable-3.png and b/docs/reference/ggtexttable-3.png differ diff --git a/docs/reference/ggtexttable-4.png b/docs/reference/ggtexttable-4.png index ec083f5b..9d0730e5 100644 Binary files a/docs/reference/ggtexttable-4.png and b/docs/reference/ggtexttable-4.png differ diff --git a/docs/reference/ggtexttable-5.png b/docs/reference/ggtexttable-5.png index 5c8022d3..e29e2df3 100644 Binary files a/docs/reference/ggtexttable-5.png and b/docs/reference/ggtexttable-5.png differ diff --git a/docs/reference/ggtexttable-6.png b/docs/reference/ggtexttable-6.png index 96e3c7a8..34236e99 100644 Binary files a/docs/reference/ggtexttable-6.png and b/docs/reference/ggtexttable-6.png differ diff --git a/docs/reference/ggtexttable-7.png b/docs/reference/ggtexttable-7.png index 089ee07e..5c8022d3 100644 Binary files a/docs/reference/ggtexttable-7.png and b/docs/reference/ggtexttable-7.png differ diff --git a/docs/reference/ggtexttable-8.png b/docs/reference/ggtexttable-8.png index f90e18df..96e3c7a8 100644 Binary files a/docs/reference/ggtexttable-8.png and b/docs/reference/ggtexttable-8.png differ diff --git a/docs/reference/ggtexttable-9.png b/docs/reference/ggtexttable-9.png index 2384de9d..089ee07e 100644 Binary files a/docs/reference/ggtexttable-9.png and b/docs/reference/ggtexttable-9.png differ diff --git a/docs/reference/ggtexttable.html b/docs/reference/ggtexttable.html index 052d0273..d0304525 100644 --- a/docs/reference/ggtexttable.html +++ b/docs/reference/ggtexttable.html @@ -8,23 +8,29 @@ Draw a Textual Table — ggtexttable • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,8 +40,8 @@ - + - + @@ -63,7 +75,7 @@ - +
    @@ -96,9 +108,13 @@ Changelog -
    @@ -113,12 +129,11 @@
    -

    Draw a textual table.

    -
    ggtexttable(
    @@ -184,10 +204,113 @@ 

    Draw a Textual Table

    ... ) -table_cell_font(tab, row, column, face = NULL, size = NULL) +table_cell_font(tab, row, column, face = NULL, size = NULL, color = NULL) + +table_cell_bg( + tab, + row, + column, + fill = NULL, + color = NULL, + linewidth = NULL, + alpha = NULL +) + +tab_cell_crossout( + tab, + row, + column, + linetype = 1, + linewidth = 1, + linecolor = "black", + reduce.size.by = 0 +) + +tab_ncol(tab) + +tab_nrow(tab) + +tab_add_hline( + tab, + at.row = 2:tab_nrow(tab), + row.side = c("bottom", "top"), + from.column = 1, + to.column = tab_ncol(tab), + linetype = 1, + linewidth = 1, + linecolor = "black" +) + +tab_add_vline( + tab, + at.column = 2:tab_ncol(tab), + column.side = c("left", "right"), + from.row = 1, + to.row = tab_nrow(tab), + linetype = 1, + linewidth = 1, + linecolor = "black" +) + +tab_add_border( + tab, + from.row = 2, + to.row = tab_nrow(tab), + from.column = 1, + to.column = tab_ncol(tab), + linetype = 1, + linewidth = 1, + linecolor = "black" +) + +tbody_add_border( + tab, + from.row = 2, + to.row = tab_nrow(tab), + from.column = 1, + to.column = tab_ncol(tab), + linetype = 1, + linewidth = 1, + linecolor = "black" +) + +thead_add_border( + tab, + from.row = 1, + to.row = 1, + from.column = 1, + to.column = tab_ncol(tab), + linetype = 1, + linewidth = 1, + linecolor = "black" +) + +tab_add_title( + tab, + text, + face = NULL, + size = NULL, + color = NULL, + family = NULL, + padding = unit(1.5, "line"), + just = "left", + hjust = NULL, + vjust = NULL +) + +tab_add_footnote( + tab, + text, + face = NULL, + size = NULL, + color = NULL, + family = NULL, + padding = unit(1.5, "line"), + just = "right", + hjust = NULL, + vjust = NULL +)
    -table_cell_bg(tab, row, column, fill = NULL, color = NULL, linewidth = NULL) -

    Arguments

    @@ -281,18 +404,89 @@

    Arg

    - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    tab

    an object of class ggtexttable.

    an object from ggtexttable or from gridExtra::tableGrob().

    row, column

    an integer specifying the row and the column numbers for the cell of interest.

    alpha

    numeric value specifying fill color transparency. +Value should be in [0, 1], where 0 is full transparency and 1 is no transparency.

    linetype

    line type

    reduce.size.by

    Numeric value in [0, 1] to reduce the size by.

    at.row

    a numeric vector of row indexes; for example at.row = c(1, 2).

    row.side

    row side to which the horinzotal line should be added. Can be one of c("bottom", "top").

    from.column

    integer indicating the column from which to start drawing the horizontal line.

    to.column

    integer indicating the column to which the horizontal line should end.

    at.column

    a numeric vector of column indexes; for example at.column = c(1, 2).

    column.side

    column side to which the vertical line should be added. Can be one of c("left", "right").

    from.row

    integer indicating the row from which to start drawing the horizontal line.

    to.row

    integer indicating the row to which the vertical line should end.

    text

    text to be added as title or footnote.

    family

    font family

    just

    The justification of the text relative to its (x, y) location. If +there are two values, the first value specifies horizontal justification +and the second value specifies vertical justification. Possible string +values are: "left", "right", "centre", "center", "bottom", and "top". For +numeric values, 0 means left (bottom) alignment and 1 means right (top) +alignment.

    hjust

    A numeric vector specifying horizontal justification. If +specified, overrides the just setting.

    vjust

    A numeric vector specifying vertical justification. If +specified, overrides the just setting.

    - +

    Value

    an object of class ggplot.

    -

    Examples

    # data @@ -303,12 +497,17 @@

    Examp ggtexttable(df, rows = NULL)

    # Blank theme ggtexttable(df, rows = NULL, theme = ttheme("blank"))
    +# light theme +ggtexttable(df, rows = NULL, theme = ttheme("light"))
    +# Column names border only +ggtexttable(df, rows = NULL, theme = ttheme("blank")) %>% + tab_add_hline(at.row = 1:2, row.side = "top", linewidth = 2)
    # classic theme -ggtexttable(df, rows = NULL, theme = ttheme("classic"))
    +ggtexttable(df, rows = NULL, theme = ttheme("classic"))
    # minimal theme -ggtexttable(df, rows = NULL, theme = ttheme("minimal"))
    +ggtexttable(df, rows = NULL, theme = ttheme("minimal"))
    # Medium blue (mBlue) theme -ggtexttable(df, rows = NULL, theme = ttheme("mBlue"))
    +ggtexttable(df, rows = NULL, theme = ttheme("mBlue"))
    # Customize the table as you want ggtexttable(df, rows = NULL, @@ -316,7 +515,7 @@

    Examp colnames.style = colnames_style(color = "white", fill = "#8cc257"), tbody.style = tbody_style(color = "black", fill = c("#e8f3de", "#d3e8bb")) ) -)

    +)
    # Use RColorBrewer palette # Provide as many fill color as there are rows in the table body, here nrow = 6 ggtexttable(df, @@ -324,7 +523,7 @@

    Examp colnames.style = colnames_style(fill = "white"), tbody.style = tbody_style(fill = get_palette("RdBu", 6)) ) -)

    +)
    # Text justification #:::::::::::::::::::::::::::::::::::::::::::::: # Default is "centre" for the body and header, and "right" for the row names. @@ -337,7 +536,7 @@

    Examp colnames.style = colnames_style(color = "white", fill = "#8cc257"), tbody.style = tbody.style ) -)

    +)
    # Access and modify the font and # the background of table cells # ::::::::::::::::::::::::::::::::::::::::::::: @@ -347,7 +546,50 @@

    Examp face = "bold") tab <- table_cell_bg(tab, row = 4, column = 3, linewidth = 5, fill="darkolivegreen1", color = "darkolivegreen4") -tab

    +tab
    +# Change table cells background and font for column 3, +# Spaning from row 2 to the last row in the data +tab <- ggtexttable(df, rows = NULL, theme = ttheme("classic")) +tab %>% + table_cell_bg(row = 2:tab_nrow(tab), column = 3, fill = "darkblue") %>% + table_cell_font(row = 2:tab_nrow(tab), column = 3, face = "italic", color = "white")
    +# Add separators and borders +# ::::::::::::::::::::::::::::::::::::::::::::::::::: +# Table with blank theme +tab <- ggtexttable(df, theme = ttheme("blank"), rows = NULL) +# Add horizontal and vertical lines +tab %>% + tab_add_hline(at.row = c(1, 2), row.side = "top", linewidth = 3, linetype = 1) %>% + tab_add_hline(at.row = c(7), row.side = "bottom", linewidth = 3, linetype = 1) %>% + tab_add_vline(at.column = 2:tab_ncol(tab), column.side = "left", from.row = 2, linetype = 2)
    +# Add borders to table body and header +# Cross out some cells +tab %>% + tbody_add_border() %>% + thead_add_border() %>% + tab_cell_crossout( + row = c(2, 4), column = 3, linecolor = "red", + reduce.size.by = 0.6 + )
    +# Add titles andd footnote +# ::::::::::::::::::::::::::::::::::::::::::::::::::: +# Add titles and footnote +# Wrap subtitle into multiple lines using strwrap() +main.title <- "Edgar Anderson's Iris Data" +subtitle <- paste0( +"This famous (Fisher's or Anderson's) iris data set gives the measurements", +" in centimeters of the variables sepal length and width and petal length and width,", + " respectively, for 50 flowers from each of 3 species of iris.", + " The species are Iris setosa, versicolor, and virginica." +) %>% + strwrap(width = 80) %>% + paste(collapse = "\n") + +tab <- ggtexttable(head(iris), theme = ttheme("light")) +tab %>% + tab_add_title(text = subtitle, face = "plain", size = 10) %>% + tab_add_title(text = main.title, face = "bold", padding = unit(0.1, "line")) %>% + tab_add_footnote(text = "*Table created using ggpubr", size = 10, face = "italic")
    # Combine density plot and summary table #::::::::::::::::::::::::::::::::::::: @@ -366,19 +608,13 @@

    Examp # Arrange the plots on the same page ggarrange(density.p, stable.p, ncol = 1, nrow = 2, - heights = c(1, 0.5))

    + heights = c(1, 0.5))
    - @@ -389,7 +625,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/ggviolin-6.png b/docs/reference/ggviolin-6.png index bf0a7660..fe79253c 100644 Binary files a/docs/reference/ggviolin-6.png and b/docs/reference/ggviolin-6.png differ diff --git a/docs/reference/ggviolin-7.png b/docs/reference/ggviolin-7.png index 9fdde3ab..72a887bb 100644 Binary files a/docs/reference/ggviolin-7.png and b/docs/reference/ggviolin-7.png differ diff --git a/docs/reference/ggviolin.html b/docs/reference/ggviolin.html index 34587d5c..b60af41c 100644 --- a/docs/reference/ggviolin.html +++ b/docs/reference/ggviolin.html @@ -8,23 +8,29 @@ Violin plot — ggviolin • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,12 +40,12 @@ - + - + @@ -56,7 +62,7 @@ - +
    @@ -89,9 +95,13 @@ Changelog -
    @@ -106,16 +116,14 @@
    -

    Create a violin plot with error bars. Violin plots are similar to box plots, except that they also show the kernel probability density of the data at different values.

    -
    ggviolin(
    @@ -154,7 +162,7 @@ 

    Violin plot

    ggtheme = theme_pubr(), ... )
    - +

    Arguments

    @@ -277,8 +285,9 @@

    Arg

    +"mean_ci", "mean_range", "median", "median_iqr", "median_hilow", +"median_q1q3", "median_mad", "median_range"; see ?desc_statby for more +details.

    @@ -351,7 +360,7 @@

    Arg facet.

    character vector for adding another plot element (e.g.: dot plot or error bars). Allowed values are one or the combination of: "none", "dotplot", "jitter", "boxplot", "point", "mean", "mean_se", "mean_sd", -"mean_ci", "mean_range", "median", "median_iqr", "median_mad", -"median_range"; see ?desc_statby for more details.

    add.params
    - +

    Details

    The plot can be easily customized using the function ggpar(). Read @@ -369,11 +378,9 @@

    Details c("vertical", "horizontal", "reverse")

    -

    See also

    ggpar

    -

    Examples

    # Load data @@ -429,18 +436,10 @@

    Examp palette = c("#00AFBB", "#E7B800"), add = "boxplot")

    - @@ -451,7 +450,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/gradient_color.html b/docs/reference/gradient_color.html index 36a1352b..f60fef61 100644 --- a/docs/reference/gradient_color.html +++ b/docs/reference/gradient_color.html @@ -8,23 +8,29 @@ Set Gradient Color — gradient_color • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,14 +40,14 @@ - + - + @@ -58,7 +64,7 @@ - +
    @@ -91,9 +97,13 @@ Changelog -
    @@ -108,24 +118,22 @@
    -

    Change gradient color.

    -
    gradient_color(palette)
     
     gradient_fill(palette)
    - +

    Arguments

    @@ -141,11 +149,10 @@

    Arg palette.

    - +

    See also

    set_palette.

    -

    Examples

    df <- mtcars @@ -164,16 +171,10 @@

    Examp # Use ggsci color palette p + gradient_color("npg")

    - @@ -184,7 +185,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/grids.html b/docs/reference/grids.html index 7a05aab6..e4c91bbb 100644 --- a/docs/reference/grids.html +++ b/docs/reference/grids.html @@ -8,23 +8,29 @@ Add Grids to a ggplot — grids • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,10 +40,10 @@ - + - + @@ -54,7 +60,7 @@ - +
    @@ -87,9 +93,13 @@ Changelog -
    @@ -104,18 +114,16 @@
    -

    Add grids to ggplot.

    -
    grids(axis = c("xy", "x", "y"), color = "grey92", size = NULL, linetype = NULL)
    - +

    Arguments

    @@ -137,7 +145,7 @@

    Arg dotted, dotdash, longdash, twodash). Sess show_line_types.

    - +

    Examples

    # Load data @@ -149,14 +157,10 @@

    Examp # Add border p + grids(linetype = "dashed")

    - @@ -167,7 +171,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/index.html b/docs/reference/index.html index 05260211..f7484059 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -8,23 +8,29 @@ Function reference • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,10 +40,12 @@ + + @@ -51,7 +59,7 @@ - +
    @@ -84,9 +92,13 @@ Changelog -
    @@ -118,6 +130,11 @@

    Visualize distributions.

    + + + + + @@ -156,6 +173,11 @@

    Visualize data distributions by groups.

    + + + + + @@ -230,6 +252,11 @@

    Scatter plots

    + + + + + @@ -251,7 +278,7 @@

    ggscatterhist()

    +

    ggscatterhist() print(<ggscatterhist>)

    Scatter Plot with Marginal Histograms

    @@ -262,6 +289,11 @@

    Paired data

    + + + + + @@ -276,6 +308,11 @@

    + + + + + @@ -308,10 +345,15 @@

    + + + + + -

    ggtexttable() ttheme() colnames_style() rownames_style() tbody_style() table_cell_font() table_cell_bg()

    +

    ggtexttable() ttheme() colnames_style() rownames_style() tbody_style() table_cell_font() table_cell_bg() tab_cell_crossout() tab_ncol() tab_nrow() tab_add_hline() tab_add_vline() tab_add_border() tbody_add_border() thead_add_border() tab_add_title() tab_add_footnote()

    Draw a Textual Table

    @@ -334,6 +376,11 @@

    + + + + + @@ -348,6 +395,11 @@

    Plotting data obtained from genomic data analyses.

    + + + + + @@ -362,6 +414,11 @@

    + + + + + @@ -382,6 +439,11 @@

    Change graphical parameters such as, titles, legend, colors, axis limits, scale transformation (log, sqrt), axis ticks and plot orientation (vertical, horizontal).

    + + + + + @@ -462,6 +524,12 @@

    get_breaks()

    + +

    Easy Break Creation for Numeric Axes

    + +

    get_legend()

    @@ -474,6 +542,11 @@

    + + + + + @@ -499,6 +572,31 @@

    +

    Make Programming Easy with GGPlot2

    +

    + + + + + + + + + + +

    geom_exec()

    + +

    Execute ggplot2 functions

    + + + +

    create_aes()

    + +

    Create Aes Mapping from a List

    + @@ -506,6 +604,11 @@

    + + + + + @@ -515,7 +618,7 @@

    add_summary() mean_se_() mean_sd() mean_ci() mean_range() median_iqr() median_mad() median_range()

    +

    add_summary() mean_se_() mean_sd() mean_ci() mean_range() median_iqr() median_hilow_() median_q1q3() median_mad() median_range()

    Add Summary Statistics onto a ggplot.

    @@ -544,6 +647,11 @@

    <

    + + + + + @@ -564,6 +672,11 @@

    + + + + + @@ -605,24 +718,10 @@

    -

    Contents

    -
    + @@ -633,7 +732,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/pipe.html b/docs/reference/pipe.html new file mode 100644 index 00000000..8d843469 --- /dev/null +++ b/docs/reference/pipe.html @@ -0,0 +1,156 @@ + + + + + + + + +Pipe operator — %>% • ggpubr + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + +
    + +
    +
    + + +
    +

    See magrittr::%>% for details.

    +
    + +
    lhs %>% rhs
    + + + +
    + +
    + + +
    + + +
    +

    Site built with pkgdown 1.5.1.

    +
    + +
    +
    + + + + + + + + diff --git a/docs/reference/reexports.html b/docs/reference/reexports.html index 6279ac62..6051333e 100644 --- a/docs/reference/reexports.html +++ b/docs/reference/reexports.html @@ -8,23 +8,29 @@ Objects exported from other packages — reexports • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,21 +40,17 @@ - + - + @@ -65,7 +67,7 @@ - +
    @@ -98,9 +100,13 @@ Changelog -
    @@ -115,35 +121,29 @@
    -

    These objects are imported from other packages. Follow the links below to see their documentation.

    -
    +
    dplyr

    group_by, mutate

    -
    ggsignif

    geom_signif

    - -
    magrittr

    %>%

    -
    rstatix

    get_summary_stats

    -
    - -
    - + @@ -154,7 +154,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/rotate.html b/docs/reference/rotate.html index bdd0367d..368a4529 100644 --- a/docs/reference/rotate.html +++ b/docs/reference/rotate.html @@ -8,23 +8,29 @@ Rotate a ggplot Horizontally — rotate • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,11 +40,11 @@ - + - + @@ -55,7 +61,7 @@ - +
    @@ -88,9 +94,13 @@ Changelog -
    @@ -105,19 +115,17 @@
    -

    Rotate a ggplot to create horizontal plots. Wrapper around coord_flip.

    -
    rotate(...)
    - +

    Arguments

    @@ -126,7 +134,7 @@

    Arg

    other arguments to pass to coord_flip.

    - +

    Examples

    # Load data @@ -139,14 +147,10 @@

    Examp p

    # Create horizontal plots p + rotate()
    - @@ -157,7 +161,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/rotate_axis_text.html b/docs/reference/rotate_axis_text.html index c2d51c5c..fc4d75b7 100644 --- a/docs/reference/rotate_axis_text.html +++ b/docs/reference/rotate_axis_text.html @@ -8,23 +8,29 @@ Rotate Axes Text — rotate_axis_text • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,14 +40,14 @@ - + - + @@ -58,7 +64,7 @@ - +
    @@ -91,9 +97,13 @@ Changelog -
    @@ -108,24 +118,22 @@
    -

    Rotate the x-axis text (tick mark labels).

    • rotate_x_text(): Rotate x axis text.

    • rotate_y_text(): Rotate y axis text.

    -
    rotate_x_text(angle = 90, hjust = NULL, vjust = NULL, ...)
     
     rotate_y_text(angle = 90, hjust = NULL, vjust = NULL, ...)
    - +

    Arguments

    @@ -144,10 +152,10 @@

    Arg

    +element_text().

    ...

    other arguments to pass to the function -element_text().

    - +

    Examples

    # Load data @@ -161,14 +169,10 @@

    Examp p + rotate_x_text(45)

    p + rotate_y_text(45)
    - @@ -179,7 +183,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/rremove.html b/docs/reference/rremove.html index f1e5451d..69b4238e 100644 --- a/docs/reference/rremove.html +++ b/docs/reference/rremove.html @@ -8,23 +8,29 @@ Remove a ggplot Component — rremove • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,10 +40,10 @@ - + - + @@ -54,7 +60,7 @@ - +
    @@ -87,9 +93,13 @@ Changelog -
    @@ -104,18 +114,16 @@
    -

    Remove a specific component from a ggplot.

    -
    rremove(object)
    - +

    Arguments

    @@ -145,7 +153,7 @@

    Arg

    - +

    Examples

    # Load data @@ -160,14 +168,10 @@

    Examp # Remove only x grids p + rremove("x.grid")

    - @@ -178,7 +182,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/set_palette.html b/docs/reference/set_palette.html index 20dd9eac..35be4621 100644 --- a/docs/reference/set_palette.html +++ b/docs/reference/set_palette.html @@ -8,23 +8,29 @@ Set Color Palette — set_palette • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,8 +40,8 @@ - + - + @@ -62,7 +68,7 @@ - +
    @@ -95,9 +101,13 @@ Changelog -
    @@ -112,13 +122,12 @@
    -
    • change_palette(), set_palette(): Change both color and fill palettes.

    • @@ -127,7 +136,6 @@

      Set Color Palette

    • fill_palette(): change fill palette only.

    -
    set_palette(p, palette)
    @@ -137,7 +145,7 @@ 

    Set Color Palette

    color_palette(palette = NULL, ...) fill_palette(palette = NULL, ...)
    - +

    Arguments

    @@ -165,11 +173,10 @@

    Arg scale_fill_xxx() functions.

    - +

    See also

    -

    Examples

    # Load data @@ -183,16 +190,10 @@

    Examp # Change the color palette set_palette(p, "jco")

    - @@ -203,7 +204,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/show_line_types.html b/docs/reference/show_line_types.html index 2cd08237..2f1bfecf 100644 --- a/docs/reference/show_line_types.html +++ b/docs/reference/show_line_types.html @@ -8,23 +8,29 @@ Line types available in R — show_line_types • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,10 +40,10 @@ - + - + @@ -54,7 +60,7 @@ - +
    @@ -87,9 +93,13 @@ Changelog -
    @@ -104,42 +114,32 @@
    -

    Show line types available in R.

    -
    show_line_types()
    - + +

    Value

    a ggplot.

    -

    See also

    -

    Examples

    show_line_types()+ theme_minimal()
    - @@ -150,7 +150,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/show_point_shapes.html b/docs/reference/show_point_shapes.html index d77cd54c..e3f03d99 100644 --- a/docs/reference/show_point_shapes.html +++ b/docs/reference/show_point_shapes.html @@ -8,23 +8,29 @@ Point shapes available in R — show_point_shapes • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,10 +40,10 @@ - + - + @@ -54,7 +60,7 @@ - +
    @@ -87,9 +93,13 @@ Changelog -
    @@ -104,43 +114,33 @@
    -

    Show point shapes available in R.

    -
    show_point_shapes()
    - + +

    Value

    a ggplot.

    -

    See also

    -

    Examples

    show_point_shapes()+ theme_minimal()
    #> Scale for 'y' is already present. Adding another scale for 'y', which will #> replace the existing scale.
    - @@ -151,7 +151,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/stat_central_tendency.html b/docs/reference/stat_central_tendency.html index 718fd7b9..4e1a55a7 100644 --- a/docs/reference/stat_central_tendency.html +++ b/docs/reference/stat_central_tendency.html @@ -8,23 +8,29 @@ Add Central Tendency Measures to a GGPLot — stat_central_tendency • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,8 +40,8 @@ - + - + @@ -61,7 +67,7 @@ - +
    @@ -94,9 +100,13 @@ Changelog -
    @@ -111,12 +121,11 @@
    -

    Add central tendency measures (mean, median, mode) to density and histogram plots created using ggplots.

    Note that, normally, the mode is used for categorical data where we wish to @@ -125,7 +134,6 @@

    Add Central Tendency Measures to a GGPLot

    continuous variable.

    For continuous variable, we can consider using mean or median as the measures of the central tendency.

    -
    stat_central_tendency(
    @@ -139,7 +147,7 @@ 

    Add Central Tendency Measures to a GGPLot

    type = c("mean", "median", "mode"), ... )
    - +

    Arguments

    @@ -203,11 +211,10 @@

    Arg

    other arguments to pass to geom_line.

    - +

    See also

    -

    Examples

    # Simple density plot @@ -232,16 +239,10 @@

    Examp stat_central_tendency(type = "median", color = "blue", linetype = 2)

    - @@ -252,7 +253,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/stat_chull.html b/docs/reference/stat_chull.html index ff61e79f..2606794b 100644 --- a/docs/reference/stat_chull.html +++ b/docs/reference/stat_chull.html @@ -8,23 +8,29 @@ Plot convex hull of a set of points — stat_chull • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,10 +40,10 @@ - + - + @@ -54,7 +60,7 @@ - +
    @@ -87,9 +93,13 @@ Changelog -
    @@ -104,14 +114,12 @@
    -

    Plot convex hull of a set of points.

    -
    stat_chull(
    @@ -124,7 +132,7 @@ 

    Plot convex hull of a set of points

    inherit.aes = TRUE, ... )
    - +

    Arguments

    @@ -186,11 +194,10 @@

    Arg to the paired geom/stat.

    - +

    See also

    -

    Examples

    # Load data @@ -205,16 +212,10 @@

    Examp stat_chull(aes(color = cyl, fill = cyl), alpha = 0.1, geom = "polygon")

    - @@ -225,7 +226,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/stat_compare_means-1.png b/docs/reference/stat_compare_means-1.png index 5e66fc94..9fd4d2f5 100644 Binary files a/docs/reference/stat_compare_means-1.png and b/docs/reference/stat_compare_means-1.png differ diff --git a/docs/reference/stat_compare_means-2.png b/docs/reference/stat_compare_means-2.png index 7e351923..c53c971b 100644 Binary files a/docs/reference/stat_compare_means-2.png and b/docs/reference/stat_compare_means-2.png differ diff --git a/docs/reference/stat_compare_means-4.png b/docs/reference/stat_compare_means-4.png index 8eb5e77e..c0f466a5 100644 Binary files a/docs/reference/stat_compare_means-4.png and b/docs/reference/stat_compare_means-4.png differ diff --git a/docs/reference/stat_compare_means-6.png b/docs/reference/stat_compare_means-6.png index 16aed27a..9bf286eb 100644 Binary files a/docs/reference/stat_compare_means-6.png and b/docs/reference/stat_compare_means-6.png differ diff --git a/docs/reference/stat_compare_means.html b/docs/reference/stat_compare_means.html index 7d66d8ad..fbf1dd64 100644 --- a/docs/reference/stat_compare_means.html +++ b/docs/reference/stat_compare_means.html @@ -8,23 +8,29 @@ Add Mean Comparison P-values to a ggplot — stat_compare_means • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,11 +40,11 @@ - + - + @@ -55,7 +61,7 @@ - +
    @@ -88,9 +94,13 @@ Changelog -
    @@ -105,15 +115,13 @@
    -

    Add mean comparison p-values to a ggplot, such as box blots, dot plots and stripcharts.

    -
    stat_compare_means(
    @@ -143,7 +151,7 @@ 

    Add Mean Comparison P-values to a ggplot

    inherit.aes = TRUE, ... )
    - +

    Arguments

    @@ -304,11 +312,10 @@

    Arg geom_label.

    - +

    See also

    -

    Examples

    # Load data @@ -362,16 +369,10 @@

    Examp )

    - @@ -382,7 +383,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/stat_conf_ellipse.html b/docs/reference/stat_conf_ellipse.html index 340a12d8..4c1c7269 100644 --- a/docs/reference/stat_conf_ellipse.html +++ b/docs/reference/stat_conf_ellipse.html @@ -8,23 +8,29 @@ Plot confidence ellipses. — stat_conf_ellipse • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,11 +40,11 @@ - + - + computing confidence ellipses has been modified from FactoMineR::coord.ellipse()." /> + @@ -55,7 +61,7 @@ - +
    @@ -88,9 +94,13 @@ Changelog -
    @@ -105,15 +115,13 @@
    -

    Plot confidence ellipses around barycenters. The method for - computing confidence ellipses has been modified from FactoMineR::coord.ellipse.

    - + computing confidence ellipses has been modified from FactoMineR::coord.ellipse().

    stat_conf_ellipse(
    @@ -129,7 +137,7 @@ 

    Plot confidence ellipses.

    bary = TRUE, ... )
    - +

    Arguments

    @@ -205,11 +213,10 @@

    Arg to the paired geom/stat.

    - +

    See also

    stat_conf_ellipse

    -

    Examples

    # Load data @@ -224,16 +231,10 @@

    Examp stat_conf_ellipse(aes(color = cyl, fill = cyl), alpha = 0.1, geom = "polygon")

    - @@ -244,7 +245,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/stat_cor-1.png b/docs/reference/stat_cor-1.png index 265b71d7..78664cb9 100644 Binary files a/docs/reference/stat_cor-1.png and b/docs/reference/stat_cor-1.png differ diff --git a/docs/reference/stat_cor-2.png b/docs/reference/stat_cor-2.png index b5f85819..5dc854ea 100644 Binary files a/docs/reference/stat_cor-2.png and b/docs/reference/stat_cor-2.png differ diff --git a/docs/reference/stat_cor-3.png b/docs/reference/stat_cor-3.png index 0539e78b..ed27b3d4 100644 Binary files a/docs/reference/stat_cor-3.png and b/docs/reference/stat_cor-3.png differ diff --git a/docs/reference/stat_cor-4.png b/docs/reference/stat_cor-4.png new file mode 100644 index 00000000..b5f85819 Binary files /dev/null and b/docs/reference/stat_cor-4.png differ diff --git a/docs/reference/stat_cor-5.png b/docs/reference/stat_cor-5.png new file mode 100644 index 00000000..b9887679 Binary files /dev/null and b/docs/reference/stat_cor-5.png differ diff --git a/docs/reference/stat_cor.html b/docs/reference/stat_cor.html index 4abd7dc0..e8906478 100644 --- a/docs/reference/stat_cor.html +++ b/docs/reference/stat_cor.html @@ -8,23 +8,29 @@ Add Correlation Coefficients with P-values to a Scatter Plot — stat_cor • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,11 +40,11 @@ - + - + @@ -55,7 +61,7 @@ - +
    @@ -88,9 +94,13 @@ Changelog -
    @@ -105,21 +115,20 @@
    -

    Add correlation coefficients with p-values to a scatter plot. Can be also used to add `R2`.

    -
    stat_cor(
       mapping = NULL,
       data = NULL,
       method = "pearson",
    +  alternative = "two.sided",
       cor.coef.name = c("R", "rho", "tau"),
       label.sep = ", ",
       label.x.npc = "left",
    @@ -130,6 +139,8 @@ 

    Add Correlation Coefficients with P-values to a Scatter Plot

    digits = 2, r.digits = digits, p.digits = digits, + r.accuracy = NULL, + p.accuracy = NULL, geom = "text", position = "identity", na.rm = FALSE, @@ -137,7 +148,7 @@

    Add Correlation Coefficients with P-values to a Scatter Plot

    inherit.aes = TRUE, ... )
    - +

    Arguments

    @@ -167,12 +178,18 @@

    Arg

    + + + + +"rho" (spearman coef) and "tau" (kendall coef). Uppercase and +lowercase are allowed.

    @@ -202,12 +219,26 @@

    Arg

    - + - + + + + + + + + + @@ -244,11 +275,20 @@

    Arg geom_label.

    a character string indicating which correlation coefficient (or covariance) is to be computed. One of "pearson" (default), "kendall", or "spearman".

    alternative

    a character string specifying the alternative hypothesis, +must be one of "two.sided" (default), "greater" or "less". You can specify +just the initial letter.

    cor.coef.name

    character. Can be one of "R" (pearson coef), -"rho" (spearman coef) and "tau" (kendall coef). -Uppercase and lowercase are allowed.

    label.sep
    output.type

    character One of "expression", "latex" or "text".

    character One of "expression", "latex", "tex" or "text".

    digits, r.digits, p.digits

    integer indicating the number of decimal places (round) or -significant digits (signif) to be used for the correlation coefficient and the p-value, respectively..

    integer indicating the number of decimal +places (round) or significant digits (signif) to be used for the correlation +coefficient and the p-value, respectively..

    r.accuracy

    a real value specifying the number of decimal places of +precision for the correlation coefficient. Default is NULL. Use (e.g.) 0.01 +to show 2 decimal places of precision. If specified, then r.digits is +ignored.

    p.accuracy

    a real value specifying the number of decimal places of +precision for the p-value. Default is NULL. Use (e.g.) 0.0001 to show 4 +decimal places of precision. If specified, then p.digits is ignored.

    geom
    - + +

    Computed variables

    + +

    +
    r

    correlation coefficient

    +
    rr

    correlation coefficient squared

    r.label

    formatted label + for the correlation coefficient

    rr.label

    formatted label for the + squared correlation coefficient

    p.label

    label for the p-value

    +
    label

    default labeldisplayed by stat_cor()

    + +

    See also

    -

    Examples

    # Load data @@ -265,30 +305,30 @@

    Examp ) # Add correlation coefficient sp + stat_cor(method = "pearson", label.x = 3, label.y = 30)

    #> `geom_smooth()` using formula 'y ~ x'
    +# Specify the number of decimal places of precision for p and r +# Using 3 decimal places for the p-value and +# 2 decimal places for the correlation coefficient (r) +sp + stat_cor(p.accuracy = 0.001, r.accuracy = 0.01)
    #> `geom_smooth()` using formula 'y ~ x'
    +# Show only the r.label but not the p.label +sp + stat_cor(aes(label = ..r.label..), label.x = 3)
    #> `geom_smooth()` using formula 'y ~ x'
    # Use R2 instead of R ggscatter(df, x = "wt", y = "mpg", add = "reg.line") + stat_cor( aes(label = paste(..rr.label.., ..p.label.., sep = "~`,`~")), label.x = 3 -)
    #> `geom_smooth()` using formula 'y ~ x'
    +)
    #> `geom_smooth()` using formula 'y ~ x'
    # Color by groups and facet #:::::::::::::::::::::::::::::::::::::::::::::::::::: sp <- ggscatter(df, x = "wt", y = "mpg", color = "cyl", palette = "jco", add = "reg.line", conf.int = TRUE) -sp + stat_cor(aes(color = cyl), label.x = 3)
    #> `geom_smooth()` using formula 'y ~ x'
    +sp + stat_cor(aes(color = cyl), label.x = 3)
    #> `geom_smooth()` using formula 'y ~ x'
    - @@ -299,7 +339,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/stat_mean.html b/docs/reference/stat_mean.html index fe4bc581..8c8cdf91 100644 --- a/docs/reference/stat_mean.html +++ b/docs/reference/stat_mean.html @@ -8,23 +8,29 @@ Draw group mean points — stat_mean • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,10 +40,10 @@ - + - + @@ -54,7 +60,7 @@ - +
    @@ -87,9 +93,13 @@ Changelog -
    @@ -104,14 +114,12 @@
    -

    Draw the mean point of each group.

    -
    stat_mean(
    @@ -124,7 +132,7 @@ 

    Draw group mean points

    inherit.aes = TRUE, ... )
    - +

    Arguments

    @@ -183,12 +191,11 @@

    Arg

    other arguments to pass to geom_point.

    - +

    See also

    stat_conf_ellipse, stat_chull and ggscatter

    -

    Examples

    # Load data @@ -202,16 +209,10 @@

    Examp stat_mean(aes(color = cyl, shape = cyl), size = 4)

    - @@ -222,7 +223,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/stat_overlay_normal_density.html b/docs/reference/stat_overlay_normal_density.html index c285bd32..cf86ed0d 100644 --- a/docs/reference/stat_overlay_normal_density.html +++ b/docs/reference/stat_overlay_normal_density.html @@ -8,23 +8,29 @@ Overlay Normal Density Plot — stat_overlay_normal_density • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,12 +40,12 @@ - + - + @@ -56,7 +62,7 @@ - +
    @@ -89,9 +95,13 @@ Changelog -
    @@ -106,16 +116,14 @@
    -

    Overlay normal density plot (with the same mean and SD) to the density distribution of 'x'. This is useful for visually inspecting the degree of deviance from normality.

    -
    stat_overlay_normal_density(
    @@ -128,7 +136,7 @@ 

    Overlay Normal Density Plot

    inherit.aes = TRUE, ... )
    - +

    Arguments

    @@ -187,11 +195,10 @@

    Arg

    other arguments to pass to geom_line.

    - +

    See also

    ggdensity

    -

    Examples

    # Simpledensity plot @@ -209,16 +216,10 @@

    Examp stat_overlay_normal_density(color = "red", linetype = "dashed")

    - @@ -229,7 +230,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/stat_pvalue_manual-4.png b/docs/reference/stat_pvalue_manual-4.png index 16c3c66d..c8cbb5bb 100644 Binary files a/docs/reference/stat_pvalue_manual-4.png and b/docs/reference/stat_pvalue_manual-4.png differ diff --git a/docs/reference/stat_pvalue_manual.html b/docs/reference/stat_pvalue_manual.html index e6d083df..23e68dcb 100644 --- a/docs/reference/stat_pvalue_manual.html +++ b/docs/reference/stat_pvalue_manual.html @@ -8,23 +8,29 @@ Add Manually P-values to a ggplot — stat_pvalue_manual • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,11 +40,20 @@ - + - + and stripcharts. Frequently asked questions are available on Datanovia ggpubr FAQ page, for example: +How to Add P-Values onto Basic GGPLOTS +How to Add Adjusted P-values to a Multi-Panel GGPlot +How to Add P-values to GGPLOT Facets +How to Add P-Values Generated Elsewhere to a GGPLOT +How to Add P-Values onto a Grouped GGPLOT using the GGPUBR R Package +How to Create Stacked Bar Plots with Error Bars and P-values +How to Add P-Values onto Horizontal GGPLOTS + +" /> + @@ -55,7 +70,7 @@ - +
    @@ -88,9 +103,13 @@ Changelog -
    @@ -105,15 +124,22 @@
    -

    Add manually p-values to a ggplot, such as box blots, dot plots - and stripcharts.

    - + and stripcharts. Frequently asked questions are available on Datanovia ggpubr FAQ page, for example:

    +
    stat_pvalue_manual(
    @@ -126,6 +152,8 @@ 

    Add Manually P-values to a ggplot

    size = 3.88, label.size = size, bracket.size = 0.3, + bracket.nudge.y = 0, + bracket.shorten = 0, color = "black", linetype = 1, tip.length = 0.03, @@ -134,10 +162,11 @@

    Add Manually P-values to a ggplot

    step.group.by = NULL, hide.ns = FALSE, vjust = 0, + coord.flip = FALSE, position = "identity", ... )
    - +

    Arguments

    @@ -187,6 +216,17 @@

    Arg

    + + + + + + + + @@ -226,6 +266,14 @@

    Arg

    + + + + @@ -238,11 +286,10 @@

    Arg geom_text()

    bracket.size

    Width of the lines of the bracket.

    bracket.nudge.y

    Vertical adjustment to nudge brackets by. Useful to +move up or move down the bracket. If positive value, brackets will be moved +up; if negative value, brackets are moved down.

    bracket.shorten

    a small numeric value in [0-1] for shortening the with +of bracket.

    color

    text and line color. Can be variable name in the data for coloring by groups.

    vjust

    move the text up or down relative to the bracket. Can be also a column name available in the data.

    coord.flip

    logical. If TRUE, flip x and y coordinates so that +horizontal becomes vertical, and vertical, horizontal. When adding the +p-values to a horizontal ggplot (generated using +coord_flip()), you need to specify the option +coord.flip = TRUE.

    position
    - +

    See also

    stat_compare_means

    -

    Examples

    @@ -251,12 +298,12 @@

    Examp len ~ dose, data = ToothGrowth, method = "t.test" ) -stat.test

    #> # A tibble: 3 x 8 +stat.test
    #> # A tibble: 3 x 8 #> .y. group1 group2 p p.adj p.format p.signif method -#> <chr> <chr> <chr> <dbl> <dbl> <chr> <chr> <chr> -#> 1 len 0.5 1 1.27e- 7 2.50e- 7 1.3e-07 **** T-test -#> 2 len 0.5 2 4.40e-14 1.30e-13 4.4e-14 **** T-test -#> 3 len 1 2 1.91e- 5 1.90e- 5 1.9e-05 **** T-test
    +#> <chr> <chr> <chr> <dbl> <dbl> <chr> <chr> <chr> +#> 1 len 0.5 1 1.27e- 7 2.50e- 7 1.3e-07 **** T-test +#> 2 len 0.5 2 4.40e-14 1.30e-13 4.4e-14 **** T-test +#> 3 len 1 2 1.91e- 5 1.90e- 5 1.9e-05 **** T-test
    # Create a simple box plot p <- ggboxplot(ToothGrowth, x = "dose", y = "len") p
    @@ -265,12 +312,12 @@

    Examp len ~ dose, data = ToothGrowth, method = "t.test" ) -stat.test

    #> # A tibble: 3 x 8 +stat.test
    #> # A tibble: 3 x 8 #> .y. group1 group2 p p.adj p.format p.signif method -#> <chr> <chr> <chr> <dbl> <dbl> <chr> <chr> <chr> -#> 1 len 0.5 1 1.27e- 7 2.50e- 7 1.3e-07 **** T-test -#> 2 len 0.5 2 4.40e-14 1.30e-13 4.4e-14 **** T-test -#> 3 len 1 2 1.91e- 5 1.90e- 5 1.9e-05 **** T-test
    +#> <chr> <chr> <chr> <dbl> <dbl> <chr> <chr> <chr> +#> 1 len 0.5 1 1.27e- 7 2.50e- 7 1.3e-07 **** T-test +#> 2 len 0.5 2 4.40e-14 1.30e-13 4.4e-14 **** T-test +#> 3 len 1 2 1.91e- 5 1.90e- 5 1.9e-05 **** T-test
    # Add manually p-values from stat.test data # First specify the y.position of each comparison stat.test <- stat.test %>% @@ -288,13 +335,13 @@

    Examp len ~ dose, data = ToothGrowth, group.by = "supp", method = "t.test", ref.group = "0.5" ) -stat.test

    #> # A tibble: 4 x 9 +stat.test
    #> # A tibble: 4 x 9 #> supp .y. group1 group2 p p.adj p.format p.signif method -#> <fct> <chr> <chr> <chr> <dbl> <dbl> <chr> <chr> <chr> -#> 1 VC len 0.5 1 0.000000681 0.000002 6.8e-07 **** T-test -#> 2 VC len 0.5 2 0.0000000468 0.00000019 4.7e-08 **** T-test -#> 3 OJ len 0.5 1 0.0000878 0.000088 8.8e-05 **** T-test -#> 4 OJ len 0.5 2 0.00000132 0.0000026 1.3e-06 **** T-test
    # Plot +#> <fct> <chr> <chr> <chr> <dbl> <dbl> <chr> <chr> <chr> +#> 1 VC len 0.5 1 0.000000681 0.000002 6.8e-07 **** T-test +#> 2 VC len 0.5 2 0.0000000468 0.00000019 4.7e-08 **** T-test +#> 3 OJ len 0.5 1 0.0000878 0.000088 8.8e-05 **** T-test +#> 4 OJ len 0.5 2 0.00000132 0.0000026 1.3e-06 **** T-test
    # Plot bp <- ggbarplot(ToothGrowth, x = "supp", y = "len", fill = "dose", palette = "jco", add = "mean_sd", add.params = list(group = "dose"), @@ -304,18 +351,12 @@

    Examp label = "p.signif", position = position_dodge(0.8) )

    -
    +
    - @@ -326,7 +367,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/stat_regline_equation-1.png b/docs/reference/stat_regline_equation-1.png index b297124d..cf375782 100644 Binary files a/docs/reference/stat_regline_equation-1.png and b/docs/reference/stat_regline_equation-1.png differ diff --git a/docs/reference/stat_regline_equation-2.png b/docs/reference/stat_regline_equation-2.png index 109178b9..07ebde14 100644 Binary files a/docs/reference/stat_regline_equation-2.png and b/docs/reference/stat_regline_equation-2.png differ diff --git a/docs/reference/stat_regline_equation.html b/docs/reference/stat_regline_equation.html index 4456f059..46185db8 100644 --- a/docs/reference/stat_regline_equation.html +++ b/docs/reference/stat_regline_equation.html @@ -8,23 +8,29 @@ Add Regression Line Equation and R-Square to a GGPLOT. — stat_regline_equation • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,11 +40,11 @@ - + - + @@ -55,7 +61,7 @@ - +
    @@ -88,9 +94,13 @@ Changelog -
    @@ -105,15 +115,13 @@
    -

    Add regression line equation and R^2 to a ggplot. Regression model is fitted using the function lm.

    -
    stat_regline_equation(
    @@ -132,7 +140,7 @@ 

    Add Regression Line Equation and R-Square to a GGPLOT.

    inherit.aes = TRUE, ... )
    - +

    Arguments

    @@ -221,12 +229,12 @@

    Arg geom_label.

    - +

    Computed variables

    -

    +

    x

    x position for left edge

    y

    y position near upper edge

    eq.label

    equation for the @@ -239,17 +247,14 @@

    -

    References

    the source code of the function stat_regline_equation() is inspired from the code of the function stat_poly_eq() (in ggpmisc package).

    -

    See also

    ggscatter

    -

    Examples

    @@ -293,20 +298,10 @@

    Examp ggpar(p, palette = "jco")

    - @@ -317,7 +312,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/stat_stars.html b/docs/reference/stat_stars.html index a9e0e364..267c8dfb 100644 --- a/docs/reference/stat_stars.html +++ b/docs/reference/stat_stars.html @@ -8,23 +8,29 @@ Add Stars to a Scatter Plot — stat_stars • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,10 +40,10 @@ - + - + @@ -54,7 +60,7 @@ - +
    @@ -87,9 +93,13 @@ Changelog -
    @@ -104,14 +114,12 @@
    -

    Create a star plot by drawing segments from group centroid to each points.

    -
    stat_stars(
    @@ -124,7 +132,7 @@ 

    Add Stars to a Scatter Plot

    inherit.aes = TRUE, ... )
    - +

    Arguments

    @@ -183,11 +191,10 @@

    Arg

    other arguments to pass to geom_segment.

    - +

    See also

    ggscatter

    -

    Examples

    # Load data @@ -202,16 +209,10 @@

    Examp stat_stars(aes(color = cyl))

    - @@ -222,7 +223,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/text_grob.html b/docs/reference/text_grob.html index 72bf96be..3784e122 100644 --- a/docs/reference/text_grob.html +++ b/docs/reference/text_grob.html @@ -8,23 +8,29 @@ Create a Text Graphical object — text_grob • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,11 +40,11 @@ - + - + @@ -55,7 +61,7 @@ - +
    @@ -88,9 +94,13 @@ Changelog -
    @@ -105,15 +115,13 @@
    -

    Create easily a customized text grob (graphical object). Wrapper around textGrob.

    -
    text_grob(
    @@ -129,7 +137,7 @@ 

    Create a Text Graphical object

    family = NULL, ... )
    - +

    Arguments

    @@ -145,8 +153,8 @@

    Arg value specifies horizontal justification and the second value specifies vertical justification. Possible string values are: "left", "right", "centre", "center", "bottom", - and "top". For numeric values, 0 means left alignment - and 1 means right alignment.

    + and "top". For numeric values, 0 means left (bottom) alignment + and 1 means right (top) alignment.

    @@ -188,11 +196,10 @@

    Arg

    hjust

    other arguments passed to textGrob.

    - +

    Value

    a text grob.

    -

    Examples

    text <- paste("iris data set gives the measurements in cm", @@ -207,16 +214,10 @@

    Examp as_ggplot(tgrob)

    - @@ -227,7 +228,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/theme_pubr.html b/docs/reference/theme_pubr.html index f29a0fca..933304c1 100644 --- a/docs/reference/theme_pubr.html +++ b/docs/reference/theme_pubr.html @@ -8,23 +8,29 @@ Publication ready theme — theme_pubr • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,8 +40,8 @@ - + - + @@ -69,7 +75,7 @@ - +
    @@ -102,9 +108,13 @@ Changelog -
    @@ -119,13 +129,12 @@
    -

    .

    -
    theme_pubr(
    @@ -162,7 +170,7 @@ 

    Publication ready theme

    clean_theme() clean_table_theme()
    - +

    Arguments

    @@ -204,7 +212,7 @@

    Arg axis.

    - +

    Examples

    p <- ggplot(mtcars, aes(x = wt, y = mpg)) + @@ -218,14 +226,10 @@

    Examp p + labs_pubr()

    - @@ -236,7 +240,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/docs/reference/theme_transparent.html b/docs/reference/theme_transparent.html index 2728dbda..338fb44d 100644 --- a/docs/reference/theme_transparent.html +++ b/docs/reference/theme_transparent.html @@ -8,23 +8,29 @@ Create a ggplot with Transparent Background — theme_transparent • ggpubr + - + - - + + + + + + + - - + + - + - - + + @@ -34,10 +40,10 @@ - + - + @@ -54,7 +60,7 @@ - +
    @@ -87,9 +93,13 @@ Changelog -
    @@ -104,18 +114,16 @@
    -

    Create a ggplot with transparent background.

    -
    theme_transparent(base_size = 12, base_family = "")
    - +

    Arguments

    @@ -128,11 +136,10 @@

    Arg

    base font family

    - +

    See also

    theme_pubr

    -

    Examples

    # Create a scatter plot @@ -144,16 +151,10 @@

    Examp sp + theme_transparent()

    - @@ -164,7 +165,7 @@

    Contents

    -

    Site built with pkgdown 1.4.1.

    +

    Site built with pkgdown 1.5.1.

    diff --git a/man/annotate_figure.Rd b/man/annotate_figure.Rd index 3c26a2e6..1c444055 100644 --- a/man/annotate_figure.Rd +++ b/man/annotate_figure.Rd @@ -35,7 +35,7 @@ include: "plain", "bold", "italic", "bold.italic".} } \description{ Annotate figures including: i) ggplots, ii) arranged ggplots from - \code{\link{ggarrange}()}, \code{\link[gridExtra]{grid.arrange}()} and + \code{\link{ggarrange}()}, \code{\link[gridExtra:arrangeGrob]{grid.arrange}()} and \code{\link[cowplot]{plot_grid}()}. } \examples{ diff --git a/man/as_ggplot.Rd b/man/as_ggplot.Rd index f18e521d..93cbcd95 100644 --- a/man/as_ggplot.Rd +++ b/man/as_ggplot.Rd @@ -8,15 +8,15 @@ as_ggplot(x) } \arguments{ \item{x}{an object of class gtable or grob as returned by the functions -\code{\link[gridExtra]{arrangeGrob}()} and -\code{\link[gridExtra]{grid.arrange}()}.} +\code{\link[gridExtra:arrangeGrob]{arrangeGrob}()} and +\code{\link[gridExtra:arrangeGrob]{grid.arrange}()}.} } \value{ an object of class ggplot. } \description{ -Transform the output of \code{\link[gridExtra]{arrangeGrob}()} - and \code{\link[gridExtra]{grid.arrange}()} to a an object of class ggplot. +Transform the output of \code{\link[gridExtra:arrangeGrob]{arrangeGrob}()} + and \code{\link[gridExtra:arrangeGrob]{grid.arrange}()} to a an object of class ggplot. } \examples{ # Creat some plots diff --git a/man/font.Rd b/man/font.Rd index ab684e16..ad49ce5c 100644 --- a/man/font.Rd +++ b/man/font.Rd @@ -30,12 +30,12 @@ or \code{"axis.text"} for both x and y axis texts }} \item{family}{the font family.} \item{...}{other arguments to pass to the function -\code{\link[ggplot2]{element_text}()}.} +\code{\link[ggplot2:element]{element_text}()}.} } \description{ Change the appearance of the main title, subtitle, caption, axis labels and text, as well as the legend title and texts. Wrapper around - \code{\link[ggplot2]{element_text}()}. + \code{\link[ggplot2:element]{element_text}()}. } \examples{ # Load data diff --git a/man/geom_signif.Rd b/man/geom_signif.Rd new file mode 100644 index 00000000..f9722c9b --- /dev/null +++ b/man/geom_signif.Rd @@ -0,0 +1,9 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/utils-geom-signif.R +\name{geom_signif} +\alias{geom_signif} +\title{geom_signif exported from ggsignif package} +\description{ +See \code{ggsignif::\link[ggsignif:stat_signif]{geom_signif}} for details. +} +\keyword{internal} diff --git a/man/get_breaks.Rd b/man/get_breaks.Rd index ec837463..8ae9458f 100644 --- a/man/get_breaks.Rd +++ b/man/get_breaks.Rd @@ -22,8 +22,8 @@ a break function } \description{ Creates breaks for numeric axes to be used in the functions - \code{\link[ggplot2]{scale_x_continuous}()} and - \code{\link[ggplot2]{scale_y_continuous}()}. Can be used to increase the + \code{\link[ggplot2:scale_continuous]{scale_x_continuous}()} and + \code{\link[ggplot2:scale_continuous]{scale_y_continuous}()}. Can be used to increase the number of x and y ticks by specifying the option \code{n}. It's also possible to control axis breaks by specifying a step between ticks. For example, if \code{by = 5}, a tick mark is shown on every 5. diff --git a/man/get_palette.Rd b/man/get_palette.Rd index 4dac44af..217be56e 100644 --- a/man/get_palette.Rd +++ b/man/get_palette.Rd @@ -9,7 +9,7 @@ get_palette(palette = "default", k) \arguments{ \item{palette}{Color palette. Allowed values include: \itemize{ \item \strong{Grey color palettes}: "grey" or "gray"; \item \strong{RColorBrewer -palettes}, see \code{\link[RColorBrewer]{brewer.pal}} and details section. +palettes}, see \code{\link[RColorBrewer:ColorBrewer]{brewer.pal}} and details section. Examples of palette names include: "RdBu", "Blues", "Dark2", "Set2", ...; \item \strong{Custom color palettes}. For example, palette = c("#00AFBB", "#E7B800", "#FC4E07"); \item \strong{ggsci scientific journal palettes}, diff --git a/man/ggscatter.Rd b/man/ggscatter.Rd index bf35404a..753e52e9 100644 --- a/man/ggscatter.Rd +++ b/man/ggscatter.Rd @@ -135,7 +135,7 @@ probability.} \itemize{ \item \code{"convex"}: plot convex hull of a set o points. \item \code{"confidence"}: plot confidence ellipses arround group mean points as - \code{\link[FactoMineR]{coord.ellipse}()}[in FactoMineR]. \item \code{"t"}: + \code{FactoMineR::coord.ellipse()}. \item \code{"t"}: assumes a multivariate t-distribution. \item \code{"norm"}: assumes a multivariate normal distribution. \item \code{"euclid"}: draws a circle with the radius equal to level, representing the euclidean distance from the diff --git a/man/ggscatterhist.Rd b/man/ggscatterhist.Rd index bafe074c..5460322c 100644 --- a/man/ggscatterhist.Rd +++ b/man/ggscatterhist.Rd @@ -78,7 +78,7 @@ fit to your data.} \item{margin.params}{parameters to be applied to the marginal plots.} \item{margin.ggtheme}{the theme of the marginal plot. Default is -\code{\link[ggplot2]{theme_void}()}.} +\code{\link[ggplot2:ggtheme]{theme_void}()}.} \item{margin.space}{logical value. If TRUE, adds space between the main plot and the marginal plot.} diff --git a/man/ggsummarystats.Rd b/man/ggsummarystats.Rd index 7e0b035f..e5b290ab 100644 --- a/man/ggsummarystats.Rd +++ b/man/ggsummarystats.Rd @@ -106,7 +106,7 @@ legend = "none".} } \description{ Create a ggplot with summary stats (n, median, mean, iqr) table - under the plot. + under the plot. Read more: \href{https://www.datanovia.com/en/blog/how-to-create-a-beautiful-plots-in-r-with-summary-statistics-labels/}{How to Create a Beautiful Plots in R with Summary Statistics Labels}. } \section{Functions}{ \itemize{ @@ -168,14 +168,7 @@ ggsummarystats( # Facet #:::::::::::::::::::::::::::::::::::::::::::::::: - -ggsummarystats( - df, x = "dose", y = "len", - ggfunc = ggboxplot, add = "jitter", - color = "dose", palette = "npg", - facet.by = c("supp", "qc") -) - # Specify labeller +# Specify free.panels = TRUE for free panels ggsummarystats( df, x = "dose", y = "len", ggfunc = ggboxplot, add = "jitter", @@ -184,13 +177,4 @@ ggsummarystats( labeller = "label_both" ) -# Free panels -ggsummarystats( - df, x = "dose", y = "len", - ggfunc = ggboxplot, add = "jitter", - color = "dose", palette = "npg", - facet.by = c("supp", "qc"), - free.panels = TRUE, labeller = "label_both" -) - } diff --git a/man/reexports.Rd b/man/reexports.Rd index 493e616f..54e6659b 100644 --- a/man/reexports.Rd +++ b/man/reexports.Rd @@ -5,7 +5,6 @@ \alias{reexports} \alias{mutate} \alias{group_by} -\alias{geom_signif} \alias{get_summary_stats} \title{Objects exported from other packages} \keyword{internal} @@ -16,8 +15,6 @@ below to see their documentation. \describe{ \item{dplyr}{\code{\link[dplyr]{group_by}}, \code{\link[dplyr]{mutate}}} - \item{ggsignif}{\code{\link[ggsignif]{geom_signif}}} - \item{rstatix}{\code{\link[rstatix]{get_summary_stats}}} }} diff --git a/man/rotate_axis_text.Rd b/man/rotate_axis_text.Rd index c6e8ddbe..7478f077 100644 --- a/man/rotate_axis_text.Rd +++ b/man/rotate_axis_text.Rd @@ -18,7 +18,7 @@ rotate_y_text(angle = 90, hjust = NULL, vjust = NULL, ...) \item{vjust}{vertical justification (in [0, 1]).} \item{...}{other arguments to pass to the function -\code{\link[ggplot2]{element_text}()}.} +\code{\link[ggplot2:element]{element_text}()}.} } \description{ Rotate the x-axis text (tick mark labels). diff --git a/man/set_palette.Rd b/man/set_palette.Rd index f1f343e1..06f00635 100644 --- a/man/set_palette.Rd +++ b/man/set_palette.Rd @@ -20,7 +20,7 @@ fill_palette(palette = NULL, ...) \item{palette}{Color palette. Allowed values include: \itemize{ \item \strong{Grey color palettes}: "grey" or "gray"; \item \strong{RColorBrewer -palettes}, see \code{\link[RColorBrewer]{brewer.pal}} and details section. +palettes}, see \code{\link[RColorBrewer:ColorBrewer]{brewer.pal}} and details section. Examples of palette names include: "RdBu", "Blues", "Dark2", "Set2", ...; \item \strong{Custom color palettes}. For example, palette = c("#00AFBB", "#E7B800", "#FC4E07"); \item \strong{ggsci scientific journal palettes}, diff --git a/man/stat_central_tendency.Rd b/man/stat_central_tendency.Rd index 7bb11b27..ec7b61dc 100644 --- a/man/stat_central_tendency.Rd +++ b/man/stat_central_tendency.Rd @@ -59,7 +59,7 @@ the default plot specification, e.g. \code{\link[ggplot2:borders]{borders()}}.} \item{type}{the type of central tendency measure to be used. Possible values include: \code{"mean", "median", "mode"}.} -\item{...}{other arguments to pass to \code{\link[ggplot2]{geom_line}}.} +\item{...}{other arguments to pass to \code{\link[ggplot2:geom_path]{geom_line}}.} } \description{ Add central tendency measures (mean, median, mode) to density diff --git a/man/stat_compare_means.Rd b/man/stat_compare_means.Rd index 6320ea22..d0db37ef 100644 --- a/man/stat_compare_means.Rd +++ b/man/stat_compare_means.Rd @@ -139,7 +139,7 @@ that define both data and aesthetics and shouldn't inherit behaviour from the default plot specification, e.g. \code{\link[ggplot2:borders]{borders()}}.} \item{...}{other arguments to pass to \code{\link[ggplot2]{geom_text}} or -\code{\link[ggplot2]{geom_label}}.} +\code{\link[ggplot2:geom_text]{geom_label}}.} } \description{ Add mean comparison p-values to a ggplot, such as box blots, dot diff --git a/man/stat_conf_ellipse.Rd b/man/stat_conf_ellipse.Rd index 32f15df5..90b72314 100644 --- a/man/stat_conf_ellipse.Rd +++ b/man/stat_conf_ellipse.Rd @@ -73,7 +73,7 @@ to the paired geom/stat.} } \description{ Plot confidence ellipses around barycenters. The method for - computing confidence ellipses has been modified from FactoMineR::coord.ellipse. + computing confidence ellipses has been modified from \code{FactoMineR::coord.ellipse()}. } \examples{ # Load data diff --git a/man/stat_cor.Rd b/man/stat_cor.Rd index 64e4a9c2..c89c41ba 100644 --- a/man/stat_cor.Rd +++ b/man/stat_cor.Rd @@ -114,7 +114,7 @@ that define both data and aesthetics and shouldn't inherit behaviour from the default plot specification, e.g. \code{\link[ggplot2:borders]{borders()}}.} \item{...}{other arguments to pass to \code{\link[ggplot2]{geom_text}} or -\code{\link[ggplot2]{geom_label}}.} +\code{\link[ggplot2:geom_text]{geom_label}}.} } \description{ Add correlation coefficients with p-values to a scatter plot. Can diff --git a/man/stat_overlay_normal_density.Rd b/man/stat_overlay_normal_density.Rd index cc0fe58d..afc47728 100644 --- a/man/stat_overlay_normal_density.Rd +++ b/man/stat_overlay_normal_density.Rd @@ -55,7 +55,7 @@ rather than combining with them. This is most useful for helper functions that define both data and aesthetics and shouldn't inherit behaviour from the default plot specification, e.g. \code{\link[ggplot2:borders]{borders()}}.} -\item{...}{other arguments to pass to \code{\link[ggplot2]{geom_line}}.} +\item{...}{other arguments to pass to \code{\link[ggplot2:geom_path]{geom_line}}.} } \description{ Overlay normal density plot (with the same mean and SD) to the diff --git a/man/stat_regline_equation.Rd b/man/stat_regline_equation.Rd index 96ccf958..f624dd7f 100644 --- a/man/stat_regline_equation.Rd +++ b/man/stat_regline_equation.Rd @@ -80,7 +80,7 @@ that define both data and aesthetics and shouldn't inherit behaviour from the default plot specification, e.g. \code{\link[ggplot2:borders]{borders()}}.} \item{...}{other arguments to pass to \code{\link[ggplot2]{geom_text}} or -\code{\link[ggplot2]{geom_label}}.} +\code{\link[ggplot2:geom_text]{geom_label}}.} } \description{ Add regression line equation and R^2 to a ggplot. Regression diff --git a/man/text_grob.Rd b/man/text_grob.Rd index 6b45afdc..0e2af1c6 100644 --- a/man/text_grob.Rd +++ b/man/text_grob.Rd @@ -50,14 +50,14 @@ text_grob( \item{family}{font family.} -\item{...}{other arguments passed to \link[grid]{textGrob}.} +\item{...}{other arguments passed to \link[grid:grid.text]{textGrob}.} } \value{ a text grob. } \description{ Create easily a customized text grob (graphical object). Wrapper around - \code{\link[grid]{textGrob}}. + \code{\link[grid:grid.text]{textGrob}}. } \examples{ text <- paste("iris data set gives the measurements in cm",