Skip to content

Commit

Permalink
doc updated #300
Browse files Browse the repository at this point in the history
  • Loading branch information
kassambara committed Jun 27, 2020
1 parent 7ca7d83 commit 54f0dc9
Show file tree
Hide file tree
Showing 198 changed files with 4,595 additions and 2,813 deletions.
2 changes: 2 additions & 0 deletions CRAN-RELEASE
Original file line number Diff line number Diff line change
@@ -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).
7 changes: 4 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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 = "[email protected]"))
Description: The 'ggplot2' package is excellent and flexible for elegant data
Expand Down Expand Up @@ -33,7 +33,7 @@ Imports:
glue,
polynom,
rlang,
rstatix (>= 0.4.0),
rstatix (>= 0.6.0),
tibble,
magrittr
Suggests:
Expand Down Expand Up @@ -118,4 +118,5 @@ Collate:
'text_grob.R'
'theme_pubr.R'
'theme_transparent.R'
'utils-geom-signif.R'
'utils-pipe.R'
3 changes: 1 addition & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion R/annotate_figure.R
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 4 additions & 4 deletions R/as_ggplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions R/font.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions R/get_breaks.R
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion R/get_palette.R
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down
2 changes: 1 addition & 1 deletion R/ggscatter.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion R/ggscatterhist.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 2 additions & 18 deletions R/ggsummarystats.R
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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",
Expand All @@ -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,
Expand Down
3 changes: 0 additions & 3 deletions R/reexports.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion R/rotate_axis_text.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion R/stat_central_tendency.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion R/stat_compare_means.R
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down
2 changes: 1 addition & 1 deletion R/stat_conf_ellipse.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion R/stat_cor.R
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down
2 changes: 1 addition & 1 deletion R/stat_overlay_normal_density.R
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down
2 changes: 1 addition & 1 deletion R/stat_regline_equation.R
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down
4 changes: 2 additions & 2 deletions R/text_grob.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ 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",
#' "italic", "bold.italic"}.
#' @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",
Expand Down
10 changes: 10 additions & 0 deletions R/utils-geom-signif.R
Original file line number Diff line number Diff line change
@@ -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
6 changes: 4 additions & 2 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,17 @@ reference:
- ggexport
- annotate_figure
- background_image
- title: Make Programming Easy with GGPlot2
contents:
- geom_exec
- create_aes
- title: Helpers
contents:
- facet
- add_summary
- ggadd
- get_palette
- as_ggplot
- geom_exec
- create_aes
- title: Data
contents:
- diff_express
Expand Down
4 changes: 2 additions & 2 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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).

Loading

0 comments on commit 54f0dc9

Please sign in to comment.