+
+
+
-Last updated: 12 May 2021
+Last updated: 13 May 2021
@@ -346,7 +346,7 @@
#> Filtering on oxazolidinones: value in column `LNZ` (linezolid) is either "R", "S" or "I"
Support for custom MDRO guidelines, using the new custom_mdro_guideline()
function, please see mdro()
for additional info
-
ggplot()
generics for classes <mic>
and <disk>
+
ggplot()
generics for classes <mic>
and <disk>
Function mo_is_yeast()
, which determines whether a microorganism is a member of the taxonomic class Saccharomycetes or the taxonomic order Saccharomycetales:
@@ -403,7 +403,7 @@
Plotting of MIC and disk diffusion values now support interpretation colouring if you supply the microorganism and antimicrobial agent
All colours were updated to colour-blind friendly versions for values R, S and I for all plot methods (also applies to tibble printing)
Interpretation of MIC and disk diffusion values to R/SI will now be translated if the system language is German, Dutch or Spanish (see translate
)
-
Plotting is now possible with base R using plot()
and with ggplot2 using ggplot()
on any vector of MIC and disk diffusion values
+
Plotting is now possible with base R using plot()
and with ggplot2 using ggplot()
on any vector of MIC and disk diffusion values
Updated SNOMED codes to US Edition of SNOMED CT from 1 September 2020 and added the source to the help page of the microorganisms
data set
diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml
index dc09372c..36ac5e84 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-12T16:13Z
+last_built: 2021-05-13T13:55Z
urls:
reference: https://msberends.github.io/AMR//reference
article: https://msberends.github.io/AMR//articles
diff --git a/docs/reference/as.rsi.html b/docs/reference/as.rsi.html
index 53d8f1f7..6da02b6e 100644
--- a/docs/reference/as.rsi.html
+++ b/docs/reference/as.rsi.html
@@ -82,7 +82,7 @@
AMR (for R)
- 1.6.0.9021
+ 1.6.0.9022
@@ -453,7 +453,7 @@ The lifecycle of this function is stableif (require("dplyr")) {
df %>% mutate_if(is.mic, as.rsi)
df %>% mutate_if(function(x) is.mic(x) | is.disk(x), as.rsi)
- df %>% mutate(across((is.mic), as.rsi))
+ df %>% mutate(across(where(is.mic), as.rsi))
df %>% mutate_at(vars(AMP:TOB), as.rsi)
df %>% mutate(across(AMP:TOB, as.rsi))
@@ -498,7 +498,7 @@ The lifecycle of this function is stable# note: from dplyr 1.0.0 on, this will be:
# example_isolates %>%
- # mutate(across((is.rsi.eligible), as.rsi))
+ # mutate(across(where(is.rsi.eligible), as.rsi))
}
# }
diff --git a/docs/reference/index.html b/docs/reference/index.html
index 0b86bfe7..292064ef 100644
--- a/docs/reference/index.html
+++ b/docs/reference/index.html
@@ -81,7 +81,7 @@
AMR (for R)
- 1.6.0.9021
+ 1.6.0.9022
diff --git a/docs/survey.html b/docs/survey.html
index 0a88a3ee..f15ab302 100644
--- a/docs/survey.html
+++ b/docs/survey.html
@@ -81,7 +81,7 @@
AMR (for R)
- 1.6.0.9021
+ 1.6.0.9022
diff --git a/man/as.rsi.Rd b/man/as.rsi.Rd
index f1eedd34..53e270e8 100755
--- a/man/as.rsi.Rd
+++ b/man/as.rsi.Rd
@@ -195,7 +195,7 @@ as.rsi(x = as.disk(18),
if (require("dplyr")) {
df \%>\% mutate_if(is.mic, as.rsi)
df \%>\% mutate_if(function(x) is.mic(x) | is.disk(x), as.rsi)
- df \%>\% mutate(across((is.mic), as.rsi))
+ df \%>\% mutate(across(where(is.mic), as.rsi))
df \%>\% mutate_at(vars(AMP:TOB), as.rsi)
df \%>\% mutate(across(AMP:TOB, as.rsi))
@@ -240,7 +240,7 @@ if (require("dplyr")) {
# note: from dplyr 1.0.0 on, this will be:
# example_isolates \%>\%
- # mutate(across((is.rsi.eligible), as.rsi))
+ # mutate(across(where(is.rsi.eligible), as.rsi))
}
}
}
diff --git a/tests/testthat/test-eucast_rules.R b/tests/testthat/test-eucast_rules.R
index d798cf08..d9aaaf4d 100755
--- a/tests/testthat/test-eucast_rules.R
+++ b/tests/testthat/test-eucast_rules.R
@@ -77,17 +77,18 @@ test_that("EUCAST rules work", {
expect_equal(suppressWarnings(eucast_rules(a, "mo", info = FALSE)), b)
# piperacillin must be R in Enterobacteriaceae when tica is R
- library(dplyr, warn.conflicts = FALSE)
- expect_equal(suppressWarnings(
- example_isolates %>%
- filter(mo_family(mo) == "Enterobacteriaceae") %>%
- mutate(TIC = as.rsi("R"),
- PIP = as.rsi("S")) %>%
- eucast_rules(col_mo = "mo", version_expertrules = 3.1, info = FALSE) %>%
- pull(PIP) %>%
- unique() %>%
- as.character()),
- "R")
+ if (require("dplyr")) {
+ expect_equal(suppressWarnings(
+ example_isolates %>%
+ filter(mo_family(mo) == "Enterobacteriaceae") %>%
+ mutate(TIC = as.rsi("R"),
+ PIP = as.rsi("S")) %>%
+ eucast_rules(col_mo = "mo", version_expertrules = 3.1, info = FALSE) %>%
+ pull(PIP) %>%
+ unique() %>%
+ as.character()),
+ "R")
+ }
# Azithromycin and Clarythromycin must be equal to Erythromycin
a <- suppressWarnings(as.rsi(eucast_rules(data.frame(mo = example_isolates$mo,
@@ -114,7 +115,9 @@ test_that("EUCAST rules work", {
"S")
# also test norf
- expect_output(suppressWarnings(eucast_rules(example_isolates %>% mutate(NOR = "S", NAL = "S"), info = TRUE)))
+ if (require("dplyr")) {
+ expect_output(suppressWarnings(eucast_rules(example_isolates %>% mutate(NOR = "S", NAL = "S"), info = TRUE)))
+ }
# check verbose output
expect_output(suppressWarnings(eucast_rules(example_isolates, verbose = TRUE, rules = "all", info = TRUE)))