diff --git a/DESCRIPTION b/DESCRIPTION
index 67169e31..4b8334d7 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,6 +1,6 @@
Package: AMR
-Version: 1.4.0.9037
-Date: 2020-12-12
+Version: 1.4.0.9038
+Date: 2020-12-13
Title: Antimicrobial Resistance Analysis
Authors@R: c(
person(role = c("aut", "cre"),
diff --git a/NEWS.md b/NEWS.md
index 9d45e44b..016ed0f5 100755
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,5 +1,5 @@
-# AMR 1.4.0.9037
-## Last updated: 12 December 2020
+# AMR 1.4.0.9038
+## Last updated: 13 December 2020
### New
* Function `is_new_episode()` to determine patient episodes which are not necessarily based on microorganisms. It also supports grouped variables with e.g. `mutate()`, `filter()` and `summarise()` of the `dplyr` package:
diff --git a/R/eucast_rules.R b/R/eucast_rules.R
index deafd468..daa2aedf 100755
--- a/R/eucast_rules.R
+++ b/R/eucast_rules.R
@@ -539,7 +539,9 @@ eucast_rules <- function(x,
x <- paste(paste0(ab_names, collapse = " and "), "are both")
} else {
# like PEN,FOX,GEN S (although dependency on > 2 ABx does not exist at the moment)
- x <- paste(paste0(ab_names, collapse = " and "), "are all")
+ # nolint start
+ # x <- paste(paste0(ab_names, collapse = " and "), "are all")
+ # nolint end
}
return(paste0(x, " '", ab_results, "'"))
} else {
@@ -869,14 +871,16 @@ eucast_rules <- function(x,
& as.rsi_no_warning(x[, source_antibiotics[1L]]) == source_value[1L]
& as.rsi_no_warning(x[, source_antibiotics[2L]]) == source_value[2L]),
error = function(e) integer(0))
- } else if (length(source_antibiotics) == 3) {
- rows <- tryCatch(which(x[, if_mo_property, drop = TRUE] %like_perl% mo_value
- & as.rsi_no_warning(x[, source_antibiotics[1L]]) == source_value[1L]
- & as.rsi_no_warning(x[, source_antibiotics[2L]]) == source_value[2L]
- & as.rsi_no_warning(x[, source_antibiotics[3L]]) == source_value[3L]),
- error = function(e) integer(0))
+ # nolint start
+ # } else if (length(source_antibiotics) == 3) {
+ # rows <- tryCatch(which(x[, if_mo_property, drop = TRUE] %like_perl% mo_value
+ # & as.rsi_no_warning(x[, source_antibiotics[1L]]) == source_value[1L]
+ # & as.rsi_no_warning(x[, source_antibiotics[2L]]) == source_value[2L]
+ # & as.rsi_no_warning(x[, source_antibiotics[3L]]) == source_value[3L]),
+ # error = function(e) integer(0))
+ # nolint end
} else {
- stop_("only 3 antibiotics supported for source_antibiotics")
+ stop_("only 2 antibiotics supported for source_antibiotics")
}
}
diff --git a/R/globals.R b/R/globals.R
index 2e870b65..bc1d87f7 100755
--- a/R/globals.R
+++ b/R/globals.R
@@ -40,6 +40,7 @@ globalVariables(c("...length", # for pm_group_split() on R 3.3
"genus",
"gr",
"group",
+ "guideline",
"hjust",
"input",
"intrinsic_resistant",
@@ -47,6 +48,7 @@ globalVariables(c("...length", # for pm_group_split() on R 3.3
"lang",
"language",
"lookup",
+ "method",
"microorganism",
"microorganisms",
"microorganisms.codes",
diff --git a/docs/404.html b/docs/404.html
index 2958537e..dbf886ae 100644
--- a/docs/404.html
+++ b/docs/404.html
@@ -81,7 +81,7 @@
AMR (for R)
- 1.4.0.9037
+ 1.4.0.9038
diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html
index f96252b2..69c72d07 100644
--- a/docs/LICENSE-text.html
+++ b/docs/LICENSE-text.html
@@ -81,7 +81,7 @@
AMR (for R)
- 1.4.0.9037
+ 1.4.0.9038
diff --git a/docs/articles/index.html b/docs/articles/index.html
index b08ec871..9ba50a61 100644
--- a/docs/articles/index.html
+++ b/docs/articles/index.html
@@ -81,7 +81,7 @@
AMR (for R)
- 1.4.0.9037
+ 1.4.0.9038
diff --git a/docs/authors.html b/docs/authors.html
index ce1597da..af3c49ca 100644
--- a/docs/authors.html
+++ b/docs/authors.html
@@ -81,7 +81,7 @@
AMR (for R)
- 1.4.0.9037
+ 1.4.0.9038
diff --git a/docs/index.html b/docs/index.html
index 0d049f2c..da51250a 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -43,7 +43,7 @@
AMR (for R)
- 1.4.0.9037
+ 1.4.0.9038
@@ -210,27 +210,27 @@ Since you are one of our users, we would like to know how you use the package an
This package is fully independent of any other R package and works on Windows, macOS and Linux with all versions of R since R-3.0.0 (April 2013). It was designed to work in any setting, including those with very limited resources. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the University of Groningen, in collaboration with non-profit organisations Certe Medical Diagnostics and Advice and University Medical Center Groningen. This R package is actively maintained and is free software (see Copyright).
- Used in 135 countries
Since its first public release in early 2018, this package has been downloaded from 135 countries. Click the map to enlarge.
+ Used in 135 countries
Since its first public release in early 2018, this package has been downloaded from 135 countries. Click the map to enlarge and to see the country names.
-
With AMR
(for R), there’s always a knowledgeable microbiologist by your side!
-
# AMR works great with dplyr, but it's not required or neccesary
-library(AMR)
-library(dplyr)
-
-example_isolates %>%
- mutate(mo = mo_fullname(mo)) %>%
- filter(mo_is_gram_negative(), mo_is_intrinsic_resistant(ab = "cefotax")) %>%
- select(mo, aminoglycosides(), carbapenems())
-#> NOTE: Using column 'mo' as input for mo_is_gram_negative()
-#> NOTE: Using column 'mo' as input for mo_is_intrinsic_resistant()
-#> Selecting aminoglycosides: 'AMK' (amikacin), 'GEN' (gentamicin),
- 'KAN' (kanamycin), 'TOB' (tobramycin)
-#> Selecting carbapenems: 'IPM' (imipenem), 'MEM' (meropenem)
-
With only having defined a row filter on Gram-negative bacteria with intrinsic resistance to cefotaxime (mo_is_gram_positive()
and mo_is_intrinsic_resistant()
) and a column selection on two antibiotic groups (aminoglycosides()
and carbapenems()
), the reference data about all microorganisms and all antibiotics in the AMR
package make sure you get what you meant:
+
+
With only having defined a row filter on Gram-negative bacteria with intrinsic resistance to cefotaxime (mo_is_gram_negative()
and mo_is_intrinsic_resistant()
) and a column selection on two antibiotic groups (aminoglycosides()
and carbapenems()
), the reference data about all microorganisms and all antibiotics in the AMR
package make sure you get what you meant:
Pseudomonas aeruginosa |
- |
-I |
-R |
-S |
-S |
- |
-
-
-Pseudomonas aeruginosa |
- |
-I |
-R |
-S |
-S |
- |
-
-
-Pseudomonas aeruginosa |
S |
S |
R |
@@ -455,7 +437,7 @@ Since you are one of our users, we would like to know how you use the package an
It analyses the data with convenient functions that use well-known methods.
-- Calculate the microbial susceptibility or resistance (and even co-resistance) with the
susceptibility()
and resistance()
functions, or be even more specific with the proportion_R()
, proportion_IR()
, proportion_I()
, proportion_SI()
and proportion_S()
functions. Similarly, the number of isolates can be determined with the count_resistant()
, count_susceptible()
and count_all()
functions. All these functions can be used with the dplyr
package (e.g. in conjunction with summarise()
)
+- Calculate the microbial susceptibility or resistance (and even co-resistance) with the
susceptibility()
and resistance()
functions, or be even more specific with the proportion_R()
, proportion_IR()
, proportion_I()
, proportion_SI()
and proportion_S()
functions. Similarly, the number of isolates can be determined with the count_resistant()
, count_susceptible()
and count_all()
functions. All these functions can be used with the dplyr
package (e.g. in conjunction with summarise()
)
- Plot AMR results with
geom_rsi()
, a function made for the ggplot2
package
- Predict antimicrobial resistance for the nextcoming years using logistic regression models with the
resistance_predict()
function
diff --git a/docs/news/index.html b/docs/news/index.html
index 762ca72e..dfca8ed0 100644
--- a/docs/news/index.html
+++ b/docs/news/index.html
@@ -81,7 +81,7 @@
AMR (for R)
- 1.4.0.9037
+ 1.4.0.9038
@@ -236,13 +236,13 @@
Source: NEWS.md
-
-