This commit is contained in:
dr. M.S. (Matthijs) Berends 2022-10-02 15:48:07 +02:00
parent c2b89d541e
commit 75e05a201a
6 changed files with 13 additions and 15 deletions

View File

@ -36,9 +36,6 @@ name: R-code-check-PR
jobs:
R-code-check-PR:
# do not run if we are the authors - the other checks will already run
if: ${{ github.event.comment.author_association }} != 'CONTRIBUTOR' && ${{ github.event.comment.author_association }} != 'MEMBER' && ${{ github.event.comment.author_association }} != 'OWNER' && ${{ github.context.payload.comment.author_association }} != 'CONTRIBUTOR' && ${{ github.context.payload.comment.author_association }} != 'MEMBER' && ${{ github.context.payload.comment.author_association }} != 'OWNER'
runs-on: ${{ matrix.config.os }}
continue-on-error: ${{ matrix.config.allowfail }}

View File

@ -1,5 +1,5 @@
Package: AMR
Version: 1.8.2.9022
Version: 1.8.2.9023
Date: 2022-10-02
Title: Antimicrobial Resistance Data Analysis
Description: Functions to simplify and standardise antimicrobial resistance (AMR)

View File

@ -1,4 +1,4 @@
# AMR 1.8.2.9022
# AMR 1.8.2.9023
This version will eventually become v2.0! We're happy to reach a new major milestone soon!

View File

@ -1459,6 +1459,13 @@ if (getRversion() < "3.3.0") {
paste0(replicate(times, x), collapse = "")
}, list(x = x, times = times), MoreArgs = list()), use.names = FALSE)
}
}
if (getRversion() < "3.5.0") {
isFALSE <- function(x) {
is.logical(x) && length(x) == 1L && !is.na(x) && !x
}
# trims() was introduced in 3.3.0, but its argument `whitespace` only in 3.5.0
trimws <- function(x, which = c("both", "left", "right"), whitespace = "[ \t\r\n]") {
which <- match.arg(which)
mysub <- function(re, x) sub(re, "", x, perl = TRUE)
@ -1470,12 +1477,6 @@ if (getRversion() < "3.3.0") {
}
}
if (getRversion() < "3.5.0") {
isFALSE <- function(x) {
is.logical(x) && length(x) == 1L && !is.na(x) && !x
}
}
if (getRversion() < "3.6.0") {
str2lang <- function(s) {
stopifnot(length(s) == 1L)

View File

@ -79,9 +79,9 @@ expect_identical(MOs$fullname, mo_fullname(MOs$fullname, language = "en"))
expect_equal(mo_type("Escherichia coli", language = "de"), "Bakterien")
expect_equal(mo_gramstain("Escherichia coli", language = "nl"), "Gram-negatief")
for (l in LANGUAGES_SUPPORTED) {
expect_stdout(print(mo_gramstain("Escherichia coli", language = l)))
print(mo_gramstain("Escherichia coli", language = l))
gr <- mo_gramstain("Escherichia coli", language = NULL)
for (l in AMR:::LANGUAGES_SUPPORTED[-1]) {
expect_false(mo_gramstain("Escherichia coli", language = l) == gr, info = paste("Gram-stain in langauge", l))
}
expect_error(mo_gramstain("Escherichia coli", language = "UNKNOWN"))

View File

@ -51,10 +51,10 @@ if (identical(Sys.getenv("R_RUN_TINYTEST"), "true")) {
}
if (getRversion() < "3.3.0") {
strrep <- AMR:::strrep
trimws <- AMR:::trimws
}
if (getRversion() < "3.5.0") {
isFALSE <- AMR:::isFALSE
trimws <- AMR:::trimws
}
if (getRversion() < "3.6.0") {
str2lang <- AMR:::str2lang