1
0
mirror of https://github.com/msberends/AMR.git synced 2025-01-15 22:01:39 +01:00
This commit is contained in:
dr. M.S. (Matthijs) Berends 2022-09-23 16:40:17 +02:00
parent f932f8279e
commit 3a5e20c11a
5 changed files with 10 additions and 9 deletions

View File

@ -1,5 +1,5 @@
Package: AMR Package: AMR
Version: 1.8.1.9066 Version: 1.8.1.9067
Date: 2022-09-23 Date: 2022-09-23
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.9066 # AMR 1.8.1.9067
This version will eventually become v2.0! We're happy to reach a new major milestone soon! This version will eventually become v2.0! We're happy to reach a new major milestone soon!

View File

@ -1466,7 +1466,7 @@ if (getRversion() < "3.3.0") {
} }
} }
if (getRversion() < "3.4.2") { if (getRversion() < "3.5.0") {
isFALSE <- function(x) { isFALSE <- function(x) {
is.logical(x) && length(x) == 1L && !is.na(x) && !x is.logical(x) && length(x) == 1L && !is.na(x) && !x
} }

View File

@ -25,7 +25,7 @@
expect_equal(mo_kingdom("Escherichia coli"), "Bacteria") expect_equal(mo_kingdom("Escherichia coli"), "Bacteria")
expect_equal(mo_kingdom("Escherichia coli"), mo_domain("Escherichia coli")) expect_equal(mo_kingdom("Escherichia coli"), mo_domain("Escherichia coli"))
expect_equal(mo_phylum("Escherichia coli"), "Proteobacteria") expect_equal(mo_phylum("Escherichia coli"), "Pseudomonadota")
expect_equal(mo_class("Escherichia coli"), "Gammaproteobacteria") expect_equal(mo_class("Escherichia coli"), "Gammaproteobacteria")
expect_equal(mo_order("Escherichia coli"), "Enterobacterales") expect_equal(mo_order("Escherichia coli"), "Enterobacterales")
expect_equal(mo_family("Escherichia coli"), "Enterobacteriaceae") expect_equal(mo_family("Escherichia coli"), "Enterobacteriaceae")
@ -64,7 +64,7 @@ expect_equal(mo_ref("Escherichia coli"), "Castellani et al., 1919")
expect_equal(mo_authors("Escherichia coli"), "Castellani et al.") expect_equal(mo_authors("Escherichia coli"), "Castellani et al.")
expect_equal(mo_year("Escherichia coli"), 1919) expect_equal(mo_year("Escherichia coli"), 1919)
expect_true(mo_url("Candida albicans") %like% "catalogueoflife.org") expect_true(mo_url("Candida albicans") %like% "gbif.org")
expect_true(mo_url("Escherichia coli") %like% "lpsn.dsmz.de") expect_true(mo_url("Escherichia coli") %like% "lpsn.dsmz.de")
# test integrity # test integrity
@ -84,11 +84,12 @@ expect_stdout(print(mo_gramstain("Escherichia coli", language = "it")))
expect_stdout(print(mo_gramstain("Escherichia coli", language = "fr"))) expect_stdout(print(mo_gramstain("Escherichia coli", language = "fr")))
expect_error(mo_gramstain("Escherichia coli", language = "UNKNOWN")) expect_error(mo_gramstain("Escherichia coli", language = "UNKNOWN"))
dutch <- mo_name(microorganisms$fullname, language = "nl") # should be transformable to English again dutch <- mo_name(microorganisms$fullname[which(microorganisms$fullname %unlike% "unknown|coagulase")], language = "nl") # should be transformable to English again
expect_identical(mo_name(dutch, language = NULL), microorganisms$fullname) # gigantic test - will run ALL names expect_identical(mo_name(dutch, language = NULL),
microorganisms$fullname[which(microorganisms$fullname %unlike% "unknown|coagulase")]) # gigantic test - will run ALL names
# manual property function # manual property function
expect_error(mo_property("Escherichia coli", property = c("tsn", "fullname"))) expect_error(mo_property("Escherichia coli", property = c("genus", "fullname")))
expect_error(mo_property("Escherichia coli", property = "UNKNOWN")) expect_error(mo_property("Escherichia coli", property = "UNKNOWN"))
expect_identical( expect_identical(
mo_property("Escherichia coli", property = "fullname"), mo_property("Escherichia coli", property = "fullname"),

View File

@ -49,7 +49,7 @@ if (identical(Sys.getenv("R_RUN_TINYTEST"), "true")) {
strrep <- AMR:::strrep strrep <- AMR:::strrep
trimws <- AMR:::trimws trimws <- AMR:::trimws
} }
if (getRversion() < "3.4.2") { if (getRversion() < "3.5.0") {
isFALSE <- AMR:::isFALSE isFALSE <- AMR:::isFALSE
} }
if (getRversion() < "3.6.0") { if (getRversion() < "3.6.0") {