(v3.0.1.9132) Make translating around 50 times faster and coercion of unknown input in as.ab() up to 70 times faster with identical results, use DOIs instead of PubMed URLs, shorten an example line, and reword cran-comments.md

This commit is contained in:
dr. M.S. (Matthijs) Berends committed 2026-10-14 20:17:28 +02:00
1 parent 4115db67fa
commit 1a1a3abed1
12 files changed
+164 -112

No files matched your search

@@ -227,4 +227,10 @@ test_that("test-custom ab synonyms via add_custom_antimicrobials()", {
stringsAsFactors = FALSE
)))
expect_identical(as.character(as.ab("Meropenemum Somebrand")), "MEM")
# the translated names used by as.ab() are rebuilt after adding antimicrobials
invisible(AMR:::get_ab_translated_index("de"))
suppressMessages(add_custom_antimicrobials(data.frame(ab = "TESTTRANS", name = "Testtransicillin", group = "Test")))
expect_identical(length(AMR:::get_ab_translated_index("de")), NROW(AMR:::AMR_env$AB_lookup))
expect_identical(AMR:::get_ab_translated_index("de")[AMR:::AMR_env$AB_lookup$ab == "TESTTRANS"], "TESTTRANSICILLIN")
})