Skip to content

Commit 0a09967

Browse files
committed
Merge pull request #708 from BrianDiggs/fix/ggdep
Fixes for gg_dep
2 parents 4d85250 + 41c17c4 commit 0a09967

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

R/scale-area.r

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
#' @param range Range of output sizes. Should be greater than 0.
1111
#' @export
1212
scale_area <- function(..., range = c(1, 6)) {
13-
gg_dep("0.9.2",
14-
"scale_area is deprecated. Use scale_size_area instead.\n",
15-
" Note that the behavior of scale_size_area is slightly different: \n",
16-
" by default it makes the area proportional to the numeric value.\n")
13+
gg_dep("0.9.2", paste(sep = "\n",
14+
"scale_area is deprecated. Use scale_size_area instead.",
15+
" Note that the behavior of scale_size_area is slightly different:",
16+
" by default it makes the area proportional to the numeric value."))
1717
continuous_scale("size", "area", area_pal(range), ...)
1818
}

R/theme.r

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,9 +327,9 @@ opts <- function(...) {
327327
elements <- list(...)
328328
if (!is.null(elements[["title"]])) {
329329
# This is kind of a hack, but fortunately it will be removed in future versions
330-
gg_dep("0.9.1",
330+
gg_dep("0.9.1", paste(sep = "\n",
331331
'Setting the plot title with opts(title="...") is deprecated.',
332-
' Use labs(title="...") or ggtitle("...") instead.')
332+
' Use labs(title="...") or ggtitle("...") instead.'))
333333

334334
title <- elements$title
335335
elements$title <- NULL

R/utilities.r

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ if (packageVersion("plyr") <= package_version("1.7.1")) {
232232
#'
233233
#' @param version The last version of ggplot2 where this function was good
234234
#' (in other words, the last version where it was not deprecated).
235-
#' @param message The message to print.
235+
#' @param msg The message to print.
236236
#' @export
237237
gg_dep <- function(version, msg) {
238238
v <- as.package_version(version)
@@ -242,7 +242,7 @@ gg_dep <- function(version, msg) {
242242
# current minor number is more than 1 greater than last-good minor number,
243243
# give error.
244244
if (cv[[1,1]] > v[[1,1]] || cv[[1,2]] > v[[1,2]] + 1) {
245-
error(msg, " (Defunct; last used in version ", version, ")",
245+
stop(msg, " (Defunct; last used in version ", version, ")",
246246
call. = FALSE)
247247

248248
# If minor number differs by one, give warning

man/gg_dep.Rd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
function was good (in other words, the last version where
1010
it was not deprecated).}
1111

12-
\item{message}{The message to print.}
12+
\item{msg}{The message to print.}
1313
}
1414
\description{
1515
Version numbers have the format

0 commit comments

Comments
 (0)