1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-08 15:21:58 +02:00

163 new trade names, added ab_tradenames

This commit is contained in:
2018-08-29 12:27:37 +02:00
parent 972fc4f6c7
commit 029157b3be
20 changed files with 139 additions and 314 deletions

View File

@ -6,4 +6,6 @@ test_that("ab_property works", {
expect_equal(ab_official_nl("amox"), "Amoxicilline")
expect_equal(ab_trivial_nl("amox"), "Amoxicilline")
expect_equal(ab_umcg("amox"), "AMOX")
expect_equal(class(ab_tradenames("amox")), "character")
expect_equal(class(ab_tradenames(c("amox", "amox"))), "list")
})

View File

@ -34,6 +34,10 @@ test_that("guess_atc works", {
expect_identical(class(as.atc("amox")), "atc")
expect_identical(ab_trivial_nl("Cefmenoxim"), "Cefmenoxim")
expect_warning(as.atc("Z00ZZ00")) # not yet available in data set
# first 5 chars of official name
expect_equal(as.character(as.atc(c("nitro", "cipro"))),
c("J01XE01", "J01MA02"))