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

This commit is contained in:
dr. M.S. (Matthijs) Berends committed 2018-09-16 16:43:29 +02:00
1 parent b0ca49d68d
commit b792a2754e
16 files changed
+101 -79

No files matched your search

+5 -2
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)))
})