Skip to content

Commit

Permalink
working on CRAN revisions
Browse files Browse the repository at this point in the history
  • Loading branch information
Sayani07 committed Jan 31, 2022
1 parent 7c52d17 commit 1e78086
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 6 deletions.
1 change: 1 addition & 0 deletions R/geom-hdr-boxplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#' @importFrom ggplot2 layer aes
#' @inheritParams ggplot2::layer
#' @inheritParams ggplot2::geom_bar
#' @return A [ggplot2::Geom] representing a highest density region box plot geometry which can be added to a [ggplot()] object.
#' @examples
#' library(ggplot2)
#'
Expand Down
7 changes: 4 additions & 3 deletions R/scale-prob.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#' ones already defined by ggplot2. This allows the shade of confidence
#' intervals
#' to work with the legend output.
#' @return A ggproto object inheriting from `Scale`
#' @return A ggproto object inheriting from `[ggplot2::Scale]`
#' @family scale_prob_*
#' @name scale_prob
#' @inheritParams ggplot2::scale_colour_gradient
Expand All @@ -23,11 +23,11 @@ prob_scale <- function(...) {
}

#' @title Probability shade bar guide
#' @description The prob guide shows the colour from the forecast intervals
#' which is blended with the series colour.
#' @description The guide shows the colour scales mapped to different probability coverage required for HDRs
#' @inheritParams ggplot2::guide_colourbar
#' @param ... Further arguments passed onto either
#' \code{\link[ggplot2]{guide_colourbar}} or \code{\link[ggplot2]{guide_legend}}
#' @return A guide object
#' @export
guide_prob <- function(title = waiver(), ...) {
structure(list(
Expand All @@ -45,6 +45,7 @@ guide_prob <- function(title = waiver(), ...) {
#' @importFrom ggplot2 guide_colourbar guide_train guide_legend
#' @importFrom digest digest
#' @keywords internal
#' @return A guide object

guide_train.prob_guide <- function(guide, scale, aesthetic) {
args <- append(guide[!(names(guide) %in% c("args"))], guide$args)
Expand Down
1 change: 1 addition & 0 deletions R/stat-hdr.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#' @param show.legend Default: NA
#' @param inherit.aes Default: TRUE
#' @rdname stat_hdr
#' @return A [ggplot2::Stat] representing the data transformations with required mappings for plotting HDRs using [geom_hdr_boxplot()] and [geom_hdr_rug()].
#' @export
stat_hdr <- function(mapping = NULL, data = NULL,
geom = "hdr_rug", position = "dodge2",
Expand Down
1 change: 1 addition & 0 deletions R/stat-hdrcde.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#' @param show.legend Default: NA
#' @param inherit.aes Default: TRUE
#' @rdname stat_hdrcde
#' @return A [ggplot2::Stat] representing the data transformations with required mappings for plotting conditional HDRs using [geom_hdr_boxplot].
#' @export
stat_hdrcde <- function(mapping = NULL, data = NULL,
geom = "hdr_boxplot", position = "dodge2",
Expand Down
3 changes: 3 additions & 0 deletions man/geom_hdr_boxplot.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/guide-helpers.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions man/guide_prob.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/scale_prob.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/stat_hdr.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/stat_hdrcde.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1e78086

Please sign in to comment.