Compare commits

...

2 Commits

Author SHA1 Message Date
dr. M.S. (Matthijs) Berends 3e5c7d45c6 update intro logo 2024-04-24 09:58:24 +02:00
dr. M.S. (Matthijs) Berends 25089e811e correct for high-level abx 2024-04-24 09:50:32 +02:00
9 changed files with 622 additions and 6099 deletions

View File

@ -36,7 +36,9 @@
# check the commit message
COMMIT_MSG=$(cat "$1")
if [[ "$COMMIT_MSG" =~ \(no-check\)|\(no-checks\)|\(no-verify\) ]]; then
echo "Not running pre-commit checks; commit message contains '(no-check)', '(no-checks)', or '(no-verify)."
echo "Not running pre-commit checks:"
echo "Commit message contains '(no-check)', '(no-checks)', or '(no-verify)."
echo ""
exit 0
fi

View File

@ -1,6 +1,6 @@
Package: AMR
Version: 2.1.1.9022
Date: 2024-04-23
Version: 2.1.1.9025
Date: 2024-04-24
Title: Antimicrobial Resistance Data Analysis
Description: Functions to simplify and standardise antimicrobial resistance (AMR)
data analysis and to work with microbial and antimicrobial properties by

View File

@ -1,4 +1,4 @@
# AMR 2.1.1.9022
# AMR 2.1.1.9025
*(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!)*
@ -29,6 +29,8 @@ This package now supports not only tools for AMR data analysis in clinical setti
* Greatly improved `vctrs` integration, a Tidyverse package working in the background for many Tidyverse functions. For users, this means that functions such as `dplyr`'s `bind_rows()`, `rowwise()` and `c_across()` are now supported for e.g. columns of class `mic`. Despite this, this `AMR` package is still zero-dependent on any other package, including `dplyr` and `vctrs`.
* Updated all ATC codes from WHOCC
* Updated all antibiotic DDDs from WHOCC
* Fix for using a manual value for `mo_transform` in `antibiogram()`
* Fix for mapping 'high level' antibiotics in `as.ab()` (amphotericin B-high, gentamicin-high, kanamycin-high, streptomycin-high, tobramycin-high)
## Other
* Added Jordan Stull, Matthew Saab, and Javier Sanchez as contributors, to thank them for their valuable input

2
R/ab.R
View File

@ -645,6 +645,8 @@ generalise_antibiotic_name <- function(x) {
x <- gsub("_(MIC|RSI|SIR|DIS[CK])$", "", x, perl = TRUE)
# remove disk concentrations, like LVX_NM -> LVX
x <- gsub("_[A-Z]{2}[0-9_.]{0,3}$", "", x, perl = TRUE)
# correct for 'high level' antibiotics
x <- gsub("([^A-Z0-9]+)?(HIGH(.?LEVEL)?|H[^A-Z0-9]?L)([^A-Z0-9]+)?", "-HIGH", x, perl = TRUE)
# remove part between brackets if that's followed by another string
x <- gsub("(.*)+ [(].*[)]", "\\1", x)
# keep only max 1 space

Binary file not shown.

Binary file not shown.

View File

@ -79,6 +79,16 @@ expect_equal(
# based on Levenshtein distance
expect_identical(ab_name("ceftazidim/avibactam", language = NULL), "Ceftazidime/avibactam")
expect_identical(as.character(as.ab(c("gentamicine High Level",
"gentamicine High",
"gentamicine (High Level)",
"gentamicine (High)",
"gentamicine HL",
"gentamicine H-L",
"gentamicine (HL)",
"gentamicine (H-L)"))),
rep("GEH", 8))
# assigning and subsetting
x <- antibiotics$ab
expect_inherits(x[1], "ab")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 KiB

After

Width:  |  Height:  |  Size: 91 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 464 KiB

After

Width:  |  Height:  |  Size: 1.2 MiB