1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-11 11:41:54 +02:00

(v0.7.0.9005) ab algorithm update

This commit is contained in:
2019-06-11 14:18:25 +02:00
parent f6c47c8c88
commit 8f674e19bb
36 changed files with 274 additions and 248 deletions

View File

@ -24,12 +24,17 @@ context("data.R")
test_that("data sets are valid", {
# IDs should always be unique
expect_identical(nrow(antibiotics), length(unique(antibiotics$ab)))
expect_identical(class(antibiotics$ab), "ab")
expect_identical(nrow(microorganisms), length(unique(microorganisms$mo)))
expect_identical(class(microorganisms$mo), "mo")
# check cross table reference
expect_true(all(microorganisms.codes$mo %in% microorganisms$mo))
# there should be no diacritics (i.e. non ASCII) characters in the datasets
# antibiotic names must always be coercible to their original AB code
expect_identical(antibiotics$ab, as.ab(antibiotics$name))
# there should be no diacritics (i.e. non ASCII) characters in the datasets (CRAN policy)
datasets <- data(package = "AMR", envir = asNamespace("AMR"))$results[, "Item"]
for (i in 1:length(datasets)) {
dataset <- get(datasets[i], envir = asNamespace("AMR"))