diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml
index ec4a771a..e410f250 100644
--- a/.github/workflows/check.yaml
+++ b/.github/workflows/check.yaml
@@ -104,7 +104,7 @@ jobs:
# we don't want to depend on the sysreqs pkg here, as it requires quite a recent R version
# as of May 2021: https://sysreqs.r-hub.io/pkg/AMR,R,cleaner,curl,dplyr,ggplot2,ggtext,knitr,microbenchmark,pillar,readxl,rmarkdown,rstudioapi,rvest,skimr,tidyr,tinytest,xml2,backports,crayon,rlang,vctrs,evaluate,highr,markdown,stringr,yaml,xfun,cli,ellipsis,fansi,lifecycle,utf8,glue,mime,magrittr,stringi,generics,R6,tibble,tidyselect,pkgconfig,purrr,digest,gtable,isoband,MASS,mgcv,scales,withr,nlme,Matrix,farver,labeling,munsell,RColorBrewer,viridisLite,lattice,colorspace,gridtext,Rcpp,RCurl,png,jpeg,bitops,cellranger,progress,rematch,hms,prettyunits,htmltools,jsonlite,tinytex,base64enc,httr,selectr,openssl,askpass,sys,repr,cpp11
run: |
- sudo apt install -y libssl-dev pandoc pandoc-citeproc libxml2-dev libicu-dev libcurl4-openssl-dev libpng-dev
+ sudo apt install -y libssl-dev pandoc pandoc-citeproc libxml2-dev libicu-dev libcurl4-openssl-dev libpng-dev libudunits2-dev
- name: Query dependencies
# this will change every day (i.e. at scheduled night run of GitHub Action), so it will cache dependency updates
diff --git a/DESCRIPTION b/DESCRIPTION
index 6d116959..06cfaf99 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,5 +1,5 @@
Package: AMR
-Version: 1.7.1.9011
+Version: 1.7.1.9012
Date: 2021-07-04
Title: Antimicrobial Resistance Data Analysis
Authors@R: c(
diff --git a/NEWS.md b/NEWS.md
index d72e9568..3bff0fa0 100755
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,4 +1,4 @@
-# `AMR` 1.7.1.9011
+# `AMR` 1.7.1.9012
## Last updated: 4 July 2021
### Changed
diff --git a/data-raw/AMR_latest.tar.gz b/data-raw/AMR_latest.tar.gz
index a6954a03..710b3b95 100644
Binary files a/data-raw/AMR_latest.tar.gz and b/data-raw/AMR_latest.tar.gz differ
diff --git a/docs/404.html b/docs/404.html
index 1cf6a7e5..50a019da 100644
--- a/docs/404.html
+++ b/docs/404.html
@@ -81,7 +81,7 @@
AMR (for R)
- 1.7.1.9011
+ 1.7.1.9012
diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html
index 9fa02834..bbf8de67 100644
--- a/docs/LICENSE-text.html
+++ b/docs/LICENSE-text.html
@@ -81,7 +81,7 @@
AMR (for R)
- 1.7.1.9011
+ 1.7.1.9012
diff --git a/docs/articles/datasets.html b/docs/articles/datasets.html
index 50329e3a..72227cc8 100644
--- a/docs/articles/datasets.html
+++ b/docs/articles/datasets.html
@@ -39,7 +39,7 @@
AMR (for R)
- 1.7.1.9011
+ 1.7.1.9012
diff --git a/docs/articles/index.html b/docs/articles/index.html
index 70aea4d0..e8518cde 100644
--- a/docs/articles/index.html
+++ b/docs/articles/index.html
@@ -81,7 +81,7 @@
AMR (for R)
- 1.7.1.9011
+ 1.7.1.9012
diff --git a/docs/authors.html b/docs/authors.html
index 8e5921d3..19a5c235 100644
--- a/docs/authors.html
+++ b/docs/authors.html
@@ -81,7 +81,7 @@
AMR (for R)
- 1.7.1.9011
+ 1.7.1.9012
diff --git a/docs/index.html b/docs/index.html
index 5ba3ed2b..d91fdb02 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -42,7 +42,7 @@
AMR (for R)
- 1.7.1.9011
+ 1.7.1.9012
diff --git a/docs/news/index.html b/docs/news/index.html
index f8fb0430..a6fbacb2 100644
--- a/docs/news/index.html
+++ b/docs/news/index.html
@@ -81,7 +81,7 @@
AMR (for R)
- 1.7.1.9011
+ 1.7.1.9012
@@ -236,9 +236,9 @@
Source: NEWS.md
-
-
+
+
Last updated: 4 July 2021
diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml
index 9f0933e2..7b6d3b14 100644
--- a/docs/pkgdown.yml
+++ b/docs/pkgdown.yml
@@ -12,7 +12,7 @@ articles:
datasets: datasets.html
resistance_predict: resistance_predict.html
welcome_to_AMR: welcome_to_AMR.html
-last_built: 2021-07-04T13:26Z
+last_built: 2021-07-04T18:25Z
urls:
reference: https://msberends.github.io/AMR//reference
article: https://msberends.github.io/AMR//articles
diff --git a/docs/reference/index.html b/docs/reference/index.html
index 4c55f404..e6155322 100644
--- a/docs/reference/index.html
+++ b/docs/reference/index.html
@@ -81,7 +81,7 @@
AMR (for R)
- 1.7.1.9011
+ 1.7.1.9012
diff --git a/docs/survey.html b/docs/survey.html
index b9d9e164..d44082ce 100644
--- a/docs/survey.html
+++ b/docs/survey.html
@@ -81,7 +81,7 @@
AMR (for R)
- 1.7.1.9011
+ 1.7.1.9012
diff --git a/inst/tinytest/test-mo_property.R b/inst/tinytest/test-mo_property.R
index c6fd2644..ea6f94e2 100644
--- a/inst/tinytest/test-mo_property.R
+++ b/inst/tinytest/test-mo_property.R
@@ -28,12 +28,23 @@ expect_equal(mo_kingdom("Escherichia coli"), mo_domain("Escherichia coli"))
expect_equal(mo_phylum("Escherichia coli"), "Proteobacteria")
expect_equal(mo_class("Escherichia coli"), "Gammaproteobacteria")
expect_equal(mo_order("Escherichia coli"), "Enterobacterales")
-expect_equal(mo_family("Escherichia coli"), "Enterobacteriaceae")
-expect_equal(mo_genus("Escherichia coli"), "Escherichia")
+
+# S3 class for taxonomic names
+expect_inherits(mo_family("Escherichia coli"), "taxonomic_name")
+expect_equal(as.character(mo_family("Escherichia coli")), "Enterobacteriaceae")
+expect_equal(as.character(mo_fullname("Escherichia coli")), "Escherichia coli")
+expect_equal(as.character(mo_genus("Escherichia coli")), "Escherichia")
+expect_equal(as.character(mo_name("Escherichia coli")), "Escherichia coli")
+expect_equal(as.character(mo_shortname("Escherichia coli")), "E. coli")
+expect_equal(as.character(mo_shortname("Escherichia")), "Escherichia")
+expect_equal(as.character(mo_shortname("Staphylococcus aureus")), "S. aureus")
+expect_equal(as.character(mo_shortname("Staphylococcus aureus", Becker = TRUE)), "S. aureus")
+expect_equal(as.character(mo_shortname("Staphylococcus aureus", Becker = "all", language = "en")), "CoPS")
+expect_equal(as.character(mo_shortname("Streptococcus agalactiae")), "S. agalactiae")
+expect_equal(as.character(mo_shortname("Streptococcus agalactiae", Lancefield = TRUE)), "GBS")
+
expect_equal(mo_species("Escherichia coli"), "coli")
expect_equal(mo_subspecies("Escherichia coli"), "")
-expect_equal(mo_fullname("Escherichia coli"), "Escherichia coli")
-expect_equal(mo_name("Escherichia coli"), "Escherichia coli")
expect_equal(mo_type("Escherichia coli", language = "en"), "Bacteria")
expect_equal(mo_gramstain("Escherichia coli", language = "en"), "Gram-negative")
expect_inherits(mo_taxonomy("Escherichia coli"), "list")
@@ -52,20 +63,12 @@ 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_equal(mo_shortname("Escherichia coli"), "E. coli")
-expect_equal(mo_shortname("Escherichia"), "Escherichia")
-expect_equal(mo_shortname("Staphylococcus aureus"), "S. aureus")
-expect_equal(mo_shortname("Staphylococcus aureus", Becker = TRUE), "S. aureus")
-expect_equal(mo_shortname("Staphylococcus aureus", Becker = "all", language = "en"), "CoPS")
-expect_equal(mo_shortname("Streptococcus agalactiae"), "S. agalactiae")
-expect_equal(mo_shortname("Streptococcus agalactiae", Lancefield = TRUE), "GBS")
-
expect_true(mo_url("Candida albicans") %like% "catalogueoflife.org")
expect_true(mo_url("Escherichia coli") %like% "lpsn.dsmz.de")
# test integrity
MOs <- microorganisms
-expect_identical(MOs$fullname, mo_fullname(MOs$fullname, language = "en"))
+expect_identical(MOs$fullname, as.character(mo_fullname(MOs$fullname, language = "en")))
# check languages
expect_equal(mo_type("Escherichia coli", language = "de"), "Bakterien")
@@ -81,7 +84,7 @@ 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
+expect_identical(as.character(mo_name(dutch, language = NULL)), microorganisms$fullname) # gigantic test - will run ALL names
# manual property function
expect_error(mo_property("Escherichia coli", property = c("tsn", "fullname")))
@@ -117,7 +120,7 @@ expect_equal(mo_is_intrinsic_resistant(c("Escherichia coli", "Staphylococcus aur
"vanco"),
c(TRUE, FALSE, FALSE))
# with reference data
-expect_equal(mo_name("test", reference_df = data.frame(col1 = "test", mo = "B_ESCHR_COLI")),
+expect_equal(as.character(mo_name("test", reference_df = data.frame(col1 = "test", mo = "B_ESCHR_COLI"))),
"Escherichia coli")
if (AMR:::pkg_is_available("dplyr")) {
expect_equal(example_isolates %>% filter(mo_is_gram_negative()) %>% nrow(),