diff --git a/NAMESPACE b/NAMESPACE index 787c535e..6d62bc40 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -166,4 +166,5 @@ importFrom(graphics,plot) importFrom(graphics,rect) importFrom(graphics,text) importFrom(lifecycle,deprecate_soft) +importFrom(lifecycle,deprecated) importFrom(munsell,mnsl) diff --git a/R/breaks-retired.R b/R/breaks-retired.R index c0a413d5..d2cb42ed 100644 --- a/R/breaks-retired.R +++ b/R/breaks-retired.R @@ -1,6 +1,6 @@ #' Regularly spaced dates #' -#' \Sexpr[results=rd, stage=render]{lifecycle::badge("retired")} +#' `r lifecycle::badge('superseded')` #' Use `breaks_width()` instead. #' #' @param width an interval specification, one of "sec", "min", "hour", @@ -15,7 +15,7 @@ date_breaks <- function(width = "1 month") { #' Pretty breaks on transformed scale #' -#' \Sexpr[results=rd, stage=render]{lifecycle::badge("retired")} +#' `r lifecycle::badge('superseded')` #' These often do not produce very attractive breaks. #' #' @param trans function of single variable, `x`, that given a numeric @@ -42,7 +42,7 @@ trans_breaks <- function(trans, inv, n = 5, ...) { #' Compute breaks for continuous scale #' -#' \Sexpr[results=rd, stage=render]{lifecycle::badge("retired")} +#' `r lifecycle::badge('superseded')` #' This function wraps up the components needed to go from a continuous range #' to a set of breaks and labels suitable for display on axes or legends. #' diff --git a/R/breaks.r b/R/breaks.r index f5b67d40..c591bb9b 100644 --- a/R/breaks.r +++ b/R/breaks.r @@ -75,7 +75,7 @@ extended_breaks <- breaks_extended #' primarily useful for date/times, as [extended_breaks()] should do a slightly #' better job for numeric scales. #' -#' `pretty_breaks()` is retired; use `breaks_pretty()` instead. +#' `pretty_breaks()` is superseded; use `breaks_pretty()` instead. #' #' @inheritParams breaks_extended #' @param ... other arguments passed on to [pretty()] diff --git a/R/label-date.R b/R/label-date.R index ce2204ed..0b908bdc 100644 --- a/R/label-date.R +++ b/R/label-date.R @@ -9,7 +9,7 @@ #' `date_short()` formats changes (e.g. new month, new year) specially. #' #' @section Old interface: -#' `date_format()` and `time_format()` are retired; please use `label_date()` +#' `date_format()` and `time_format()` are superseded; please use `label_date()` #' and `label_time()` instead. #' @inherit number_format return #' @param format For `date_format()` and `time_format()` a date/time format diff --git a/R/label-dollar.R b/R/label-dollar.R index 511ff50e..fe84e0bb 100644 --- a/R/label-dollar.R +++ b/R/label-dollar.R @@ -4,7 +4,7 @@ #' a convenient heuristic. #' #' @section Old interface: -#' `dollar()` and `format_dollar()` are retired; please use `label_dollar()` +#' `dollar()` and `format_dollar()` are superseded; please use `label_dollar()` #' instead. #' #' @inherit number_format return params diff --git a/R/label-expression.R b/R/label-expression.R index 0411cdcd..fb3e54d5 100644 --- a/R/label-expression.R +++ b/R/label-expression.R @@ -5,7 +5,7 @@ #' with each string. #' #' @section Old interface: -#' `parse_format()` and `math_format()` was retired; please use +#' `parse_format()` and `math_format()` was superseded; please use #' `label_parse()` and `label_math()` instead. #' @inherit number_format return #' @seealso [plotmath] for the details of mathematical formatting in R. diff --git a/R/label-number.r b/R/label-number.r index 36658e9d..b7acfb58 100644 --- a/R/label-number.r +++ b/R/label-number.r @@ -14,7 +14,7 @@ #' they work similarly for all scales, including those that generate legends #' rather than axes. #' @section Old interface: -#' `number_format()`, `comma_format()`, and `comma()` are retired; please use +#' `number_format()`, `comma_format()`, and `comma()` are superseded; please use #' `label_number()` and `label_comma()` instead. #' @param x A numeric vector to format. #' @param accuracy A number to round to. Use (e.g.) `0.01` to show 2 decimal diff --git a/R/label-ordinal.R b/R/label-ordinal.R index 80f7a3c9..76957708 100644 --- a/R/label-ordinal.R +++ b/R/label-ordinal.R @@ -4,7 +4,7 @@ #' 3rd). Built-in rules are provided for English, French, and Spanish. #' #' @section Old interface: -#' `ordinal()` and `format_ordinal()` are retired; please use `label_ordinal()` +#' `ordinal()` and `format_ordinal()` are superseded; please use `label_ordinal()` #' instead. #' @inherit number_format return params #' @param prefix,suffix Symbols to display before and after value. diff --git a/R/label-percent.R b/R/label-percent.R index db15f2ba..e597236e 100644 --- a/R/label-percent.R +++ b/R/label-percent.R @@ -1,7 +1,7 @@ #' Label percentages (2.5%, 50%, etc) #' #' @section Old interface: -#' `percent()` and `percent_format()` are retired; please use `label_percent()` +#' `percent()` and `percent_format()` are superseded; please use `label_percent()` #' instead. #' @inherit number_format return params #' @export diff --git a/R/label-pvalue.R b/R/label-pvalue.R index 4afd447c..d628fdb4 100644 --- a/R/label-pvalue.R +++ b/R/label-pvalue.R @@ -3,7 +3,7 @@ #' Formatter for p-values, using "<" and ">" for p-values close to 0 and 1. #' #' @section Old interface: -#' `pvalue()` and `pvalue_dollar()` are retired; please use `label_pvalue()` +#' `pvalue()` and `pvalue_dollar()` are superseded; please use `label_pvalue()` #' instead. #' @inherit number_format return params #' @param prefix A character vector of length 3 giving the prefixes to diff --git a/R/label-scientific.R b/R/label-scientific.R index 9aa9778e..e857ae8c 100644 --- a/R/label-scientific.R +++ b/R/label-scientific.R @@ -1,7 +1,7 @@ #' Label numbers with scientific notation (e.g. 1e05, 1.5e-02) #' #' @section Old interface: -#' `scientific_format()` and `scientific()` are retired; please use +#' `scientific_format()` and `scientific()` are superseded; please use #' `label_scientific()`. #' @inherit number_format return params #' @param digits Number of digits to show before exponent. diff --git a/R/label-wrap.R b/R/label-wrap.R index ea671d36..938a345e 100644 --- a/R/label-wrap.R +++ b/R/label-wrap.R @@ -3,7 +3,7 @@ #' Uses [strwrap()] to split long labels across multiple lines. #' #' @section Old interface: -#' `wrap_format()` is retired; please use `label_format()` instead. +#' `wrap_format()` is superseded; please use `label_format()` instead. #' @inherit number_format return #' @param width Number of characters per line. #' @export diff --git a/R/labels-retired.R b/R/labels-retired.R index d3b3ae29..c43da2fc 100644 --- a/R/labels-retired.R +++ b/R/labels-retired.R @@ -1,6 +1,6 @@ #' Older interface to `label_bytes()` #' -#' \Sexpr[results=rd, stage=render]{lifecycle::badge("retired")} +#' `r lifecycle::badge('superseded')` #' These functions are kept for backward compatibility, but you should switch #' to [label_bytes()] for new code. #' @@ -66,7 +66,7 @@ validate_byte_symbol <- function(symbol, symbols, default = "auto") { #' Format labels after transformation #' -#' \Sexpr[results=rd, stage=render]{lifecycle::badge("retired")} +#' `r lifecycle::badge('superseded')` #' #' @param trans transformation to apply #' @param format additional formatter to apply after transformation @@ -90,7 +90,7 @@ trans_format <- function(trans, format = scientific_format()) { #' Unit labels #' -#' \Sexpr[results=rd, stage=render]{lifecycle::badge("retired")} +#' `r lifecycle::badge('superseded')` #' This function is kept for backward compatiblity; you should either use #' [label_number()] or [label_number_si()] instead. #' @@ -123,7 +123,7 @@ unit_format <- function(accuracy = NULL, scale = 1, prefix = "", #' Label using `format()` #' -#' \Sexpr[results=rd, stage=render]{lifecycle::badge("retired")} +#' `r lifecycle::badge('superseded')` #' This function is kept for backward compatiblity; you should either use #' [label_number()] or [label_date()] instead. #' diff --git a/R/scales-package.R b/R/scales-package.R index 981b9827..8c593b5f 100644 --- a/R/scales-package.R +++ b/R/scales-package.R @@ -6,5 +6,6 @@ # roxygen namespace tags. Modify with care! ## usethis namespace: start #' @importFrom lifecycle deprecate_soft +#' @importFrom lifecycle deprecated ## usethis namespace: end NULL diff --git a/man/breaks_pretty.Rd b/man/breaks_pretty.Rd index 3265ab8a..dfe26274 100644 --- a/man/breaks_pretty.Rd +++ b/man/breaks_pretty.Rd @@ -19,7 +19,7 @@ primarily useful for date/times, as \code{\link[=extended_breaks]{extended_break better job for numeric scales. } \details{ -\code{pretty_breaks()} is retired; use \code{breaks_pretty()} instead. +\code{pretty_breaks()} is superseded; use \code{breaks_pretty()} instead. } \examples{ one_month <- as.POSIXct(c("2020-05-01", "2020-06-01")) diff --git a/man/cbreaks.Rd b/man/cbreaks.Rd index ec493887..24f61a8c 100644 --- a/man/cbreaks.Rd +++ b/man/cbreaks.Rd @@ -20,7 +20,7 @@ breaks are - it is extremely dangerous to supply labels if you don't know what the breaks will be.} } \description{ -\Sexpr[results=rd, stage=render]{lifecycle::badge("retired")} +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#superseded}{\figure{lifecycle-superseded.svg}{options: alt='[Superseded]'}}}{\strong{[Superseded]}} This function wraps up the components needed to go from a continuous range to a set of breaks and labels suitable for display on axes or legends. } diff --git a/man/date_breaks.Rd b/man/date_breaks.Rd index f5ed8bb1..08ae5cd7 100644 --- a/man/date_breaks.Rd +++ b/man/date_breaks.Rd @@ -12,7 +12,7 @@ date_breaks(width = "1 month") followed by "s". Fractional seconds are supported.} } \description{ -\Sexpr[results=rd, stage=render]{lifecycle::badge("retired")} +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#superseded}{\figure{lifecycle-superseded.svg}{options: alt='[Superseded]'}}}{\strong{[Superseded]}} Use \code{breaks_width()} instead. } \keyword{internal} diff --git a/man/figures/lifecycle-soft-deprecated.svg b/man/figures/lifecycle-soft-deprecated.svg deleted file mode 100644 index 9f014fd1..00000000 --- a/man/figures/lifecycle-soft-deprecated.svg +++ /dev/null @@ -1 +0,0 @@ -lifecyclelifecyclesoft-deprecatedsoft-deprecated \ No newline at end of file diff --git a/man/figures/lifecycle-retired.svg b/man/figures/lifecycle-superseded.svg similarity index 52% rename from man/figures/lifecycle-retired.svg rename to man/figures/lifecycle-superseded.svg index 33f406b1..75f24f55 100644 --- a/man/figures/lifecycle-retired.svg +++ b/man/figures/lifecycle-superseded.svg @@ -1 +1 @@ - lifecyclelifecycleretiredretired \ No newline at end of file + lifecyclelifecyclesupersededsuperseded \ No newline at end of file diff --git a/man/format_format.Rd b/man/format_format.Rd index 148f08cf..c2ff6e8a 100644 --- a/man/format_format.Rd +++ b/man/format_format.Rd @@ -10,7 +10,7 @@ format_format(...) \item{...}{Arguments passed on to \code{\link[=format]{format()}}.} } \description{ -\Sexpr[results=rd, stage=render]{lifecycle::badge("retired")} +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#superseded}{\figure{lifecycle-superseded.svg}{options: alt='[Superseded]'}}}{\strong{[Superseded]}} This function is kept for backward compatiblity; you should either use \code{\link[=label_number]{label_number()}} or \code{\link[=label_date]{label_date()}} instead. } diff --git a/man/label_date.Rd b/man/label_date.Rd index 2a1230dc..6f02bb55 100644 --- a/man/label_date.Rd +++ b/man/label_date.Rd @@ -51,7 +51,7 @@ but uses a slightly different approach: \code{ConciseDateFormatter} formats } \section{Old interface}{ -\code{date_format()} and \code{time_format()} are retired; please use \code{label_date()} +\code{date_format()} and \code{time_format()} are superseded; please use \code{label_date()} and \code{label_time()} instead. } diff --git a/man/label_dollar.Rd b/man/label_dollar.Rd index d0c614da..de93d533 100644 --- a/man/label_dollar.Rd +++ b/man/label_dollar.Rd @@ -103,7 +103,7 @@ a convenient heuristic. } \section{Old interface}{ -\code{dollar()} and \code{format_dollar()} are retired; please use \code{label_dollar()} +\code{dollar()} and \code{format_dollar()} are superseded; please use \code{label_dollar()} instead. } diff --git a/man/label_number.Rd b/man/label_number.Rd index 6d97d988..3155caa8 100644 --- a/man/label_number.Rd +++ b/man/label_number.Rd @@ -112,7 +112,7 @@ that inserts a comma every three digits. } \section{Old interface}{ -\code{number_format()}, \code{comma_format()}, and \code{comma()} are retired; please use +\code{number_format()}, \code{comma_format()}, and \code{comma()} are superseded; please use \code{label_number()} and \code{label_comma()} instead. } diff --git a/man/label_ordinal.Rd b/man/label_ordinal.Rd index 71f592f5..9069c28e 100644 --- a/man/label_ordinal.Rd +++ b/man/label_ordinal.Rd @@ -72,7 +72,7 @@ Round values to integers and then display as ordinal values (e.g. 1st, 2nd, } \section{Old interface}{ -\code{ordinal()} and \code{format_ordinal()} are retired; please use \code{label_ordinal()} +\code{ordinal()} and \code{format_ordinal()} are superseded; please use \code{label_ordinal()} instead. } diff --git a/man/label_parse.Rd b/man/label_parse.Rd index 0ba465c1..ed1c57d2 100644 --- a/man/label_parse.Rd +++ b/man/label_parse.Rd @@ -39,7 +39,7 @@ with each string. } \section{Old interface}{ -\code{parse_format()} and \code{math_format()} was retired; please use +\code{parse_format()} and \code{math_format()} was superseded; please use \code{label_parse()} and \code{label_math()} instead. } diff --git a/man/label_percent.Rd b/man/label_percent.Rd index cf001bbb..ca99a1c7 100644 --- a/man/label_percent.Rd +++ b/man/label_percent.Rd @@ -83,7 +83,7 @@ Label percentages (2.5\%, 50\%, etc) } \section{Old interface}{ -\code{percent()} and \code{percent_format()} are retired; please use \code{label_percent()} +\code{percent()} and \code{percent_format()} are superseded; please use \code{label_percent()} instead. } diff --git a/man/label_pvalue.Rd b/man/label_pvalue.Rd index 76259171..d3a420ac 100644 --- a/man/label_pvalue.Rd +++ b/man/label_pvalue.Rd @@ -56,7 +56,7 @@ Formatter for p-values, using "<" and ">" for p-values close to 0 and 1. } \section{Old interface}{ -\code{pvalue()} and \code{pvalue_dollar()} are retired; please use \code{label_pvalue()} +\code{pvalue()} and \code{pvalue_dollar()} are superseded; please use \code{label_pvalue()} instead. } diff --git a/man/label_scientific.Rd b/man/label_scientific.Rd index 0e5a49dc..b212f308 100644 --- a/man/label_scientific.Rd +++ b/man/label_scientific.Rd @@ -71,7 +71,7 @@ Label numbers with scientific notation (e.g. 1e05, 1.5e-02) } \section{Old interface}{ -\code{scientific_format()} and \code{scientific()} are retired; please use +\code{scientific_format()} and \code{scientific()} are superseded; please use \code{label_scientific()}. } diff --git a/man/label_wrap.Rd b/man/label_wrap.Rd index 6a71cac8..702a0179 100644 --- a/man/label_wrap.Rd +++ b/man/label_wrap.Rd @@ -27,7 +27,7 @@ Uses \code{\link[=strwrap]{strwrap()}} to split long labels across multiple line } \section{Old interface}{ -\code{wrap_format()} is retired; please use \code{label_format()} instead. +\code{wrap_format()} is superseded; please use \code{label_format()} instead. } \examples{ diff --git a/man/number_bytes_format.Rd b/man/number_bytes_format.Rd index a4f7c4df..32747e49 100644 --- a/man/number_bytes_format.Rd +++ b/man/number_bytes_format.Rd @@ -18,7 +18,7 @@ variants for binary units.} \item{units}{which unit base to use, "binary" (1024 base) or "si" (1000 base)} } \description{ -\Sexpr[results=rd, stage=render]{lifecycle::badge("retired")} +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#superseded}{\figure{lifecycle-superseded.svg}{options: alt='[Superseded]'}}}{\strong{[Superseded]}} These functions are kept for backward compatibility, but you should switch to \code{\link[=label_bytes]{label_bytes()}} for new code. } diff --git a/man/trans_breaks.Rd b/man/trans_breaks.Rd index 7eea4a80..8ff170f8 100644 --- a/man/trans_breaks.Rd +++ b/man/trans_breaks.Rd @@ -17,7 +17,7 @@ vector returns the transformed values} \item{...}{other arguments passed on to pretty} } \description{ -\Sexpr[results=rd, stage=render]{lifecycle::badge("retired")} +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#superseded}{\figure{lifecycle-superseded.svg}{options: alt='[Superseded]'}}}{\strong{[Superseded]}} These often do not produce very attractive breaks. } \examples{ diff --git a/man/trans_format.Rd b/man/trans_format.Rd index 500a54ae..72d3e003 100644 --- a/man/trans_format.Rd +++ b/man/trans_format.Rd @@ -16,7 +16,7 @@ a function with single parameter x, a numeric vector, that returns a character vector of list of expressions } \description{ -\Sexpr[results=rd, stage=render]{lifecycle::badge("retired")} +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#superseded}{\figure{lifecycle-superseded.svg}{options: alt='[Superseded]'}}}{\strong{[Superseded]}} } \examples{ tf <- trans_format("log10", scientific_format()) diff --git a/man/unit_format.Rd b/man/unit_format.Rd index c365415c..377ffd36 100644 --- a/man/unit_format.Rd +++ b/man/unit_format.Rd @@ -48,7 +48,7 @@ width (see \code{\link[base:format]{base::format()}}).} \item{...}{Other arguments passed on to \code{\link[base:format]{base::format()}}.} } \description{ -\Sexpr[results=rd, stage=render]{lifecycle::badge("retired")} +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#superseded}{\figure{lifecycle-superseded.svg}{options: alt='[Superseded]'}}}{\strong{[Superseded]}} This function is kept for backward compatiblity; you should either use \code{\link[=label_number]{label_number()}} or \code{\link[=label_number_si]{label_number_si()}} instead. }