1
0
mirror of https://github.com/msberends/AMR.git synced 2026-03-11 15:47:54 +01:00

(v3.0.1.9030) fix R 3.6

This commit is contained in:
2026-03-07 18:07:24 +01:00
parent 9af726dcaa
commit e2102c081a
4 changed files with 8 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
Package: AMR Package: AMR
Version: 3.0.1.9029 Version: 3.0.1.9030
Date: 2026-03-07 Date: 2026-03-07
Title: Antimicrobial Resistance Data Analysis Title: Antimicrobial Resistance Data Analysis
Description: Functions to simplify and standardise antimicrobial resistance (AMR) Description: Functions to simplify and standardise antimicrobial resistance (AMR)

View File

@@ -1,4 +1,4 @@
# AMR 3.0.1.9029 # AMR 3.0.1.9030
### New ### New
* Integration with the **tidymodels** framework to allow seamless use of SIR, MIC and disk data in modelling pipelines via `recipes` * Integration with the **tidymodels** framework to allow seamless use of SIR, MIC and disk data in modelling pipelines via `recipes`

View File

@@ -35,7 +35,10 @@ test_that("test-data.R", {
expect_identical(class(microorganisms$mo), c("mo", "character")) expect_identical(class(microorganisms$mo), c("mo", "character"))
expect_identical(nrow(antimicrobials), length(unique(AMR::antimicrobials$ab))) expect_identical(nrow(antimicrobials), length(unique(AMR::antimicrobials$ab)))
expect_identical(class(AMR::antimicrobials$ab), c("ab", "character")) expect_identical(class(AMR::antimicrobials$ab), c("ab", "character"))
expect_identical(nrow(antimicrobials[!is.na(antimicrobials$cid), ]), length(unique(AMR::antimicrobials$cid[!is.na(antimicrobials$cid)])), label = "nr of rows with CIDs", expected.label = "unique nr of CIDs") expect_identical(
nrow(antimicrobials[!is.na(antimicrobials$cid), ]),
length(unique(AMR::antimicrobials$cid[!is.na(antimicrobials$cid)]))
)
# check cross table reference # check cross table reference
expect_true(all(microorganisms.codes$mo %in% microorganisms$mo)) expect_true(all(microorganisms.codes$mo %in% microorganisms$mo))

View File

@@ -302,7 +302,7 @@ test_that("test-mdro.R", {
# MRGN guideline is used because it explicitly requires PIP=R (not PIP OR TZP) # MRGN guideline is used because it explicitly requires PIP=R (not PIP OR TZP)
# for Pseudomonas aeruginosa 4MRGN, making the proxy effect directly testable. # for Pseudomonas aeruginosa 4MRGN, making the proxy effect directly testable.
pseud_no_pip <- data.frame( pseud_no_pip <- data.frame(
mo = as.mo("Pseudomonas aeruginosa"), mo = as.mo("Pseudomonas aeruginosa"),
TZP = as.sir("R"), # piperacillin/tazobactam; no PIP column TZP = as.sir("R"), # piperacillin/tazobactam; no PIP column
CAZ = as.sir("R"), CAZ = as.sir("R"),
IPM = as.sir("R"), IPM = as.sir("R"),
@@ -332,7 +332,7 @@ test_that("test-mdro.R", {
# Multiple combos for the same base drug: AMX can come from AMC (amoxicillin/clavulanic acid) # Multiple combos for the same base drug: AMX can come from AMC (amoxicillin/clavulanic acid)
ente_no_amx <- data.frame( ente_no_amx <- data.frame(
mo = as.mo("Enterococcus faecium"), mo = as.mo("Enterococcus faecium"),
AMC = as.sir("R"), # amoxicillin/clavulanic acid; no AMX column AMC = as.sir("R"), # amoxicillin/clavulanic acid; no AMX column
VAN = as.sir("R"), VAN = as.sir("R"),
TEC = as.sir("R"), TEC = as.sir("R"),