Skip to content

Commit 94d88b6

Browse files
authored
Merge pull request #26 from tidyverse/master
Sync Fork from Upstream Repo
2 parents d0016de + 9deb97b commit 94d88b6

File tree

12 files changed

+79
-53
lines changed

12 files changed

+79
-53
lines changed

.github/workflows/R-CMD-check.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ jobs:
3030
- {os: ubuntu-16.04, r: '3.5', vdiffr: false, xref: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
3131
- {os: ubuntu-16.04, r: '3.4', vdiffr: false, xref: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
3232
- {os: ubuntu-16.04, r: '3.3', vdiffr: false, xref: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
33-
- {os: ubuntu-16.04, r: '3.2', vdiffr: false, xref: false, rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
3433

3534
env:
3635
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Authors@R: c(
2525
person("RStudio", role = c("cph", "fnd"))
2626
)
2727
Depends:
28-
R (>= 3.2)
28+
R (>= 3.3)
2929
Imports:
3030
digest,
3131
glue,

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222

2323
* `stat_bin()`'s computed variable `width` is now documented (#3522).
2424

25+
* ggplot2 now requires R >= 3.3 (#4247).
26+
2527
# ggplot2 3.3.2
2628
This is a small release focusing on fixing regressions introduced in 3.3.1.
2729

R/data.R

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,21 @@
4848

4949
#' Midwest demographics
5050
#'
51-
#' Demographic information of midwest counties
51+
#' Demographic information of midwest counties from 2000 US census
52+
#'
53+
#' Note: this dataset is included for illustrative purposes. The original
54+
#' descriptions were not documented and the current descriptions here are based
55+
#' on speculation. For more accurate and up-to-date US census data, see the
56+
#' [`acs` package](https://cran.r-project.org/package=acs).
5257
#'
5358
#' @format A data frame with 437 rows and 28 variables:
5459
#' \describe{
55-
#' \item{PID}{}
56-
#' \item{county}{}
57-
#' \item{state}{}
58-
#' \item{area}{}
59-
#' \item{poptotal}{Total population}
60-
#' \item{popdensity}{Population density}
60+
#' \item{PID}{Unique county identifier.}
61+
#' \item{county}{County name.}
62+
#' \item{state}{State to which county belongs to.}
63+
#' \item{area}{Area of county (units unknown).}
64+
#' \item{poptotal}{Total population.}
65+
#' \item{popdensity}{Population density (person/unit area).}
6166
#' \item{popwhite}{Number of whites.}
6267
#' \item{popblack}{Number of blacks.}
6368
#' \item{popamerindian}{Number of American Indians.}
@@ -69,17 +74,17 @@
6974
#' \item{percasian}{Percent Asian.}
7075
#' \item{percother}{Percent other races.}
7176
#' \item{popadults}{Number of adults.}
72-
#' \item{perchsd}{}
77+
#' \item{perchsd}{Percent with high school diploma.}
7378
#' \item{percollege}{Percent college educated.}
74-
#' \item{percprof}{Percent profession.}
75-
#' \item{poppovertyknown}{}
76-
#' \item{percpovertyknown}{}
77-
#' \item{percbelowpoverty}{}
78-
#' \item{percchildbelowpovert}{}
79-
#' \item{percadultpoverty}{}
80-
#' \item{percelderlypoverty}{}
81-
#' \item{inmetro}{In a metro area.}
82-
#' \item{category}{}
79+
#' \item{percprof}{Percent with professional degree.}
80+
#' \item{poppovertyknown}{Population with known poverty status.}
81+
#' \item{percpovertyknown}{Percent of population with known poverty status.}
82+
#' \item{percbelowpoverty}{Percent of people below poverty line.}
83+
#' \item{percchildbelowpovert}{Percent of children below poverty line.}
84+
#' \item{percadultpoverty}{Percent of adults below poverty line.}
85+
#' \item{percelderlypoverty}{Percent of elderly below poverty line.}
86+
#' \item{inmetro}{County considered in a metro area.}
87+
#' \item{category}{Miscellaneous.}
8388
#' }
8489
#'
8590
"midwest"

R/geom-polygon.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ GeomPolygon <- ggproto("GeomPolygon", Geom,
167167

168168
},
169169

170-
default_aes = aes(colour = "NA", fill = "grey20", size = 0.5, linetype = 1,
170+
default_aes = aes(colour = NA, fill = "grey20", size = 0.5, linetype = 1,
171171
alpha = NA, subgroup = NULL),
172172

173173
handle_na = function(data, params) {

R/stat-smooth.r

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525
#' @param level Level of confidence interval to use (0.95 by default).
2626
#' @param span Controls the amount of smoothing for the default loess smoother.
2727
#' Smaller numbers produce wigglier lines, larger numbers produce smoother
28-
#' lines.
28+
#' lines. Only used with loess, i.e. when `method = "loess"`,
29+
#' or when `method = NULL` (the default) and there are fewer than 1,000
30+
#' observations.
2931
#' @param n Number of points at which to evaluate smoother.
3032
#' @param method.args List of additional arguments passed on to the modelling
3133
#' function defined by `method`.

R/stat-summary.r

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#' number, but is somewhat less flexible. If your summary function computes
3232
#' multiple values at once (e.g. min and max), use `fun.data`.
3333
#'
34-
#' `fun.data` will recieve data as if it was oriented along the x-axis and
34+
#' `fun.data` will receive data as if it was oriented along the x-axis and
3535
#' should return a data.frame that corresponds to that orientation. The layer
3636
#' will take care of flipping the input and output if it is oriented along the
3737
#' y-axis.
@@ -270,13 +270,18 @@ mean_sdl <- wrap_hmisc("smean.sdl")
270270
#' @rdname hmisc
271271
median_hilow <- wrap_hmisc("smedian.hilow")
272272

273-
#' Calculate mean and standard error
273+
#' Calculate mean and standard error of the mean
274274
#'
275275
#' For use with [stat_summary()]
276276
#'
277-
#' @param x numeric vector
278-
#' @param mult number of multiples of standard error
279-
#' @return A data frame with columns `y`, `ymin`, and `ymax`.
277+
#' @param x numeric vector.
278+
#' @param mult number of multiples of standard error.
279+
#' @return A data frame with three columns:
280+
#' \describe{
281+
#' \item{`y`}{ The mean.}
282+
#' \item{`ymin`}{ The mean minus the multiples of the standard error.}
283+
#' \item{`ymax`}{ The mean plus the multiples of the standard error.}
284+
#' }
280285
#' @export
281286
#' @examples
282287
#' x <- rnorm(100)

man/geom_smooth.Rd

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

man/mean_se.Rd

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

man/midwest.Rd

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

man/stat_summary.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.

tests/testthat/test-facet-.r

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,10 @@ test_that("facet_grid() accepts vars()", {
125125
expect_identical(grid$params$rows, quos(foo = foo))
126126
expect_identical(grid$params$cols, quos(bar = bar))
127127

128-
expect_equal(facet_grid(vars(am, vs)), facet_grid(am + vs ~ .))
129-
expect_equal(facet_grid(vars(am, vs), vars(cyl)), facet_grid(am + vs ~ cyl))
130-
expect_equal(facet_grid(NULL, vars(cyl)), facet_grid(. ~ cyl))
131-
expect_equal(facet_grid(vars(am, vs), TRUE), facet_grid(am + vs ~ ., margins = TRUE))
128+
expect_equal(facet_grid(vars(am, vs))$params, facet_grid(am + vs ~ .)$params)
129+
expect_equal(facet_grid(vars(am, vs), vars(cyl))$params, facet_grid(am + vs ~ cyl)$params)
130+
expect_equal(facet_grid(NULL, vars(cyl))$params, facet_grid(. ~ cyl)$params)
131+
expect_equal(facet_grid(vars(am, vs), TRUE)$params, facet_grid(am + vs ~ ., margins = TRUE)$params)
132132
})
133133

134134
test_that("facet_grid() fails if passed both a formula and a vars()", {

0 commit comments

Comments
 (0)