diff --git a/DESCRIPTION b/DESCRIPTION index 85885258..eb6cf705 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: AMR -Version: 1.4.0.9059 +Version: 1.4.0.9060 Date: 2021-01-04 Title: Antimicrobial Resistance Analysis Authors@R: c( diff --git a/NEWS.md b/NEWS.md index 83df7775..45f1c904 100755 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# AMR 1.4.0.9059 +# AMR 1.4.0.9060 ## Last updated: 4 January 2021 ### New * Functions `get_episode()` and `is_new_episode()` to determine (patient) episodes which are not necessarily based on microorganisms. The `get_episode()` function returns the index number of the episode per group, while the `is_new_episode()` function returns values `TRUE`/`FALSE` to indicate whether an item in a vector is the start of a new episode. They also support `dplyr`s grouping (i.e. using `group_by()`): diff --git a/R/aa_helper_functions.R b/R/aa_helper_functions.R index 0276b60c..dd262024 100755 --- a/R/aa_helper_functions.R +++ b/R/aa_helper_functions.R @@ -527,7 +527,7 @@ meet_criteria <- function(object, } get_current_data <- function(arg_name, call) { - if (as.double(R.Version()$major) + (as.double(R.Version()$minor) / 100) < 3.2) { + if (as.double(R.Version()$major) + (as.double(R.Version()$minor) / 10) < 3.2) { if (is.na(arg_name)) { warning_("this function can only be used in R >= 3.2", call = call) return(data.frame()) diff --git a/R/ab_class_selectors.R b/R/ab_class_selectors.R index f3211490..0d06d6f6 100644 --- a/R/ab_class_selectors.R +++ b/R/ab_class_selectors.R @@ -164,7 +164,7 @@ ab_selector <- function(ab_class, function_name) { meet_criteria(ab_class, allow_class = "character", has_length = 1, .call_depth = 1) meet_criteria(function_name, allow_class = "character", has_length = 1, .call_depth = 1) - if (as.double(R.Version()$major) + (as.double(R.Version()$minor) / 100) < 3.2) { + if (as.double(R.Version()$major) + (as.double(R.Version()$minor) / 10) < 3.2) { warning_(function_name, "() can only be used in R >= 3.2", call = FALSE) return(NULL) } diff --git a/data-raw/AMR_1.4.0.9059.tar.gz b/data-raw/AMR_1.4.0.9060.tar.gz similarity index 82% rename from data-raw/AMR_1.4.0.9059.tar.gz rename to data-raw/AMR_1.4.0.9060.tar.gz index 5ea064c4..d19c9781 100644 Binary files a/data-raw/AMR_1.4.0.9059.tar.gz and b/data-raw/AMR_1.4.0.9060.tar.gz differ diff --git a/docs/404.html b/docs/404.html index 576efc7e..d2be3138 100644 --- a/docs/404.html +++ b/docs/404.html @@ -81,7 +81,7 @@ AMR (for R) - 1.4.0.9059 + 1.4.0.9060 diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index e6a80ec3..b2f23b85 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -81,7 +81,7 @@ AMR (for R) - 1.4.0.9059 + 1.4.0.9060 diff --git a/docs/articles/index.html b/docs/articles/index.html index 99b0cafa..e62c032e 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -81,7 +81,7 @@ AMR (for R) - 1.4.0.9059 + 1.4.0.9060 diff --git a/docs/authors.html b/docs/authors.html index 85a4a984..14f2739a 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -81,7 +81,7 @@ AMR (for R) - 1.4.0.9059 + 1.4.0.9060 diff --git a/docs/index.html b/docs/index.html index b9642e1d..5fc50fd8 100644 --- a/docs/index.html +++ b/docs/index.html @@ -43,7 +43,7 @@ AMR (for R) - 1.4.0.9059 + 1.4.0.9060 diff --git a/docs/news/index.html b/docs/news/index.html index efaee483..f3e04c0c 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -81,7 +81,7 @@ AMR (for R) - 1.4.0.9059 + 1.4.0.9060 @@ -236,9 +236,9 @@ Source: NEWS.md -
-

-AMR 1.4.0.9059 Unreleased +
+

+AMR 1.4.0.9060 Unreleased

diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 11ecbf3a..21cd2f6e 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-01-04T11:28Z +last_built: 2021-01-04T12:36Z 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 ea81bcd4..3ca53671 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -81,7 +81,7 @@ AMR (for R) - 1.4.0.9059 + 1.4.0.9060

diff --git a/docs/survey.html b/docs/survey.html index 5ebafb63..e3d205cc 100644 --- a/docs/survey.html +++ b/docs/survey.html @@ -81,7 +81,7 @@ AMR (for R) - 1.4.0.9059 + 1.4.0.9060
diff --git a/tests/testthat/test-zzz.R b/tests/testthat/test-zzz.R index c9cffce0..01eaa5a3 100644 --- a/tests/testthat/test-zzz.R +++ b/tests/testthat/test-zzz.R @@ -105,12 +105,13 @@ test_that("imports work", { import_functions <- c(import_functions, call_functions) - # check if all are in Suggests field - expect_true(all(unique(import_functions) %in% strsplit(packageDescription("AMR")$Suggests, ",\n")[[1]])) - for (i in seq_len(length(import_functions))) { fn <- names(import_functions)[i] pkg <- unname(import_functions[i]) + # package should be in Suggests field of DESCRIPTION + expect(pkg %in% strsplit(packageDescription("AMR")$Suggests, ",\n")[[1]], + failure_message = paste0("Package ", pkg, " is not in Suggests field")) + # function should exist in foreign pkg namespace expect(!is.null(import_fn(name = fn, pkg = pkg, error_on_fail = FALSE)), failure_message = paste0("Function ", pkg, "::", fn, "() does not exist anymore")) }