From 98f04aa8edaaed5babcfcb268e84b1130f0a8d70 Mon Sep 17 00:00:00 2001 From: Teun van den Brand <49372158+teunbrand@users.noreply.github.com> Date: Thu, 8 Jun 2023 19:18:34 +0200 Subject: [PATCH] Fix typos part III (#5313) * Fix typos * Lingering fix --- R/coord-cartesian-.R | 2 +- R/geom-tile.R | 2 +- R/guide-.R | 2 +- R/guide-colorsteps.R | 2 +- R/layer.R | 2 +- R/position-dodge.R | 2 +- R/scale-.R | 2 +- R/scale-brewer.R | 2 +- R/scale-colour.R | 2 +- R/scale-manual.R | 2 +- R/scale-viridis.R | 2 +- R/stat-contour.R | 2 +- R/stat-sf-coordinates.R | 2 +- R/utilities.R | 6 +++--- man/bidirection.Rd | 6 +++--- man/coord_cartesian.Rd | 2 +- man/geom_contour.Rd | 2 +- man/geom_tile.Rd | 2 +- man/ggplot2-ggproto.Rd | 2 +- man/guide_coloursteps.Rd | 2 +- man/layer.Rd | 2 +- man/new_guide.Rd | 2 +- man/position_dodge.Rd | 2 +- man/scale_brewer.Rd | 2 +- man/scale_colour_continuous.Rd | 2 +- man/scale_manual.Rd | 2 +- man/scale_viridis.Rd | 2 +- man/stat_sf_coordinates.Rd | 2 +- 28 files changed, 32 insertions(+), 32 deletions(-) diff --git a/R/coord-cartesian-.R b/R/coord-cartesian-.R index cf4f5d31bd..cd68e36eef 100644 --- a/R/coord-cartesian-.R +++ b/R/coord-cartesian-.R @@ -43,7 +43,7 @@ #' # limits. You can set the limits precisely by setting expand = FALSE #' p + coord_cartesian(xlim = c(325, 500), expand = FALSE) #' -#' # Simiarly, we can use expand = FALSE to turn off expansion with the +#' # Similarly, we can use expand = FALSE to turn off expansion with the #' # default limits #' p + coord_cartesian(expand = FALSE) #' diff --git a/R/geom-tile.R b/R/geom-tile.R index f5bf2e5043..264e8c2092 100644 --- a/R/geom-tile.R +++ b/R/geom-tile.R @@ -15,7 +15,7 @@ #' #' @details #' `geom_rect()` and `geom_tile()`'s respond differently to scale -#' transformations due to their parametrisation. In `geom_rect()`, the scale +#' transformations due to their parameterisation. In `geom_rect()`, the scale #' transformation is applied to the corners of the rectangles. In `geom_tile()`, #' the transformation is applied only to the centres and its size is determined #' after transformation. diff --git a/R/guide-.R b/R/guide-.R index a1c194bf99..b9e2685ff1 100644 --- a/R/guide-.R +++ b/R/guide-.R @@ -1,6 +1,6 @@ #' Guide constructor #' -#' A constructor function for guides, which performs some standard compatability +#' A constructor function for guides, which performs some standard compatibility #' checks between the guide and provided arguments. #' #' @param ... Named arguments that match the parameters of `super$params` or diff --git a/R/guide-colorsteps.R b/R/guide-colorsteps.R index 26aac440bf..d964e1d058 100644 --- a/R/guide-colorsteps.R +++ b/R/guide-colorsteps.R @@ -13,7 +13,7 @@ #' shown irrespective of the value of `show.limits`. #' @param ticks A theme object for rendering tick marks at the colourbar. #' Usually, the object of `element_line()` is expected. If `element_blank()` -#' (default), no tick marks are drawn. For backward compatability, can also +#' (default), no tick marks are drawn. For backward compatibility, can also #' be a logical which translates `TRUE` to `element_line()` and `FALSE` to #' `element_blank()`. #' @inheritDotParams guide_colourbar -nbin -raster -ticks -available_aes diff --git a/R/layer.R b/R/layer.R index 973b358460..98e89540cd 100644 --- a/R/layer.R +++ b/R/layer.R @@ -49,7 +49,7 @@ #' @param params Additional parameters to the `geom` and `stat`. #' @param key_glyph A legend key drawing function or a string providing the #' function name minus the `draw_key_` prefix. See [draw_key] for details. -#' @param layer_class The type of layer object to be constructued. This is +#' @param layer_class The type of layer object to be constructed. This is #' intended for ggplot2 internal use only. #' @keywords internal #' @examples diff --git a/R/position-dodge.R b/R/position-dodge.R index 35b426a4e7..ef24531207 100644 --- a/R/position-dodge.R +++ b/R/position-dodge.R @@ -5,7 +5,7 @@ #' be specified in the global or `geom_*` layer. Unlike `position_dodge()`, #' `position_dodge2()` works without a grouping variable in a layer. #' `position_dodge2()` works with bars and rectangles, but is -#' particulary useful for arranging box plots, which +#' particularly useful for arranging box plots, which #' can have variable widths. #' #' @param width Dodging width, when different to the width of the individual diff --git a/R/scale-.R b/R/scale-.R index d644bc036b..97e2e8378e 100644 --- a/R/scale-.R +++ b/R/scale-.R @@ -375,7 +375,7 @@ binned_scale <- function(aesthetics, scale_name, palette, name = waiver(), #' - `dimension()` For continuous scales, the dimension is the same concept as the limits. #' For discrete scales, `dimension()` returns a continuous range, where the limits #' would be placed at integer positions. `dimension()` optionally expands -#' this range given an expantion of length 4 (see [expansion()]). +#' this range given an expansion of length 4 (see [expansion()]). #' #' - `break_info()` Returns a `list()` with calculated values needed for the `Coord` #' to transform values in transformed data space. Axis and grid guides also use diff --git a/R/scale-brewer.R b/R/scale-brewer.R index d9e99b57b5..72264f98f4 100644 --- a/R/scale-brewer.R +++ b/R/scale-brewer.R @@ -69,7 +69,7 @@ #' theme_dark() #' } #' -#' # Use distiller variant with continous data +#' # Use distiller variant with continuous data #' v <- ggplot(faithfuld) + #' geom_tile(aes(waiting, eruptions, fill = density)) #' v diff --git a/R/scale-colour.R b/R/scale-colour.R index b864742e5c..c063f9efa9 100644 --- a/R/scale-colour.R +++ b/R/scale-colour.R @@ -44,7 +44,7 @@ #' palette) are not suitable to support all viewers, especially those with #' color vision deficiencies. Using `viridis` type, which is perceptually #' uniform in both colour and black-and-white display is an easy option to -#' ensure good perceptive properties of your visulizations. +#' ensure good perceptive properties of your visualizations. #' The colorspace package offers functionalities #' - to generate color palettes with good perceptive properties, #' - to analyse a given color palette, like emulating color blindness, diff --git a/R/scale-manual.R b/R/scale-manual.R index 9fd9f832cb..6d86c5f42c 100644 --- a/R/scale-manual.R +++ b/R/scale-manual.R @@ -40,7 +40,7 @@ #' palette) are not suitable to support all viewers, especially those with #' color vision deficiencies. Using `viridis` type, which is perceptually #' uniform in both colour and black-and-white display is an easy option to -#' ensure good perceptive properties of your visulizations. +#' ensure good perceptive properties of your visualizations. #' The colorspace package offers functionalities #' - to generate color palettes with good perceptive properties, #' - to analyse a given color palette, like emulating color blindness, diff --git a/R/scale-viridis.R b/R/scale-viridis.R index 3f96a25f19..6460d435b9 100644 --- a/R/scale-viridis.R +++ b/R/scale-viridis.R @@ -49,7 +49,7 @@ #' # the order of colour can be reversed #' p + scale_fill_viridis_d(direction = -1) #' -#' # Use viridis_c with continous data +#' # Use viridis_c with continuous data #' (v <- ggplot(faithfuld) + #' geom_tile(aes(waiting, eruptions, fill = density))) #' v + scale_fill_viridis_c() diff --git a/R/stat-contour.R b/R/stat-contour.R index 60a131e746..a9249f69ff 100644 --- a/R/stat-contour.R +++ b/R/stat-contour.R @@ -5,7 +5,7 @@ #' @eval rd_aesthetics("stat", "contour_filled") #' @eval rd_computed_vars( #' .details = "The computed variables differ somewhat for contour lines -#' (compbuted by `stat_contour()`) and contour bands (filled contours, +#' (computed by `stat_contour()`) and contour bands (filled contours, #' computed by `stat_contour_filled()`). The variables `nlevel` and `piece` #' are available for both, whereas `level_low`, `level_high`, and `level_mid` #' are only available for bands. The variable `level` is a numeric or a factor diff --git a/R/stat-sf-coordinates.R b/R/stat-sf-coordinates.R index f39a19370f..b54c8f6376 100644 --- a/R/stat-sf-coordinates.R +++ b/R/stat-sf-coordinates.R @@ -19,7 +19,7 @@ #' For the first step, you can use an arbitrary function via `fun.geometry`. #' By default, `function(x) sf::st_point_on_surface(sf::st_zm(x))` is used; #' `sf::st_point_on_surface()` seems more appropriate than `sf::st_centroid()` -#' since lables and text usually are intended to be put within the polygon or +#' since labels and text usually are intended to be put within the polygon or #' the line. `sf::st_zm()` is needed to drop Z and M dimension beforehand, #' otherwise `sf::st_point_on_surface()` may fail when the geometries have M #' dimension. diff --git a/R/utilities.R b/R/utilities.R index 28e65d3985..1efbc121ff 100644 --- a/R/utilities.R +++ b/R/utilities.R @@ -429,11 +429,11 @@ switch_orientation <- function(aesthetics) { #' features in the data correspond to: #' #' - `main_is_orthogonal`: This argument controls how the existence of only a `x` -#' or `y` aesthetic is understood. If `TRUE` then the exisiting aesthetic +#' or `y` aesthetic is understood. If `TRUE` then the existing aesthetic #' would be then secondary axis. This behaviour is present in [stat_ydensity()] -#' and [stat_boxplot()]. If `FALSE` then the exisiting aesthetic is the main +#' and [stat_boxplot()]. If `FALSE` then the existing aesthetic is the main #' axis as seen in e.g. [stat_bin()], [geom_count()], and [stat_density()]. -#' - `range_is_orthogonal`: This argument controls whether the existance of +#' - `range_is_orthogonal`: This argument controls whether the existence of #' range-like aesthetics (e.g. `xmin` and `xmax`) represents the main or #' secondary axis. If `TRUE` then the range is given for the secondary axis as #' seen in e.g. [geom_ribbon()] and [geom_linerange()]. diff --git a/man/bidirection.Rd b/man/bidirection.Rd index 931be772c4..f58460091c 100644 --- a/man/bidirection.Rd +++ b/man/bidirection.Rd @@ -79,11 +79,11 @@ How the layer data should be interpreted depends on its specific features. features in the data correspond to: \itemize{ \item \code{main_is_orthogonal}: This argument controls how the existence of only a \code{x} -or \code{y} aesthetic is understood. If \code{TRUE} then the exisiting aesthetic +or \code{y} aesthetic is understood. If \code{TRUE} then the existing aesthetic would be then secondary axis. This behaviour is present in \code{\link[=stat_ydensity]{stat_ydensity()}} -and \code{\link[=stat_boxplot]{stat_boxplot()}}. If \code{FALSE} then the exisiting aesthetic is the main +and \code{\link[=stat_boxplot]{stat_boxplot()}}. If \code{FALSE} then the existing aesthetic is the main axis as seen in e.g. \code{\link[=stat_bin]{stat_bin()}}, \code{\link[=geom_count]{geom_count()}}, and \code{\link[=stat_density]{stat_density()}}. -\item \code{range_is_orthogonal}: This argument controls whether the existance of +\item \code{range_is_orthogonal}: This argument controls whether the existence of range-like aesthetics (e.g. \code{xmin} and \code{xmax}) represents the main or secondary axis. If \code{TRUE} then the range is given for the secondary axis as seen in e.g. \code{\link[=geom_ribbon]{geom_ribbon()}} and \code{\link[=geom_linerange]{geom_linerange()}}. diff --git a/man/coord_cartesian.Rd b/man/coord_cartesian.Rd index e5eaf0efab..d92f107235 100644 --- a/man/coord_cartesian.Rd +++ b/man/coord_cartesian.Rd @@ -60,7 +60,7 @@ p + coord_cartesian(xlim = c(325, 500)) # limits. You can set the limits precisely by setting expand = FALSE p + coord_cartesian(xlim = c(325, 500), expand = FALSE) -# Simiarly, we can use expand = FALSE to turn off expansion with the +# Similarly, we can use expand = FALSE to turn off expansion with the # default limits p + coord_cartesian(expand = FALSE) diff --git a/man/geom_contour.Rd b/man/geom_contour.Rd index 33f525e859..696f51f19a 100644 --- a/man/geom_contour.Rd +++ b/man/geom_contour.Rd @@ -208,7 +208,7 @@ Learn more about setting these aesthetics in \code{vignette("ggplot2-specs")}. \section{Computed variables}{ -These are calculated by the 'stat' part of layers and can be accessed with \link[=aes_eval]{delayed evaluation}. The computed variables differ somewhat for contour lines (compbuted by \code{stat_contour()}) and contour bands (filled contours, computed by \code{stat_contour_filled()}). The variables \code{nlevel} and \code{piece} are available for both, whereas \code{level_low}, \code{level_high}, and \code{level_mid} are only available for bands. The variable \code{level} is a numeric or a factor depending on whether lines or bands are calculated. +These are calculated by the 'stat' part of layers and can be accessed with \link[=aes_eval]{delayed evaluation}. The computed variables differ somewhat for contour lines (computed by \code{stat_contour()}) and contour bands (filled contours, computed by \code{stat_contour_filled()}). The variables \code{nlevel} and \code{piece} are available for both, whereas \code{level_low}, \code{level_high}, and \code{level_mid} are only available for bands. The variable \code{level} is a numeric or a factor depending on whether lines or bands are calculated. \itemize{ \item \code{after_stat(level)}\cr Height of contour. For contour lines, this is a numeric vector that represents bin boundaries. For contour bands, this is an ordered factor that represents bin ranges. \item \code{after_stat(level_low)}, \code{after_stat(level_high)}, \code{after_stat(level_mid)}\cr (contour bands only) Lower and upper bin boundaries for each band, as well as the mid point between boundaries. diff --git a/man/geom_tile.Rd b/man/geom_tile.Rd index be494fe6d1..d229e4f628 100644 --- a/man/geom_tile.Rd +++ b/man/geom_tile.Rd @@ -113,7 +113,7 @@ performance special case for when all the tiles are the same size. } \details{ \code{geom_rect()} and \code{geom_tile()}'s respond differently to scale -transformations due to their parametrisation. In \code{geom_rect()}, the scale +transformations due to their parameterisation. In \code{geom_rect()}, the scale transformation is applied to the corners of the rectangles. In \code{geom_tile()}, the transformation is applied only to the centres and its size is determined after transformation. diff --git a/man/ggplot2-ggproto.Rd b/man/ggplot2-ggproto.Rd index 0e320e5c46..69939d4a82 100644 --- a/man/ggplot2-ggproto.Rd +++ b/man/ggplot2-ggproto.Rd @@ -491,7 +491,7 @@ These methods are only valid for position (x and y) scales: \item \code{dimension()} For continuous scales, the dimension is the same concept as the limits. For discrete scales, \code{dimension()} returns a continuous range, where the limits would be placed at integer positions. \code{dimension()} optionally expands -this range given an expantion of length 4 (see \code{\link[=expansion]{expansion()}}). +this range given an expansion of length 4 (see \code{\link[=expansion]{expansion()}}). \item \code{break_info()} Returns a \code{list()} with calculated values needed for the \code{Coord} to transform values in transformed data space. Axis and grid guides also use these values to draw guides. This is called with diff --git a/man/guide_coloursteps.Rd b/man/guide_coloursteps.Rd index 38771cb472..e97230b6f4 100644 --- a/man/guide_coloursteps.Rd +++ b/man/guide_coloursteps.Rd @@ -31,7 +31,7 @@ shown irrespective of the value of \code{show.limits}.} \item{ticks}{A theme object for rendering tick marks at the colourbar. Usually, the object of \code{element_line()} is expected. If \code{element_blank()} -(default), no tick marks are drawn. For backward compatability, can also +(default), no tick marks are drawn. For backward compatibility, can also be a logical which translates \code{TRUE} to \code{element_line()} and \code{FALSE} to \code{element_blank()}.} diff --git a/man/layer.Rd b/man/layer.Rd index 4b9d08a00c..f7dd21b542 100644 --- a/man/layer.Rd +++ b/man/layer.Rd @@ -74,7 +74,7 @@ display.} \item{key_glyph}{A legend key drawing function or a string providing the function name minus the \code{draw_key_} prefix. See \link{draw_key} for details.} -\item{layer_class}{The type of layer object to be constructued. This is +\item{layer_class}{The type of layer object to be constructed. This is intended for ggplot2 internal use only.} } \description{ diff --git a/man/new_guide.Rd b/man/new_guide.Rd index a533908f62..ad511bf40d 100644 --- a/man/new_guide.Rd +++ b/man/new_guide.Rd @@ -20,7 +20,7 @@ Guide class object.} A \code{Guide} ggproto object. } \description{ -A constructor function for guides, which performs some standard compatability +A constructor function for guides, which performs some standard compatibility checks between the guide and provided arguments. } \keyword{internal} diff --git a/man/position_dodge.Rd b/man/position_dodge.Rd index 45d5bff551..01608e13db 100644 --- a/man/position_dodge.Rd +++ b/man/position_dodge.Rd @@ -34,7 +34,7 @@ horizontal position. \code{position_dodge()} requires the grouping variable to b be specified in the global or \verb{geom_*} layer. Unlike \code{position_dodge()}, \code{position_dodge2()} works without a grouping variable in a layer. \code{position_dodge2()} works with bars and rectangles, but is -particulary useful for arranging box plots, which +particularly useful for arranging box plots, which can have variable widths. } \examples{ diff --git a/man/scale_brewer.Rd b/man/scale_brewer.Rd index 339affac0b..c71599ca40 100644 --- a/man/scale_brewer.Rd +++ b/man/scale_brewer.Rd @@ -162,7 +162,7 @@ p + theme_dark() } -# Use distiller variant with continous data +# Use distiller variant with continuous data v <- ggplot(faithfuld) + geom_tile(aes(waiting, eruptions, fill = density)) v diff --git a/man/scale_colour_continuous.Rd b/man/scale_colour_continuous.Rd index 58063f09e2..c8a8a5ff45 100644 --- a/man/scale_colour_continuous.Rd +++ b/man/scale_colour_continuous.Rd @@ -62,7 +62,7 @@ Many color palettes derived from RGB combinations (like the "rainbow" color palette) are not suitable to support all viewers, especially those with color vision deficiencies. Using \code{viridis} type, which is perceptually uniform in both colour and black-and-white display is an easy option to -ensure good perceptive properties of your visulizations. +ensure good perceptive properties of your visualizations. The colorspace package offers functionalities \itemize{ \item to generate color palettes with good perceptive properties, diff --git a/man/scale_manual.Rd b/man/scale_manual.Rd index c5eb1e0b50..d8dbdfcfe7 100644 --- a/man/scale_manual.Rd +++ b/man/scale_manual.Rd @@ -125,7 +125,7 @@ Many color palettes derived from RGB combinations (like the "rainbow" color palette) are not suitable to support all viewers, especially those with color vision deficiencies. Using \code{viridis} type, which is perceptually uniform in both colour and black-and-white display is an easy option to -ensure good perceptive properties of your visulizations. +ensure good perceptive properties of your visualizations. The colorspace package offers functionalities \itemize{ \item to generate color palettes with good perceptive properties, diff --git a/man/scale_viridis.Rd b/man/scale_viridis.Rd index 261f6cb09f..4550146e7e 100644 --- a/man/scale_viridis.Rd +++ b/man/scale_viridis.Rd @@ -172,7 +172,7 @@ p + scale_fill_viridis_d() # the order of colour can be reversed p + scale_fill_viridis_d(direction = -1) -# Use viridis_c with continous data +# Use viridis_c with continuous data (v <- ggplot(faithfuld) + geom_tile(aes(waiting, eruptions, fill = density))) v + scale_fill_viridis_c() diff --git a/man/stat_sf_coordinates.Rd b/man/stat_sf_coordinates.Rd index e980ec7dd9..2d46e1696c 100644 --- a/man/stat_sf_coordinates.Rd +++ b/man/stat_sf_coordinates.Rd @@ -93,7 +93,7 @@ or \code{sf::st_point_on_surface()}. For the first step, you can use an arbitrary function via \code{fun.geometry}. By default, \code{function(x) sf::st_point_on_surface(sf::st_zm(x))} is used; \code{sf::st_point_on_surface()} seems more appropriate than \code{sf::st_centroid()} -since lables and text usually are intended to be put within the polygon or +since labels and text usually are intended to be put within the polygon or the line. \code{sf::st_zm()} is needed to drop Z and M dimension beforehand, otherwise \code{sf::st_point_on_surface()} may fail when the geometries have M dimension.