Skip to content

Commit a312cb4

Browse files
perezp44hadley
authored andcommitted
Deprecate ggdep (#3412)
Fixes #3382
1 parent 3cfd3bb commit a312cb4

File tree

3 files changed

+5
-18
lines changed

3 files changed

+5
-18
lines changed

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# ggplot2 (development version)
22

3+
* `ggdep()` was deprecated (@perezp44, #3382).
4+
35
* Added weight aesthetic option to `stat_density()` and made scaling of
46
weights the default (@annennenne, #2902)
57

R/utilities.r

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -178,31 +178,15 @@ rescale01 <- function(x) {
178178

179179
#' Give a deprecation error, warning, or message, depending on version number.
180180
#'
181-
#' Version numbers have the format <major>.<minor>.<subminor>, like 0.9.2.
182-
#' This function compares the current version number of ggplot2 against the
183-
#' specified `version`, which is the most recent version before the
184-
#' function (or other object) was deprecated.
185-
#'
186-
#' `gg_dep` will give an error, warning, or message, depending on the
187-
#' difference between the current ggplot2 version and the specified
188-
#' `version`.
189-
#'
190-
#' If the current major number is greater than `version`'s major number,
191-
#' or if the current minor number is more than 1 greater than `version`'s
192-
#' minor number, give an error.
193-
#'
194-
#' If the current minor number differs from `version`'s minor number by
195-
#' one, give a warning.
196-
#'
197-
#' If the current subminor number differs from `version`'s subminor
198-
#' number, print a message.
181+
#' This function is deprecated.
199182
#'
200183
#' @param version The last version of ggplot2 where this function was good
201184
#' (in other words, the last version where it was not deprecated).
202185
#' @param msg The message to print.
203186
#' @keywords internal
204187
#' @export
205188
gg_dep <- function(version, msg) {
189+
.Deprecate()
206190
v <- as.package_version(version)
207191
cv <- utils::packageVersion("ggplot2")
208192

man/gg_dep.Rd

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

0 commit comments

Comments
 (0)