diff --git a/DESCRIPTION b/DESCRIPTION index ac7a6527b..5c98dfcad 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: AMR -Version: 2.1.1.9186 +Version: 2.1.1.9187 Date: 2025-03-07 Title: Antimicrobial Resistance Data Analysis Description: Functions to simplify and standardise antimicrobial resistance (AMR) diff --git a/NEWS.md b/NEWS.md index 22993b25c..46a72496a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# AMR 2.1.1.9186 +# AMR 2.1.1.9187 *(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://msberends.github.io/AMR/#latest-development-version).)* diff --git a/PythonPackage/AMR/AMR.egg-info/PKG-INFO b/PythonPackage/AMR/AMR.egg-info/PKG-INFO index fe244a9f4..6ffb36834 100644 --- a/PythonPackage/AMR/AMR.egg-info/PKG-INFO +++ b/PythonPackage/AMR/AMR.egg-info/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 2.2 Name: AMR -Version: 2.1.1.9186 +Version: 2.1.1.9187 Summary: A Python wrapper for the AMR R package Home-page: https://github.com/msberends/AMR Author: Matthijs Berends diff --git a/PythonPackage/AMR/dist/amr-2.1.1.9186.tar.gz b/PythonPackage/AMR/dist/amr-2.1.1.9186.tar.gz deleted file mode 100644 index 5ddbf31b9..000000000 Binary files a/PythonPackage/AMR/dist/amr-2.1.1.9186.tar.gz and /dev/null differ diff --git a/PythonPackage/AMR/dist/amr-2.1.1.9186-py3-none-any.whl b/PythonPackage/AMR/dist/amr-2.1.1.9187-py3-none-any.whl similarity index 86% rename from PythonPackage/AMR/dist/amr-2.1.1.9186-py3-none-any.whl rename to PythonPackage/AMR/dist/amr-2.1.1.9187-py3-none-any.whl index 4f0c0925b..6f4dae0c1 100644 Binary files a/PythonPackage/AMR/dist/amr-2.1.1.9186-py3-none-any.whl and b/PythonPackage/AMR/dist/amr-2.1.1.9187-py3-none-any.whl differ diff --git a/PythonPackage/AMR/dist/amr-2.1.1.9187.tar.gz b/PythonPackage/AMR/dist/amr-2.1.1.9187.tar.gz new file mode 100644 index 000000000..c99d56927 Binary files /dev/null and b/PythonPackage/AMR/dist/amr-2.1.1.9187.tar.gz differ diff --git a/PythonPackage/AMR/setup.py b/PythonPackage/AMR/setup.py index 7e27980ee..1a69aff62 100644 --- a/PythonPackage/AMR/setup.py +++ b/PythonPackage/AMR/setup.py @@ -2,7 +2,7 @@ from setuptools import setup, find_packages setup( name='AMR', - version='2.1.1.9186', + version='2.1.1.9187', packages=find_packages(), install_requires=[ 'rpy2', diff --git a/R/antibiogram.R b/R/antibiogram.R index 0a7a0720a..410534326 100755 --- a/R/antibiogram.R +++ b/R/antibiogram.R @@ -606,9 +606,6 @@ antibiogram.default <- function(x, warning_("All combinations had less than `minimum = ", minimum, "` results, returning an empty antibiogram") return(as_original_data_class(data.frame(), class(x), extra_class = "antibiogram")) } else if (any(out$n_tested < minimum, na.rm = TRUE)) { - out <- out %pm>% - # also for WISCA, refrain from anything below 15 isolates: - subset(n_tested > 15) mins <- sum(out$n_tested < minimum, na.rm = TRUE) if (wisca == FALSE) { out <- out %pm>% @@ -620,7 +617,6 @@ antibiogram.default <- function(x, warning_("Number of tested isolates per regimen should exceed ", minimum, " for each species. Coverage estimates might be inaccurate.", call = FALSE) } } - if (NROW(out) == 0) { return(as_original_data_class(data.frame(), class(x), extra_class = "antibiogram")) } @@ -671,6 +667,7 @@ antibiogram.default <- function(x, out_wisca <- out %pm>% pm_group_by(ab) } + out_wisca <- out_wisca %pm>% pm_summarise( coverage = NA_real_, @@ -680,6 +677,7 @@ antibiogram.default <- function(x, n_tested = sum(n_tested, na.rm = TRUE), n_susceptible = sum(n_susceptible, na.rm = TRUE) ) + out_wisca$p_susceptible <- out_wisca$n_susceptible / out_wisca$n_tested if (isTRUE(has_syndromic_group)) { diff --git a/R/data.R b/R/data.R index 869ff3936..960973d0e 100755 --- a/R/data.R +++ b/R/data.R @@ -74,7 +74,6 @@ #' * European Commission Public Health PHARMACEUTICALS - COMMUNITY REGISTER: #' @inheritSection WHOCC WHOCC #' @seealso [microorganisms], [intrinsic_resistant] -#' @aliases antibiotics #' @examples #' antimicrobials #' antivirals diff --git a/R/temp_file b/R/temp_file deleted file mode 100644 index 2cec545fc..000000000 --- a/R/temp_file +++ /dev/null @@ -1 +0,0 @@ -test_that("key_antimicrobials works", { diff --git a/R/zz_deprecated.R b/R/zz_deprecated.R index 06ec4ad20..e03ef4c2b 100755 --- a/R/zz_deprecated.R +++ b/R/zz_deprecated.R @@ -36,6 +36,7 @@ NULL #' @rdname AMR-deprecated +#' @usage NULL #' @export "antibiotics" diff --git a/R/zzz.R b/R/zzz.R index d89f1e869..9ee8a7e1f 100755 --- a/R/zzz.R +++ b/R/zzz.R @@ -210,7 +210,9 @@ AMR_env$cross_icon <- if (isTRUE(base::l10n_info()$`UTF-8`)) "\u00d7" else "x" # deprecated antibiotics data set makeActiveBinding("antibiotics", function() { - deprecation_warning(old = "antibiotics", new = "antimicrobials", is_function = FALSE, is_dataset = TRUE) + if (interactive()) { + deprecation_warning(old = "antibiotics", new = "antimicrobials", is_function = FALSE, is_dataset = TRUE) + } AMR::antimicrobials }, env = asNamespace(pkgname)) diff --git a/data-raw/gpt_training_text_v2.1.1.9186.txt b/data-raw/gpt_training_text_v2.1.1.9187.txt similarity index 99% rename from data-raw/gpt_training_text_v2.1.1.9186.txt rename to data-raw/gpt_training_text_v2.1.1.9187.txt index 396aa19d7..e7b496041 100644 --- a/data-raw/gpt_training_text_v2.1.1.9186.txt +++ b/data-raw/gpt_training_text_v2.1.1.9187.txt @@ -1,6 +1,6 @@ This knowledge base contains all context you must know about the AMR package for R. You are a GPT trained to be an assistant for the AMR package in R. You are an incredible R specialist, especially trained in this package and in the tidyverse. -First and foremost, you are trained on version 2.1.1.9186. Remember this whenever someone asks which AMR package version you’re at. +First and foremost, you are trained on version 2.1.1.9187. Remember this whenever someone asks which AMR package version you’re at. Below are the contents of the file, the file, and all the files (documentation) in the package. Every file content is split using 100 hypens. ---------------------------------------------------------------------------------------------------- @@ -735,8 +735,6 @@ THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/AMR-deprecated.Rd': An object of class \code{tbl_df} (inherits from \code{tbl}, \code{data.frame}) with 487 rows and 14 columns. } \usage{ -antibiotics - ab_class(...) ab_selector(...) @@ -2498,7 +2496,6 @@ THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/antimicrobials.Rd': \docType{data} \name{antimicrobials} \alias{antimicrobials} -\alias{antibiotics} \alias{antivirals} \title{Data Sets with 607 Antimicrobial Drugs} \format{ diff --git a/man/AMR-deprecated.Rd b/man/AMR-deprecated.Rd index 173621038..b5ba9f605 100644 --- a/man/AMR-deprecated.Rd +++ b/man/AMR-deprecated.Rd @@ -11,8 +11,6 @@ An object of class \code{tbl_df} (inherits from \code{tbl}, \code{data.frame}) with 487 rows and 14 columns. } \usage{ -antibiotics - ab_class(...) ab_selector(...) diff --git a/man/antimicrobials.Rd b/man/antimicrobials.Rd index 5d8ac88d4..9de86e7f9 100644 --- a/man/antimicrobials.Rd +++ b/man/antimicrobials.Rd @@ -3,7 +3,6 @@ \docType{data} \name{antimicrobials} \alias{antimicrobials} -\alias{antibiotics} \alias{antivirals} \title{Data Sets with 607 Antimicrobial Drugs} \format{