From 6e59719562f5bdb541b7ff0f8d2cb068f3525e12 Mon Sep 17 00:00:00 2001 From: Teun van den Brand Date: Sun, 15 Dec 2024 16:25:55 +0100 Subject: [PATCH] fix broken links --- R/geom_outline_point.R | 2 +- R/geom_text_aimed.R | 2 +- R/stat_difference.R | 2 +- R/utils.R | 4 ++++ man/geom_outline_point.Rd | 16 ++++++++-------- man/geom_text_aimed.Rd | 16 ++++++++-------- man/stat_difference.Rd | 18 +++++++++--------- 7 files changed, 32 insertions(+), 28 deletions(-) diff --git a/R/geom_outline_point.R b/R/geom_outline_point.R index 4d03766..522564b 100644 --- a/R/geom_outline_point.R +++ b/R/geom_outline_point.R @@ -10,7 +10,7 @@ #' #' @return A ggplot `Layer` #' @export -#' @eval ggplot2:::rd_aesthetics("geom", "outline_point") +#' @eval fixup_docs(ggplot2:::rd_aesthetics("geom", "outline_point")) #' #' @details Due to the way this geom is implemented, it handles the `alpha` #' aesthetic pretty ungracefully. diff --git a/R/geom_text_aimed.R b/R/geom_text_aimed.R index a9ed572..40c4ad2 100644 --- a/R/geom_text_aimed.R +++ b/R/geom_text_aimed.R @@ -25,7 +25,7 @@ #' @note When using this geom to aim text at the centre of a polar plot, make #' sure the radius range does not have close to zero width. #' -#' @eval ggplot2:::rd_aesthetics("geom", "text_aimed") +#' @eval fixup_docs(ggplot2:::rd_aesthetics("geom", "text_aimed")) #' @examples #' # Point all labels to upper right corner #' ggplot(mtcars, aes(mpg, wt)) + diff --git a/R/stat_difference.R b/R/stat_difference.R index 011a34b..7e676da 100644 --- a/R/stat_difference.R +++ b/R/stat_difference.R @@ -24,7 +24,7 @@ #' When there is a run of more than two 0-difference values, the inner values #' will be ignored. #' -#' @eval ggplot2:::rd_aesthetics("geom", "ribbon") +#' @eval fixup_docs(ggplot2:::rd_aesthetics("geom", "ribbon")) #' @section Computed variables: \describe{ #' \item{`sign`}{A `factor` with the `levels` attribute set to the `levels` #' argument.} diff --git a/R/utils.R b/R/utils.R index 05a06d5..746cb25 100644 --- a/R/utils.R +++ b/R/utils.R @@ -36,6 +36,10 @@ height_cm <- function(x) { } } +fixup_docs <- function(x) { + gsub("\\[=aes", "\\[ggplot2:aes", x) +} + # ggplot internals -------------------------------------------------------- data_frame0 <- function(...) {data_frame(..., .name_repair = "minimal")} diff --git a/man/geom_outline_point.Rd b/man/geom_outline_point.Rd index 9998c19..3cdfb71 100644 --- a/man/geom_outline_point.Rd +++ b/man/geom_outline_point.Rd @@ -120,14 +120,14 @@ aesthetic pretty ungracefully. \code{geom_outline_point()} understands the following aesthetics (required aesthetics are in bold): \itemize{ -\item \strong{\code{\link[=aes_position]{x}}} -\item \strong{\code{\link[=aes_position]{y}}} -\item \code{\link[=aes_colour_fill_alpha]{alpha}} -\item \code{\link[=aes_colour_fill_alpha]{colour}} -\item \code{\link[=aes_colour_fill_alpha]{fill}} -\item \code{\link[=aes_group_order]{group}} -\item \code{\link[=aes_linetype_size_shape]{shape}} -\item \code{\link[=aes_linetype_size_shape]{size}} +\item \strong{\code{\link[ggplot2:aes_position]{x}}} +\item \strong{\code{\link[ggplot2:aes_position]{y}}} +\item \code{\link[ggplot2:aes_colour_fill_alpha]{alpha}} +\item \code{\link[ggplot2:aes_colour_fill_alpha]{colour}} +\item \code{\link[ggplot2:aes_colour_fill_alpha]{fill}} +\item \code{\link[ggplot2:aes_group_order]{group}} +\item \code{\link[ggplot2:aes_linetype_size_shape]{shape}} +\item \code{\link[ggplot2:aes_linetype_size_shape]{size}} \item \code{stroke} \item \code{stroke_colour} } diff --git a/man/geom_text_aimed.Rd b/man/geom_text_aimed.Rd index 8fb1cb2..09ce531 100644 --- a/man/geom_text_aimed.Rd +++ b/man/geom_text_aimed.Rd @@ -151,21 +151,21 @@ sure the radius range does not have close to zero width. \code{geom_text_aimed()} understands the following aesthetics (required aesthetics are in bold): \itemize{ -\item \strong{\code{\link[=aes_position]{x}}} -\item \strong{\code{\link[=aes_position]{y}}} +\item \strong{\code{\link[ggplot2:aes_position]{x}}} +\item \strong{\code{\link[ggplot2:aes_position]{y}}} \item \strong{\code{label}} -\item \code{\link[=aes_colour_fill_alpha]{alpha}} +\item \code{\link[ggplot2:aes_colour_fill_alpha]{alpha}} \item \code{angle} -\item \code{\link[=aes_colour_fill_alpha]{colour}} +\item \code{\link[ggplot2:aes_colour_fill_alpha]{colour}} \item \code{family} \item \code{fontface} -\item \code{\link[=aes_group_order]{group}} +\item \code{\link[ggplot2:aes_group_order]{group}} \item \code{hjust} \item \code{lineheight} -\item \code{\link[=aes_linetype_size_shape]{size}} +\item \code{\link[ggplot2:aes_linetype_size_shape]{size}} \item \code{vjust} -\item \code{\link[=aes_position]{xend}} -\item \code{\link[=aes_position]{yend}} +\item \code{\link[ggplot2:aes_position]{xend}} +\item \code{\link[ggplot2:aes_position]{yend}} } Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. } diff --git a/man/stat_difference.Rd b/man/stat_difference.Rd index dfcc71c..d949736 100644 --- a/man/stat_difference.Rd +++ b/man/stat_difference.Rd @@ -126,15 +126,15 @@ will be ignored. \code{geom_ribbon()} understands the following aesthetics (required aesthetics are in bold): \itemize{ -\item \strong{\code{\link[=aes_position]{x}} \emph{or} \code{\link[=aes_position]{y}}} -\item \strong{\code{\link[=aes_position]{ymin}} \emph{or} \code{\link[=aes_position]{xmin}}} -\item \strong{\code{\link[=aes_position]{ymax}} \emph{or} \code{\link[=aes_position]{xmax}}} -\item \code{\link[=aes_colour_fill_alpha]{alpha}} -\item \code{\link[=aes_colour_fill_alpha]{colour}} -\item \code{\link[=aes_colour_fill_alpha]{fill}} -\item \code{\link[=aes_group_order]{group}} -\item \code{\link[=aes_linetype_size_shape]{linetype}} -\item \code{\link[=aes_linetype_size_shape]{linewidth}} +\item \strong{\code{\link[ggplot2:aes_position]{x}} \emph{or} \code{\link[ggplot2:aes_position]{y}}} +\item \strong{\code{\link[ggplot2:aes_position]{ymin}} \emph{or} \code{\link[ggplot2:aes_position]{xmin}}} +\item \strong{\code{\link[ggplot2:aes_position]{ymax}} \emph{or} \code{\link[ggplot2:aes_position]{xmax}}} +\item \code{\link[ggplot2:aes_colour_fill_alpha]{alpha}} +\item \code{\link[ggplot2:aes_colour_fill_alpha]{colour}} +\item \code{\link[ggplot2:aes_colour_fill_alpha]{fill}} +\item \code{\link[ggplot2:aes_group_order]{group}} +\item \code{\link[ggplot2:aes_linetype_size_shape]{linetype}} +\item \code{\link[ggplot2:aes_linetype_size_shape]{linewidth}} } Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. }