mirror of
https://github.com/msberends/AMR.git
synced 2026-06-29 14:16:18 +02:00
(v3.0.1.9079) docs: rename remaining 'antibiotic selectors'/'AB selectors' to 'antimicrobial selectors'/'AMR selectors'
* docs: rename remaining 'antibiotic selectors'/'AB selectors' to 'antimicrobial selectors'/'AMR selectors' Five leftover occurrences of the old terminology updated in the AMR vignette (section heading + code comment), the amr_selectors test file, and two roxygen example comments in amr_selectors.R. The auto-generated man/antimicrobial_selectors.Rd will update on the next devtools::document() run. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0169LucQ7SHDLHdTnDs1ENhd * fix --------- Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
Package: AMR
|
||||
Version: 3.0.1.9078
|
||||
Version: 3.0.1.9079
|
||||
Date: 2026-06-27
|
||||
Title: Antimicrobial Resistance Data Analysis
|
||||
Description: Functions to simplify and standardise antimicrobial resistance (AMR)
|
||||
|
||||
2
NEWS.md
2
NEWS.md
@@ -1,4 +1,4 @@
|
||||
# AMR 3.0.1.9078
|
||||
# AMR 3.0.1.9079
|
||||
|
||||
Planned as v3.1.0, end of June 2026.
|
||||
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
#' # data.table --------------------------------------------------------------
|
||||
#'
|
||||
#' # data.table is supported as well, just use it in the same way as with
|
||||
#' # base R, but add `with = FALSE` if using a single AB selector.
|
||||
#' # base R, but add `with = FALSE` if using a single AMR selector.
|
||||
#'
|
||||
#' if (require("data.table")) {
|
||||
#' dt <- as.data.table(example_isolates)
|
||||
@@ -215,7 +215,7 @@
|
||||
#' dt[, carbapenems(), with = FALSE]
|
||||
#' }
|
||||
#'
|
||||
#' # for multiple selections or AB selectors, `with = FALSE` is not needed:
|
||||
#' # for multiple selections or AMR selectors, `with = FALSE` is not needed:
|
||||
#' if (require("data.table")) {
|
||||
#' dt[, c("mo", aminoglycosides())]
|
||||
#' }
|
||||
|
||||
BIN
R/sysdata.rda
BIN
R/sysdata.rda
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -437,7 +437,7 @@ example_isolates[, amr_selector(oral_ddd > 1 & oral_units == "g")]
|
||||
# data.table --------------------------------------------------------------
|
||||
|
||||
# data.table is supported as well, just use it in the same way as with
|
||||
# base R, but add `with = FALSE` if using a single AB selector.
|
||||
# base R, but add `with = FALSE` if using a single AMR selector.
|
||||
|
||||
if (require("data.table")) {
|
||||
dt <- as.data.table(example_isolates)
|
||||
@@ -450,7 +450,7 @@ if (require("data.table")) {
|
||||
dt[, carbapenems(), with = FALSE]
|
||||
}
|
||||
|
||||
# for multiple selections or AB selectors, `with = FALSE` is not needed:
|
||||
# for multiple selections or AMR selectors, `with = FALSE` is not needed:
|
||||
if (require("data.table")) {
|
||||
dt[, c("mo", aminoglycosides())]
|
||||
}
|
||||
|
||||
@@ -36,21 +36,21 @@ scale_fill_mic(keep_operators = "edges", mic_range = NULL, ...)
|
||||
scale_x_sir(
|
||||
colours_SIR = c(S = "#3CAEA3", SDD = "#8FD6C4", I = "#F6D55C", R = "#ED553B"),
|
||||
language = get_AMR_locale(),
|
||||
eucast_I = getOption("AMR_guideline", "EUCAST") == "EUCAST",
|
||||
eucast_I = getOption("AMR_guideline", "EUCAST") \%like\% "EUCAST",
|
||||
...
|
||||
)
|
||||
|
||||
scale_colour_sir(
|
||||
colours_SIR = c(S = "#3CAEA3", SDD = "#8FD6C4", I = "#F6D55C", R = "#ED553B"),
|
||||
language = get_AMR_locale(),
|
||||
eucast_I = getOption("AMR_guideline", "EUCAST") == "EUCAST",
|
||||
eucast_I = getOption("AMR_guideline", "EUCAST") \%like\% "EUCAST",
|
||||
...
|
||||
)
|
||||
|
||||
scale_fill_sir(
|
||||
colours_SIR = c(S = "#3CAEA3", SDD = "#8FD6C4", I = "#F6D55C", R = "#ED553B"),
|
||||
language = get_AMR_locale(),
|
||||
eucast_I = getOption("AMR_guideline", "EUCAST") == "EUCAST",
|
||||
eucast_I = getOption("AMR_guideline", "EUCAST") \%like\% "EUCAST",
|
||||
...
|
||||
)
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ test_that("test-amr selectors.R", {
|
||||
expect_equal(nrow(example_isolates[any(carbapenems() != "R"), ]), 910, tolerance = 0.5)
|
||||
expect_equal(nrow(example_isolates[carbapenems() != "R", ]), 704, tolerance = 0.5)
|
||||
|
||||
# filter with multiple antibiotic selectors using c()
|
||||
# filter with multiple antimicrobial selectors using c()
|
||||
expect_equal(nrow(example_isolates[all(c(carbapenems(), aminoglycosides()) == "R"), ]), 26, tolerance = 0.5)
|
||||
|
||||
# filter + select in one go: get penicillins in carbapenems-resistant strains
|
||||
|
||||
@@ -220,9 +220,9 @@ our_data_1st %>%
|
||||
count(mo_name(bacteria), sort = TRUE)
|
||||
```
|
||||
|
||||
## Select and filter with antibiotic selectors
|
||||
## Select and filter with antimicrobial selectors
|
||||
|
||||
Using so-called antibiotic class selectors, you can select or filter columns based on the antibiotic class that your antibiotic results are in:
|
||||
Using so-called antimicrobial class selectors, you can select or filter columns based on the antimicrobial class that your antimicrobial results are in:
|
||||
|
||||
```{r bug_drg 2a}
|
||||
our_data_1st %>%
|
||||
@@ -234,7 +234,7 @@ our_data_1st %>%
|
||||
our_data_1st %>%
|
||||
select(bacteria, where(is.sir))
|
||||
|
||||
# filtering using AB selectors is also possible:
|
||||
# filtering using antimicrobial selectors is also possible:
|
||||
our_data_1st %>%
|
||||
filter(any(aminoglycosides() == "R"))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user