mirror of
https://github.com/msberends/AMR.git
synced 2024-12-25 18:06:12 +01:00
fix for R <= 3.3
This commit is contained in:
parent
71db246d5c
commit
c44ddf272f
3
.github/workflows/check.yaml
vendored
3
.github/workflows/check.yaml
vendored
@ -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
|
||||||
|
|
||||||
|
@ -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)
|
||||||
|
2
NEWS.md
2
NEWS.md
@ -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.
|
||||||
|
@ -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
|
||||||
|
@ -53,12 +53,14 @@ 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)
|
||||||
|
|
||||||
|
if (AMR:::pkg_is_available("tibble", also_load = FALSE)) {
|
||||||
# there should be no diacritics (i.e. non ASCII) characters in the datasets (CRAN policy)
|
# 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]
|
datasets <- data(package = "AMR", envir = asNamespace("AMR"))$results[, "Item", drop = TRUE]
|
||||||
for (i in seq_len(length(datasets))) {
|
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
|
||||||
expect_true(nrow(df[which(df$prevalence == 1), , drop = FALSE]) < nrow(df[which(df$prevalence == 2), , drop = FALSE]))
|
expect_true(nrow(df[which(df$prevalence == 1), , drop = FALSE]) < nrow(df[which(df$prevalence == 2), , drop = FALSE]))
|
||||||
|
Loading…
Reference in New Issue
Block a user