diff --git a/DESCRIPTION b/DESCRIPTION index a9b2cae7..ff70b6dd 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: AMR -Version: 1.2.0.9011 +Version: 1.2.0.9012 Date: 2020-06-22 Title: Antimicrobial Resistance Analysis Authors@R: c( diff --git a/NEWS.md b/NEWS.md index c2b595a2..a80f9837 100755 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# AMR 1.2.0.9011 +# AMR 1.2.0.9012 ## Last updated: 22-Jun-2020 ### New diff --git a/R/rsi_calc.R b/R/rsi_calc.R index 3d162339..1a182f62 100755 --- a/R/rsi_calc.R +++ b/R/rsi_calc.R @@ -163,11 +163,10 @@ rsi_calc_df <- function(type, # "proportion", "count" or "both" stop_ifnot(is.data.frame(data), "`data` must be a data.frame", call = -2) stop_if(any(dim(data) == 0), "`data` must contain rows and columns", call = -2) stop_ifnot(any(sapply(data, is.rsi), na.rm = TRUE), "no columns with class found. See ?as.rsi.", call = -2) - stop_if(isTRUE(combine_SI) & isTRUE(combine_IR), "either `combine_SI` or `combine_IR` can be TRUE, not both", call = -2) - if (isTRUE(combine_IR) & isTRUE(combine_SI_missing)) { combine_SI <- FALSE } + stop_if(isTRUE(combine_SI) & isTRUE(combine_IR), "either `combine_SI` or `combine_IR` can be TRUE, not both", call = -2) if (as.character(translate_ab) %in% c("TRUE", "official")) { translate_ab <- "name" diff --git a/docs/404.html b/docs/404.html index b0c0185e..15b5a2e4 100644 --- a/docs/404.html +++ b/docs/404.html @@ -81,7 +81,7 @@ AMR (for R) - 1.2.0.9011 + 1.2.0.9012 diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index b82e2b1c..10613673 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -81,7 +81,7 @@ AMR (for R) - 1.2.0.9011 + 1.2.0.9012 diff --git a/docs/articles/index.html b/docs/articles/index.html index 1634e029..7c39a51e 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -81,7 +81,7 @@ AMR (for R) - 1.2.0.9011 + 1.2.0.9012 diff --git a/docs/authors.html b/docs/authors.html index 57272522..4b6b8751 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -81,7 +81,7 @@ AMR (for R) - 1.2.0.9011 + 1.2.0.9012 diff --git a/docs/index.html b/docs/index.html index d87a86f2..bc23ff66 100644 --- a/docs/index.html +++ b/docs/index.html @@ -43,7 +43,7 @@ AMR (for R) - 1.2.0.9011 + 1.2.0.9012 diff --git a/docs/news/index.html b/docs/news/index.html index 652c8e3f..165231ff 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -81,7 +81,7 @@ AMR (for R) - 1.2.0.9011 + 1.2.0.9012 @@ -229,9 +229,9 @@ Source: NEWS.md -
-

-AMR 1.2.0.9011 Unreleased +
+

+AMR 1.2.0.9012 Unreleased

diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 65ed51a2..53308601 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -10,7 +10,7 @@ articles: WHONET: WHONET.html benchmarks: benchmarks.html resistance_predict: resistance_predict.html -last_built: 2020-06-22T09:16Z +last_built: 2020-06-22T10:13Z urls: reference: https://msberends.gitlab.io/AMR/reference article: https://msberends.gitlab.io/AMR/articles diff --git a/docs/reference/index.html b/docs/reference/index.html index 9bb0888a..ca96a488 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -81,7 +81,7 @@ AMR (for R) - 1.2.0.9011 + 1.2.0.9012

diff --git a/tests/testthat/test-count.R b/tests/testthat/test-count.R index fab02430..20e8e919 100644 --- a/tests/testthat/test-count.R +++ b/tests/testthat/test-count.R @@ -28,13 +28,13 @@ test_that("counts work", { expect_equal(count_all(example_isolates$AMX), n_rsi(example_isolates$AMX)) # AMX resistance in `example_isolates` - expect_equal(count_R(example_isolates$AMX), 683) - expect_equal(count_I(example_isolates$AMX), 3) - expect_equal(suppressWarnings(count_S(example_isolates$AMX)), 543) - expect_equal(count_R(example_isolates$AMX) + count_I(example_isolates$AMX), - suppressWarnings(count_IR(example_isolates$AMX))) - expect_equal(suppressWarnings(count_S(example_isolates$AMX)) + count_I(example_isolates$AMX), - count_SI(example_isolates$AMX)) + expect_equal(count_R(example_isolates$AMX), 683) + expect_equal(count_I(example_isolates$AMX), 3) + expect_equal(suppressWarnings(count_S(example_isolates$AMX)), 543) + expect_equal(count_R(example_isolates$AMX) + count_I(example_isolates$AMX), + suppressWarnings(count_IR(example_isolates$AMX))) + expect_equal(suppressWarnings(count_S(example_isolates$AMX)) + count_I(example_isolates$AMX), + count_SI(example_isolates$AMX)) library(dplyr) expect_equal(example_isolates %>% count_susceptible(AMC), 1433) @@ -45,7 +45,7 @@ test_that("counts work", { expect_identical(example_isolates %>% count_all(AMC, GEN, only_all_tested = TRUE), example_isolates %>% count_susceptible(AMC, GEN, only_all_tested = TRUE) + example_isolates %>% count_resistant(AMC, GEN, only_all_tested = TRUE)) - + # count of cases expect_equal(example_isolates %>% group_by(hospital_id) %>% @@ -83,8 +83,8 @@ test_that("counts work", { expect_error(count_resistant("test", as_percent = "test")) expect_error(count_susceptible("test", minimum = "test")) expect_error(count_susceptible("test", as_percent = "test")) - + expect_error(count_df(c("A", "B", "C"))) expect_error(count_df(example_isolates[, "date"])) - + })