diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 6a9f0c00b..b7127048c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -62,6 +62,7 @@ R-release:
allow_failure: false
script:
- Rscript -e 'sessionInfo()'
+ - Rscript -e 'AMR::eucast_rules(AMR::example_isolates_unclean, info = TRUE)'
# install missing and outdated packages
- Rscript -e 'source(".gitlab-ci.R"); gl_update_pkg_all(repos = "https://cran.rstudio.com", quiet = TRUE, install_pkgdown = TRUE, install_lintr = TRUE)'
- Rscript -e 'devtools::test(stop_on_failure = FALSE)'
@@ -77,6 +78,7 @@ R-devel:
allow_failure: false
script:
- Rscriptdevel -e 'sessionInfo()'
+ - Rscriptdevel -e 'AMR::eucast_rules(AMR::example_isolates_unclean, info = TRUE)'
# install missing and outdated packages
- Rscriptdevel -e 'source(".gitlab-ci.R"); gl_update_pkg_all(repos = "https://cran.rstudio.com", quiet = TRUE, install_pkgdown = TRUE, install_lintr = TRUE)'
- Rscriptdevel -e 'devtools::test(stop_on_failure = FALSE)'
diff --git a/DESCRIPTION b/DESCRIPTION
index 8416b2371..c41350f4e 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,5 +1,5 @@
Package: AMR
-Version: 1.1.0.9005
+Version: 1.1.0.9006
Date: 2020-05-16
Title: Antimicrobial Resistance Analysis
Authors@R: c(
diff --git a/NEWS.md b/NEWS.md
index fce08c361..ee4e81ae5 100755
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,4 +1,4 @@
-# AMR 1.1.0.9005
+# AMR 1.1.0.9006
## Last updated: 16-May-2020
### Breaking
diff --git a/R/aa_helper_functions.R b/R/aa_helper_functions.R
index 1bff1acaa..a0232f695 100755
--- a/R/aa_helper_functions.R
+++ b/R/aa_helper_functions.R
@@ -63,16 +63,14 @@ filter_join_worker <- function(x, y, by = NULL, type = c("anti", "semi")) {
# No export, no Rd
addin_insert_in <- function() {
- if (!require("rstudioapi")) {
- insertText(" %in% ")
- }
+ stopifnot_installed_package("rstudioapi")
+ get("insertText", envir = asNamespace("rstudioapi"))(" %in% ")
}
# No export, no Rd
addin_insert_like <- function() {
- if (!require("rstudioapi")) {
- insertText(" %like% ")
- }
+ stopifnot_installed_package("rstudioapi")
+ get("insertText", envir = asNamespace("rstudioapi"))(" %like% ")
}
check_dataset_integrity <- function() {
diff --git a/R/atc_online.R b/R/atc_online.R
index 9ef534c71..0b056755e 100644
--- a/R/atc_online.R
+++ b/R/atc_online.R
@@ -59,7 +59,7 @@
#' @inheritSection AMR Read more on our website!
#' @source NEWS.md
-
p.symbol() - it was replaced with p_symbol()
+vctrs package for data transformation and data joining. In newer versions of e.g. the dplyr package, a function like bind_rows() would not preserve the right class for microorganisms (class mo) and antibiotics (class ab). This is fixed in this version.dplyr package (such as bind_rows()) would not preserve the right class for microorganisms (class mo) and antibiotics (class ab)eucast_rules()
+AMR package to work properly: crayon, data.table, dplyr, ggplot2, R6, rlang and tidyr. This is a major code change, but will probably not be noticeable by users. Making this package independent on especially the tidyverse (packages dplyr, ggplot2 and tidyr) tremendously increases sustainability on the long term, since tidyverse functions change quite often. Most of our functions are replaced with versions that only rely on base R, which keeps this package fully functional for many years to come, without requiring a lot of maintenance to keep up with other packages anymore. The only dependencies that remained are for extending methods of other packages, like pillar and vctrs for printing and working with tibbles using our classes mo and ab.read.4d(), that was only useful for reading from an old test database.as.rsi() for years 2010-2019 (thanks to Anthony Underwood)dplyr version 1.0.0rsi and mic
@@ -378,9 +396,9 @@
CITATION filemicroorganisms data set, which means that the new order Enterobacterales now consists of a part of the existing family Enterobacteriaceae, but that this family has been split into other families as well (like Morganellaceae and Yersiniaceae). Although published in 2016, this information is not yet in the Catalogue of Life version of 2019. All MDRO determinations with mdro() will now use the Enterobacterales order for all guidelines before 2016 that were dependent on the Enterobacteriaceae family.
clean to cleaner, as this package was renamed accordingly upon CRAN requestDetermination of first isolates now excludes all ‘unknown’ microorganisms at default, i.e. microbial code "UNKNOWN". They can be included with the new parameter include_unknown:
also_single_tested w
filter_ab_class() to be more reliable and to support 5th generation cephalosporinsavailability() now uses portion_R() instead of portion_IR(), to comply with EUCAST insightsage() and age_groups() now have a na.rm parameter to remove empty valuesp.symbol() to p_symbol() (the former is now deprecated and will be removed in a future version)p.symbol() to p_symbol() (the former is now deprecated and will be removed in a future version)x in age_groups() will now introduce NAs and not return an error anymorekey_antibiotics() on foreign systemsalso_single_tested w
as.mic())lintr packagealso_single_tested w
as.mo(..., allow_uncertain = 3)if using different lengths of pattern and x in %like%, it will now return the call
as.mo(..., allow_uncertain = 3)Percentages will now will rounded more logically (e.g. in freq function)
crayon, to support formatted text in the consoletidyr is now mandatory (went to Import field) since portion_df and count_df rely on itas.mo(..., allow_uncertain = 3)
as.mo(..., allow_uncertain = 3)Other small fixes
as.mo(..., allow_uncertain = 3)Functions as.rsi and as.mic now add the package name and version as attributesREADME.md with more examples