Skip to content

update to tidyverse edition 20191129 #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,6 @@ Collate:
'zxx.r'
'zzz.r'
VignetteBuilder: knitr
RoxygenNote: 6.1.1
RoxygenNote: 7.0.1
Roxygen: list(markdown = TRUE)
Encoding: UTF-8
2 changes: 1 addition & 1 deletion R/aes.r
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ NULL
#'
#' Aesthetic mappings describe how variables in the data are mapped to visual
#' properties (aesthetics) of geoms. Aesthetic mappings can be set in
#' [ggplot2()] and in individual layers.
#' [ggplot()] and in individual layers.
#'
#' This function also standardises aesthetic names by converting `color` to `colour`
#' (also in substrings, e.g., `point_color` to `point_colour`) and translating old style
Expand Down
2 changes: 1 addition & 1 deletion R/geom-bar.r
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#' automatically determines the orientation from the aesthetic mapping. In the
#' rare event that this fails it can be given explicitly by setting `orientation`
#' to either `"x"` or `"y"`. See the *Orientation* section for more detail.
#' @param width Bar width. By default, set to 90\% of the resolution of the data.
#' @param width Bar width. By default, set to 90% of the resolution of the data.
#' @param binwidth `geom_bar()` no longer has a binwidth argument - if
#' you use it you'll get an warning telling to you use
#' [geom_histogram()] instead.
Expand Down
2 changes: 1 addition & 1 deletion R/geom-boxplot.r
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#' individually.
#'
#' In a notched box plot, the notches extend `1.58 * IQR / sqrt(n)`.
#' This gives a roughly 95\% confidence interval for comparing medians.
#' This gives a roughly 95% confidence interval for comparing medians.
#' See McGill et al. (1978) for more details.
#'
#' @eval rd_aesthetics("geom", "boxplot")
Expand Down
4 changes: 2 additions & 2 deletions R/geom-rug.r
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
#' with the two 1d marginal distributions. Rug plots display individual
#' cases so are best used with smaller datasets.
#'
#' By default, the rug lines are drawn with a length that corresponds to 3\%
#' By default, the rug lines are drawn with a length that corresponds to 3%
#' of the total plot size. Since the default scale expansion of for continuous
#' variables is 5\% at both ends of the scale, the rug will not overlap with
#' variables is 5% at both ends of the scale, the rug will not overlap with
#' any data points under the default settings.
#'
#' @eval rd_aesthetics("geom", "rug")
Expand Down
1 change: 0 additions & 1 deletion R/layer.r
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#' calls but it can also be created directly using this function.
#'
#' @export
#' @inheritParams geom_point
#' @param mapping Set of aesthetic mappings created by [aes()] or
#' [aes_()]. If specified and `inherit.aes = TRUE` (the
#' default), it is combined with the default mapping at the top level of the
Expand Down
2 changes: 1 addition & 1 deletion R/plot-construction.r
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#' - A `coord` overrides the current coordinate system.
#' - A `facet` specification overrides the current faceting.
#'
#' To replace the current default data frame, you must use \code{\%+\%},
#' To replace the current default data frame, you must use `%+%`,
#' due to S3 method precedence issues.
#'
#' You can also supply a list, in which case each element of the list will
Expand Down
1 change: 0 additions & 1 deletion R/position-dodge.r
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#' also works with bars and rectangles. But unlike `position_dodge`,
#' `position_dodge2` works without a grouping variable in a layer.
#'
#' @inheritParams position_identity
#' @param width Dodging width, when different to the width of the individual
#' elements. This is useful when you want to align narrow geoms with wider
#' geoms. See the examples.
Expand Down
4 changes: 2 additions & 2 deletions R/position-jitter.r
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
#' is added in both positive and negative directions, so the total spread
#' is twice the value specified here.
#'
#' If omitted, defaults to 40\% of the resolution of the data: this means the
#' jitter values will occupy 80\% of the implied bins. Categorical data
#' If omitted, defaults to 40% of the resolution of the data: this means the
#' jitter values will occupy 80% of the implied bins. Categorical data
#' is aligned on the integers, so a width or height of 0.5 will spread the
#' data so it's not possible to see the distinction between the categories.
#' @param seed A random seed to make the jitter reproducible.
Expand Down
2 changes: 1 addition & 1 deletion R/position-jitterdodge.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#' a fill aesthetic supplied).
#'
#' @family position adjustments
#' @param jitter.width degree of jitter in x direction. Defaults to 40\% of the
#' @param jitter.width degree of jitter in x direction. Defaults to 40% of the
#' resolution of the data.
#' @param jitter.height degree of jitter in y direction. Defaults to 0.
#' @param dodge.width the amount to dodge in the x direction. Defaults to 0.75,
Expand Down
6 changes: 3 additions & 3 deletions R/scale-.r
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
#' range \[0, 1]. This is always [scales::rescale()], except for
#' diverging and n colour gradients (i.e., [scale_colour_gradient2()],
#' [scale_colour_gradientn()]). The `rescaler` is ignored by position
#' scales, which ways use [scales::rescale()].
#' scales, which always use [scales::rescale()].
#' @param oob One of:
#' - Function that handles limits outside of the scale limits
#' (out of bounds).
Expand All @@ -75,7 +75,7 @@
#' padding around the data to ensure that they are placed some distance
#' away from the axes. Use the convenience function [expansion()]
#' to generate the values for the `expand` argument. The defaults are to
#' expand the scale by 5\% on each side for continuous variables, and by
#' expand the scale by 5% on each side for continuous variables, and by
#' 0.6 units on each side for discrete variables.
#' @param position For position scales, The position of the axis.
#' `left` or `right` for y axes, `top` or `bottom` for x axes.
Expand Down Expand Up @@ -1033,7 +1033,7 @@ ScaleBinned <- ggproto("ScaleBinned", Scale,
warning("Ignoring n.breaks. Use a breaks function that supports setting number of breaks", call. = FALSE)
}
breaks <- self$breaks(limits)
}
}
} else {
breaks <- self$breaks
}
Expand Down
4 changes: 0 additions & 4 deletions R/scale-steps.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#' @seealso [scales::seq_gradient_pal()] for details on underlying
#' palette
#' @family colour scales
#' @rdname scale_steps
#' @export
#' @examples
#' df <- data.frame(
Expand All @@ -41,10 +40,7 @@
#' ggplot(df, aes(x, y)) +
#' geom_point(aes(colour = z1)) +
#' scale_colour_stepsn(colours = terrain.colors(10))
#'

#' @rdname scale_steps
#' @export
scale_colour_steps <- function(..., low = "#132B43", high = "#56B1F7", space = "Lab",
na.value = "grey50", guide = "coloursteps", aesthetics = "colour") {
binned_scale(aesthetics, "steps", seq_gradient_pal(low, high, space),
Expand Down
6 changes: 3 additions & 3 deletions R/stat-boxplot.r
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
#' \describe{
#' \item{width}{width of boxplot}
#' \item{ymin}{lower whisker = smallest observation greater than or equal to lower hinge - 1.5 * IQR}
#' \item{lower}{lower hinge, 25\% quantile}
#' \item{lower}{lower hinge, 25% quantile}
#' \item{notchlower}{lower edge of notch = median - 1.58 * IQR / sqrt(n)}
#' \item{middle}{median, 50\% quantile}
#' \item{middle}{median, 50% quantile}
#' \item{notchupper}{upper edge of notch = median + 1.58 * IQR / sqrt(n)}
#' \item{upper}{upper hinge, 75\% quantile}
#' \item{upper}{upper hinge, 75% quantile}
#' \item{ymax}{upper whisker = largest observation less than or equal to upper hinge + 1.5 * IQR}
#' }
#' @export
Expand Down
6 changes: 3 additions & 3 deletions R/theme-current.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ NULL
#'
#' @section Adding on to a theme:
#'
#' `+` and \code{\%+replace\%} can be used to modify elements in themes.
#' `+` and `%+replace%` can be used to modify elements in themes.
#'
#' `+` updates the elements of e1 that differ from elements specified (not
#' NULL) in e2. Thus this operator can be used to incrementally add or modify
#' attributes of a ggplot theme.
#'
#' In contrast, \code{\%+replace\%} replaces the entire element; any element of
#' In contrast, `%+replace%` replaces the entire element; any element of
#' a theme not specified in e2 will not be present in the resulting theme (i.e.
#' NULL). Thus this operator can be used to overwrite an entire theme.
#'
#' `theme_update` uses the `+` operator, so that any unspecified
#' values in the theme element will default to the values they are set in the
#' theme. `theme_replace` uses \code{\%+replace\%} to completely replace
#' theme. `theme_replace` uses `%+replace%` to completely replace
#' the element, so any unspecified values will overwrite the current value in
#' the theme with `NULL`s.
#'
Expand Down
2 changes: 1 addition & 1 deletion R/theme.r
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
#' [`el_def()`]. See [`el_def()`] for more details.
#'
#' @seealso
#' [+.gg()] and \code{\link{\%+replace\%}},
#' [+.gg()] and [%+replace%],
#' [element_blank()], [element_line()],
#' [element_rect()], and [element_text()] for
#' details of the specific theme elements.
Expand Down
10 changes: 8 additions & 2 deletions man/absoluteGrob.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/aes.Rd

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

18 changes: 14 additions & 4 deletions man/annotate.Rd

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

3 changes: 1 addition & 2 deletions man/annotation_custom.Rd

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

18 changes: 14 additions & 4 deletions man/annotation_logticks.Rd

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

11 changes: 6 additions & 5 deletions man/as.list.ggproto.Rd

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

12 changes: 9 additions & 3 deletions man/bidirection.Rd

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

31 changes: 23 additions & 8 deletions man/binned_scale.Rd

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

Loading