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

added prevalence column and alterted as.mo algorith to use it, added ab_name as alias

This commit is contained in:
2018-09-16 16:43:29 +02:00
parent b0ca49d68d
commit b792a2754e
16 changed files with 101 additions and 79 deletions

View File

@ -2,8 +2,9 @@ context("ab_property.R")
test_that("ab_property works", {
expect_equal(ab_certe("amox"), "amox")
expect_equal(ab_official("amox"), "Amoxicillin")
expect_equal(ab_official_nl("amox"), "Amoxicilline")
expect_equal(ab_name("amox", language = "en"), "Amoxicillin")
expect_equal(ab_name("amox", language = "nl"), "Amoxicilline")
expect_equal(ab_official("amox", language = "en"), "Amoxicillin")
expect_equal(ab_trivial_nl("amox"), "Amoxicilline")
expect_equal(ab_umcg("amox"), "AMOX")
expect_equal(class(ab_tradenames("amox")), "character")
@ -11,4 +12,6 @@ test_that("ab_property works", {
expect_equal(ab_atc("amox"), as.character(as.atc("amox")))
expect_error(ab_property("amox", "invalid property"))
expect_error(ab_name("amox", language = "INVALID"))
expect_output(print(ab_name("amox", language = NULL)))
})