mirror of
https://github.com/msberends/AMR.git
synced 2026-11-16 05:50:48 +01:00
(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:
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")
|
||||
})
|
||||
Reference in new issue
Block a user