diff --git a/DESCRIPTION b/DESCRIPTION index f55b129e..ea7700ac 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: AMR -Version: 2.1.1.9111 +Version: 2.1.1.9112 Date: 2024-12-06 Title: Antimicrobial Resistance Data Analysis Description: Functions to simplify and standardise antimicrobial resistance (AMR) diff --git a/NEWS.md b/NEWS.md index 1abc798c..af6e7a80 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# AMR 2.1.1.9111 +# AMR 2.1.1.9112 *(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 266bfe76..14498aa4 100644 --- a/PythonPackage/AMR/AMR.egg-info/PKG-INFO +++ b/PythonPackage/AMR/AMR.egg-info/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: AMR -Version: 2.1.1.9111 +Version: 2.1.1.9112 Summary: A Python wrapper for the AMR R package Home-page: https://github.com/msberends/AMR Author: Dr. Matthijs Berends diff --git a/PythonPackage/AMR/dist/AMR-2.1.1.9111-py3-none-any.whl b/PythonPackage/AMR/dist/AMR-2.1.1.9112-py3-none-any.whl similarity index 51% rename from PythonPackage/AMR/dist/AMR-2.1.1.9111-py3-none-any.whl rename to PythonPackage/AMR/dist/AMR-2.1.1.9112-py3-none-any.whl index 2b71496e..b60c2f6c 100644 Binary files a/PythonPackage/AMR/dist/AMR-2.1.1.9111-py3-none-any.whl and b/PythonPackage/AMR/dist/AMR-2.1.1.9112-py3-none-any.whl differ diff --git a/PythonPackage/AMR/dist/amr-2.1.1.9111.tar.gz b/PythonPackage/AMR/dist/amr-2.1.1.9111.tar.gz deleted file mode 100644 index 977033fd..00000000 Binary files a/PythonPackage/AMR/dist/amr-2.1.1.9111.tar.gz and /dev/null differ diff --git a/PythonPackage/AMR/dist/amr-2.1.1.9112.tar.gz b/PythonPackage/AMR/dist/amr-2.1.1.9112.tar.gz new file mode 100644 index 00000000..e15b5b2c Binary files /dev/null and b/PythonPackage/AMR/dist/amr-2.1.1.9112.tar.gz differ diff --git a/PythonPackage/AMR/setup.py b/PythonPackage/AMR/setup.py index 8a8cb7f8..aa7158fc 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.9111', + version='2.1.1.9112', packages=find_packages(), install_requires=[ 'rpy2', diff --git a/R/ab_selectors.R b/R/ab_selectors.R index 369de342..f75a2587 100755 --- a/R/ab_selectors.R +++ b/R/ab_selectors.R @@ -71,7 +71,7 @@ #' #' # you can combine selectors like you are used with tidyverse #' # e.g., for betalactams, but not the ones with an enzyme inhibitor: -#' example_isolates |> select(betalactams(), -betalactams_with_inhibitor()) +#' example_isolates %>% select(betalactams(), -betalactams_with_inhibitor()) #' #' # select only antibiotic columns with DDDs for oral treatment #' example_isolates %>% select(administrable_per_os()) diff --git a/R/sir.R b/R/sir.R index 5c818f31..14942c62 100755 --- a/R/sir.R +++ b/R/sir.R @@ -1658,15 +1658,16 @@ get_skimmers.sir <- function(column) { print.sir <- function(x, ...) { x_name <- deparse(substitute(x)) cat("Class 'sir'\n") - if (!is.null(attributes(x)$guideline) && !all(is.na(attributes(x)$guideline))) { - cat(font_blue(word_wrap("These values were interpreted using ", - font_bold(vector_and(attributes(x)$guideline, quotes = FALSE)), - " based on ", - vector_and(attributes(x)$method, quotes = FALSE), - " values. ", - "Use `sir_interpretation_history(", x_name, ")` to return a full logbook."))) - cat("\n") - } + # TODO for #170 + # if (!is.null(attributes(x)$guideline) && !all(is.na(attributes(x)$guideline))) { + # cat(font_blue(word_wrap("These values were interpreted using ", + # font_bold(vector_and(attributes(x)$guideline, quotes = FALSE)), + # " based on ", + # vector_and(attributes(x)$method, quotes = FALSE), + # " values. ", + # "Use `sir_interpretation_history(", x_name, ")` to return a full logbook."))) + # cat("\n") + # } print(as.character(x), quote = FALSE) } @@ -1749,23 +1750,25 @@ summary.sir <- function(object, ...) { c.sir <- function(...) { lst <- list(...) - guideline <- vapply(FUN.VALUE = character(1), lst, function(x) attributes(x)$guideline %or% NA_character_) - mo <- vapply(FUN.VALUE = character(1), lst, function(x) attributes(x)$mo %or% NA_character_) - ab <- vapply(FUN.VALUE = character(1), lst, function(x) attributes(x)$ab %or% NA_character_) - method <- vapply(FUN.VALUE = character(1), lst, function(x) attributes(x)$method %or% NA_character_) - ref_tbl <- vapply(FUN.VALUE = character(1), lst, function(x) attributes(x)$ref_tbl %or% NA_character_) - ref_breakpoints <- vapply(FUN.VALUE = character(1), lst, function(x) attributes(x)$ref_breakpoints %or% NA_character_) + # TODO for #170 + # guideline <- vapply(FUN.VALUE = character(1), lst, function(x) attributes(x)$guideline %or% NA_character_) + # mo <- vapply(FUN.VALUE = character(1), lst, function(x) attributes(x)$mo %or% NA_character_) + # ab <- vapply(FUN.VALUE = character(1), lst, function(x) attributes(x)$ab %or% NA_character_) + # method <- vapply(FUN.VALUE = character(1), lst, function(x) attributes(x)$method %or% NA_character_) + # ref_tbl <- vapply(FUN.VALUE = character(1), lst, function(x) attributes(x)$ref_tbl %or% NA_character_) + # ref_breakpoints <- vapply(FUN.VALUE = character(1), lst, function(x) attributes(x)$ref_breakpoints %or% NA_character_) out <- as.sir(unlist(lapply(list(...), as.character))) - if (!all(is.na(guideline))) { - attributes(out)$guideline <- guideline - attributes(out)$mo <- mo - attributes(out)$ab <- ab - attributes(out)$method <- method - attributes(out)$ref_tbl <- ref_tbl - attributes(out)$ref_breakpoints <- ref_breakpoints - } + # TODO for #170 + # if (!all(is.na(guideline))) { + # attributes(out)$guideline <- guideline + # attributes(out)$mo <- mo + # attributes(out)$ab <- ab + # attributes(out)$method <- method + # attributes(out)$ref_tbl <- ref_tbl + # attributes(out)$ref_breakpoints <- ref_breakpoints + # } out } diff --git a/data-raw/AMR intro.jpg b/data-raw/AMR intro.jpg new file mode 100644 index 00000000..dbe3dd91 Binary files /dev/null and b/data-raw/AMR intro.jpg differ diff --git a/data-raw/gpt_training_text_v2.1.1.9111.txt b/data-raw/gpt_training_text_v2.1.1.9112.txt similarity index 99% rename from data-raw/gpt_training_text_v2.1.1.9111.txt rename to data-raw/gpt_training_text_v2.1.1.9112.txt index 65332989..f09488d8 100644 --- a/data-raw/gpt_training_text_v2.1.1.9111.txt +++ b/data-raw/gpt_training_text_v2.1.1.9112.txt @@ -1,5 +1,5 @@ This files contains all context you must know about the AMR package for R. -First and foremost, you are trained on version 2.1.1.9111. Remember this whenever someone asks which AMR package version you’re at. +First and foremost, you are trained on version 2.1.1.9112. Remember this whenever someone asks which AMR package version you’re at. -------------------------------- THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'NAMESPACE': @@ -2130,7 +2130,7 @@ example_isolates \%>\% select(mo, aminoglycosides()) # you can combine selectors like you are used with tidyverse # e.g., for betalactams, but not the ones with an enzyme inhibitor: -example_isolates |> select(betalactams(), -betalactams_with_inhibitor()) +example_isolates \%>\% select(betalactams(), -betalactams_with_inhibitor()) # select only antibiotic columns with DDDs for oral treatment example_isolates \%>\% select(administrable_per_os()) diff --git a/man/antibiotic_class_selectors.Rd b/man/antibiotic_class_selectors.Rd index fdb3f0ee..cd57e338 100644 --- a/man/antibiotic_class_selectors.Rd +++ b/man/antibiotic_class_selectors.Rd @@ -203,7 +203,7 @@ example_isolates \%>\% select(mo, aminoglycosides()) # you can combine selectors like you are used with tidyverse # e.g., for betalactams, but not the ones with an enzyme inhibitor: -example_isolates |> select(betalactams(), -betalactams_with_inhibitor()) +example_isolates \%>\% select(betalactams(), -betalactams_with_inhibitor()) # select only antibiotic columns with DDDs for oral treatment example_isolates \%>\% select(administrable_per_os())