Skip to content

Commit 346a8f0

Browse files
authored
Merge pull request #4 from tidyverse/master
update to tidyverse edition 20191129
2 parents 40bdc73 + 6424808 commit 346a8f0

File tree

122 files changed

+2501
-1112
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+2501
-1112
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,6 @@ Collate:
253253
'zxx.r'
254254
'zzz.r'
255255
VignetteBuilder: knitr
256-
RoxygenNote: 6.1.1
256+
RoxygenNote: 7.0.1
257257
Roxygen: list(markdown = TRUE)
258258
Encoding: UTF-8

R/aes.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ NULL
55
#'
66
#' Aesthetic mappings describe how variables in the data are mapped to visual
77
#' properties (aesthetics) of geoms. Aesthetic mappings can be set in
8-
#' [ggplot2()] and in individual layers.
8+
#' [ggplot()] and in individual layers.
99
#'
1010
#' This function also standardises aesthetic names by converting `color` to `colour`
1111
#' (also in substrings, e.g., `point_color` to `point_colour`) and translating old style

R/geom-bar.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#' automatically determines the orientation from the aesthetic mapping. In the
3636
#' rare event that this fails it can be given explicitly by setting `orientation`
3737
#' to either `"x"` or `"y"`. See the *Orientation* section for more detail.
38-
#' @param width Bar width. By default, set to 90\% of the resolution of the data.
38+
#' @param width Bar width. By default, set to 90% of the resolution of the data.
3939
#' @param binwidth `geom_bar()` no longer has a binwidth argument - if
4040
#' you use it you'll get an warning telling to you use
4141
#' [geom_histogram()] instead.

R/geom-boxplot.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#' individually.
2222
#'
2323
#' In a notched box plot, the notches extend `1.58 * IQR / sqrt(n)`.
24-
#' This gives a roughly 95\% confidence interval for comparing medians.
24+
#' This gives a roughly 95% confidence interval for comparing medians.
2525
#' See McGill et al. (1978) for more details.
2626
#'
2727
#' @eval rd_aesthetics("geom", "boxplot")

R/geom-rug.r

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
#' with the two 1d marginal distributions. Rug plots display individual
55
#' cases so are best used with smaller datasets.
66
#'
7-
#' By default, the rug lines are drawn with a length that corresponds to 3\%
7+
#' By default, the rug lines are drawn with a length that corresponds to 3%
88
#' of the total plot size. Since the default scale expansion of for continuous
9-
#' variables is 5\% at both ends of the scale, the rug will not overlap with
9+
#' variables is 5% at both ends of the scale, the rug will not overlap with
1010
#' any data points under the default settings.
1111
#'
1212
#' @eval rd_aesthetics("geom", "rug")

R/layer.r

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#' calls but it can also be created directly using this function.
66
#'
77
#' @export
8-
#' @inheritParams geom_point
98
#' @param mapping Set of aesthetic mappings created by [aes()] or
109
#' [aes_()]. If specified and `inherit.aes = TRUE` (the
1110
#' default), it is combined with the default mapping at the top level of the

R/plot-construction.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#' - A `coord` overrides the current coordinate system.
1616
#' - A `facet` specification overrides the current faceting.
1717
#'
18-
#' To replace the current default data frame, you must use \code{\%+\%},
18+
#' To replace the current default data frame, you must use `%+%`,
1919
#' due to S3 method precedence issues.
2020
#'
2121
#' You can also supply a list, in which case each element of the list will

R/position-dodge.r

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#' also works with bars and rectangles. But unlike `position_dodge`,
77
#' `position_dodge2` works without a grouping variable in a layer.
88
#'
9-
#' @inheritParams position_identity
109
#' @param width Dodging width, when different to the width of the individual
1110
#' elements. This is useful when you want to align narrow geoms with wider
1211
#' geoms. See the examples.

R/position-jitter.r

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
#' is added in both positive and negative directions, so the total spread
1010
#' is twice the value specified here.
1111
#'
12-
#' If omitted, defaults to 40\% of the resolution of the data: this means the
13-
#' jitter values will occupy 80\% of the implied bins. Categorical data
12+
#' If omitted, defaults to 40% of the resolution of the data: this means the
13+
#' jitter values will occupy 80% of the implied bins. Categorical data
1414
#' is aligned on the integers, so a width or height of 0.5 will spread the
1515
#' data so it's not possible to see the distinction between the categories.
1616
#' @param seed A random seed to make the jitter reproducible.

R/position-jitterdodge.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#' a fill aesthetic supplied).
66
#'
77
#' @family position adjustments
8-
#' @param jitter.width degree of jitter in x direction. Defaults to 40\% of the
8+
#' @param jitter.width degree of jitter in x direction. Defaults to 40% of the
99
#' resolution of the data.
1010
#' @param jitter.height degree of jitter in y direction. Defaults to 0.
1111
#' @param dodge.width the amount to dodge in the x direction. Defaults to 0.75,

R/scale-.r

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
#' range \[0, 1]. This is always [scales::rescale()], except for
5050
#' diverging and n colour gradients (i.e., [scale_colour_gradient2()],
5151
#' [scale_colour_gradientn()]). The `rescaler` is ignored by position
52-
#' scales, which ways use [scales::rescale()].
52+
#' scales, which always use [scales::rescale()].
5353
#' @param oob One of:
5454
#' - Function that handles limits outside of the scale limits
5555
#' (out of bounds).
@@ -75,7 +75,7 @@
7575
#' padding around the data to ensure that they are placed some distance
7676
#' away from the axes. Use the convenience function [expansion()]
7777
#' to generate the values for the `expand` argument. The defaults are to
78-
#' expand the scale by 5\% on each side for continuous variables, and by
78+
#' expand the scale by 5% on each side for continuous variables, and by
7979
#' 0.6 units on each side for discrete variables.
8080
#' @param position For position scales, The position of the axis.
8181
#' `left` or `right` for y axes, `top` or `bottom` for x axes.
@@ -1033,7 +1033,7 @@ ScaleBinned <- ggproto("ScaleBinned", Scale,
10331033
warning("Ignoring n.breaks. Use a breaks function that supports setting number of breaks", call. = FALSE)
10341034
}
10351035
breaks <- self$breaks(limits)
1036-
}
1036+
}
10371037
} else {
10381038
breaks <- self$breaks
10391039
}

R/scale-steps.R

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#' @seealso [scales::seq_gradient_pal()] for details on underlying
1919
#' palette
2020
#' @family colour scales
21-
#' @rdname scale_steps
2221
#' @export
2322
#' @examples
2423
#' df <- data.frame(
@@ -41,10 +40,7 @@
4140
#' ggplot(df, aes(x, y)) +
4241
#' geom_point(aes(colour = z1)) +
4342
#' scale_colour_stepsn(colours = terrain.colors(10))
44-
#'
45-
4643
#' @rdname scale_steps
47-
#' @export
4844
scale_colour_steps <- function(..., low = "#132B43", high = "#56B1F7", space = "Lab",
4945
na.value = "grey50", guide = "coloursteps", aesthetics = "colour") {
5046
binned_scale(aesthetics, "steps", seq_gradient_pal(low, high, space),

R/stat-boxplot.r

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
#' \describe{
66
#' \item{width}{width of boxplot}
77
#' \item{ymin}{lower whisker = smallest observation greater than or equal to lower hinge - 1.5 * IQR}
8-
#' \item{lower}{lower hinge, 25\% quantile}
8+
#' \item{lower}{lower hinge, 25% quantile}
99
#' \item{notchlower}{lower edge of notch = median - 1.58 * IQR / sqrt(n)}
10-
#' \item{middle}{median, 50\% quantile}
10+
#' \item{middle}{median, 50% quantile}
1111
#' \item{notchupper}{upper edge of notch = median + 1.58 * IQR / sqrt(n)}
12-
#' \item{upper}{upper hinge, 75\% quantile}
12+
#' \item{upper}{upper hinge, 75% quantile}
1313
#' \item{ymax}{upper whisker = largest observation less than or equal to upper hinge + 1.5 * IQR}
1414
#' }
1515
#' @export

R/theme-current.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@ NULL
1111
#'
1212
#' @section Adding on to a theme:
1313
#'
14-
#' `+` and \code{\%+replace\%} can be used to modify elements in themes.
14+
#' `+` and `%+replace%` can be used to modify elements in themes.
1515
#'
1616
#' `+` updates the elements of e1 that differ from elements specified (not
1717
#' NULL) in e2. Thus this operator can be used to incrementally add or modify
1818
#' attributes of a ggplot theme.
1919
#'
20-
#' In contrast, \code{\%+replace\%} replaces the entire element; any element of
20+
#' In contrast, `%+replace%` replaces the entire element; any element of
2121
#' a theme not specified in e2 will not be present in the resulting theme (i.e.
2222
#' NULL). Thus this operator can be used to overwrite an entire theme.
2323
#'
2424
#' `theme_update` uses the `+` operator, so that any unspecified
2525
#' values in the theme element will default to the values they are set in the
26-
#' theme. `theme_replace` uses \code{\%+replace\%} to completely replace
26+
#' theme. `theme_replace` uses `%+replace%` to completely replace
2727
#' the element, so any unspecified values will overwrite the current value in
2828
#' the theme with `NULL`s.
2929
#'

R/theme.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@
170170
#' [`el_def()`]. See [`el_def()`] for more details.
171171
#'
172172
#' @seealso
173-
#' [+.gg()] and \code{\link{\%+replace\%}},
173+
#' [+.gg()] and [%+replace%],
174174
#' [element_blank()], [element_line()],
175175
#' [element_rect()], and [element_text()] for
176176
#' details of the specific theme elements.

man/absoluteGrob.Rd

Lines changed: 8 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/aes.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/annotate.Rd

Lines changed: 14 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/annotation_custom.Rd

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/annotation_logticks.Rd

Lines changed: 14 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/as.list.ggproto.Rd

Lines changed: 6 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/bidirection.Rd

Lines changed: 9 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/binned_scale.Rd

Lines changed: 23 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)