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:
@ -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"))
|
||||
|
Reference in New Issue
Block a user