diff --git a/.github/workflows/check-old.yaml b/.github/workflows/check-old.yaml index af49fe84..1f9f2994 100644 --- a/.github/workflows/check-old.yaml +++ b/.github/workflows/check-old.yaml @@ -48,7 +48,8 @@ jobs: config: # Test all old versions of R >= 3.0, we support them all! # For these old versions, dependencies and vignettes will not be checked. - # For recent R versions, see check-recent.yaml (r-lib and tidyverse support the latest 5 major R versions). + # For recent R versions, see check-recent.yaml (r-lib and tidyverse support the latest 5 major R releases). + - {os: ubuntu-latest, r: '3.5', allowfail: false} - {os: ubuntu-latest, r: '3.4', allowfail: false} - {os: ubuntu-latest, r: '3.3', allowfail: false} - {os: ubuntu-latest, r: '3.2', allowfail: false} diff --git a/.github/workflows/check-recent.yaml b/.github/workflows/check-recent.yaml index 4775ad33..960e7926 100644 --- a/.github/workflows/check-recent.yaml +++ b/.github/workflows/check-recent.yaml @@ -52,21 +52,21 @@ jobs: fail-fast: false matrix: config: - # current development version: + # current development version, check all major OSes: - {os: macOS-latest, r: 'devel', allowfail: false} - {os: windows-latest, r: 'devel', allowfail: false} - {os: ubuntu-latest, r: 'devel', allowfail: false} - # current 'release' version: - - {os: macOS-latest, r: '4.2', allowfail: false} - - {os: windows-latest, r: '4.2', allowfail: false} - - {os: ubuntu-latest, r: '4.2', allowfail: false} + # current 'release' version, check all major OSes: + - {os: macOS-latest, r: '4.3', allowfail: false} + - {os: windows-latest, r: '4.3', allowfail: false} + - {os: ubuntu-latest, r: '4.3', allowfail: false} # older versions (see also check-old.yaml for even older versions): + - {os: ubuntu-latest, r: '4.2', allowfail: false} - {os: ubuntu-latest, r: '4.1', allowfail: false} - {os: ubuntu-latest, r: '4.0', allowfail: false} - - {os: ubuntu-latest, r: '3.6', allowfail: false} - - {os: ubuntu-latest, r: '3.5', allowfail: false} # when a new R releases, this one has to move to check-old.yaml + - {os: ubuntu-latest, r: '3.6', allowfail: false} # when a new R releases, this one has to move to check-old.yaml env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} diff --git a/DESCRIPTION b/DESCRIPTION index 5395e1ad..31f683ab 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: AMR -Version: 2.0.0.9021 +Version: 2.0.0.9022 Date: 2023-05-26 Title: Antimicrobial Resistance Data Analysis Description: Functions to simplify and standardise antimicrobial resistance (AMR) diff --git a/NEWS.md b/NEWS.md index 7c932a9c..98569bda 100755 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# AMR 2.0.0.9021 +# AMR 2.0.0.9022 ## Changed * Added oxygen tolerance from BacDive to over 25,000 bacteria in the `microorganisms` data set diff --git a/R/aa_helper_functions.R b/R/aa_helper_functions.R index a4f58c3f..2d5e83a7 100755 --- a/R/aa_helper_functions.R +++ b/R/aa_helper_functions.R @@ -1009,7 +1009,7 @@ get_current_column <- function() { # cur_column() doesn't always work (only allowed for certain conditions set by dplyr), but it's probably still possible: frms <- lapply(sys.frames(), function(env) { - if (!is.null(env$i)) { + if (tryCatch(!is.null(env$i), error = function(e) FALSE)) { if (!is.null(env$tibble_vars)) { # for mutate_if() env$tibble_vars[env$i] diff --git a/R/custom_microorganisms.R b/R/custom_microorganisms.R index 49cd626b..5c1b82dd 100755 --- a/R/custom_microorganisms.R +++ b/R/custom_microorganisms.R @@ -71,7 +71,8 @@ #' @examples #' \donttest{ #' # a combination of species is not formal taxonomy, so -#' # this will result in only "Enterobacter asburiae": +#' # this will result in "Enterobacter cloacae cloacae", +#' # since it resembles the input best: #' mo_name("Enterobacter asburiae/cloacae") #' #' # now add a custom entry - it will be considered by as.mo() and @@ -109,7 +110,7 @@ #' mo_name("BACTEROIDES / PARABACTEROIDES") #' mo_rank("BACTEROIDES / PARABACTEROIDES") #' -#' # taxonomy still works, although a slashline genus was given as input: +#' # taxonomy still works, even though a slashline genus was given as input: #' mo_family("Bacteroides/Parabacteroides") #' #' diff --git a/R/sysdata.rda b/R/sysdata.rda index f74fb9ad..974ea73b 100755 Binary files a/R/sysdata.rda and b/R/sysdata.rda differ diff --git a/inst/tinytest/test-custom_microorganisms.R b/inst/tinytest/test-custom_microorganisms.R index 54baac84..3aaa0b56 100644 --- a/inst/tinytest/test-custom_microorganisms.R +++ b/inst/tinytest/test-custom_microorganisms.R @@ -28,7 +28,7 @@ # ==================================================================== # expect_identical(as.mo("Enterobacter asburiae/cloacae"), - as.mo("Enterobacter asburiae")) + as.mo("Enterobacter cloacae cloacae")) suppressMessages( add_custom_microorganisms( diff --git a/man/AMR.Rd b/man/AMR.Rd index e380f0ea..5163ffd2 100644 --- a/man/AMR.Rd +++ b/man/AMR.Rd @@ -32,7 +32,7 @@ The \code{AMR} package is a \href{https://msberends.github.io/AMR/#copyright}{fr This work was published in the Journal of Statistical Software (Volume 104(3); \doi{jss.v104.i03}) and formed the basis of two PhD theses (\doi{10.33612/diss.177417131} and \doi{10.33612/diss.192486375}). -After installing this package, R knows \href{https://msberends.github.io/AMR/reference/microorganisms.html}{\strong{~52 000 microorganisms}} (updated december 2022) and all \href{https://msberends.github.io/AMR/reference/antibiotics.html}{\strong{~600 antibiotic, antimycotic and antiviral drugs}} by name and code (including ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid SIR and MIC values. The integral breakpoint guidelines from CLSI and EUCAST are included from the last 10 years. It supports and can read any data format, including WHONET data. This package works on Windows, macOS and Linux with all versions of R since R-3.0 (April 2013). \strong{It was designed to work in any setting, including those with very limited resources}. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the \href{https://www.rug.nl}{University of Groningen}, in collaboration with non-profit organisations \href{https://www.certe.nl}{Certe Medical Diagnostics and Advice Foundation} and \href{https://www.umcg.nl}{University Medical Center Groningen}. +After installing this package, R knows \href{https://msberends.github.io/AMR/reference/microorganisms.html}{\strong{~52 000 microorganisms}} (updated December 2022) and all \href{https://msberends.github.io/AMR/reference/antibiotics.html}{\strong{~600 antibiotic, antimycotic and antiviral drugs}} by name and code (including ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid SIR and MIC values. The integral breakpoint guidelines from CLSI and EUCAST are included from the last 10 years. It supports and can read any data format, including WHONET data. This package works on Windows, macOS and Linux with all versions of R since R-3.0 (April 2013). \strong{It was designed to work in any setting, including those with very limited resources}. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the \href{https://www.rug.nl}{University of Groningen}, in collaboration with non-profit organisations \href{https://www.certe.nl}{Certe Medical Diagnostics and Advice Foundation} and \href{https://www.umcg.nl}{University Medical Center Groningen}. The \code{AMR} package is available in English, Chinese, Czech, Danish, Dutch, Finnish, French, German, Greek, Italian, Japanese, Norwegian, Polish, Portuguese, Romanian, Russian, Spanish, Swedish, Turkish, and Ukrainian. Antimicrobial drug (group) names and colloquial microorganism names are provided in these languages. } diff --git a/man/add_custom_microorganisms.Rd b/man/add_custom_microorganisms.Rd index aaf76e1b..6b6f9852 100644 --- a/man/add_custom_microorganisms.Rd +++ b/man/add_custom_microorganisms.Rd @@ -52,7 +52,8 @@ Use \code{\link[=clear_custom_microorganisms]{clear_custom_microorganisms()}} to \examples{ \donttest{ # a combination of species is not formal taxonomy, so -# this will result in only "Enterobacter asburiae": +# this will result in "Enterobacter cloacae cloacae", +# since it resembles the input best: mo_name("Enterobacter asburiae/cloacae") # now add a custom entry - it will be considered by as.mo() and @@ -90,7 +91,7 @@ add_custom_microorganisms( mo_name("BACTEROIDES / PARABACTEROIDES") mo_rank("BACTEROIDES / PARABACTEROIDES") -# taxonomy still works, although a slashline genus was given as input: +# taxonomy still works, even though a slashline genus was given as input: mo_family("Bacteroides/Parabacteroides")