1
0
mirror of https://github.com/msberends/AMR.git synced 2024-12-25 18:46:11 +01:00

fix for R <= 3.3

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

View File

@ -135,6 +135,7 @@ jobs:
R_RUN_TINYTEST: true R_RUN_TINYTEST: true
run: | run: |
cd .. cd ..
ls -lh
R CMD build AMR R CMD build AMR
R CMD check --no-manual --run-donttest --run-dontrun AMR_*.tar.gz R CMD check --no-manual --run-donttest --run-dontrun AMR_*.tar.gz
shell: bash shell: bash
@ -142,6 +143,8 @@ jobs:
- name: Show unit tests output - name: Show unit tests output
if: always() if: always()
run: | run: |
ls -lh
cd AMR
find . -name 'tinytest.Rout*' -exec cat '{}' \; || true find . -name 'tinytest.Rout*' -exec cat '{}' \; || true
shell: bash shell: bash

View File

@ -1,5 +1,5 @@
Package: AMR Package: AMR
Version: 1.8.1.9039 Version: 1.8.1.9040
Date: 2022-08-28 Date: 2022-08-28
Title: Antimicrobial Resistance Data Analysis Title: Antimicrobial Resistance Data Analysis
Description: Functions to simplify and standardise antimicrobial resistance (AMR) Description: Functions to simplify and standardise antimicrobial resistance (AMR)

View File

@ -1,4 +1,4 @@
# AMR 1.8.1.9039 # AMR 1.8.1.9040
### New ### New
* EUCAST 2022 and CLSI 2022 guidelines have been added for `as.rsi()`. EUCAST 2022 is now the new default guideline for all MIC and disks diffusion interpretations. * EUCAST 2022 and CLSI 2022 guidelines have been added for `as.rsi()`. EUCAST 2022 is now the new default guideline for all MIC and disks diffusion interpretations.

View File

@ -651,7 +651,7 @@ dataset_UTF8_to_ASCII <- function(df) {
df[, i] <- col df[, i] <- col
} }
} }
tibble::as_tibble(df) import_fn("as_tibble", "tibble")(df)
} }
# for eucast_rules() and mdro(), creates markdown output with URLs and names # for eucast_rules() and mdro(), creates markdown output with URLs and names

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 # antibiotic names must always be coercible to their original AB code
expect_identical(as.ab(antibiotics$name), antibiotics$ab) expect_identical(as.ab(antibiotics$name), antibiotics$ab)
# there should be no diacritics (i.e. non ASCII) characters in the datasets (CRAN policy) if (AMR:::pkg_is_available("tibble", also_load = FALSE)) {
datasets <- data(package = "AMR", envir = asNamespace("AMR"))$results[, "Item", drop = TRUE] # there should be no diacritics (i.e. non ASCII) characters in the datasets (CRAN policy)
for (i in seq_len(length(datasets))) { 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")) dataset <- get(datasets[i], envir = asNamespace("AMR"))
expect_identical(AMR:::dataset_UTF8_to_ASCII(dataset), dataset, info = datasets[i]) expect_identical(AMR:::dataset_UTF8_to_ASCII(dataset), dataset, info = datasets[i])
}
} }
df <- AMR:::MO_lookup df <- AMR:::MO_lookup