fix for R <= 3.3

This commit is contained in:
dr. M.S. (Matthijs) Berends committed 2022-08-28 19:34:04 +02:00
1 parent 71db246d5c
commit c44ddf272f
5 files changed
+13 -8

No files matched your search

+7 -5
View File
@@ -53,11 +53,13 @@ expect_false(any(is.na(as.disk(rsi_translation[which(rsi_translation$method == "
# antibiotic names must always be coercible to their original AB code
expect_identical(as.ab(antibiotics$name), antibiotics$ab)
# there should be no diacritics (i.e. non ASCII) characters in the datasets (CRAN policy)
datasets <- data(package = "AMR", envir = asNamespace("AMR"))$results[, "Item", drop = TRUE]
for (i in seq_len(length(datasets))) {
dataset <- get(datasets[i], envir = asNamespace("AMR"))
expect_identical(AMR:::dataset_UTF8_to_ASCII(dataset), dataset, info = datasets[i])
if (AMR:::pkg_is_available("tibble", also_load = FALSE)) {
# there should be no diacritics (i.e. non ASCII) characters in the datasets (CRAN policy)
datasets <- data(package = "AMR", envir = asNamespace("AMR"))$results[, "Item", drop = TRUE]
for (i in seq_len(length(datasets))) {
dataset <- get(datasets[i], envir = asNamespace("AMR"))
expect_identical(AMR:::dataset_UTF8_to_ASCII(dataset), dataset, info = datasets[i])
}
}
df <- AMR:::MO_lookup