1
0
mirror of https://github.com/msberends/AMR.git synced 2025-09-02 22:24:07 +02:00

(v2.1.1.9125) replace 'antibiotic selectors' with 'antimicrobial selectors'

This commit is contained in:
2025-01-17 12:09:39 +01:00
parent 1697ad37ce
commit 92c4fc0f94
33 changed files with 1029 additions and 807 deletions

View File

@@ -27,14 +27,28 @@
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
# ==================================================================== #
# #' Deprecated Functions
# #'
# #' These functions are so-called '[Deprecated]'. **They will be removed in a future release.** Using the functions will give a warning with the name of the function it has been replaced by (if there is one).
# #' @keywords internal
# #' @name AMR-deprecated
# #' @rdname AMR-deprecated
# #' @export
# NULL
#' Deprecated Functions
#'
#' These functions are so-called '[Deprecated]'. **They will be removed in a future version of this package.** Using these functions will give a warning with the name of the function it has been replaced by (if there is one).
#' @keywords internal
#' @name AMR-deprecated
#' @rdname AMR-deprecated
NULL
#' @rdname AMR-deprecated
#' @export
ab_class <- function(...) {
deprecation_warning("ab_class", "amr_class")
amr_class(...)
}
#' @rdname AMR-deprecated
#' @export
ab_selector <- function(...) {
deprecation_warning("ab_selector", "amr_selector")
amr_selector(...)
}
deprecation_warning <- function(old = NULL, new = NULL, extra_msg = NULL, is_function = TRUE) {
if (is.null(old)) {
@@ -53,7 +67,7 @@ deprecation_warning <- function(old = NULL, new = NULL, extra_msg = NULL, is_fun
warning_(
ifelse(is.null(new),
paste0("The `", old, "` ", type, " is no longer in use"),
paste0("The `", old, "` ", type, " has been replaced with `", new, "`")
paste0("The `", old, "` ", type, " has been replaced with `", new, "` and will be removed in a future version")
),
ifelse(type == "argument",
". While the old argument still works, it will be removed in a future version, so please update your code.",