mirror of
https://github.com/msberends/AMR.git
synced 2025-01-15 22:01:39 +01:00
fixes
This commit is contained in:
parent
f932f8279e
commit
3a5e20c11a
@ -1,5 +1,5 @@
|
||||
Package: AMR
|
||||
Version: 1.8.1.9066
|
||||
Version: 1.8.1.9067
|
||||
Date: 2022-09-23
|
||||
Title: Antimicrobial Resistance Data Analysis
|
||||
Description: Functions to simplify and standardise antimicrobial resistance (AMR)
|
||||
|
2
NEWS.md
2
NEWS.md
@ -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!
|
||||
|
||||
|
@ -1466,7 +1466,7 @@ if (getRversion() < "3.3.0") {
|
||||
}
|
||||
}
|
||||
|
||||
if (getRversion() < "3.4.2") {
|
||||
if (getRversion() < "3.5.0") {
|
||||
isFALSE <- function(x) {
|
||||
is.logical(x) && length(x) == 1L && !is.na(x) && !x
|
||||
}
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
expect_equal(mo_kingdom("Escherichia coli"), "Bacteria")
|
||||
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_order("Escherichia coli"), "Enterobacterales")
|
||||
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_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")
|
||||
|
||||
# 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_error(mo_gramstain("Escherichia coli", language = "UNKNOWN"))
|
||||
dutch <- mo_name(microorganisms$fullname, language = "nl") # should be transformable to English again
|
||||
expect_identical(mo_name(dutch, language = NULL), microorganisms$fullname) # gigantic test - will run ALL names
|
||||
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[which(microorganisms$fullname %unlike% "unknown|coagulase")]) # gigantic test - will run ALL names
|
||||
|
||||
# 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_identical(
|
||||
mo_property("Escherichia coli", property = "fullname"),
|
||||
|
@ -49,7 +49,7 @@ if (identical(Sys.getenv("R_RUN_TINYTEST"), "true")) {
|
||||
strrep <- AMR:::strrep
|
||||
trimws <- AMR:::trimws
|
||||
}
|
||||
if (getRversion() < "3.4.2") {
|
||||
if (getRversion() < "3.5.0") {
|
||||
isFALSE <- AMR:::isFALSE
|
||||
}
|
||||
if (getRversion() < "3.6.0") {
|
||||
|
Loading…
Reference in New Issue
Block a user