From 9243e2f744e8531632f5ce9a51542530fdc62052 Mon Sep 17 00:00:00 2001 From: guqicun <166205493+guqicun@users.noreply.github.com> Date: Tue, 16 Apr 2024 21:13:39 +0800 Subject: [PATCH] chore: remove repetitive words (#5830) * chore: remove repetitive words Signed-off-by: guqicun * regenerate docs --------- Signed-off-by: guqicun Co-authored-by: Teun van den Brand --- NEWS | 2 +- R/scale-.R | 2 +- man/ggplot2-ggproto.Rd | 2 +- tests/testthat/test-coord-train.R | 2 +- vignettes/articles/faq-axes.Rmd | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/NEWS b/NEWS index 080474291a..4c3f6de24b 100644 --- a/NEWS +++ b/NEWS @@ -28,7 +28,7 @@ NEW FEATURES `example(position_jitterdodge)` for a potential usage. (@kevinushey, #932) * Allow specifying only one of the limits in a scale and use the automatic - calculation of the other limit by passing NA to to the limit function, + calculation of the other limit by passing NA to the limit function, `xlim()` or `ylim()` (@jimhester, #557). * Allow to use brewer palettes for continuous scales, through the new diff --git a/R/scale-.R b/R/scale-.R index 96472e4f5b..0b374d72ef 100644 --- a/R/scale-.R +++ b/R/scale-.R @@ -388,7 +388,7 @@ binned_scale <- function(aesthetics, scale_name = deprecated(), palette, name = #' which do not use the default implementation of this method). The output corresponds #' to the transformed data value in aesthetic space (e.g., a color, line width, or size). #' -#' - `rescale()` Rescale transformed data to the the range 0, 1. This is most useful for +#' - `rescale()` Rescale transformed data to the range 0, 1. This is most useful for #' position scales. For continuous scales, `rescale()` uses the `rescaler` that #' was provided to the constructor. `rescale()` does not apply `self$oob()` to #' its input, which means that discrete values outside `limits` will be `NA`, and diff --git a/man/ggplot2-ggproto.Rd b/man/ggplot2-ggproto.Rd index 5f8e570dae..c3384f1e45 100644 --- a/man/ggplot2-ggproto.Rd +++ b/man/ggplot2-ggproto.Rd @@ -542,7 +542,7 @@ position scales, only the continuous range is reset. determined by \code{self$rescale()} and \code{self$palette} (except for position scales, which do not use the default implementation of this method). The output corresponds to the transformed data value in aesthetic space (e.g., a color, line width, or size). -\item \code{rescale()} Rescale transformed data to the the range 0, 1. This is most useful for +\item \code{rescale()} Rescale transformed data to the range 0, 1. This is most useful for position scales. For continuous scales, \code{rescale()} uses the \code{rescaler} that was provided to the constructor. \code{rescale()} does not apply \code{self$oob()} to its input, which means that discrete values outside \code{limits} will be \code{NA}, and diff --git a/tests/testthat/test-coord-train.R b/tests/testthat/test-coord-train.R index 2b712499e3..b326fc6fe1 100644 --- a/tests/testthat/test-coord-train.R +++ b/tests/testthat/test-coord-train.R @@ -17,7 +17,7 @@ test_that("NA's don't appear in breaks", { # First have to test that scale_breaks_positions will return a vector with NA # This is a test to make sure the later tests will be useful! - # It's possible that changes to the the way that breaks are calculated will + # It's possible that changes to the way that breaks are calculated will # make it so that scale_break_positions will no longer give NA for range 1, 12 expect_true(any(is.na(scale_x$break_positions()))) expect_true(any(is.na(scale_y$break_positions()))) diff --git a/vignettes/articles/faq-axes.Rmd b/vignettes/articles/faq-axes.Rmd index 726c6407ec..6a9ed45521 100644 --- a/vignettes/articles/faq-axes.Rmd +++ b/vignettes/articles/faq-axes.Rmd @@ -427,7 +427,7 @@ ggplot(mpg, aes(x = cty^2, y = log(hwy))) + #| fig.alt = "A scatter plot showing the squared city miles per gallon on the #| x-axis versus the base 10 logarithm of highway miles per gallon on the #| y-axis for 234 cars. In the axis titles, the base 10 is indicated in -#| subscript on the y-axis and the power 2 is is indicated in superscript on +#| subscript on the y-axis and the power 2 is indicated in superscript on #| the x-axis." ggplot(mpg, aes(x = cty^2, y = log(hwy, base = 10))) + geom_point() + @@ -443,7 +443,7 @@ ggplot(mpg, aes(x = cty^2, y = log(hwy, base = 10))) + #| fig.alt = "A scatter plot showing the squared city miles per gallon on the #| x-axis versus the base 10 logarithm of highway miles per gallon on the #| y-axis for 234 cars. In the axis titles, the base 10 is indicated in -#| subscript on the y-axis and the power 2 is is indicated in superscript on +#| subscript on the y-axis and the power 2 is indicated in superscript on #| the x-axis." ggplot(mpg, aes(x = cty^2, y = log(hwy, base = 10))) + geom_point() +