+
+
+
-Last updated: 19 May 2021
+Last updated: 20 May 2021
diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml
index 1fa87d64..9f57ff13 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-05-19T21:58Z
+last_built: 2021-05-20T08:10Z
urls:
reference: https://msberends.github.io/AMR//reference
article: https://msberends.github.io/AMR//articles
diff --git a/docs/reference/atc_online.html b/docs/reference/atc_online.html
index 0976037d..5d4653ca 100644
--- a/docs/reference/atc_online.html
+++ b/docs/reference/atc_online.html
@@ -82,7 +82,7 @@
AMR (for R)
- 1.6.0.9021
+ 1.6.0.9050
@@ -309,7 +309,7 @@
"TU"
= thousand units
"MU"
= million units
"mmol"
= millimole
-
"ml"
= milliliter (e.g. eyedrops)
+
"ml"
= millilitre (e.g. eyedrops)
N.B. This function requires an internet connection and only works if the following packages are installed: curl
, rvest
, xml2
.
diff --git a/docs/reference/index.html b/docs/reference/index.html
index 2b430678..63a3578e 100644
--- a/docs/reference/index.html
+++ b/docs/reference/index.html
@@ -81,7 +81,7 @@
AMR (for R)
- 1.6.0.9049
+ 1.6.0.9050
diff --git a/docs/survey.html b/docs/survey.html
index c1c4492e..4fbf51a0 100644
--- a/docs/survey.html
+++ b/docs/survey.html
@@ -81,7 +81,7 @@
AMR (for R)
- 1.6.0.9049
+ 1.6.0.9050
diff --git a/inst/tinytest/test-atc_online.R b/inst/tinytest/test-atc_online.R
index bd390e1a..9feaf261 100644
--- a/inst/tinytest/test-atc_online.R
+++ b/inst/tinytest/test-atc_online.R
@@ -23,7 +23,10 @@
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
# ==================================================================== #
-if (tryCatch(curl::has_internet(), error = function(e) FALSE)) {
+if (pkg_is_available("curl", also_load = FALSE) &&
+ pkg_is_available("rvest", also_load = FALSE) &&
+ pkg_is_available("xml2", also_load = FALSE) &&
+ tryCatch(curl::has_internet(), error = function(e) FALSE)) {
expect_true(length(atc_online_groups(ab_atc("AMX"))) >= 1)
expect_equal(atc_online_ddd(ab_atc("AMX"), administration = "O"), 1.5)
expect_equal(atc_online_ddd(ab_atc("AMX"), administration = "P"), 3)
diff --git a/inst/tinytest/test-proportion.R b/inst/tinytest/test-proportion.R
index 93927483..5f2b7d34 100755
--- a/inst/tinytest/test-proportion.R
+++ b/inst/tinytest/test-proportion.R
@@ -35,17 +35,17 @@ expect_equal(proportion_R(example_isolates$AMX) + proportion_I(example_isolates$
expect_equal(proportion_S(example_isolates$AMX) + proportion_I(example_isolates$AMX),
proportion_SI(example_isolates$AMX))
-expect_equal(example_isolates %>% proportion_SI(AMC),
- 0.7626397,
- tolerance = 0.0001)
-expect_equal(example_isolates %>% proportion_SI(AMC, GEN),
- 0.9408,
- tolerance = 0.0001)
-expect_equal(example_isolates %>% proportion_SI(AMC, GEN, only_all_tested = TRUE),
- 0.9382647,
- tolerance = 0.0001)
-
if (pkg_is_available("dplyr")) {
+ expect_equal(example_isolates %>% proportion_SI(AMC),
+ 0.7626397,
+ tolerance = 0.0001)
+ expect_equal(example_isolates %>% proportion_SI(AMC, GEN),
+ 0.9408,
+ tolerance = 0.0001)
+ expect_equal(example_isolates %>% proportion_SI(AMC, GEN, only_all_tested = TRUE),
+ 0.9382647,
+ tolerance = 0.0001)
+
# percentages
expect_equal(example_isolates %>%
group_by(hospital_id) %>%
diff --git a/man/atc_online.Rd b/man/atc_online.Rd
index b62a582a..190b4cfe 100644
--- a/man/atc_online.Rd
+++ b/man/atc_online.Rd
@@ -61,7 +61,7 @@ Abbreviations of return values when using \code{property = "U"} (unit):
\item \code{"TU"} = thousand units
\item \code{"MU"} = million units
\item \code{"mmol"} = millimole
-\item \code{"ml"} = milliliter (e.g. eyedrops)
+\item \code{"ml"} = millilitre (e.g. eyedrops)
}
\strong{N.B. This function requires an internet connection and only works if the following packages are installed: \code{curl}, \code{rvest}, \code{xml2}.}