diff --git a/.github/prehooks/commit-msg b/.github/prehooks/commit-msg index 10906f01f..6e18ce448 100755 --- a/.github/prehooks/commit-msg +++ b/.github/prehooks/commit-msg @@ -60,6 +60,7 @@ else fi git add data-raw/* +git add data/* git add -u exit 0 diff --git a/.github/prehooks/pre-commit b/.github/prehooks/pre-commit index a3e82d42e..2bbc61e2a 100755 --- a/.github/prehooks/pre-commit +++ b/.github/prehooks/pre-commit @@ -51,6 +51,7 @@ if command -v Rscript > /dev/null; then currentpkg=$(Rscript -e "cat(pkgload::pkg_name())") echo "- Adding changed files in ./data-raw and ./man to this commit" git add data-raw/* + git add data/* git add man/* git add R/sysdata.rda git add NAMESPACE @@ -112,6 +113,7 @@ echo "" echo "${currentversion}" > .git/commit_version.tmp git add data-raw/* +git add data/* git add -u exit 0 diff --git a/DESCRIPTION b/DESCRIPTION index bdc9a28a3..310016939 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: AMR -Version: 2.1.1.9286 +Version: 2.1.1.9287 Date: 2025-06-01 Title: Antimicrobial Resistance Data Analysis Description: Functions to simplify and standardise antimicrobial resistance (AMR) diff --git a/NAMESPACE b/NAMESPACE index 35d997aef..0cc72d821 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -166,7 +166,6 @@ export(amr_distance_from_row) export(amr_selector) export(anti_join_microorganisms) export(antibiogram) -export(antibiotics) export(antifungals) export(antimicrobials_equal) export(antimycobacterials) diff --git a/NEWS.md b/NEWS.md index 1642cbf9d..4f5c98baa 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,50 +1,9 @@ -# AMR 2.1.1.9286 +# AMR 2.1.1.9287 *(this beta version will eventually become v3.0. We're happy to reach a new major milestone soon, which will be all about the new One Health support! Install this beta using [the instructions here](https://amr-for-r.org/#get-this-package).)* This package now supports not only tools for AMR data analysis in clinical settings, but also for veterinary and environmental microbiology. This was made possible through a collaboration with the [University of Prince Edward Island's Atlantic Veterinary College](https://www.upei.ca/avc), Canada. To celebrate this great improvement of the package, we also updated the package logo to reflect this change. -## tl;dr - -- Scope Expansion: One Health support (Human + Veterinary + Environmental microbiology). -- Data Updates: - - `antibiotics` renamed to `antimicrobials`. - - Veterinary antimicrobials and WHOCC codes added. - - MycoBank fungal taxonomy integrated (+20,000 fungi). -- Breakpoints & Interpretations: - - CLSI/EUCAST 2024-2025 breakpoints added; EUCAST 2025 default. - - `as.sir()` supports NI/SDD levels; parallel computation enabled. - - Custom S/I/R/SDD/NI definitions allowed. - - Improved handling of capped MICs. -- New Tools & Functions: - - WISCA antibiogram support (`antibiogram()`, `wisca()`). - - New ggplot2 extensions: `scale_*_mic()`, `scale_*_sir()`, `rescale_mic()`. - - New utility functions: `top_n_microorganisms()`, `mo_group_members()`, `mic_p50()`, `mic_p90()`. -- Predictive Modelling: - - Full tidymodels compatibility for antimicrobial selectors. - - Deprecated `resistance_predict()` and `sir_predict()`. -- Python Compatibility: AMR R package now runs in Python. -- Selector Improvements: - * Added selectors (`isoxazolylpenicillins()`, `monobactams()`, `nitrofurans()`, `phenicols()`, `rifamycins()`, and `sulfonamides()`) - - Selectors renamed from `ab_*` to `amr_*`; old names deprecated. -- MIC/Disks Handling: - - MIC strict comparisons, added levels. - - Disk diffusion range expanded (0–50 mm). -- EUCAST Rules and MDROs: - - EUCAST v12–v15 rules implemented. - - Dutch MDRO 2024 guideline support in `mdro()`. -- Infrastructure: - - New website: https://amr-for-r.org. - - Improved `vctrs` integration for tidyverse workflows. - - Dropped SAS `.xpt` file support. -- Other Fixes & Enhancements: - - Support for 8 new languages, adding to a total of 28 languages. - - Faster microorganism identification. - - Improved antimicrobial and MIC handling. - - Extended documentation, additional contributors acknowledged. - -## Full Changelog - ### Breaking * Dataset `antibiotics` has been renamed to `antimicrobials` as the data set contains more than just antibiotics. Using `antibiotics` will still work, but now returns a warning. * Removed all functions and references that used the deprecated `rsi` class, which were all replaced with their `sir` equivalents over two years ago. diff --git a/R/zz_deprecated.R b/R/zz_deprecated.R index 080122e77..82fc127cb 100755 --- a/R/zz_deprecated.R +++ b/R/zz_deprecated.R @@ -35,17 +35,6 @@ #' @rdname AMR-deprecated NULL -#' @rdname AMR-deprecated -#' @usage antibiotics -#' @export -antibiotics <- local({ - warned <- FALSE - value <- AMR::antimicrobials - structure( - value, - class = c("deprecated_amr_dataset", class(value)) - ) -}) .amr_deprecation_warn <- function() { deprecation_warning(old = "antibiotics", new = "antimicrobials", is_dataset = TRUE) invisible(NULL) diff --git a/cran-comments.md b/cran-comments.md index c131e679d..9c7b4dba8 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,5 +1,5 @@ -As with all previous >20 releases, some CHECKs might return a NOTE for *just* hitting the installation size limit, though its size has been brought down to a minimum in collaboration with CRAN maintainers previously. +As with all previous >20 releases, some CHECKs on `oldrel` may return a `NOTE` for narrowly exceeding the installation size limit. This has been reduced to a minimum in prior coordination with CRAN maintainers and currently returns only an `INFO` on `release` and `devel`. -We consider this a high-impact package: it was published in the Journal of Statistical Software (2022), is included in a CRAN Task View (Epidemiology), and is according to download stats (cranlogs) used in almost all countries in the world. If there is anything to note, please let us know up-front without directly archiving the current version. That said, we continually unit test our package extensively and have no reason to assume that anything is wrong. +We treat this as a high-impact package: it was published in the *Journal of Statistical Software* (2022), is listed in the CRAN Task View "Epidemiology", and (based on cranlogs download statistics) is used globally. If there is anything to address, we would appreciate being informed before archiving the current version. We conduct extensive automated unit testing and have no indication of unresolved issues. -Thanks for maintaining and hosting CRAN! It's empowering R and its use enormously! +Thank you for your continued maintenance of CRAN, it plays a central role in the success and growth of the R ecosystem. diff --git a/data-raw/_pre_commit_checks.R b/data-raw/_pre_commit_checks.R index e1c2f6798..bf626fc68 100644 --- a/data-raw/_pre_commit_checks.R +++ b/data-raw/_pre_commit_checks.R @@ -625,6 +625,11 @@ if (changed_md5(dosage)) { try(arrow::write_parquet(dosage, "data-raw/datasets/dosage.parquet"), silent = TRUE) } +# Set `antibiotics` as a deprecated data set +antibiotics <- structure(antimicrobials, class = c("deprecated_amr_dataset", class(antimicrobials))) +usethis::use_data(antibiotics, internal = FALSE, overwrite = TRUE, compress = "xz", version = 2) +rm(antibiotics) + suppressMessages(reset_AMR_locale()) devtools::load_all(quiet = TRUE) diff --git a/data/antibiotics.rda b/data/antibiotics.rda new file mode 100644 index 000000000..93ffa1f8c Binary files /dev/null and b/data/antibiotics.rda differ diff --git a/index.Rmd b/index.Rmd index df54a5631..39faabd1a 100644 --- a/index.Rmd +++ b/index.Rmd @@ -192,7 +192,7 @@ out %>% set_ab_names(property = "atc") This package was intended as a comprehensive toolbox for integrated AMR data analysis. This package can be used for: - * Reference for the taxonomy of microorganisms, since the package contains all microbial (sub)species from the List of Prokaryotic names with Standing in Nomenclature ([LPSN]((https://lpsn.dsmz.de))) and the Global Biodiversity Information Facility ([GBIF](https://www.gbif.org)) ([manual](./reference/mo_property.html)) + * Reference for the taxonomy of microorganisms, since the package contains all microbial (sub)species from the List of Prokaryotic names with Standing in Nomenclature ([LPSN](https://lpsn.dsmz.de)) and the Global Biodiversity Information Facility ([GBIF](https://www.gbif.org)) ([manual](./reference/mo_property.html)) * Interpreting raw MIC and disk diffusion values, based on any CLSI or EUCAST guideline ([manual](./reference/as.sir.html)) * Retrieving antimicrobial drug names, doses and forms of administration from clinical health care records ([manual](./reference/ab_from_text.html)) * Determining first isolates to be used for AMR data analysis ([manual](./reference/first_isolate.html)) diff --git a/index.md b/index.md index 3d47d246b..ca584ebc0 100644 --- a/index.md +++ b/index.md @@ -387,7 +387,7 @@ data analysis. This package can be used for: - Reference for the taxonomy of microorganisms, since the package contains all microbial (sub)species from the List of Prokaryotic names - with Standing in Nomenclature ([LPSN]((https://lpsn.dsmz.de))) and the + with Standing in Nomenclature ([LPSN](https://lpsn.dsmz.de)) and the Global Biodiversity Information Facility ([GBIF](https://www.gbif.org)) ([manual](./reference/mo_property.html)) diff --git a/man/AMR-deprecated.Rd b/man/AMR-deprecated.Rd index 881d24955..fa51804a8 100644 --- a/man/AMR-deprecated.Rd +++ b/man/AMR-deprecated.Rd @@ -1,18 +1,11 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/zz_deprecated.R -\docType{data} \name{AMR-deprecated} \alias{AMR-deprecated} -\alias{antibiotics} \alias{ab_class} \alias{ab_selector} \title{Deprecated Functions, Arguments, or Datasets} -\format{ -An object of class \code{deprecated_amr_dataset} (inherits from \code{tbl_df}, \code{tbl}, \code{data.frame}) with 497 rows and 14 columns. -} \usage{ -antibiotics - ab_class(...) ab_selector(...) @@ -20,5 +13,4 @@ ab_selector(...) \description{ These objects are so-called '\link{Deprecated}'. \strong{They will be removed in a future version of this package.} Using these will give a warning with the name of the alternative object it has been replaced by (if there is one). } -\keyword{datasets} \keyword{internal} diff --git a/vignettes/welcome_to_AMR.Rmd b/vignettes/welcome_to_AMR.Rmd index 3e090e180..16422f83b 100644 --- a/vignettes/welcome_to_AMR.Rmd +++ b/vignettes/welcome_to_AMR.Rmd @@ -36,7 +36,7 @@ The `AMR` package is available in `r AMR:::vector_and(vapply(FUN.VALUE = charact This package was intended as a comprehensive toolbox for integrated AMR data analysis. This package can be used for: - * Reference for the taxonomy of microorganisms, since the package contains all microbial (sub)species from the List of Prokaryotic names with Standing in Nomenclature ([LPSN]((https://lpsn.dsmz.de))) and the Global Biodiversity Information Facility ([GBIF](https://www.gbif.org)) ([manual](https://amr-for-r.org/reference/mo_property.html)) + * Reference for the taxonomy of microorganisms, since the package contains all microbial (sub)species from the List of Prokaryotic names with Standing in Nomenclature ([LPSN](https://lpsn.dsmz.de)) and the Global Biodiversity Information Facility ([GBIF](https://www.gbif.org)) ([manual](https://amr-for-r.org/reference/mo_property.html)) * Interpreting raw MIC and disk diffusion values, based on any CLSI or EUCAST guideline ([manual](https://amr-for-r.org/reference/as.sir.html)) * Retrieving antimicrobial drug names, doses and forms of administration from clinical health care records ([manual](https://amr-for-r.org/reference/ab_from_text.html)) * Determining first isolates to be used for AMR data analysis ([manual](https://amr-for-r.org/reference/first_isolate.html))