diff --git a/DESCRIPTION b/DESCRIPTION index 3fd5df79..669cbbd8 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: AMR -Version: 1.7.0.9002 -Date: 2021-06-01 +Version: 1.7.1 +Date: 2021-06-03 Title: Antimicrobial Resistance Data Analysis Authors@R: c( person(role = c("aut", "cre"), @@ -43,7 +43,6 @@ Depends: R (>= 3.0.0) Suggests: cleaner, - covr, curl, dplyr, ggplot2, diff --git a/NEWS.md b/NEWS.md index 820f36e3..139173ea 100755 --- a/NEWS.md +++ b/NEWS.md @@ -1,18 +1,8 @@ -# `AMR` 1.7.0.9002 -## Last updated: 1 June 2021 - -### New -* Support for CLSI 2020 guideline for interpreting MICs and disk diffusion values (using `as.rsi()`) - -### Changed -* `bug_drug_combinations()` now supports grouping using the `dplyr` package -* As requested by CRAN administrators: decreased package size by 3 MB in costs of a ~50 times slower loading time of the package (i.e., `library(AMR)`) - - -# `AMR` 1.7.0 +# `AMR` 1.7.1 ### Breaking change -* All antibiotic class selectors (such as `carbapenems()`, `aminoglycosides()`) can now be used for filtering as well, making all their accompanying `filter_*()` functions redundant (such as `filter_carbapenems()`, `filter_aminoglycosides()`). These functions are now deprecated and will be removed in a next release. +* Support for CLSI 2020 guideline for interpreting MICs and disk diffusion values (using `as.rsi()`) +* All antibiotic class selectors (such as `carbapenems()`, `aminoglycosides()`) can now be used for filtering as well, making all their accompanying `filter_*()` functions redundant (such as `filter_carbapenems()`, `filter_aminoglycosides()`). These functions are now deprecated and will be removed in a next release. Examples of how the selectors can be used for filtering: ```r # select columns with results for carbapenems example_isolates[, carbapenems()] # base R @@ -45,6 +35,7 @@ ### Changed +* `bug_drug_combinations()` now supports grouping using the `dplyr` package * Custom MDRO guidelines (`mdro()`, `custom_mdro_guideline()`): * Custom MDRO guidelines can now be combined with other custom MDRO guidelines using `c()` * Fix for applying the rules; in previous versions, rows were interpreted according to the last matched rule. Now, rows are interpreted according to the first matched rule @@ -77,6 +68,7 @@ * `age()` now vectorises over both `x` and `reference` ### Other +* As requested by CRAN administrators: decreased package size by 3 MB in costs of a slower loading time of the package * All unit tests are now processed by the `tinytest` package, instead of the `testthat` package. The `testthat` package unfortunately requires tons of dependencies that are also heavy and only usable for recent R versions, disallowing developers to test a package under any R 3.* version. On the contrary, the `tinytest` package is very lightweight and dependency-free. diff --git a/R/ab_class_selectors.R b/R/ab_class_selectors.R index ce103cb6..d897d022 100644 --- a/R/ab_class_selectors.R +++ b/R/ab_class_selectors.R @@ -73,6 +73,11 @@ #' \donttest{ #' if (require("dplyr")) { #' +#' # get AMR for all aminoglycosides e.g., per hospital: +#' example_isolates %>% +#' group_by(hospital_id) %>% +#' summarise(across(aminoglycosides(), resistance)) +#' #' # this will select columns 'IPM' (imipenem) and 'MEM' (meropenem): #' example_isolates %>% #' select(carbapenems()) diff --git a/R/sysdata.rda b/R/sysdata.rda index 51680594..d9cd9bdb 100644 Binary files a/R/sysdata.rda and b/R/sysdata.rda differ diff --git a/README.md b/README.md index 901c244e..4b8a62a2 100755 --- a/README.md +++ b/README.md @@ -23,14 +23,7 @@ This is the development source of the `AMR` package for R. Not a developer? Then ### How to get this package Please see [our website](https://msberends.github.io/AMR/#get-this-package). -You have to add [our R-universe address](https://msberends.r-universe.dev) to your list of repositories ('repos'), by running: - -```r -options(repos = c(getOption("repos"), - msberends = "https://msberends.r-universe.dev")) -``` - -You can now install or update the `AMR` package in the same way you are used to: +You can install or update the `AMR` package from CRAN using: ```r install.packages("AMR") diff --git a/cran-comments.md b/cran-comments.md index efd52128..4347495f 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1 +1 @@ -* This package now has a data folder size of ~2.8 MB (this was ~5.6 MB), which will return a NOTE on R CMD CHECK. The package size is needed to provide users reference data for the complete taxonomy of microorganisms - one of the most important features of this package. This was written and explained in a manuscript that was accepted for publication in the Journal of Statistical Software earlier this year. We will add the paper as a vignette after publication in a next version. All data sets were compressed using `compression = "xz"` to make them as small as possible. We try to update as infrequent as possible. +* This package now has a data folder size of ~2.8 MB (this was ~5.6 MB), which will return a NOTE on R CMD CHECK. This package size is needed to provide users reference data for the complete taxonomy of microorganisms - one of the most important features of this package, following 15 previous releases of this package. All data sets were compressed using `compression = "xz"` to make them as small as possible. diff --git a/data-raw/AMR_latest.tar.gz b/data-raw/AMR_latest.tar.gz index dafcaadc..7564a482 100644 Binary files a/data-raw/AMR_latest.tar.gz and b/data-raw/AMR_latest.tar.gz differ diff --git a/data-raw/_internals.R b/data-raw/_internals.R index c7fbf430..2bbed1bc 100644 --- a/data-raw/_internals.R +++ b/data-raw/_internals.R @@ -146,7 +146,6 @@ usethis::use_data(eucast_rules_file, LANGUAGES_SUPPORTED, MO_CONS, MO_COPS, - AB_lookup, AMINOGLYCOSIDES, AMINOPENICILLINS, CARBAPENEMS, diff --git a/docs/404.html b/docs/404.html index dbf8025b..e400ee9d 100644 --- a/docs/404.html +++ b/docs/404.html @@ -81,7 +81,7 @@ AMR (for R) - 1.7.0.9002 + 1.7.1 diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index 4efddbc9..ca124220 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -81,7 +81,7 @@ AMR (for R) - 1.7.0.9002 + 1.7.1 diff --git a/docs/articles/AMR.html b/docs/articles/AMR.html index eb643e82..fa7113c9 100644 --- a/docs/articles/AMR.html +++ b/docs/articles/AMR.html @@ -39,7 +39,7 @@ AMR (for R) - 1.7.0 + 1.7.1 @@ -193,7 +193,7 @@

How to conduct AMR data analysis

Matthijs S. Berends

-

26 May 2021

+

03 June 2021

Source: vignettes/AMR.Rmd @@ -202,7 +202,7 @@ -

Note: values on this page will change with every website update since they are based on randomly created values and the page was written in R Markdown. However, the methodology remains unchanged. This page was generated on 26 May 2021.

+

Note: values on this page will change with every website update since they are based on randomly created values and the page was written in R Markdown. However, the methodology remains unchanged. This page was generated on 03 June 2021.

Introduction

@@ -233,21 +233,21 @@ -2021-05-26 +2021-06-03 abcd Escherichia coli S S -2021-05-26 +2021-06-03 abcd Escherichia coli S R -2021-05-26 +2021-06-03 efgh Escherichia coli R @@ -344,52 +344,52 @@ -2013-04-02 -X1 -Hospital D +2014-11-23 +A2 +Hospital B Escherichia coli S -R S S -F +S +M -2015-07-17 -X6 -Hospital A +2013-08-17 +V3 +Hospital D Staphylococcus aureus R -R +S S S F -2012-09-03 -C4 +2011-02-20 +B1 Hospital C -Staphylococcus aureus -I -I +Streptococcus pneumoniae +S +S S S M -2010-02-11 -D2 -Hospital B +2016-10-04 +U3 +Hospital A Escherichia coli S S S S -M +F -2012-12-14 -L5 +2010-04-22 +F1 Hospital B Escherichia coli S @@ -399,12 +399,12 @@ M -2016-01-30 -S3 -Hospital D -Klebsiella pneumoniae +2013-01-15 +W4 +Hospital B +Escherichia coli +S S -R S S F @@ -441,16 +441,16 @@ Longest: 1

1 M -10,375 -51.88% -10,375 -51.88% +10,416 +52.08% +10,416 +52.08% 2 F -9,625 -48.13% +9,584 +47.92% 20,000 100.00% @@ -505,9 +505,9 @@ Longest: 1

# ℹ Using column 'patient_id' as input for `col_patient_id`. # Basing inclusion on all antimicrobial results, using a points threshold of # 2 -# => Found 10,550 first weighted isolates (phenotype-based, 52.8% of total +# => Found 10,645 first weighted isolates (phenotype-based, 53.2% of total # where a microbial ID was available)
-

So only 52.8% is suitable for resistance analysis! We can now filter on it with the filter() function, also from the dplyr package:

+

So only 53.2% is suitable for resistance analysis! We can now filter on it with the filter() function, also from the dplyr package:

 data_1st <- data %>% 
   filter(first == TRUE)
@@ -515,7 +515,7 @@ Longest: 1

 data_1st <- data %>% 
   filter_first_isolate()
-

So we end up with 10,550 isolates for analysis. Now our data looks like:

+

So we end up with 10,645 isolates for analysis. Now our data looks like:

 head(data_1st)
@@ -553,89 +553,25 @@ Longest: 1

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - + + - - - - - - - - - - - - - - - - - - - + + + @@ -648,6 +584,70 @@ Longest: 1

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
12013-04-02X1Hospital DB_ESCHR_COLIRRSSFGram-negativeEscherichiacoliTRUE
22015-07-17X6Hospital AB_STPHY_AURSRRSSFGram-positiveStaphylococcusaureusTRUE
42010-02-11D2Hospital BB_ESCHR_COLISSSSMGram-negativeEscherichiacoliTRUE
62016-01-30S32013-08-17V3 Hospital DB_KLBSL_PNMNRB_STPHY_AURS R S SS FGram-negativeKlebsiellapneumoniaeTRUE
72012-10-20D10Hospital BB_STPHY_AURSRRRSM Gram-positive Staphylococcus aureus TRUE
82016-03-28K732011-02-20B1 Hospital C B_STRPT_PNMN S pneumoniae TRUE
52010-04-22F1Hospital BB_ESCHR_COLISSSSMGram-negativeEscherichiacoliTRUE
72014-07-28W5Hospital BB_STPHY_AURSRSSSFGram-positiveStaphylococcusaureusTRUE
82015-01-06V3Hospital AB_ESCHR_COLIRISRFGram-negativeEscherichiacoliTRUE
92014-03-16H4Hospital AB_STPHY_AURSRSRSMGram-positiveStaphylococcusaureusTRUE

Time for the analysis!

@@ -669,8 +669,8 @@ Longest: 1

data_1st %>% freq(genus, species)

Frequency table

Class: character
-Length: 10,550
-Available: 10,550 (100.0%, NA: 0 = 0.0%)
+Length: 10,645
+Available: 10,645 (100.0%, NA: 0 = 0.0%)
Unique: 4

Shortest: 16
Longest: 24

@@ -687,33 +687,33 @@ Longest: 24

1 Escherichia coli -4,566 -43.28% -4,566 -43.28% +4,652 +43.70% +4,652 +43.70% 2 Staphylococcus aureus -2,786 -26.41% -7,352 -69.69% +2,744 +25.78% +7,396 +69.48% 3 Streptococcus pneumoniae -2,025 -19.19% -9,377 -88.88% +2,052 +19.28% +9,448 +88.76% 4 Klebsiella pneumoniae -1,173 -11.12% -10,550 +1,197 +11.24% +10,645 100.00% @@ -760,8 +760,8 @@ Longest: 24

-2016-03-28 -K7 +2011-02-20 +B1 Hospital C B_STRPT_PNMN S @@ -775,44 +775,14 @@ Longest: 24

TRUE -2010-01-30 -A1 -Hospital A -B_STRPT_PNMN -R -R -S -R -M -Gram-positive -Streptococcus -pneumoniae -TRUE - - -2012-12-10 -M7 +2015-01-06 +V3 Hospital A B_ESCHR_COLI R I S R -M -Gram-negative -Escherichia -coli -TRUE - - -2012-08-04 -Y7 -Hospital B -B_ESCHR_COLI -S -S -S -R F Gram-negative Escherichia @@ -820,13 +790,28 @@ Longest: 24

TRUE -2016-08-05 -I4 -Hospital A +2012-05-03 +B2 +Hospital B +B_STRPT_PNMN +R +R +S +R +M +Gram-positive +Streptococcus +pneumoniae +TRUE + + +2017-03-18 +K10 +Hospital D B_ESCHR_COLI -R -R -R +S +S +S R M Gram-negative @@ -834,14 +819,14 @@ Longest: 24

coli TRUE - -2011-05-15 -H2 -Hospital A + +2010-12-15 +H3 +Hospital B B_STRPT_PNMN -R -R -R +S +S +S R M Gram-positive @@ -849,6 +834,21 @@ Longest: 24

pneumoniae TRUE + +2017-08-10 +N2 +Hospital C +B_ESCHR_COLI +R +S +S +R +M +Gram-negative +Escherichia +coli +TRUE +

If you want to get a quick glance of the number of isolates in different bug/drug combinations, you can use the bug_drug_combinations() function:

@@ -870,50 +870,50 @@ Longest: 24

E. coli AMX -2148 -153 -2265 -4566 +2232 +119 +2301 +4652 E. coli AMC -3344 -157 -1065 -4566 +3424 +165 +1063 +4652 E. coli CIP -3356 +3386 0 -1210 -4566 +1266 +4652 E. coli GEN -3983 +4062 0 -583 -4566 +590 +4652 K. pneumoniae AMX 0 0 -1173 -1173 +1197 +1197 K. pneumoniae AMC -930 -43 -200 -1173 +932 +60 +205 +1197 @@ -936,34 +936,34 @@ Longest: 24

E. coli GEN -3983 +4062 0 -583 -4566 +590 +4652 K. pneumoniae GEN -1063 +1069 0 -110 -1173 +128 +1197 S. aureus GEN -2490 +2444 0 -296 -2786 +300 +2744 S. pneumoniae GEN 0 0 -2025 -2025 +2052 +2052 @@ -977,7 +977,7 @@ Longest: 24

As per the EUCAST guideline of 2019, we calculate resistance as the proportion of R (proportion_R(), equal to resistance()) and susceptibility as the proportion of S and I (proportion_SI(), equal to susceptibility()). These functions can be used on their own:

 data_1st %>% resistance(AMX)
-# [1] 0.5443602
+# [1] 0.5431658

Or can be used in conjunction with group_by() and summarise(), both from the dplyr package:

 data_1st %>% 
@@ -991,19 +991,19 @@ Longest: 24

Hospital A -0.5542598 +0.5461634 Hospital B -0.5400160 +0.5394702 Hospital C -0.5508217 +0.5609756 Hospital D -0.5322972 +0.5316215 @@ -1022,23 +1022,23 @@ Longest: 24

Hospital A -0.5542598 -3087 +0.5461634 +3206 Hospital B -0.5400160 -3761 +0.5394702 +3737 Hospital C -0.5508217 -1643 +0.5609756 +1599 Hospital D -0.5322972 -2059 +0.5316215 +2103 @@ -1059,27 +1059,27 @@ Longest: 24

Escherichia -0.7667543 -0.8723171 -0.9770039 +0.7714961 +0.8731728 +0.9776440 Klebsiella -0.8294970 -0.9062234 -0.9795396 +0.8287385 +0.8930660 +0.9824561 Staphylococcus -0.7910983 -0.8937545 -0.9852836 +0.7882653 +0.8906706 +0.9839650 Streptococcus -0.5387654 +0.5414230 0.0000000 -0.5387654 +0.5414230 @@ -1163,16 +1163,16 @@ Longest: 24

mic_values <- random_mic(size = 100) mic_values # Class <mic> -# [1] 2 2 16 4 0.125 0.5 64 16 128 32 -# [11] 4 32 1 0.125 128 2 8 64 64 2 -# [21] 8 0.125 0.25 1 16 64 0.25 0.5 0.25 4 -# [31] 16 32 0.25 1 0.5 8 64 2 0.25 0.0625 -# [41] 128 1 2 2 0.0625 0.125 64 8 8 8 -# [51] 4 8 0.125 1 128 1 128 2 2 0.5 -# [61] 32 64 16 32 32 16 4 1 16 2 -# [71] 1 0.125 2 4 0.125 32 2 0.125 8 0.25 -# [81] 0.0625 4 0.5 16 128 8 128 0.125 0.0625 1 -# [91] 1 0.25 0.0625 128 128 8 0.0625 32 128 0.25
+# [1] 4 4 0.25 >=512 0.0625 2 128 2 64 1 +# [11] 64 256 32 2 2 256 0.125 128 16 32 +# [21] 1 2 0.0625 32 16 16 0.0625 0.125 0.0625 2 +# [31] 128 8 0.0625 0.25 4 16 1 0.0625 1 16 +# [41] 4 0.0625 2 4 0.0625 256 16 0.5 1 1 +# [51] 16 64 >=512 64 64 1 4 0.5 16 1 +# [61] 16 256 8 256 256 >=512 8 0.5 2 2 +# [71] >=512 8 64 4 8 0.25 2 4 16 0.125 +# [81] 0.25 4 0.125 8 0.125 0.0625 >=512 0.125 64 1 +# [91] 16 2 0.5 16 0.0625 128 2 0.0625 128 2
 # base R:
 plot(mic_values)
@@ -1201,10 +1201,10 @@ Longest: 24

# to review it. disk_values # Class <disk> -# [1] 31 27 25 19 19 17 23 24 30 28 22 26 18 29 25 24 22 30 17 20 23 24 26 24 27 -# [26] 22 27 22 17 26 22 31 27 31 31 25 21 18 26 22 21 25 21 26 22 21 20 20 24 19 -# [51] 25 17 29 26 28 30 30 29 30 28 19 28 22 21 26 25 24 23 21 18 27 20 17 29 30 -# [76] 17 25 19 30 22 26 22 31 18 19 26 20 18 23 17 30 30 22 21 25 21 17 30 30 24 +# [1] 27 28 23 21 23 21 28 31 26 17 23 23 24 29 20 18 27 24 26 24 27 23 30 18 26 +# [26] 31 19 26 21 27 29 29 19 19 31 25 23 19 26 21 21 20 23 29 22 18 27 28 21 27 +# [51] 21 18 19 28 26 26 29 20 31 28 30 30 21 21 25 29 28 29 30 25 27 19 23 26 24 +# [76] 20 21 25 19 26 22 19 30 28 27 18 19 18 25 31 20 19 29 31 31 29 22 20 17 31
 # base R:
 plot(disk_values, mo = "E. coli", ab = "cipro")
diff --git a/docs/articles/AMR_files/figure-html/disk_plots-1.png b/docs/articles/AMR_files/figure-html/disk_plots-1.png index b4d0099a..6d07024d 100644 Binary files a/docs/articles/AMR_files/figure-html/disk_plots-1.png and b/docs/articles/AMR_files/figure-html/disk_plots-1.png differ diff --git a/docs/articles/AMR_files/figure-html/disk_plots_mo_ab-1.png b/docs/articles/AMR_files/figure-html/disk_plots_mo_ab-1.png index e99caa78..8ae2e7f4 100644 Binary files a/docs/articles/AMR_files/figure-html/disk_plots_mo_ab-1.png and b/docs/articles/AMR_files/figure-html/disk_plots_mo_ab-1.png differ diff --git a/docs/articles/AMR_files/figure-html/mic_plots-1.png b/docs/articles/AMR_files/figure-html/mic_plots-1.png index 420b984e..3ae7c206 100644 Binary files a/docs/articles/AMR_files/figure-html/mic_plots-1.png and b/docs/articles/AMR_files/figure-html/mic_plots-1.png differ diff --git a/docs/articles/AMR_files/figure-html/mic_plots-2.png b/docs/articles/AMR_files/figure-html/mic_plots-2.png index 57da3311..4117845c 100644 Binary files a/docs/articles/AMR_files/figure-html/mic_plots-2.png and b/docs/articles/AMR_files/figure-html/mic_plots-2.png differ diff --git a/docs/articles/AMR_files/figure-html/mic_plots_mo_ab-1.png b/docs/articles/AMR_files/figure-html/mic_plots_mo_ab-1.png index 4d2d6182..c388c06d 100644 Binary files a/docs/articles/AMR_files/figure-html/mic_plots_mo_ab-1.png and b/docs/articles/AMR_files/figure-html/mic_plots_mo_ab-1.png differ diff --git a/docs/articles/AMR_files/figure-html/mic_plots_mo_ab-2.png b/docs/articles/AMR_files/figure-html/mic_plots_mo_ab-2.png index bd0d36ba..f17bc039 100644 Binary files a/docs/articles/AMR_files/figure-html/mic_plots_mo_ab-2.png and b/docs/articles/AMR_files/figure-html/mic_plots_mo_ab-2.png differ diff --git a/docs/articles/AMR_files/figure-html/plot 1-1.png b/docs/articles/AMR_files/figure-html/plot 1-1.png index 557200b9..be00613f 100644 Binary files a/docs/articles/AMR_files/figure-html/plot 1-1.png and b/docs/articles/AMR_files/figure-html/plot 1-1.png differ diff --git a/docs/articles/AMR_files/figure-html/plot 3-1.png b/docs/articles/AMR_files/figure-html/plot 3-1.png index bfec0e50..4aaa518f 100644 Binary files a/docs/articles/AMR_files/figure-html/plot 3-1.png and b/docs/articles/AMR_files/figure-html/plot 3-1.png differ diff --git a/docs/articles/AMR_files/figure-html/plot 4-1.png b/docs/articles/AMR_files/figure-html/plot 4-1.png index 69633ef6..eec904e2 100644 Binary files a/docs/articles/AMR_files/figure-html/plot 4-1.png and b/docs/articles/AMR_files/figure-html/plot 4-1.png differ diff --git a/docs/articles/AMR_files/figure-html/plot 5-1.png b/docs/articles/AMR_files/figure-html/plot 5-1.png index 8f3b62a4..f266a420 100644 Binary files a/docs/articles/AMR_files/figure-html/plot 5-1.png and b/docs/articles/AMR_files/figure-html/plot 5-1.png differ diff --git a/docs/articles/EUCAST.html b/docs/articles/EUCAST.html index ba21884d..982b6d39 100644 --- a/docs/articles/EUCAST.html +++ b/docs/articles/EUCAST.html @@ -39,7 +39,7 @@ AMR (for R) - 1.7.0 + 1.7.1 diff --git a/docs/articles/MDR.html b/docs/articles/MDR.html index 8f56006e..b1555d56 100644 --- a/docs/articles/MDR.html +++ b/docs/articles/MDR.html @@ -39,7 +39,7 @@ AMR (for R) - 1.7.0 + 1.7.1 @@ -339,19 +339,19 @@ Unique: 2

 head(my_TB_data)
 #   rifampicin isoniazid gatifloxacin ethambutol pyrazinamide moxifloxacin
-# 1          I         I            I          I            S            S
-# 2          R         I            S          I            I            I
-# 3          S         R            R          R            R            I
-# 4          S         R            S          S            R            S
-# 5          R         S            I          R            S            R
-# 6          R         R            R          R            I            I
+# 1          S         I            R          R            R            S
+# 2          I         R            R          R            R            R
+# 3          S         S            S          R            I            R
+# 4          R         I            R          R            S            S
+# 5          I         R            S          S            R            I
+# 6          I         S            S          R            R            R
 #   kanamycin
 # 1         I
-# 2         I
-# 3         S
+# 2         R
+# 3         R
 # 4         R
-# 5         I
-# 6         I
+# 5 S +# 6 S

We can now add the interpretation of MDR-TB to our data set. You can use:

 mdro(my_TB_data, guideline = "TB")
@@ -382,40 +382,40 @@ Unique: 5

1 Mono-resistant -3271 -65.42% -3271 -65.42% +3187 +63.74% +3187 +63.74% 2 Negative -949 -18.98% -4220 -84.40% +1027 +20.54% +4214 +84.28% 3 Multi-drug-resistant -449 -8.98% -4669 -93.38% +430 +8.60% +4644 +92.88% 4 Poly-resistant -240 -4.80% -4909 -98.18% +245 +4.90% +4889 +97.78% 5 Extensively drug-resistant -91 -1.82% +111 +2.22% 5000 100.00% diff --git a/docs/articles/PCA.html b/docs/articles/PCA.html index 0c660fac..e0a8fd24 100644 --- a/docs/articles/PCA.html +++ b/docs/articles/PCA.html @@ -39,7 +39,7 @@ AMR (for R) - 1.7.0 + 1.7.1 diff --git a/docs/articles/SPSS.html b/docs/articles/SPSS.html index 3632b125..525bea3d 100644 --- a/docs/articles/SPSS.html +++ b/docs/articles/SPSS.html @@ -39,7 +39,7 @@ AMR (for R) - 1.7.0 + 1.7.1 @@ -193,7 +193,7 @@

How to import data from SPSS / SAS / Stata

Matthijs S. Berends

-

26 May 2021

+

03 June 2021

Source: vignettes/SPSS.Rmd @@ -228,7 +228,7 @@
  • R has a huge community.

    -

    Many R users just ask questions on websites like StackOverflow.com, the largest online community for programmers. At the time of writing, 403,383 R-related questions have already been asked on this platform (that covers questions and answers for any programming language). In my own experience, most questions are answered within a couple of minutes.

    +

    Many R users just ask questions on websites like StackOverflow.com, the largest online community for programmers. At the time of writing, 404,559 R-related questions have already been asked on this platform (that covers questions and answers for any programming language). In my own experience, most questions are answered within a couple of minutes.

  • R understands any data type, including SPSS/SAS/Stata.

    diff --git a/docs/articles/WHONET.html b/docs/articles/WHONET.html index ed2c9f93..124c304f 100644 --- a/docs/articles/WHONET.html +++ b/docs/articles/WHONET.html @@ -39,7 +39,7 @@ AMR (for R) - 1.7.0.9001 + 1.7.1 diff --git a/docs/articles/benchmarks.html b/docs/articles/benchmarks.html index 00de2e4b..b7b83e27 100644 --- a/docs/articles/benchmarks.html +++ b/docs/articles/benchmarks.html @@ -39,7 +39,7 @@ AMR (for R) - 1.7.0 + 1.7.1 @@ -227,18 +227,18 @@ print(S.aureus, unit = "ms", signif = 2) # Unit: milliseconds # expr min lq mean median uq max neval -# as.mo("sau") 10.0 11.0 16.0 11.0 13.0 50 25 -# as.mo("stau") 54.0 58.0 72.0 61.0 89.0 99 25 -# as.mo("STAU") 53.0 55.0 67.0 56.0 91.0 95 25 -# as.mo("staaur") 10.0 11.0 16.0 11.0 13.0 47 25 -# as.mo("STAAUR") 10.0 11.0 17.0 12.0 13.0 58 25 -# as.mo("S. aureus") 26.0 27.0 36.0 31.0 33.0 70 25 -# as.mo("S aureus") 26.0 27.0 40.0 29.0 61.0 68 25 -# as.mo("Staphylococcus aureus") 2.6 3.2 6.5 3.5 3.8 42 25 -# as.mo("Staphylococcus aureus (MRSA)") 240.0 250.0 260.0 260.0 270.0 290 25 -# as.mo("Sthafilokkockus aaureuz") 190.0 190.0 200.0 200.0 210.0 300 25 -# as.mo("MRSA") 10.0 11.0 13.0 12.0 13.0 40 25 -# as.mo("VISA") 18.0 19.0 32.0 20.0 24.0 130 25 +# as.mo("sau") 13.0 13.0 16.0 15.0 16.0 44 25 +# as.mo("stau") 55.0 58.0 75.0 62.0 94.0 110 25 +# as.mo("STAU") 55.0 59.0 77.0 89.0 94.0 100 25 +# as.mo("staaur") 11.0 13.0 20.0 14.0 16.0 48 25 +# as.mo("STAAUR") 11.0 13.0 17.0 15.0 16.0 49 25 +# as.mo("S. aureus") 26.0 30.0 41.0 32.0 60.0 68 25 +# as.mo("S aureus") 27.0 29.0 44.0 32.0 58.0 160 25 +# as.mo("Staphylococcus aureus") 3.3 3.9 5.5 4.2 4.7 37 25 +# as.mo("Staphylococcus aureus (MRSA)") 250.0 260.0 280.0 280.0 290.0 320 25 +# as.mo("Sthafilokkockus aaureuz") 170.0 200.0 210.0 200.0 220.0 250 25 +# as.mo("MRSA") 12.0 14.0 21.0 15.0 17.0 56 25 +# as.mo("VISA") 20.0 23.0 33.0 25.0 51.0 59 25

    In the table above, all measurements are shown in milliseconds (thousands of seconds). A value of 5 milliseconds means it can determine 200 input values per second. It case of 200 milliseconds, this is only 5 input values per second. It is clear that accepted taxonomic names are extremely fast, but some variations are up to 200 times slower to determine.

    To improve performance, we implemented two important algorithms to save unnecessary calculations: repetitive results and already precalculated results.

    @@ -260,8 +260,8 @@ # what do these values look like? They are of class <mo>: head(x) # Class <mo> -# [1] B_STPHY_EPDR B_STRPT_GRPA B_STPHY_AURS B_BCTRD_FRGL B_STPHY_HMNS -# [6] B_STPHY_CONS +# [1] B_STPHY_CONS B_ESCHR_COLI B_STPHY_AURS B_STRPT_PYGN B_ESCHR_COLI +# [6] B_HMPHL_INFL # as the example_isolates data set has 2,000 rows, we should have 2 million items length(x) @@ -277,8 +277,8 @@ print(run_it, unit = "ms", signif = 3) # Unit: milliseconds # expr min lq mean median uq max neval -# mo_name(x) 187 223 233 226 229 318 10 -

    So getting official taxonomic names of 2,000,000 (!!) items consisting of 90 unique values only takes 0.226 seconds. That is 113 nanoseconds on average. You only lose time on your unique input values.

    +# mo_name(x) 165 238 258 246 253 369 10 +

    So getting official taxonomic names of 2,000,000 (!!) items consisting of 90 unique values only takes 0.246 seconds. That is 123 nanoseconds on average. You only lose time on your unique input values.

    @@ -291,11 +291,11 @@ times = 10) print(run_it, unit = "ms", signif = 3) # Unit: milliseconds -# expr min lq mean median uq max neval -# A 7.28 7.59 8.01 8.03 8.45 8.66 10 -# B 23.00 24.10 30.30 25.50 27.30 75.30 10 -# C 1.55 1.74 7.31 1.95 2.01 56.10 10

    -

    So going from mo_name("Staphylococcus aureus") to "Staphylococcus aureus" takes 0.0019 seconds - it doesn’t even start calculating if the result would be the same as the expected resulting value. That goes for all helper functions:

    +# expr min lq mean median uq max neval +# A 8.20 8.33 13.30 8.53 9.71 53.2 10 +# B 22.80 23.50 29.20 24.60 26.80 69.3 10 +# C 1.82 2.04 2.25 2.16 2.38 2.9 10 +

    So going from mo_name("Staphylococcus aureus") to "Staphylococcus aureus" takes 0.0022 seconds - it doesn’t even start calculating if the result would be the same as the expected resulting value. That goes for all helper functions:

     run_it <- microbenchmark(A = mo_species("aureus"),
                              B = mo_genus("Staphylococcus"),
    @@ -308,15 +308,15 @@
                              times = 10)
     print(run_it, unit = "ms", signif = 3)
     # Unit: milliseconds
    -#  expr  min   lq mean median   uq  max neval
    -#     A 1.42 1.45 1.56   1.50 1.57 2.00    10
    -#     B 1.43 1.46 1.49   1.47 1.55 1.59    10
    -#     C 1.41 1.43 1.58   1.49 1.57 2.19    10
    -#     D 1.41 1.48 1.61   1.54 1.63 2.33    10
    -#     E 1.41 1.45 1.64   1.51 1.56 2.68    10
    -#     F 1.42 1.52 1.63   1.57 1.71 1.99    10
    -#     G 1.41 1.46 1.65   1.56 1.90 1.98    10
    -#     H 1.42 1.46 1.59   1.55 1.70 1.88    10
    +# expr min lq mean median uq max neval +# A 1.66 1.70 1.86 1.77 1.90 2.41 10 +# B 1.61 1.71 1.99 1.84 2.37 2.56 10 +# C 1.64 1.72 1.79 1.74 1.77 2.14 10 +# D 1.68 1.71 2.06 2.06 2.23 2.77 10 +# E 1.63 1.71 1.85 1.75 1.92 2.43 10 +# F 1.61 1.67 1.80 1.75 1.86 2.22 10 +# G 1.63 1.67 4.37 1.96 2.58 25.70 10 +# H 1.67 1.73 1.88 1.83 2.01 2.28 10

    Of course, when running mo_phylum("Firmicutes") the function has zero knowledge about the actual microorganism, namely S. aureus. But since the result would be "Firmicutes" anyway, there is no point in calculating the result. And because this package contains all phyla of all known bacteria, it can just return the initial value immediately.

    @@ -343,14 +343,14 @@ times = 100) print(run_it, unit = "ms", signif = 4) # Unit: milliseconds -# expr min lq mean median uq max neval -# en 17.81 18.24 21.93 18.78 19.44 60.56 100 -# de 28.82 29.53 37.92 30.33 32.62 81.75 100 -# nl 32.65 33.61 44.22 34.43 37.44 193.90 100 -# es 32.51 32.95 41.88 33.70 36.39 80.63 100 -# it 22.00 22.57 27.98 23.15 25.14 67.04 100 -# fr 21.71 22.22 27.20 22.83 24.41 66.08 100 -# pt 21.71 22.54 26.97 23.06 23.94 67.41 100
    +# expr min lq mean median uq max neval +# en 19.99 20.43 25.64 21.15 22.38 82.52 100 +# de 31.03 31.96 38.34 32.88 35.27 82.31 100 +# nl 35.25 36.19 43.25 37.63 39.66 85.19 100 +# es 35.01 35.85 40.89 36.91 38.58 83.68 100 +# it 24.35 24.90 30.43 25.81 28.03 78.90 100 +# fr 23.87 25.02 31.72 26.03 27.46 83.88 100 +# pt 24.00 24.99 31.16 26.05 28.06 80.74 100

    Currently supported non-English languages are German, Dutch, Spanish, Italian, French and Portuguese.

    diff --git a/docs/articles/benchmarks_files/figure-html/unnamed-chunk-4-1.png b/docs/articles/benchmarks_files/figure-html/unnamed-chunk-4-1.png index 85aab75d..6dcb7940 100644 Binary files a/docs/articles/benchmarks_files/figure-html/unnamed-chunk-4-1.png and b/docs/articles/benchmarks_files/figure-html/unnamed-chunk-4-1.png differ diff --git a/docs/articles/datasets.html b/docs/articles/datasets.html index 57a32e65..1873e506 100644 --- a/docs/articles/datasets.html +++ b/docs/articles/datasets.html @@ -39,7 +39,7 @@ AMR (for R) - 1.7.0.9002 + 1.7.1 @@ -192,7 +192,7 @@ diff --git a/docs/articles/resistance_predict.html b/docs/articles/resistance_predict.html index 30640a23..2d1baf16 100644 --- a/docs/articles/resistance_predict.html +++ b/docs/articles/resistance_predict.html @@ -39,7 +39,7 @@ AMR (for R) - 1.7.0 + 1.7.1 diff --git a/docs/articles/welcome_to_AMR.html b/docs/articles/welcome_to_AMR.html index 4581c8ab..131a9797 100644 --- a/docs/articles/welcome_to_AMR.html +++ b/docs/articles/welcome_to_AMR.html @@ -39,7 +39,7 @@ AMR (for R) - 1.7.0 + 1.7.1 diff --git a/docs/authors.html b/docs/authors.html index 9867ec78..680fe639 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -81,7 +81,7 @@ AMR (for R) - 1.7.0.9002 + 1.7.1 diff --git a/docs/index.html b/docs/index.html index 7999438b..346b4a61 100644 --- a/docs/index.html +++ b/docs/index.html @@ -42,7 +42,7 @@ AMR (for R) - 1.7.0.9002 + 1.7.1 @@ -376,13 +376,9 @@

    Latest released version

    -

    This package is available here on the rOpenSci R-universe platform, as CRAN does not allow frequent updates of large packages (though the AMR package is only 7-9 MB). We are working on splitting this package into two: a new data package containing the microbial taxonomy, and the AMR package that only contains all functions.

    -

    In the meanwhile, you have to add our R-universe address to your list of repositories (‘repos’), by running:

    +

    CRAN CRANlogs

    +

    This package is available here on the official R network (CRAN). Install this package in R from CRAN by using the command:

    -options(repos = c(getOption("repos"),
    -                  msberends = "https://msberends.r-universe.dev"))
    -

    You can now install or update the AMR package in the same way you are used to:

    -

    It will be downloaded and installed automatically. For RStudio, click on the menu Tools > Install Packages… and then type in “AMR” and press Install.

    Note: Not all functions on this website may be available in this latest release. To use all functions and data sets mentioned on this website, install the latest development version.

    @@ -390,11 +386,23 @@

    Latest development version

    -

    The latest and unpublished development version can be installed from GitHub using:

    -
    +

    R-code-checkCodeFactorCodecov

    +

    The latest and unpublished development version can be installed from GitHub in two ways:

    +
      +
    1. +

      Directly, using:

      +
       install.packages("remotes") # if you haven't already
       remotes::install_github("msberends/AMR")
      -

      R-code-checkCodeFactorCodecov

      +
    2. +
    3. +

      From the rOpenSci R-universe platform, by adding our R-universe address to your list of repositories (‘repos’):

      +
      +options(repos = c(getOption("repos"),
      +                  msberends = "https://msberends.r-universe.dev"))
      +

      After this, you can install and update this AMR package like any official release (using install.packages("AMR") or in RStudio via Tools > Check of Package Updates…).

      +
    4. +

    You can also download the latest build from our repository: https://github.com/msberends/AMR/raw/master/data-raw/AMR_latest.tar.gz

    diff --git a/docs/news/index.html b/docs/news/index.html index b7481481..20538bc8 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -81,7 +81,7 @@ AMR (for R) - 1.7.0.9002 + 1.7.1
    @@ -236,40 +236,16 @@ Source: NEWS.md -
    -

    - Unreleased AMR 1.7.0.9002

    -
    -

    -Last updated: 1 June 2021 -

    -
    -

    -New

    -
      -
    • Support for CLSI 2020 guideline for interpreting MICs and disk diffusion values (using as.rsi())
    • -
    -
    -
    -

    -Changed

    -
      -
    • -bug_drug_combinations() now supports grouping using the dplyr package
    • -
    • As requested by CRAN administrators: decreased package size by 3 MB in costs of a ~50 times slower loading time of the package (i.e., library(AMR))
    • -
    -
    -
    -
    -
    -

    - Unreleased AMR 1.7.0

    +
    +

    + Unreleased AMR 1.7.1

    Breaking change

      +
    • Support for CLSI 2020 guideline for interpreting MICs and disk diffusion values (using as.rsi())

    • -

      All antibiotic class selectors (such as carbapenems(), aminoglycosides()) can now be used for filtering as well, making all their accompanying filter_*() functions redundant (such as filter_carbapenems(), filter_aminoglycosides()). These functions are now deprecated and will be removed in a next release.

      +

      All antibiotic class selectors (such as carbapenems(), aminoglycosides()) can now be used for filtering as well, making all their accompanying filter_*() functions redundant (such as filter_carbapenems(), filter_aminoglycosides()). These functions are now deprecated and will be removed in a next release. Examples of how the selectors can be used for filtering:

       
       # select columns with results for carbapenems
      @@ -289,9 +265,9 @@
       
    -
    +

    -New

    +New
    -
    +

    -Changed

    +Changed
      +
    • +bug_drug_combinations() now supports grouping using the dplyr package
    • Custom MDRO guidelines (mdro(), custom_mdro_guideline()):
      • Custom MDRO guidelines can now be combined with other custom MDRO guidelines using c() @@ -365,6 +343,7 @@

        Other

          +
        • As requested by CRAN administrators: decreased package size by 3 MB in costs of a slower loading time of the package
        • All unit tests are now processed by the tinytest package, instead of the testthat package. The testthat package unfortunately requires tons of dependencies that are also heavy and only usable for recent R versions, disallowing developers to test a package under any R 3.* version. On the contrary, the tinytest package is very lightweight and dependency-free.
    @@ -372,9 +351,9 @@

    2021-03-14 AMR 1.6.0

    -
    +

    -New

    +New
    • Support for EUCAST Clinical Breakpoints v11.0 (2021), effective in the eucast_rules() function and in as.rsi() to interpret MIC and disk diffusion values. This is now the default guideline in this package.

      @@ -448,9 +427,9 @@
    -
    +

    -Changed

    +Changed
    • Updated the bacterial taxonomy to 3 March 2021 (using LPSN)
        @@ -509,9 +488,9 @@

        2021-01-06 AMR 1.5.0

        -
        +

        -New

        +New
        -
        +

        -Changed

        +Changed
        • New argument ampc_cephalosporin_resistance in eucast_rules() to correct for AmpC de-repressed cephalosporin-resistant mutants

        • @@ -622,9 +601,9 @@

          2020-10-08 AMR 1.4.0

          -
          +

          -New

          +New
          • Support for ‘EUCAST Expert Rules’ / ‘EUCAST Intrinsic Resistance and Unusual Phenotypes’ version 3.2 of May 2020. With this addition to the previously implemented version 3.1 of 2016, the eucast_rules() function can now correct for more than 180 different antibiotics and the mdro() function can determine multidrug resistance based on more than 150 different antibiotics. All previously implemented versions of the EUCAST rules are now maintained and kept available in this package. The eucast_rules() function consequently gained the arguments version_breakpoints (at the moment defaults to v10.0, 2020) and version_expertrules (at the moment defaults to v3.2, 2020). The example_isolates data set now also reflects the change from v3.1 to v3.2. The mdro() function now accepts guideline == "EUCAST3.1" and guideline == "EUCAST3.2".

          • A new vignette and website page with info about all our public and freely available data sets, that can be downloaded as flat files or in formats for use in R, SPSS, SAS, Stata and Excel: https://msberends.github.io/AMR/articles/datasets.html

          • @@ -644,9 +623,9 @@
          • Support for skimming classes <rsi>, <mic>, <disk> and <mo> with the skimr package

          -
          +

          -Changed

          +Changed
          • Although advertised that this package should work under R 3.0.0, we still had a dependency on R 3.6.0. This is fixed, meaning that our package should now work under R 3.0.0.

          • @@ -725,9 +704,9 @@

            2020-07-31 AMR 1.3.0

            -
            +

            -New

            +New
            • Function ab_from_text() to retrieve antimicrobial drug names, doses and forms of administration from clinical texts in e.g. health care records, which also corrects for misspelling since it uses as.ab() internally

            • @@ -749,9 +728,9 @@
            • Added argument conserve_capped_values to as.rsi() for interpreting MIC values - it makes sure that values starting with “<” (but not “<=”) will always return “S” and values starting with “>” (but not “>=”) will always return “R”. The default behaviour of as.rsi() has not changed, so you need to specifically do as.rsi(..., conserve_capped_values = TRUE).

            -
            +

            -Changed

            +Changed
            -
            +

            -Changed

            +Changed
            • Taxonomy:
                @@ -870,17 +849,17 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/

                2020-04-15 AMR 1.1.0

                -
                +

                -New

                +New
                • Support for easy principal component analysis for AMR, using the new pca() function
                • Plotting biplots for principal component analysis using the new ggplot_pca() function
                -
                +

                -Changed

                +Changed
                • Improvements for the algorithm used by as.mo() (and consequently all mo_* functions, that use as.mo() internally):
                    @@ -911,9 +890,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/

                    2020-02-23 AMR 1.0.1

                    -
                    +

                    -Changed

                    +Changed
                    • Fixed important floating point error for some MIC comparisons in EUCAST 2020 guideline

                    • @@ -936,9 +915,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/

                      2020-02-17 AMR 1.0.0

                      This software is now out of beta and considered stable. Nonetheless, this package will be developed continually.

                      -
                      +

                      -New

                      +New
                      • Support for the newest EUCAST Clinical Breakpoint Tables v.10.0, valid from 1 January 2020. This affects translation of MIC and disk zones using as.rsi() and inferred resistance and susceptibility using eucast_rules().
                      • The repository of this package now contains a clean version of the EUCAST and CLSI guidelines from 2011-2020 to translate MIC and disk diffusion values to R/SI: https://github.com/msberends/AMR/blob/master/data-raw/rsi_translation.txt. This allows for machine reading these guidelines, which is almost impossible with the Excel and PDF files distributed by EUCAST and CLSI. This file used to process the EUCAST Clinical Breakpoints Excel file can be found here.
                      • @@ -1033,9 +1012,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
                      -
                      +

                      -New

                      +New
                      • Functions susceptibility() and resistance() as aliases of proportion_SI() and proportion_R(), respectively. These functions were added to make it more clear that “I” should be considered susceptible and not resistant.

                        @@ -1152,9 +1131,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
                      • Renamed data set septic_patients to example_isolates

                      -
                      +

                      -New

                      +New
                      • Function bug_drug_combinations() to quickly get a data.frame with the results of all bug-drug combinations in a data set. The column containing microorganism codes is guessed automatically and its input is transformed with mo_shortname() at default:

                        @@ -1219,9 +1198,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
                      -
                      +

                      -Changed

                      +Changed
                      • Many algorithm improvements for as.mo() (of which some led to additions to the microorganisms data set). Many thanks to all contributors that helped improving the algorithms.
                          @@ -1285,9 +1264,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/

                          2019-06-23 AMR 0.7.1

                          -
                          +

                          -New

                          +New
                          • Function rsi_df() to transform a data.frame to a data set containing only the microbial interpretation (S, I, R), the antibiotic, the percentage of S/I/R and the number of available isolates. This is a convenient combination of the existing functions count_df() and portion_df() to immediately show resistance percentages and number of available isolates:

                            @@ -1331,9 +1310,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
                          • Function mo_synonyms() to get all previously accepted taxonomic names of a microorganism

                          -
                          +

                          -Changed

                          +Changed
                          • Column names of output count_df() and portion_df() are now lowercase
                          • Fixed bug in translation of microorganism names
                          • @@ -1369,9 +1348,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/

                            2019-06-03 AMR 0.7.0

                            -
                            +

                            -New

                            +New
                            • Support for translation of disk diffusion and MIC values to RSI values (i.e. antimicrobial interpretations). Supported guidelines are EUCAST (2011 to 2019) and CLSI (2011 to 2019). Use as.rsi() on an MIC value (created with as.mic()), a disk diffusion value (created with the new as.disk()) or on a complete date set containing columns with MIC or disk diffusion values.
                            • Function mo_name() as alias of mo_fullname() @@ -1379,9 +1358,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
                            • Added guidelines of the WHO to determine multi-drug resistance (MDR) for TB (mdr_tb()) and added a new vignette about MDR. Read this tutorial here on our website.
                            -
                            +

                            -Changed

                            +Changed
                            • Fixed a critical bug in first_isolate() where missing species would lead to incorrect FALSEs. This bug was not present in AMR v0.5.0, but was in v0.6.0 and v0.6.1.
                            • Fixed a bug in eucast_rules() where antibiotics from WHONET software would not be recognised
                            • @@ -1465,9 +1444,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/

                              2019-03-29 AMR 0.6.1

                              -
                              +

                              -Changed

                              +Changed
                              • Fixed a critical bug when using eucast_rules() with verbose = TRUE
                              • @@ -1484,9 +1463,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
                              • Contains the complete manual of this package and all of its functions with an explanation of their arguments
                              • Contains a comprehensive tutorial about how to conduct AMR data analysis, import data from WHONET or SPSS and many more.
                              -
                              +

                              -New

                              +New
                              • BREAKING: removed deprecated functions, arguments and references to ‘bactid’. Use as.mo() to identify an MO code.

                              • @@ -1584,9 +1563,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
                              • New vignettes about how to conduct AMR analysis, predict antimicrobial resistance, use the G-test and more. These are also available (and even easier readable) on our website: https://msberends.gitlab.io/AMR.

                              -
                              +

                              -Changed

                              +Changed
                              • Function eucast_rules():
                                  @@ -1729,9 +1708,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/

                                  2018-11-30 AMR 0.5.0

                                  -
                                  +

                                  -New

                                  +New
                                  • Repository moved to GitLab
                                  • Function count_all to get all available isolates (that like all portion_* and count_* functions also supports summarise and group_by), the old n_rsi is now an alias of count_all @@ -1742,9 +1721,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
                                  • Functions mo_authors and mo_year to get specific values about the scientific reference of a taxonomic entry
                                  -
                                  +

                                  -Changed

                                  +Changed
                                  • Functions MDRO, BRMO, MRGN and EUCAST_exceptional_phenotypes were renamed to mdro, brmo, mrgn and eucast_exceptional_phenotypes

                                  • EUCAST_rules was renamed to eucast_rules, the old function still exists as a deprecated function

                                  • @@ -1852,9 +1831,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/

                                    2018-10-01 AMR 0.4.0

                                    -
                                    +

                                    -New

                                    +New
                                    • The data set microorganisms now contains all microbial taxonomic data from ITIS (kingdoms Bacteria, Fungi and Protozoa), the Integrated Taxonomy Information System, available via https://itis.gov. The data set now contains more than 18,000 microorganisms with all known bacteria, fungi and protozoa according ITIS with genus, species, subspecies, family, order, class, phylum and subkingdom. The new data set microorganisms.old contains all previously known taxonomic names from those kingdoms.

                                    • @@ -1932,9 +1911,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
                                    • Renamed septic_patients$sex to septic_patients$gender

                                    -
                                    +

                                    -Changed

                                    +Changed
                                    • Added three antimicrobial agents to the antibiotics data set: Terbinafine (D01BA02), Rifaximin (A07AA11) and Isoconazole (D01AC05)

                                    • @@ -2000,9 +1979,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/

                                      2018-08-14 AMR 0.3.0

                                      -
                                      +

                                      -New

                                      +New
                                      • BREAKING: rsi_df was removed in favour of new functions portion_R, portion_IR, portion_I, portion_SI and portion_S to selectively calculate resistance or susceptibility. These functions are 20 to 30 times faster than the old rsi function. The old function still works, but is deprecated. @@ -2073,9 +2052,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
                                      -
                                      +

                                      -Changed

                                      +Changed
                                      • Improvements for forecasting with resistance_predict and added more examples
                                      • More antibiotics added as arguments for EUCAST rules
                                      • @@ -2136,9 +2115,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/

                                        2018-05-03 AMR 0.2.0

                                        -
                                        +

                                        -New

                                        +New
                                        • Full support for Windows, Linux and macOS
                                        • Full support for old R versions, only R-3.0.0 (April 2013) or later is needed (needed packages may have other dependencies)
                                        • @@ -2158,9 +2137,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
                                        • New print format for tibbles and data.tables
                                        -
                                        +

                                        -Changed

                                        +Changed
                                        • Fixed rsi class for vectors that contain only invalid antimicrobial interpretations
                                        • Renamed dataset ablist to antibiotics diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 5a1dd8fa..6b7f70c8 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-06-01T14:35Z +last_built: 2021-06-03T13:04Z urls: reference: https://msberends.github.io/AMR//reference article: https://msberends.github.io/AMR//articles diff --git a/docs/reference/AMR-deprecated.html b/docs/reference/AMR-deprecated.html index c7838cbe..f0faa5c4 100644 --- a/docs/reference/AMR-deprecated.html +++ b/docs/reference/AMR-deprecated.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.0.9001 + 1.7.1
                                        diff --git a/docs/reference/AMR.html b/docs/reference/AMR.html index 5bfd56dc..d6e21836 100644 --- a/docs/reference/AMR.html +++ b/docs/reference/AMR.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.0.9001 + 1.7.1
                                        diff --git a/docs/reference/WHOCC.html b/docs/reference/WHOCC.html index 8f8dab31..5af80f1f 100644 --- a/docs/reference/WHOCC.html +++ b/docs/reference/WHOCC.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.0.9001 + 1.7.1
                                        diff --git a/docs/reference/WHONET.html b/docs/reference/WHONET.html index 3f90b943..697942ef 100644 --- a/docs/reference/WHONET.html +++ b/docs/reference/WHONET.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.0.9001 + 1.7.1
                                        diff --git a/docs/reference/ab_from_text.html b/docs/reference/ab_from_text.html index 1541fe0d..e2c42c5e 100644 --- a/docs/reference/ab_from_text.html +++ b/docs/reference/ab_from_text.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.0.9001 + 1.7.1
                                      diff --git a/docs/reference/ab_property.html b/docs/reference/ab_property.html index c01a5ac4..5296a3a9 100644 --- a/docs/reference/ab_property.html +++ b/docs/reference/ab_property.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.0.9001 + 1.7.1
                                      diff --git a/docs/reference/age.html b/docs/reference/age.html index 2912306a..beec49a7 100644 --- a/docs/reference/age.html +++ b/docs/reference/age.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.0.9001 + 1.7.1
                                      diff --git a/docs/reference/age_groups.html b/docs/reference/age_groups.html index 43f91e56..391bf8e8 100644 --- a/docs/reference/age_groups.html +++ b/docs/reference/age_groups.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.0.9001 + 1.7.1
                                      diff --git a/docs/reference/antibiotic_class_selectors.html b/docs/reference/antibiotic_class_selectors.html index 31475b25..c4eb694f 100644 --- a/docs/reference/antibiotic_class_selectors.html +++ b/docs/reference/antibiotic_class_selectors.html @@ -83,7 +83,7 @@ AMR (for R) - 1.7.0.9001 + 1.7.1
                                    @@ -315,36 +315,1219 @@ The lifecycle of this function is stableOn our website https://msberends.github.io/AMR/ you can find a comprehensive tutorial about how to conduct AMR data analysis, the complete documentation of all functions and an example analysis using WHONET data.

                                    Examples

                                    -
                                    # `example_isolates` is a data set available in the AMR package.
                                    +    
                                    # `example_isolates` is a data set available in the AMR package. # See ?example_isolates. # Base R ------------------------------------------------------------------ # select columns 'IPM' (imipenem) and 'MEM' (meropenem) example_isolates[, carbapenems()] - +
                                    #> ℹ For `carbapenems()` using columns: 'IPM' (imipenem) and 'MEM' (meropenem)
                                    #> IPM MEM +#> 1 <NA> <NA> +#> 2 <NA> <NA> +#> 3 <NA> <NA> +#> 4 <NA> <NA> +#> 5 <NA> <NA> +#> 6 <NA> <NA> +#> 7 <NA> <NA> +#> 8 <NA> <NA> +#> 9 <NA> <NA> +#> 10 <NA> <NA> +#> 11 <NA> <NA> +#> 12 <NA> <NA> +#> 13 S <NA> +#> 14 S <NA> +#> 15 <NA> <NA> +#> 16 S <NA> +#> 17 S <NA> +#> 18 <NA> <NA> +#> 19 <NA> <NA> +#> 20 <NA> <NA> +#> 21 <NA> <NA> +#> 22 S <NA> +#> 23 S <NA> +#> 24 S <NA> +#> 25 <NA> <NA> +#> 26 <NA> <NA> +#> 27 <NA> <NA> +#> 28 <NA> <NA> +#> 29 <NA> <NA> +#> 30 <NA> <NA> +#> 31 <NA> <NA> +#> 32 <NA> <NA> +#> 33 S <NA> +#> 34 S <NA> +#> 35 S <NA> +#> 36 S <NA> +#> 37 <NA> <NA> +#> 38 S <NA> +#> 39 S <NA> +#> 40 <NA> <NA> +#> 41 <NA> <NA> +#> 42 <NA> <NA> +#> 43 <NA> <NA> +#> 44 <NA> <NA> +#> 45 S <NA> +#> 46 <NA> <NA> +#> 47 <NA> <NA> +#> 48 S S +#> 49 S <NA> +#> 50 S <NA> +#> 51 S <NA> +#> 52 <NA> <NA> +#> 53 <NA> <NA> +#> 54 <NA> <NA> +#> 55 <NA> <NA> +#> 56 <NA> <NA> +#> 57 <NA> <NA> +#> 58 <NA> <NA> +#> 59 <NA> <NA> +#> 60 <NA> <NA> +#> 61 <NA> <NA> +#> 62 <NA> <NA> +#> 63 <NA> <NA> +#> 64 <NA> <NA> +#> 65 S <NA> +#> 66 S <NA> +#> 67 S <NA> +#> 68 <NA> <NA> +#> 69 <NA> <NA> +#> 70 <NA> <NA> +#> 71 S <NA> +#> 72 S <NA> +#> 73 S <NA> +#> 74 S <NA> +#> 75 <NA> <NA> +#> 76 S <NA> +#> 77 <NA> <NA> +#> 78 S <NA> +#> 79 S <NA> +#> 80 <NA> <NA> +#> 81 <NA> <NA> +#> 82 <NA> <NA> +#> 83 <NA> <NA> +#> 84 S <NA> +#> 85 S <NA> +#> 86 S <NA> +#> 87 S <NA> +#> 88 S <NA> +#> 89 S <NA> +#> 90 <NA> <NA> +#> 91 <NA> <NA> +#> 92 <NA> <NA> +#> 93 <NA> <NA> +#> 94 <NA> <NA> +#> 95 <NA> <NA> +#> 96 <NA> <NA> +#> 97 <NA> <NA> +#> 98 <NA> <NA> +#> 99 <NA> <NA> +#> 100 <NA> <NA> +#> 101 S <NA> +#> 102 <NA> <NA> +#> 103 <NA> <NA> +#> 104 <NA> <NA> +#> 105 <NA> <NA> +#> 106 <NA> <NA> +#> 107 <NA> <NA> +#> 108 <NA> <NA> +#> 109 <NA> <NA> +#> 110 <NA> <NA> +#> 111 <NA> <NA> +#> 112 <NA> <NA> +#> 113 <NA> <NA> +#> 114 <NA> <NA> +#> 115 <NA> <NA> +#> 116 S <NA> +#> 117 <NA> <NA> +#> 118 S <NA> +#> 119 S <NA> +#> 120 S <NA> +#> 121 S <NA> +#> 122 S <NA> +#> 123 <NA> <NA> +#> 124 <NA> <NA> +#> 125 <NA> <NA> +#> 126 <NA> <NA> +#> 127 <NA> <NA> +#> 128 <NA> <NA> +#> 129 S <NA> +#> 130 S <NA> +#> 131 <NA> <NA> +#> 132 <NA> <NA> +#> 133 <NA> <NA> +#> 134 <NA> <NA> +#> 135 <NA> <NA> +#> 136 <NA> <NA> +#> 137 <NA> <NA> +#> 138 <NA> <NA> +#> 139 S <NA> +#> 140 <NA> <NA> +#> 141 <NA> <NA> +#> 142 <NA> <NA> +#> 143 S <NA> +#> 144 <NA> <NA> +#> 145 <NA> <NA> +#> 146 <NA> <NA> +#> 147 <NA> <NA> +#> 148 <NA> <NA> +#> 149 <NA> <NA> +#> 150 <NA> <NA> +#> 151 <NA> <NA> +#> 152 <NA> <NA> +#> 153 S S +#> 154 S S +#> 155 S S +#> 156 <NA> <NA> +#> 157 <NA> <NA> +#> 158 <NA> <NA> +#> 159 <NA> <NA> +#> 160 S <NA> +#> 161 <NA> <NA> +#> 162 S <NA> +#> 163 <NA> <NA> +#> 164 <NA> <NA> +#> 165 <NA> <NA> +#> 166 <NA> <NA> +#> 167 <NA> <NA> +#> 168 <NA> <NA> +#> 169 <NA> <NA> +#> 170 <NA> <NA> +#> 171 <NA> <NA> +#> 172 <NA> <NA> +#> 173 <NA> <NA> +#> 174 <NA> <NA> +#> 175 <NA> <NA> +#> 176 S <NA> +#> 177 <NA> <NA> +#> 178 <NA> <NA> +#> 179 <NA> <NA> +#> 180 <NA> <NA> +#> 181 <NA> <NA> +#> 182 <NA> <NA> +#> 183 S <NA> +#> 184 S <NA> +#> 185 <NA> <NA> +#> 186 <NA> <NA> +#> 187 <NA> <NA> +#> 188 <NA> <NA> +#> 189 <NA> <NA> +#> 190 <NA> <NA> +#> 191 <NA> <NA> +#> 192 <NA> <NA> +#> 193 <NA> <NA> +#> 194 S <NA> +#> 195 S <NA> +#> 196 <NA> <NA> +#> 197 <NA> <NA> +#> 198 <NA> <NA> +#> 199 S <NA> +#> 200 <NA> <NA> +#> 201 <NA> <NA> +#> 202 <NA> <NA> +#> 203 <NA> <NA> +#> 204 S <NA> +#> 205 S <NA> +#> 206 <NA> <NA> +#> 207 S S +#> 208 S <NA> +#> 209 S <NA> +#> 210 S <NA> +#> 211 S <NA> +#> 212 I <NA> +#> 213 S <NA> +#> 214 <NA> <NA> +#> 215 <NA> <NA> +#> 216 S <NA> +#> 217 <NA> <NA> +#> 218 <NA> <NA> +#> 219 <NA> <NA> +#> 220 <NA> <NA> +#> 221 <NA> <NA> +#> 222 <NA> <NA> +#> 223 <NA> <NA> +#> 224 S <NA> +#> 225 S <NA> +#> 226 S <NA> +#> 227 S <NA> +#> 228 S <NA> +#> 229 <NA> <NA> +#> 230 S <NA> +#> 231 S <NA> +#> 232 S <NA> +#> 233 <NA> <NA> +#> 234 <NA> <NA> +#> 235 <NA> <NA> +#> 236 <NA> <NA> +#> 237 S S +#> 238 S <NA> +#> 239 S <NA> +#> 240 S S +#> 241 S <NA> +#> 242 S S +#> 243 <NA> <NA> +#> 244 <NA> <NA> +#> 245 <NA> <NA> +#> 246 S S +#> 247 S S +#> 248 S S +#> 249 <NA> <NA> +#> 250 <NA> <NA> +#> 251 S S +#> 252 <NA> <NA> +#> 253 S <NA> +#> 254 S <NA> +#> 255 <NA> <NA> +#> 256 <NA> <NA> +#> 257 <NA> <NA> +#> 258 <NA> <NA> +#> 259 <NA> <NA> +#> 260 <NA> <NA> +#> 261 <NA> S +#> 262 <NA> <NA> +#> 263 <NA> <NA> +#> 264 S <NA> +#> 265 S <NA> +#> 266 <NA> <NA> +#> 267 <NA> <NA> +#> 268 <NA> <NA> +#> 269 <NA> <NA> +#> 270 <NA> <NA> +#> 271 <NA> <NA> +#> 272 <NA> <NA> +#> 273 <NA> <NA> +#> 274 <NA> <NA> +#> 275 <NA> <NA> +#> 276 <NA> <NA> +#> 277 <NA> <NA> +#> 278 S S +#> 279 S S +#> 280 S S +#> 281 <NA> <NA> +#> 282 <NA> <NA> +#> 283 <NA> S +#> 284 <NA> S +#> 285 <NA> S +#> 286 <NA> S +#> 287 <NA> <NA> +#> 288 <NA> <NA> +#> 289 <NA> <NA> +#> 290 <NA> <NA> +#> 291 <NA> <NA> +#> 292 <NA> <NA> +#> 293 <NA> <NA> +#> 294 <NA> S +#> 295 <NA> <NA> +#> 296 <NA> <NA> +#> 297 <NA> <NA> +#> 298 S S +#> 299 S S +#> 300 <NA> <NA> +#> 301 <NA> <NA> +#> 302 <NA> <NA> +#> 303 <NA> <NA> +#> 304 <NA> <NA> +#> 305 <NA> <NA> +#> 306 <NA> <NA> +#> 307 S <NA> +#> 308 <NA> <NA> +#> 309 S S +#> 310 <NA> <NA> +#> 311 <NA> <NA> +#> 312 <NA> S +#> 313 S S +#> 314 S S +#> 315 S S +#> 316 S S +#> 317 <NA> <NA> +#> 318 <NA> <NA> +#> 319 <NA> <NA> +#> 320 <NA> S +#> 321 <NA> S +#> 322 S S +#> 323 S S +#> 324 <NA> <NA> +#> 325 <NA> <NA> +#> 326 <NA> <NA> +#> 327 <NA> <NA> +#> 328 <NA> <NA> +#> 329 <NA> <NA> +#> 330 <NA> <NA> +#> 331 <NA> <NA> +#> 332 <NA> <NA> +#> 333 <NA> <NA> +#> 334 <NA> <NA> +#> 335 <NA> <NA> +#> 336 <NA> <NA> +#> 337 R <NA> +#> 338 R <NA> +#> 339 <NA> <NA> +#> 340 S S +#> 341 <NA> <NA> +#> 342 <NA> <NA> +#> 343 S S +#> 344 S <NA> +#> 345 <NA> <NA> +#> 346 <NA> <NA> +#> 347 <NA> <NA> +#> 348 <NA> <NA> +#> 349 <NA> <NA> +#> 350 <NA> S +#> 351 <NA> <NA> +#> 352 <NA> <NA> +#> 353 <NA> <NA> +#> 354 S S +#> 355 <NA> <NA> +#> 356 S S +#> 357 <NA> <NA> +#> 358 S S +#> 359 <NA> <NA> +#> 360 S S +#> 361 S S +#> 362 <NA> <NA> +#> 363 <NA> S +#> 364 <NA> S +#> 365 <NA> S +#> 366 <NA> <NA> +#> 367 <NA> <NA> +#> 368 S S +#> 369 S S +#> 370 S S +#> 371 S S +#> 372 <NA> <NA> +#> 373 <NA> <NA> +#> 374 <NA> <NA> +#> 375 <NA> <NA> +#> 376 <NA> <NA> +#> 377 <NA> <NA> +#> 378 <NA> <NA> +#> 379 <NA> <NA> +#> 380 <NA> <NA> +#> 381 R R +#> 382 <NA> <NA> +#> 383 <NA> <NA> +#> 384 <NA> <NA> +#> 385 S S +#> 386 <NA> <NA> +#> 387 <NA> <NA> +#> 388 <NA> <NA> +#> 389 S S +#> 390 S S +#> 391 S S +#> 392 S <NA> +#> 393 S S +#> 394 <NA> <NA> +#> 395 S S +#> 396 <NA> <NA> +#> 397 <NA> <NA> +#> 398 <NA> <NA> +#> 399 <NA> <NA> +#> 400 S S +#> 401 S S +#> 402 S S +#> 403 S S +#> 404 <NA> <NA> +#> 405 S S +#> 406 <NA> S +#> 407 <NA> S +#> 408 <NA> S +#> 409 S S +#> 410 S S +#> 411 <NA> S +#> 412 <NA> <NA> +#> 413 <NA> <NA> +#> 414 <NA> <NA> +#> 415 S S +#> 416 <NA> <NA> +#> 417 <NA> <NA> +#> 418 <NA> <NA> +#> 419 <NA> <NA> +#> 420 <NA> <NA> +#> 421 <NA> <NA> +#> 422 <NA> <NA> +#> 423 <NA> <NA> +#> 424 S S +#> 425 S S +#> 426 <NA> <NA> +#> 427 <NA> <NA> +#> 428 <NA> <NA> +#> 429 <NA> <NA> +#> 430 <NA> <NA> +#> 431 <NA> <NA> +#> 432 <NA> <NA> +#> 433 <NA> <NA> +#> 434 <NA> <NA> +#> 435 <NA> <NA> +#> 436 <NA> <NA> +#> 437 <NA> <NA> +#> 438 S S +#> 439 S S +#> 440 S S +#> 441 S S +#> 442 <NA> <NA> +#> 443 <NA> S +#> 444 <NA> S +#> 445 <NA> <NA> +#> 446 <NA> <NA> +#> 447 <NA> <NA> +#> 448 <NA> <NA> +#> 449 S S +#> 450 S S +#> 451 <NA> <NA> +#> 452 <NA> <NA> +#> 453 <NA> <NA> +#> 454 <NA> <NA> +#> 455 <NA> <NA> +#> 456 <NA> <NA> +#> 457 S S +#> 458 S S +#> 459 <NA> <NA> +#> 460 <NA> <NA> +#> 461 R R +#> 462 R R +#> 463 R R +#> 464 <NA> <NA> +#> 465 <NA> <NA> +#> 466 <NA> <NA> +#> 467 <NA> S +#> 468 <NA> S +#> 469 S <NA> +#> 470 <NA> <NA> +#> 471 <NA> S +#> 472 <NA> S +#> 473 <NA> S +#> 474 <NA> S +#> 475 <NA> <NA> +#> 476 <NA> <NA> +#> 477 <NA> <NA> +#> 478 S S +#> 479 <NA> <NA> +#> 480 S S +#> 481 S S +#> 482 <NA> S +#> 483 <NA> S +#> 484 <NA> <NA> +#> 485 S S +#> 486 S S +#> 487 <NA> <NA> +#> 488 <NA> S +#> 489 S S +#> 490 S S +#> 491 S S +#> 492 S S +#> 493 <NA> S +#> 494 <NA> S +#> 495 <NA> S +#> 496 <NA> S +#> 497 <NA> <NA> +#> 498 <NA> <NA> +#> 499 <NA> <NA> +#> 500 <NA> <NA> +#> [ reached 'max' / getOption("max.print") -- omitted 1500 rows ]
                                    # select columns 'mo', 'AMK', 'GEN', 'KAN' and 'TOB' example_isolates[, c("mo", aminoglycosides())] - +
                                    #> ℹ For `aminoglycosides()` using columns: 'AMK' (amikacin), 'GEN' +#> (gentamicin), 'KAN' (kanamycin) and 'TOB' (tobramycin)
                                    #> mo GEN TOB AMK KAN +#> 1 B_ESCHR_COLI <NA> <NA> <NA> <NA> +#> 2 B_ESCHR_COLI <NA> <NA> <NA> <NA> +#> 3 B_STPHY_EPDR <NA> <NA> <NA> <NA> +#> 4 B_STPHY_EPDR <NA> <NA> <NA> <NA> +#> 5 B_STPHY_EPDR <NA> <NA> <NA> <NA> +#> 6 B_STPHY_EPDR <NA> <NA> <NA> <NA> +#> 7 B_STPHY_AURS <NA> S <NA> <NA> +#> 8 B_STPHY_AURS <NA> S <NA> <NA> +#> 9 B_STPHY_EPDR <NA> <NA> <NA> <NA> +#> 10 B_STPHY_EPDR <NA> <NA> <NA> <NA> +#> 11 B_STPHY_EPDR <NA> <NA> <NA> <NA> +#> 12 B_STPHY_EPDR <NA> <NA> <NA> <NA> +#> 13 B_ESCHR_COLI <NA> S <NA> <NA> +#> 14 B_ESCHR_COLI <NA> S <NA> <NA> +#> 15 B_CTRBC_FRND <NA> <NA> <NA> <NA> +#> 16 B_PROTS_MRBL <NA> <NA> <NA> <NA> +#> 17 B_PROTS_MRBL <NA> <NA> <NA> <NA> +#> 18 B_STPHY_EPDR <NA> <NA> <NA> <NA> +#> 19 B_STPHY_EPDR <NA> <NA> <NA> <NA> +#> 20 B_STPHY_CONS <NA> <NA> <NA> <NA> +#> 21 B_STPHY_HMNS <NA> <NA> <NA> <NA> +#> 22 B_SERRT_MRCS <NA> <NA> <NA> <NA> +#> 23 B_SERRT_MRCS <NA> <NA> <NA> <NA> +#> 24 B_SERRT_MRCS <NA> <NA> <NA> <NA> +#> 25 B_STPHY_CONS <NA> <NA> <NA> <NA> +#> 26 B_STPHY_CONS <NA> S <NA> <NA> +#> 27 B_STPHY_EPDR <NA> <NA> <NA> <NA> +#> 28 B_ENTRC_FACM R R R R +#> 29 B_STPHY_CONS S <NA> <NA> <NA> +#> 30 B_STPHY_CONS S <NA> <NA> <NA> +#> 31 B_STPHY_HMNS S <NA> <NA> <NA> +#> 32 B_STPHY_EPDR S <NA> <NA> <NA> +#> 33 B_KLBSL_PNMN S S <NA> <NA> +#> 34 B_KLBSL_PNMN S S <NA> <NA> +#> 35 B_ESCHR_COLI S <NA> <NA> <NA> +#> 36 B_PSDMN_AERG I S <NA> R +#> 37 B_STPHY_CONS R R R R +#> 38 B_ESCHR_COLI S S <NA> <NA> +#> 39 B_ESCHR_COLI S S <NA> <NA> +#> 40 B_STRPT_SNGN R R R R +#> 41 B_STPHY_AURS S <NA> <NA> <NA> +#> 42 B_STPHY_AURS S <NA> <NA> <NA> +#> 43 B_STPHY_AURS S <NA> <NA> <NA> +#> 44 B_STPHY_AURS S <NA> <NA> <NA> +#> 45 B_ENTRC_FCLS R R R R +#> 46 B_STPHY_CONS S <NA> <NA> <NA> +#> 47 F_CANDD_GLBR <NA> <NA> <NA> <NA> +#> 48 B_STRPT_GRPB R R R R +#> 49 B_ESCHR_COLI S S <NA> <NA> +#> 50 B_ESCHR_COLI S S <NA> <NA> +#> 51 B_KLBSL_PNMN S S <NA> <NA> +#> 52 B_STPHY_AURS S <NA> <NA> <NA> +#> 53 B_STPHY_CONS R R R R +#> 54 B_STPHY_CONS R R R R +#> 55 B_STRPT_PNMN R R R R +#> 56 B_STRPT_PNMN R R R R +#> 57 B_STPHY_AURS S <NA> <NA> <NA> +#> 58 B_STRPT_ANGN R R R R +#> 59 B_STRPT_ANGN R R R R +#> 60 B_STPHY_AURS S <NA> <NA> <NA> +#> 61 B_STPHY_AURS S <NA> <NA> <NA> +#> 62 B_STPHY_EPDR R R R R +#> 63 B_STPHY_AURS S <NA> <NA> <NA> +#> 64 B_STRPT_PNMN R R R R +#> 65 B_ESCHR_COLI S S <NA> <NA> +#> 66 B_ESCHR_COLI S S <NA> <NA> +#> 67 B_ESCHR_COLI S S <NA> <NA> +#> 68 B_STPHY_CONS S <NA> <NA> <NA> +#> 69 B_CRYNB <NA> <NA> <NA> <NA> +#> 70 B_STPHY_HMNS S <NA> <NA> <NA> +#> 71 B_ESCHR_COLI S S <NA> <NA> +#> 72 B_ESCHR_COLI S S <NA> <NA> +#> 73 B_ENTRC_FCLS R R R R +#> 74 B_ENTRC_FCLS R R R R +#> 75 B_STPHY_HMNS I <NA> <NA> <NA> +#> 76 B_ESCHR_COLI S S <NA> <NA> +#> 77 B_STPHY_CONS S <NA> <NA> <NA> +#> 78 B_PSDMN_AERG I S <NA> R +#> 79 B_PSDMN_AERG I S <NA> R +#> 80 B_STPHY_AURS S <NA> <NA> <NA> +#> 81 B_STPHY_AURS S <NA> <NA> <NA> +#> 82 B_STPHY_AURS S <NA> <NA> <NA> +#> 83 B_STPHY_CONS S <NA> <NA> <NA> +#> 84 B_ESCHR_COLI S S <NA> <NA> +#> 85 B_ESCHR_COLI S S <NA> <NA> +#> 86 B_ESCHR_COLI S S <NA> <NA> +#> 87 B_ESCHR_COLI S S <NA> <NA> +#> 88 B_ESCHR_COLI S S <NA> <NA> +#> 89 B_ESCHR_COLI S S <NA> <NA> +#> 90 B_STRPT_SLVR R R R R +#> 91 B_STRPT_SLVR R R R R +#> 92 B_STPHY_AURS S <NA> <NA> <NA> +#> 93 B_STPHY_CONS S <NA> <NA> <NA> +#> 94 B_STPHY_AURS S <NA> <NA> <NA> +#> 95 B_STPHY_AURS S <NA> <NA> <NA> +#> 96 B_CMPYL_JEJN <NA> <NA> <NA> <NA> +#> 97 B_STPHY_EPDR S S <NA> <NA> +#> 98 B_MCRCCC S R <NA> <NA> +#> 99 B_STPHY_EPDR S <NA> <NA> <NA> +#> 100 B_STRPT_PNMN R R R R +#> 101 B_ACNTB S S <NA> <NA> +#> 102 B_STPHY_AURS S <NA> <NA> <NA> +#> 103 B_STPHY_AURS S <NA> <NA> <NA> +#> 104 B_STPHY_AURS S <NA> <NA> <NA> +#> 105 B_STPHY_AURS S <NA> <NA> <NA> +#> 106 B_STPHY_AURS S <NA> <NA> <NA> +#> 107 B_STPHY_AURS S <NA> <NA> <NA> +#> 108 B_STPHY_EPDR R R R R +#> 109 B_STRPT_PNMN R R R R +#> 110 B_STRPT_PNMN R R R R +#> 111 B_STPHY_CONS R R R R +#> 112 B_STPHY_CONS S <NA> <NA> <NA> +#> 113 B_STPHY_CONS S <NA> <NA> <NA> +#> 114 B_STPHY_CONS S <NA> <NA> <NA> +#> 115 B_STPHY_HMNS S <NA> <NA> <NA> +#> 116 B_PROTS_MRBL S S <NA> <NA> +#> 117 B_BCTRD_FRGL <NA> <NA> <NA> <NA> +#> 118 B_PROTS_MRBL S S <NA> <NA> +#> 119 B_ESCHR_COLI S S <NA> <NA> +#> 120 B_ESCHR_COLI S S <NA> <NA> +#> 121 B_ESCHR_COLI S S <NA> <NA> +#> 122 B_ESCHR_COLI S S <NA> <NA> +#> 123 B_STPHY_EPDR R R R R +#> 124 B_STPHY_EPDR R R R R +#> 125 B_STPHY_CONS R R R R +#> 126 B_STPHY_AURS S <NA> <NA> <NA> +#> 127 B_STPHY_CONS S <NA> <NA> <NA> +#> 128 B_STPHY_CONS S <NA> <NA> <NA> +#> 129 B_ESCHR_COLI S S <NA> <NA> +#> 130 B_ESCHR_COLI S S <NA> <NA> +#> 131 B_STPHY_AURS S <NA> <NA> <NA> +#> 132 B_STPHY_AURS S <NA> <NA> <NA> +#> 133 B_STPHY_CONS S <NA> <NA> <NA> +#> 134 B_STRPT_PNMN R R R R +#> 135 B_CRYNB <NA> <NA> <NA> <NA> +#> 136 B_STRPT_PNMN R R R R +#> 137 B_STPHY_CONS S <NA> <NA> <NA> +#> 138 B_STPHY_CONS S <NA> <NA> <NA> +#> 139 B_ESCHR_COLI S S <NA> <NA> +#> 140 B_STPHY_HMNS R R R R +#> 141 B_STPHY_CONS R R R R +#> 142 B_STPHY_EPDR S <NA> <NA> <NA> +#> 143 B_ESCHR_COLI S S <NA> <NA> +#> 144 B_STPHY_AURS S <NA> <NA> <NA> +#> 145 B_STPHY_CONS R R R R +#> 146 B_STPHY_CONS R R R R +#> 147 B_STRPT_PNMN R R R R +#> 148 B_STRPT_PNMN R R R R +#> 149 B_STRPT_PNMN R R R R +#> 150 B_STRPT_PNMN R R R R +#> 151 B_STPHY_AURS S <NA> <NA> <NA> +#> 152 B_STPHY_AURS S <NA> <NA> <NA> +#> 153 B_STRPT_PYGN R R R R +#> 154 B_STRPT_GRPA R R R R +#> 155 B_STRPT_GRPA R R R R +#> 156 B_STPHY_CONS S <NA> <NA> <NA> +#> 157 B_STPHY_CONS S <NA> <NA> <NA> +#> 158 B_STPHY_AURS S <NA> <NA> <NA> +#> 159 B_STPHY_AURS S <NA> <NA> <NA> +#> 160 B_ENTRC <NA> <NA> <NA> <NA> +#> 161 B_STPHY_CONS R R R R +#> 162 B_ENTRC <NA> <NA> <NA> <NA> +#> 163 B_STPHY_CONS R R R R +#> 164 B_STPHY_CONS I <NA> <NA> <NA> +#> 165 B_STPHY_CONS I <NA> <NA> <NA> +#> 166 B_STPHY_CONS R R R R +#> 167 B_CRYNB <NA> <NA> <NA> <NA> +#> 168 B_STPHY_EPDR R R R R +#> 169 B_STPHY_EPDR S <NA> <NA> <NA> +#> 170 B_STPHY_CONS S <NA> <NA> <NA> +#> 171 B_STPHY_HMNS S <NA> <NA> <NA> +#> 172 B_STPHY_CONS S <NA> <NA> <NA> +#> 173 B_HMPHL_PRNF <NA> <NA> <NA> <NA> +#> 174 B_STPHY_AURS S <NA> <NA> <NA> +#> 175 B_STPHY_AURS S <NA> <NA> <NA> +#> 176 B_ESCHR_COLI S S <NA> <NA> +#> 177 B_STRPT_PNMN R R R R +#> 178 B_STPHY_AURS S <NA> <NA> <NA> +#> 179 B_STRPT_MITS R R R R +#> 180 B_STRPT_MITS R R R R +#> 181 B_STPHY_CONS S <NA> <NA> <NA> +#> 182 B_STPHY_CONS S <NA> <NA> <NA> +#> 183 B_ESCHR_COLI S S <NA> <NA> +#> 184 B_ESCHR_COLI S S <NA> <NA> +#> 185 B_STPHY_EPDR S <NA> <NA> <NA> +#> 186 B_STPHY_CONS S <NA> <NA> <NA> +#> 187 B_STPHY_CONS R R R R +#> 188 B_STPHY_CONS S <NA> <NA> <NA> +#> 189 B_STPHY_EPDR S <NA> <NA> <NA> +#> 190 B_STPHY_EPDR R R R R +#> 191 B_STPHY_AURS S <NA> <NA> <NA> +#> 192 B_STPHY_CONS S <NA> <NA> <NA> +#> 193 B_STRPT_PNMN R R R R +#> 194 B_KLBSL_PNMN S S <NA> <NA> +#> 195 B_KLBSL_PNMN S S <NA> <NA> +#> 196 B_STPHY_CONS S <NA> <NA> <NA> +#> 197 B_STPHY_CONS S <NA> <NA> <NA> +#> 198 B_STPHY_CONS S <NA> <NA> <NA> +#> 199 B_ESCHR_COLI S S <NA> <NA> +#> 200 B_STPHY_AURS S <NA> <NA> <NA> +#> [ reached 'max' / getOption("max.print") -- omitted 1800 rows ]
                                    # filter using any() or all() example_isolates[any(carbapenems() == "R"), ] -subset(example_isolates, any(carbapenems() == "R")) - +
                                    #> ℹ Assuming a filter on all 2 carbapenems. Wrap around `all()` or `any()` to +#> prevent this note.
                                    #> date hospital_id ward_icu ward_clinical ward_outpatient age gender +#> 381 2004-11-03 B TRUE FALSE FALSE 80 F +#> 461 2005-04-21 B TRUE FALSE FALSE 82 F +#> 462 2005-04-22 B TRUE FALSE FALSE 82 F +#> 463 2005-04-22 B TRUE FALSE FALSE 82 F +#> 698 2007-02-21 D FALSE TRUE FALSE 61 F +#> 799 2007-12-15 A FALSE TRUE FALSE 72 M +#> 918 2008-12-06 D FALSE TRUE FALSE 43 F +#> 1147 2011-03-16 B TRUE TRUE FALSE 83 M +#> 1149 2011-03-19 B TRUE TRUE FALSE 83 M +#> 1156 2011-04-06 D TRUE TRUE FALSE 74 M +#> 1157 2011-04-11 C FALSE TRUE FALSE 74 M +#> 1172 2011-05-09 D TRUE TRUE FALSE 82 F +#> 1210 2011-08-01 D FALSE TRUE FALSE 63 M +#> 1213 2011-08-18 B FALSE TRUE FALSE 75 F +#> 1217 2011-09-01 B FALSE TRUE FALSE 71 M +#> 1218 2011-09-01 B FALSE TRUE FALSE 71 M +#> 1242 2011-11-04 D FALSE TRUE FALSE 70 M +#> 1243 2011-11-07 D FALSE TRUE FALSE 70 M +#> 1246 2011-11-10 D FALSE TRUE FALSE 90 F +#> 1259 2012-02-06 D TRUE TRUE FALSE 80 M +#> patient_id mo PEN OXA FLC AMX AMC AMP TZP CZO FEP CXM +#> 381 D65308 B_STNTR_MLTP R <NA> <NA> R R R R R <NA> R +#> 461 452212 B_ENTRC <NA> <NA> <NA> <NA> <NA> <NA> R <NA> <NA> <NA> +#> 462 452212 B_ENTRC <NA> <NA> <NA> <NA> <NA> <NA> R <NA> <NA> <NA> +#> 463 452212 B_ENTRC_FACM <NA> <NA> <NA> <NA> <NA> <NA> R R R R +#> 698 8BBC46 B_ENTRC_FACM <NA> <NA> <NA> <NA> <NA> <NA> R R R R +#> 799 401043 B_ENTRC_FACM <NA> <NA> <NA> <NA> <NA> <NA> R R R R +#> 918 501361 B_STNTR_MLTP R <NA> <NA> R R R R R <NA> R +#> 1147 0D7D34 B_STPHY_EPDR R R R R R R R R R R +#> 1149 0D7D34 B_STPHY_EPDR R R R R R R R R R R +#> 1156 329273 B_STPHY_CONS R R R R R R R R R R +#> 1157 A26784 B_STPHY_CONS R R R R R R R R R R +#> 1172 207325 B_ENTRC_FACM <NA> <NA> <NA> <NA> <NA> <NA> R R R R +#> 1210 F8DB34 B_STPHY_CONS R R R R R R R R R R +#> 1213 A81782 B_STPHY_CONS R R R R R R R R R R +#> 1217 50C8DB B_STPHY_EPDR R R R R R R R R R R +#> 1218 50C8DB B_STPHY_CONS R R R R R R R R R R +#> 1242 443847 B_STPHY_CONS R R R R R R R R R R +#> 1243 116866 B_STPHY_CONS R R R R R R R R R R +#> 1246 F86227 B_STPHY_CONS R R R R R R R R R R +#> 1259 967247 B_STPHY_CONS R R R R R R R R R R +#> FOX CTX CAZ CRO GEN TOB AMK KAN TMP SXT NIT FOS LNZ CIP MFX +#> 381 R R R R R R R R R S <NA> R R <NA> <NA> +#> 461 <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> +#> 462 <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> +#> 463 R R R R R R R R R R <NA> <NA> <NA> <NA> <NA> +#> 698 R R R R R R R R R R <NA> <NA> <NA> <NA> <NA> +#> 799 R R R R R R R R R R <NA> <NA> <NA> R <NA> +#> 918 R R R R R R R R R S R R R S <NA> +#> 1147 R R R R I <NA> <NA> <NA> R <NA> <NA> <NA> <NA> S <NA> +#> 1149 R R R R I <NA> <NA> <NA> R <NA> <NA> <NA> <NA> S <NA> +#> 1156 R R R R S <NA> <NA> <NA> R R <NA> <NA> <NA> R <NA> +#> 1157 R R R R I <NA> <NA> <NA> R <NA> <NA> <NA> <NA> I <NA> +#> 1172 R R R R R R R R R R <NA> <NA> <NA> <NA> <NA> +#> 1210 R R R R S <NA> <NA> <NA> R R <NA> <NA> <NA> R <NA> +#> 1213 R R R R S <NA> <NA> <NA> R <NA> <NA> <NA> <NA> R <NA> +#> 1217 R R R R I <NA> <NA> <NA> R <NA> <NA> <NA> <NA> S <NA> +#> 1218 R R R R S <NA> <NA> <NA> S S <NA> <NA> <NA> S <NA> +#> 1242 R R R R S <NA> <NA> <NA> S S <NA> <NA> <NA> S <NA> +#> 1243 R R R R S <NA> <NA> <NA> R S <NA> <NA> <NA> R <NA> +#> 1246 R R R R S <NA> <NA> <NA> R R <NA> <NA> <NA> R <NA> +#> 1259 R R R R S <NA> <NA> <NA> R R <NA> <NA> <NA> R <NA> +#> VAN TEC TCY TGC DOX ERY CLI AZM IPM MEM MTR CHL COL MUP RIF +#> 381 R R R <NA> R R R R R R <NA> <NA> R <NA> R +#> 461 S <NA> R <NA> <NA> R <NA> R R R <NA> <NA> R <NA> <NA> +#> 462 S <NA> R <NA> <NA> R <NA> R R R <NA> <NA> R <NA> <NA> +#> 463 S <NA> R <NA> <NA> R R R R R <NA> <NA> R <NA> <NA> +#> 698 S <NA> S <NA> <NA> R R R R R <NA> <NA> R <NA> <NA> +#> 799 S <NA> S <NA> <NA> R R R R R <NA> <NA> R <NA> <NA> +#> 918 R R R <NA> R R R R R R <NA> <NA> R <NA> R +#> 1147 S <NA> <NA> <NA> S R R R R R <NA> <NA> R <NA> <NA> +#> 1149 S <NA> <NA> <NA> S R R R R R <NA> <NA> R <NA> <NA> +#> 1156 S <NA> <NA> <NA> S R R R R R <NA> <NA> R <NA> <NA> +#> 1157 S <NA> <NA> <NA> S R S R R R <NA> <NA> R <NA> <NA> +#> 1172 S <NA> <NA> <NA> S R R R R R <NA> <NA> R <NA> <NA> +#> 1210 S <NA> <NA> <NA> S R R R R R <NA> <NA> R <NA> <NA> +#> 1213 S <NA> <NA> <NA> S R R R R R <NA> <NA> R <NA> <NA> +#> 1217 S <NA> <NA> <NA> S S S S R R <NA> <NA> R <NA> S +#> 1218 S <NA> <NA> <NA> S R S R R R <NA> <NA> R <NA> S +#> 1242 S <NA> <NA> <NA> S R R R R R <NA> <NA> R <NA> <NA> +#> 1243 S <NA> <NA> <NA> S R R R R R <NA> <NA> R <NA> <NA> +#> 1246 S <NA> <NA> <NA> S R R R R R <NA> <NA> R <NA> <NA> +#> 1259 S <NA> <NA> <NA> S R R R R R <NA> <NA> R <NA> <NA> +#> [ reached 'max' / getOption("max.print") -- omitted 29 rows ]
                                    subset(example_isolates, any(carbapenems() == "R")) +
                                    #> ℹ Assuming a filter on all 2 carbapenems. Wrap around `all()` or `any()` to +#> prevent this note.
                                    #> date hospital_id ward_icu ward_clinical ward_outpatient age gender +#> 381 2004-11-03 B TRUE FALSE FALSE 80 F +#> 461 2005-04-21 B TRUE FALSE FALSE 82 F +#> 462 2005-04-22 B TRUE FALSE FALSE 82 F +#> 463 2005-04-22 B TRUE FALSE FALSE 82 F +#> 698 2007-02-21 D FALSE TRUE FALSE 61 F +#> 799 2007-12-15 A FALSE TRUE FALSE 72 M +#> 918 2008-12-06 D FALSE TRUE FALSE 43 F +#> 1147 2011-03-16 B TRUE TRUE FALSE 83 M +#> 1149 2011-03-19 B TRUE TRUE FALSE 83 M +#> 1156 2011-04-06 D TRUE TRUE FALSE 74 M +#> 1157 2011-04-11 C FALSE TRUE FALSE 74 M +#> 1172 2011-05-09 D TRUE TRUE FALSE 82 F +#> 1210 2011-08-01 D FALSE TRUE FALSE 63 M +#> 1213 2011-08-18 B FALSE TRUE FALSE 75 F +#> 1217 2011-09-01 B FALSE TRUE FALSE 71 M +#> 1218 2011-09-01 B FALSE TRUE FALSE 71 M +#> 1242 2011-11-04 D FALSE TRUE FALSE 70 M +#> 1243 2011-11-07 D FALSE TRUE FALSE 70 M +#> 1246 2011-11-10 D FALSE TRUE FALSE 90 F +#> 1259 2012-02-06 D TRUE TRUE FALSE 80 M +#> patient_id mo PEN OXA FLC AMX AMC AMP TZP CZO FEP CXM +#> 381 D65308 B_STNTR_MLTP R <NA> <NA> R R R R R <NA> R +#> 461 452212 B_ENTRC <NA> <NA> <NA> <NA> <NA> <NA> R <NA> <NA> <NA> +#> 462 452212 B_ENTRC <NA> <NA> <NA> <NA> <NA> <NA> R <NA> <NA> <NA> +#> 463 452212 B_ENTRC_FACM <NA> <NA> <NA> <NA> <NA> <NA> R R R R +#> 698 8BBC46 B_ENTRC_FACM <NA> <NA> <NA> <NA> <NA> <NA> R R R R +#> 799 401043 B_ENTRC_FACM <NA> <NA> <NA> <NA> <NA> <NA> R R R R +#> 918 501361 B_STNTR_MLTP R <NA> <NA> R R R R R <NA> R +#> 1147 0D7D34 B_STPHY_EPDR R R R R R R R R R R +#> 1149 0D7D34 B_STPHY_EPDR R R R R R R R R R R +#> 1156 329273 B_STPHY_CONS R R R R R R R R R R +#> 1157 A26784 B_STPHY_CONS R R R R R R R R R R +#> 1172 207325 B_ENTRC_FACM <NA> <NA> <NA> <NA> <NA> <NA> R R R R +#> 1210 F8DB34 B_STPHY_CONS R R R R R R R R R R +#> 1213 A81782 B_STPHY_CONS R R R R R R R R R R +#> 1217 50C8DB B_STPHY_EPDR R R R R R R R R R R +#> 1218 50C8DB B_STPHY_CONS R R R R R R R R R R +#> 1242 443847 B_STPHY_CONS R R R R R R R R R R +#> 1243 116866 B_STPHY_CONS R R R R R R R R R R +#> 1246 F86227 B_STPHY_CONS R R R R R R R R R R +#> 1259 967247 B_STPHY_CONS R R R R R R R R R R +#> FOX CTX CAZ CRO GEN TOB AMK KAN TMP SXT NIT FOS LNZ CIP MFX +#> 381 R R R R R R R R R S <NA> R R <NA> <NA> +#> 461 <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> +#> 462 <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> +#> 463 R R R R R R R R R R <NA> <NA> <NA> <NA> <NA> +#> 698 R R R R R R R R R R <NA> <NA> <NA> <NA> <NA> +#> 799 R R R R R R R R R R <NA> <NA> <NA> R <NA> +#> 918 R R R R R R R R R S R R R S <NA> +#> 1147 R R R R I <NA> <NA> <NA> R <NA> <NA> <NA> <NA> S <NA> +#> 1149 R R R R I <NA> <NA> <NA> R <NA> <NA> <NA> <NA> S <NA> +#> 1156 R R R R S <NA> <NA> <NA> R R <NA> <NA> <NA> R <NA> +#> 1157 R R R R I <NA> <NA> <NA> R <NA> <NA> <NA> <NA> I <NA> +#> 1172 R R R R R R R R R R <NA> <NA> <NA> <NA> <NA> +#> 1210 R R R R S <NA> <NA> <NA> R R <NA> <NA> <NA> R <NA> +#> 1213 R R R R S <NA> <NA> <NA> R <NA> <NA> <NA> <NA> R <NA> +#> 1217 R R R R I <NA> <NA> <NA> R <NA> <NA> <NA> <NA> S <NA> +#> 1218 R R R R S <NA> <NA> <NA> S S <NA> <NA> <NA> S <NA> +#> 1242 R R R R S <NA> <NA> <NA> S S <NA> <NA> <NA> S <NA> +#> 1243 R R R R S <NA> <NA> <NA> R S <NA> <NA> <NA> R <NA> +#> 1246 R R R R S <NA> <NA> <NA> R R <NA> <NA> <NA> R <NA> +#> 1259 R R R R S <NA> <NA> <NA> R R <NA> <NA> <NA> R <NA> +#> VAN TEC TCY TGC DOX ERY CLI AZM IPM MEM MTR CHL COL MUP RIF +#> 381 R R R <NA> R R R R R R <NA> <NA> R <NA> R +#> 461 S <NA> R <NA> <NA> R <NA> R R R <NA> <NA> R <NA> <NA> +#> 462 S <NA> R <NA> <NA> R <NA> R R R <NA> <NA> R <NA> <NA> +#> 463 S <NA> R <NA> <NA> R R R R R <NA> <NA> R <NA> <NA> +#> 698 S <NA> S <NA> <NA> R R R R R <NA> <NA> R <NA> <NA> +#> 799 S <NA> S <NA> <NA> R R R R R <NA> <NA> R <NA> <NA> +#> 918 R R R <NA> R R R R R R <NA> <NA> R <NA> R +#> 1147 S <NA> <NA> <NA> S R R R R R <NA> <NA> R <NA> <NA> +#> 1149 S <NA> <NA> <NA> S R R R R R <NA> <NA> R <NA> <NA> +#> 1156 S <NA> <NA> <NA> S R R R R R <NA> <NA> R <NA> <NA> +#> 1157 S <NA> <NA> <NA> S R S R R R <NA> <NA> R <NA> <NA> +#> 1172 S <NA> <NA> <NA> S R R R R R <NA> <NA> R <NA> <NA> +#> 1210 S <NA> <NA> <NA> S R R R R R <NA> <NA> R <NA> <NA> +#> 1213 S <NA> <NA> <NA> S R R R R R <NA> <NA> R <NA> <NA> +#> 1217 S <NA> <NA> <NA> S S S S R R <NA> <NA> R <NA> S +#> 1218 S <NA> <NA> <NA> S R S R R R <NA> <NA> R <NA> S +#> 1242 S <NA> <NA> <NA> S R R R R R <NA> <NA> R <NA> <NA> +#> 1243 S <NA> <NA> <NA> S R R R R R <NA> <NA> R <NA> <NA> +#> 1246 S <NA> <NA> <NA> S R R R R R <NA> <NA> R <NA> <NA> +#> 1259 S <NA> <NA> <NA> S R R R R R <NA> <NA> R <NA> <NA> +#> [ reached 'max' / getOption("max.print") -- omitted 29 rows ]
                                    # filter on any or all results in the carbapenem columns (i.e., IPM, MEM): example_isolates[any(carbapenems()), ] -example_isolates[all(carbapenems()), ] - +
                                    #> ℹ Filtering any of columns 'IPM' and 'MEM' to contain value "R", "S" or "I"
                                    #> date hospital_id ward_icu ward_clinical ward_outpatient age gender +#> 13 2002-01-19 D FALSE TRUE FALSE 71 M +#> 14 2002-01-19 D FALSE TRUE FALSE 71 M +#> 16 2002-01-22 B TRUE FALSE FALSE 50 M +#> 17 2002-01-22 B TRUE FALSE FALSE 50 M +#> 22 2002-02-05 B TRUE FALSE FALSE 45 F +#> 23 2002-02-05 B TRUE FALSE FALSE 45 F +#> 24 2002-02-05 B TRUE FALSE FALSE 45 F +#> 33 2002-02-27 D FALSE TRUE FALSE 85 F +#> 34 2002-02-27 D FALSE TRUE FALSE 85 F +#> 35 2002-03-08 C FALSE TRUE FALSE 69 M +#> 36 2002-03-16 C FALSE TRUE FALSE 69 M +#> 38 2002-04-01 B TRUE FALSE FALSE 46 F +#> 39 2002-04-01 B TRUE FALSE FALSE 46 F +#> 45 2002-04-08 A TRUE TRUE FALSE 78 M +#> 48 2002-04-14 C FALSE FALSE TRUE 73 M +#> 49 2002-04-23 B TRUE FALSE FALSE 69 F +#> 50 2002-04-23 B TRUE FALSE FALSE 69 F +#> 51 2002-04-26 D FALSE TRUE FALSE 79 M +#> 65 2002-06-05 D FALSE TRUE FALSE 20 F +#> 66 2002-06-06 D FALSE TRUE FALSE 20 F +#> patient_id mo PEN OXA FLC AMX AMC AMP TZP CZO FEP CXM FOX +#> 13 738003 B_ESCHR_COLI R <NA> <NA> <NA> I <NA> <NA> <NA> <NA> S <NA> +#> 14 738003 B_ESCHR_COLI R <NA> <NA> <NA> I <NA> <NA> <NA> <NA> S <NA> +#> 16 F35553 B_PROTS_MRBL R <NA> <NA> <NA> I <NA> <NA> <NA> <NA> S <NA> +#> 17 F35553 B_PROTS_MRBL R <NA> <NA> <NA> I <NA> <NA> <NA> <NA> S <NA> +#> 22 067927 B_SERRT_MRCS R <NA> <NA> R R R <NA> R <NA> R R +#> 23 067927 B_SERRT_MRCS R <NA> <NA> R R R <NA> R <NA> R R +#> 24 067927 B_SERRT_MRCS R <NA> <NA> R R R <NA> R <NA> R R +#> 33 066895 B_KLBSL_PNMN R <NA> <NA> R I R <NA> <NA> <NA> S <NA> +#> 34 066895 B_KLBSL_PNMN R <NA> <NA> R I R <NA> <NA> <NA> S <NA> +#> 35 4FC193 B_ESCHR_COLI R <NA> <NA> R R R <NA> <NA> <NA> R <NA> +#> 36 4FC193 B_PSDMN_AERG R <NA> <NA> R R R <NA> R <NA> R R +#> 38 496896 B_ESCHR_COLI R <NA> <NA> <NA> I <NA> <NA> <NA> <NA> I <NA> +#> 39 496896 B_ESCHR_COLI R <NA> <NA> <NA> I <NA> <NA> <NA> <NA> I <NA> +#> 45 130252 B_ENTRC_FCLS <NA> <NA> <NA> <NA> S <NA> <NA> R R R R +#> 48 F30196 B_STRPT_GRPB S <NA> S S S S S S S S S +#> 49 EE2510 B_ESCHR_COLI R <NA> <NA> <NA> I <NA> R <NA> <NA> I <NA> +#> 50 EE2510 B_ESCHR_COLI R <NA> <NA> <NA> I <NA> R <NA> <NA> I <NA> +#> 51 D10443 B_KLBSL_PNMN R <NA> <NA> R S R <NA> <NA> <NA> S <NA> +#> 65 24D393 B_ESCHR_COLI R <NA> <NA> <NA> I <NA> <NA> <NA> <NA> S <NA> +#> 66 24D393 B_ESCHR_COLI R <NA> <NA> <NA> I <NA> <NA> <NA> <NA> S <NA> +#> CTX CAZ CRO GEN TOB AMK KAN TMP SXT NIT FOS LNZ CIP MFX VAN TEC +#> 13 S <NA> S <NA> S <NA> <NA> S S <NA> <NA> R <NA> <NA> R R +#> 14 S <NA> S <NA> S <NA> <NA> S S <NA> <NA> R <NA> <NA> R R +#> 16 S S S <NA> <NA> <NA> <NA> S S R <NA> R S <NA> R R +#> 17 S S S <NA> <NA> <NA> <NA> S S R <NA> R S <NA> R R +#> 22 <NA> <NA> <NA> <NA> <NA> <NA> <NA> S S R <NA> R S <NA> R R +#> 23 <NA> <NA> <NA> <NA> <NA> <NA> <NA> S S R <NA> R S <NA> R R +#> 24 <NA> <NA> <NA> <NA> <NA> <NA> <NA> S S R <NA> R S <NA> R R +#> 33 S S S S S <NA> <NA> S S S <NA> R S <NA> R R +#> 34 S S S S S <NA> <NA> S S S <NA> R S <NA> R R +#> 35 S S S S <NA> <NA> <NA> S S <NA> <NA> R S <NA> R R +#> 36 R R R I S <NA> R R R <NA> <NA> R I <NA> R R +#> 38 S S S S S <NA> <NA> S S S <NA> R S <NA> R R +#> 39 S S S S S <NA> <NA> S S S <NA> R S <NA> R R +#> 45 R R R R R R R R R <NA> <NA> <NA> <NA> <NA> S <NA> +#> 48 S R S R R R R S S <NA> <NA> <NA> <NA> <NA> S <NA> +#> 49 S S S S S <NA> <NA> R R R <NA> R R R R R +#> 50 S S S S S <NA> <NA> R R R <NA> R R R R R +#> 51 S S S S S <NA> <NA> S S S <NA> R S <NA> R R +#> 65 S S S S S <NA> <NA> S S S <NA> R S <NA> R R +#> 66 S S S S S <NA> <NA> S S S <NA> R S <NA> R R +#> TCY TGC DOX ERY CLI AZM IPM MEM MTR CHL COL MUP RIF +#> 13 <NA> <NA> <NA> R R R S <NA> <NA> <NA> <NA> <NA> R +#> 14 <NA> <NA> <NA> R R R S <NA> <NA> <NA> <NA> <NA> R +#> 16 R R R R R R S <NA> <NA> <NA> R <NA> R +#> 17 R R R R R R S <NA> <NA> <NA> R <NA> R +#> 22 R R R R R R S <NA> <NA> <NA> R <NA> R +#> 23 R R R R R R S <NA> <NA> <NA> R <NA> R +#> 24 R R R R R R S <NA> <NA> <NA> R <NA> R +#> 33 <NA> <NA> <NA> R R R S <NA> <NA> <NA> <NA> <NA> R +#> 34 <NA> <NA> <NA> R R R S <NA> <NA> <NA> <NA> <NA> R +#> 35 <NA> <NA> <NA> R R R S <NA> <NA> <NA> <NA> <NA> R +#> 36 R R R R R R S <NA> <NA> R <NA> <NA> R +#> 38 <NA> <NA> <NA> R R R S <NA> <NA> <NA> <NA> <NA> R +#> 39 <NA> <NA> <NA> R R R S <NA> <NA> <NA> <NA> <NA> R +#> 45 R <NA> <NA> R R R S <NA> <NA> <NA> R <NA> <NA> +#> 48 S <NA> S S <NA> S S S <NA> <NA> R <NA> <NA> +#> 49 <NA> <NA> <NA> R R R S <NA> <NA> <NA> <NA> <NA> R +#> 50 <NA> <NA> <NA> R R R S <NA> <NA> <NA> <NA> <NA> R +#> 51 <NA> <NA> <NA> R R R S <NA> <NA> <NA> <NA> <NA> R +#> 65 <NA> <NA> <NA> R R R S <NA> <NA> <NA> <NA> <NA> R +#> 66 <NA> <NA> <NA> R R R S <NA> <NA> <NA> <NA> <NA> R +#> [ reached 'max' / getOption("max.print") -- omitted 942 rows ]
                                    example_isolates[all(carbapenems()), ] +
                                    #> ℹ Filtering all of columns 'IPM' and 'MEM' to contain value "R", "S" or "I"
                                    #> date hospital_id ward_icu ward_clinical ward_outpatient age gender +#> 48 2002-04-14 C FALSE FALSE TRUE 73 M +#> 153 2003-04-08 B TRUE FALSE FALSE 74 M +#> 154 2003-04-08 B TRUE FALSE FALSE 74 M +#> 155 2003-04-08 B TRUE FALSE FALSE 74 M +#> 207 2003-08-14 D FALSE TRUE FALSE 0 F +#> 237 2003-10-16 B TRUE FALSE FALSE 63 F +#> 240 2003-10-20 B TRUE FALSE FALSE 52 M +#> 242 2003-10-20 B TRUE FALSE FALSE 52 M +#> 246 2003-11-04 B TRUE FALSE FALSE 87 F +#> 247 2003-11-04 B TRUE FALSE FALSE 87 F +#> 248 2003-11-04 B TRUE FALSE FALSE 87 F +#> 251 2003-11-21 B TRUE FALSE FALSE 77 F +#> 278 2004-02-10 B TRUE FALSE FALSE 71 F +#> 279 2004-02-10 B TRUE FALSE FALSE 71 F +#> 280 2004-02-10 B TRUE FALSE FALSE 71 F +#> 298 2004-03-03 D FALSE TRUE FALSE 74 M +#> 299 2004-03-03 D FALSE TRUE FALSE 74 M +#> 309 2004-04-07 C FALSE TRUE FALSE 86 F +#> 313 2004-04-15 B TRUE FALSE FALSE 87 F +#> 314 2004-04-15 B TRUE FALSE FALSE 87 F +#> patient_id mo PEN OXA FLC AMX AMC AMP TZP CZO FEP CXM FOX +#> 48 F30196 B_STRPT_GRPB S <NA> S S S S S S S S S +#> 153 114570 B_STRPT_PYGN S <NA> S S S S S S S S S +#> 154 114570 B_STRPT_GRPA S <NA> S S S S S S S S S +#> 155 114570 B_STRPT_GRPA S <NA> S S S S S S S S S +#> 207 F71508 B_STRPT_GRPB S <NA> S S S S S S S S S +#> 237 650870 B_ESCHR_COLI R <NA> <NA> R R R S <NA> S S S +#> 240 F35553 B_ENTRBC_CLOC R <NA> <NA> R R R S R S R R +#> 242 F35553 B_ENTRBC_CLOC R <NA> <NA> R R R S R S R R +#> 246 2FC253 B_ESCHR_COLI R <NA> <NA> <NA> S <NA> S <NA> S S S +#> 247 2FC253 B_ESCHR_COLI R <NA> <NA> <NA> S <NA> S <NA> S S S +#> 248 2FC253 B_ESCHR_COLI R <NA> <NA> <NA> S <NA> S <NA> S S S +#> 251 550406 B_ESCHR_COLI R <NA> <NA> R R R S <NA> S I R +#> 278 F24801 B_STRPT_GRPB S <NA> S S S S S S S S S +#> 279 F24801 B_STRPT_AGLC S <NA> S S S S S S S S S +#> 280 F24801 B_STRPT_GRPB S <NA> S S S S S S S S S +#> 298 1435C8 B_ESCHR_COLI R <NA> <NA> S S S S <NA> S S S +#> 299 1435C8 B_ESCHR_COLI R <NA> <NA> S S S S <NA> S S S +#> 309 765860 B_STRPT_GRPA S <NA> S S S S S S S S S +#> 313 386739 B_ESCHR_COLI R <NA> <NA> R I R S <NA> S S S +#> 314 386739 B_ESCHR_COLI R <NA> <NA> R I R S <NA> S S S +#> CTX CAZ CRO GEN TOB AMK KAN TMP SXT NIT FOS LNZ CIP MFX VAN TEC +#> 48 S R S R R R R S S <NA> <NA> <NA> <NA> <NA> S <NA> +#> 153 S R S R R R R S S <NA> <NA> <NA> <NA> <NA> S <NA> +#> 154 S R S R R R R S S <NA> <NA> <NA> <NA> <NA> S <NA> +#> 155 S R S R R R R S S <NA> <NA> <NA> <NA> <NA> S <NA> +#> 207 S R S R R R R S S <NA> <NA> <NA> <NA> <NA> S <NA> +#> 237 S S S S S S <NA> <NA> S S <NA> R S <NA> R R +#> 240 <NA> <NA> <NA> S S S <NA> <NA> S R <NA> R S <NA> R R +#> 242 <NA> <NA> <NA> S S S <NA> <NA> S R <NA> R S <NA> R R +#> 246 S S S S S S <NA> <NA> S S <NA> R S <NA> R R +#> 247 S S S S S S <NA> <NA> S S <NA> R S <NA> R R +#> 248 S S S S S S <NA> <NA> S S <NA> R S <NA> R R +#> 251 S S S S S S <NA> <NA> S S <NA> R S <NA> R R +#> 278 S R S R R R R R <NA> <NA> <NA> <NA> <NA> <NA> S <NA> +#> 279 S R S R R R R R <NA> <NA> <NA> <NA> <NA> <NA> S <NA> +#> 280 S R S R R R R R <NA> <NA> <NA> <NA> <NA> <NA> S <NA> +#> 298 S S S S S S <NA> <NA> S S <NA> R S <NA> R R +#> 299 S S S S S S <NA> <NA> S S <NA> R S <NA> R R +#> 309 S R S R R R R S S <NA> <NA> <NA> <NA> <NA> S <NA> +#> 313 S S S S S S <NA> <NA> S S <NA> R S <NA> R R +#> 314 S S S S S S <NA> <NA> S S <NA> R S <NA> R R +#> TCY TGC DOX ERY CLI AZM IPM MEM MTR CHL COL MUP RIF +#> 48 S <NA> S S <NA> S S S <NA> <NA> R <NA> <NA> +#> 153 S <NA> S S S S S S <NA> <NA> R <NA> <NA> +#> 154 S <NA> S S S S S S <NA> <NA> R <NA> <NA> +#> 155 S <NA> S S S S S S <NA> <NA> R <NA> <NA> +#> 207 R <NA> <NA> S <NA> S S S <NA> <NA> R <NA> <NA> +#> 237 <NA> <NA> <NA> R R R S S <NA> <NA> <NA> <NA> R +#> 240 <NA> <NA> <NA> R R R S S <NA> <NA> <NA> <NA> R +#> 242 <NA> <NA> <NA> R R R S S <NA> <NA> <NA> <NA> R +#> 246 <NA> <NA> <NA> R R R S S <NA> <NA> <NA> <NA> R +#> 247 <NA> <NA> <NA> R R R S S <NA> <NA> <NA> <NA> R +#> 248 <NA> <NA> <NA> R R R S S <NA> <NA> <NA> <NA> R +#> 251 <NA> <NA> <NA> R R R S S <NA> <NA> <NA> <NA> R +#> 278 R <NA> <NA> S <NA> S S S <NA> <NA> R <NA> <NA> +#> 279 R <NA> <NA> S <NA> S S S <NA> <NA> R <NA> <NA> +#> 280 R <NA> <NA> S <NA> S S S <NA> <NA> R <NA> <NA> +#> 298 <NA> <NA> <NA> R R R S S <NA> <NA> <NA> <NA> R +#> 299 <NA> <NA> <NA> R R R S S <NA> <NA> <NA> <NA> R +#> 309 R <NA> <NA> S S S S S <NA> <NA> R <NA> <NA> +#> 313 <NA> <NA> <NA> R R R S S <NA> <NA> <NA> <NA> R +#> 314 <NA> <NA> <NA> R R R S S <NA> <NA> <NA> <NA> R +#> [ reached 'max' / getOption("max.print") -- omitted 736 rows ]
                                    # filter with multiple antibiotic selectors using c() example_isolates[all(c(carbapenems(), aminoglycosides()) == "R"), ] - +
                                    #> ℹ Assuming a filter on all 6 carbapenems, aminoglycosides. Wrap around +#> `all()` or `any()` to prevent this note.
                                    #> date hospital_id ward_icu ward_clinical ward_outpatient age gender +#> 381 2004-11-03 B TRUE FALSE FALSE 80 F +#> 463 2005-04-22 B TRUE FALSE FALSE 82 F +#> 698 2007-02-21 D FALSE TRUE FALSE 61 F +#> 799 2007-12-15 A FALSE TRUE FALSE 72 M +#> 918 2008-12-06 D FALSE TRUE FALSE 43 F +#> 1172 2011-05-09 D TRUE TRUE FALSE 82 F +#> 1262 2012-03-12 B TRUE TRUE FALSE 80 M +#> 1281 2012-05-19 A FALSE FALSE TRUE 89 F +#> 1302 2012-07-17 D TRUE TRUE FALSE 83 M +#> 1307 2012-07-20 D FALSE TRUE FALSE 66 F +#> 1308 2012-07-20 D FALSE TRUE FALSE 66 F +#> 1324 2012-09-18 D FALSE TRUE FALSE 62 M +#> 1328 2012-10-04 D FALSE TRUE FALSE 62 M +#> 1334 2012-10-18 D TRUE TRUE FALSE 65 F +#> 1449 2014-01-14 B FALSE TRUE FALSE 81 M +#> 1450 2014-01-14 B FALSE TRUE FALSE 81 M +#> 1624 2015-10-06 B TRUE TRUE FALSE 79 F +#> 1625 2015-10-07 B TRUE TRUE FALSE 79 F +#> 1626 2015-10-07 B TRUE TRUE FALSE 79 F +#> 1690 2016-03-27 D FALSE TRUE FALSE 47 M +#> patient_id mo PEN OXA FLC AMX AMC AMP TZP CZO FEP CXM FOX +#> 381 D65308 B_STNTR_MLTP R <NA> <NA> R R R R R <NA> R R +#> 463 452212 B_ENTRC_FACM <NA> <NA> <NA> <NA> <NA> <NA> R R R R R +#> 698 8BBC46 B_ENTRC_FACM <NA> <NA> <NA> <NA> <NA> <NA> R R R R R +#> 799 401043 B_ENTRC_FACM <NA> <NA> <NA> <NA> <NA> <NA> R R R R R +#> 918 501361 B_STNTR_MLTP R <NA> <NA> R R R R R <NA> R R +#> 1172 207325 B_ENTRC_FACM <NA> <NA> <NA> <NA> <NA> <NA> R R R R R +#> 1262 582258 B_STPHY_CONS R R R R R R R R R R R +#> 1281 C25552 B_STPHY_CONS R R R R R R R R R R R +#> 1302 F05015 B_STPHY_CONS R R R R R R R R R R R +#> 1307 404299 B_STPHY_CONS R R R R R R R R R R R +#> 1308 404299 B_STPHY_CONS R R R R R R R R R R R +#> 1324 431647 B_STPHY_CONS R R R R R R R R R R R +#> 1328 431647 B_STPHY_CONS R R R R R R R R R R R +#> 1334 E4F322 B_ENTRC_FACM R R R R R R R R R R R +#> 1449 8F77B2 B_ENTRC_FACM R R R R R R R R R R R +#> 1450 8F77B2 B_ENTRC_FACM R R R R R R R R R R R +#> 1624 A76045 B_ENTRC_FACM R R R R R R R R R R R +#> 1625 A76045 B_ENTRC_FACM R R R R R R R R R R R +#> 1626 A76045 B_ENTRC_FACM R R R R R R R R R R R +#> 1690 960787 B_ENTRC_FACM R R R R R R R R R R R +#> CTX CAZ CRO GEN TOB AMK KAN TMP SXT NIT FOS LNZ CIP MFX VAN TEC +#> 381 R R R R R R R R S <NA> R R <NA> <NA> R R +#> 463 R R R R R R R R R <NA> <NA> <NA> <NA> <NA> S <NA> +#> 698 R R R R R R R R R <NA> <NA> <NA> <NA> <NA> S <NA> +#> 799 R R R R R R R R R <NA> <NA> <NA> R <NA> S <NA> +#> 918 R R R R R R R R S R R R S <NA> R R +#> 1172 R R R R R R R R R <NA> <NA> <NA> <NA> <NA> S <NA> +#> 1262 R R R R R R R R <NA> <NA> <NA> <NA> S <NA> S <NA> +#> 1281 R R R R R R R R R <NA> <NA> <NA> R <NA> S <NA> +#> 1302 R R R R R R R S S <NA> <NA> <NA> S <NA> S <NA> +#> 1307 R R R R R R R R S <NA> <NA> <NA> S <NA> <NA> <NA> +#> 1308 R R R R R R R R R <NA> <NA> <NA> R <NA> S <NA> +#> 1324 R R R R R R R R R <NA> <NA> <NA> R <NA> S <NA> +#> 1328 R R R R R R R R R S <NA> <NA> R <NA> <NA> <NA> +#> 1334 R R R R R R R R R S <NA> S <NA> <NA> S <NA> +#> 1449 R R R R R R R R R S <NA> S <NA> <NA> S S +#> 1450 R R R R R R R R R S <NA> S <NA> <NA> S S +#> 1624 R R R R R R R R R S <NA> S <NA> <NA> S S +#> 1625 R R R R R R R R R S <NA> S <NA> <NA> S S +#> 1626 R R R R R R R R R S <NA> S <NA> <NA> S S +#> 1690 R R R R R R R R R S <NA> S <NA> <NA> S S +#> TCY TGC DOX ERY CLI AZM IPM MEM MTR CHL COL MUP RIF +#> 381 R <NA> R R R R R R <NA> <NA> R <NA> R +#> 463 R <NA> <NA> R R R R R <NA> <NA> R <NA> <NA> +#> 698 S <NA> <NA> R R R R R <NA> <NA> R <NA> <NA> +#> 799 S <NA> <NA> R R R R R <NA> <NA> R <NA> <NA> +#> 918 R <NA> R R R R R R <NA> <NA> R <NA> R +#> 1172 <NA> <NA> S R R R R R <NA> <NA> R <NA> <NA> +#> 1262 <NA> <NA> S R R R R R <NA> <NA> R <NA> <NA> +#> 1281 <NA> <NA> <NA> R R R R R <NA> <NA> R <NA> <NA> +#> 1302 <NA> <NA> R R R R R R <NA> <NA> R <NA> <NA> +#> 1307 <NA> <NA> R R R R R R <NA> <NA> R <NA> <NA> +#> 1308 <NA> <NA> S R S R R R <NA> <NA> R <NA> <NA> +#> 1324 <NA> <NA> R R S R R R <NA> <NA> R <NA> <NA> +#> 1328 R <NA> R R R R R R <NA> <NA> R S S +#> 1334 <NA> <NA> <NA> R R R R R <NA> <NA> R <NA> <NA> +#> 1449 <NA> S <NA> R R R R R <NA> <NA> R <NA> <NA> +#> 1450 <NA> S <NA> R R R R R <NA> <NA> R <NA> <NA> +#> 1624 <NA> S <NA> R R R R R <NA> <NA> R <NA> <NA> +#> 1625 <NA> S <NA> R R R R R <NA> <NA> R <NA> <NA> +#> 1626 <NA> S <NA> R R R R R <NA> <NA> R <NA> <NA> +#> 1690 <NA> S <NA> R R R R R <NA> <NA> R <NA> <NA> +#> [ reached 'max' / getOption("max.print") -- omitted 6 rows ]
                                    # filter + select in one go: get penicillins in carbapenems-resistant strains example_isolates[any(carbapenems() == "R"), penicillins()] - +
                                    #> ℹ For `penicillins()` using columns: 'AMC' (amoxicillin/clavulanic acid), +#> 'AMP' (ampicillin), 'AMX' (amoxicillin), 'FLC' (flucloxacillin), 'OXA' +#> (oxacillin), 'PEN' (benzylpenicillin) and 'TZP' (piperacillin/tazobactam)
                                    #> ℹ Assuming a filter on all 2 carbapenems. Wrap around `all()` or `any()` to +#> prevent this note.
                                    #> PEN OXA FLC AMX AMC AMP TZP +#> 381 R <NA> <NA> R R R R +#> 461 <NA> <NA> <NA> <NA> <NA> <NA> R +#> 462 <NA> <NA> <NA> <NA> <NA> <NA> R +#> 463 <NA> <NA> <NA> <NA> <NA> <NA> R +#> 698 <NA> <NA> <NA> <NA> <NA> <NA> R +#> 799 <NA> <NA> <NA> <NA> <NA> <NA> R +#> 918 R <NA> <NA> R R R R +#> 1147 R R R R R R R +#> 1149 R R R R R R R +#> 1156 R R R R R R R +#> 1157 R R R R R R R +#> 1172 <NA> <NA> <NA> <NA> <NA> <NA> R +#> 1210 R R R R R R R +#> 1213 R R R R R R R +#> 1217 R R R R R R R +#> 1218 R R R R R R R +#> 1242 R R R R R R R +#> 1243 R R R R R R R +#> 1246 R R R R R R R +#> 1259 R R R R R R R +#> 1260 R R R R R R R +#> 1262 R R R R R R R +#> 1268 R R R R R R R +#> 1269 R R R R R R R +#> 1281 R R R R R R R +#> 1302 R R R R R R R +#> 1307 R R R R R R R +#> 1308 R R R R R R R +#> 1311 R R R R R R R +#> 1315 R R R R R R R +#> 1321 R R R R R R R +#> 1324 R R R R R R R +#> 1326 R R R R R R R +#> 1328 R R R R R R R +#> 1334 R R R R R R R +#> 1346 <NA> <NA> <NA> R R R R +#> 1449 R R R R R R R +#> 1450 R R R R R R R +#> 1624 R R R R R R R +#> 1625 R R R R R R R +#> 1626 R R R R R R R +#> 1690 R R R R R R R +#> 1693 R R R R R R R +#> 1696 R R R R R R R +#> 1723 R R R R R R R +#> 1906 R R R R R R R +#> 1908 R R R R R R R +#> 1929 R R R R R R R +#> 1945 R R R R R R R
                                    # dplyr ------------------------------------------------------------------- # \donttest{ if (require("dplyr")) { + # get AMR for all aminoglycosides e.g., per hospital: + example_isolates %>% + group_by(hospital_id) %>% + summarise(across(aminoglycosides(), resistance)) + # this will select columns 'IPM' (imipenem) and 'MEM' (meropenem): example_isolates %>% select(carbapenems()) @@ -391,8 +1574,8 @@ The lifecycle of this function is stableexample_isolates %>% filter(carbapenems() == "R") example_isolates %>% filter(across(carbapenems(), ~.x == "R")) } -# } -
                                    +
                                    #> Error:
                                    # } +
                                    diff --git a/docs/reference/as.ab.html b/docs/reference/as.ab.html index 39fd4deb..a2fa4558 100644 --- a/docs/reference/as.ab.html +++ b/docs/reference/as.ab.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.0.9001 + 1.7.1
                                    diff --git a/docs/reference/as.disk.html b/docs/reference/as.disk.html index a379cb4d..2b54c170 100644 --- a/docs/reference/as.disk.html +++ b/docs/reference/as.disk.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.0.9001 + 1.7.1
                                  diff --git a/docs/reference/as.mic.html b/docs/reference/as.mic.html index aec8d968..e12e9254 100644 --- a/docs/reference/as.mic.html +++ b/docs/reference/as.mic.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.0.9001 + 1.7.1
                                  diff --git a/docs/reference/as.mo.html b/docs/reference/as.mo.html index 9112e767..a0369ade 100644 --- a/docs/reference/as.mo.html +++ b/docs/reference/as.mo.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.0.9001 + 1.7.1
                                  diff --git a/docs/reference/as.rsi.html b/docs/reference/as.rsi.html index 46254753..24ea5c00 100644 --- a/docs/reference/as.rsi.html +++ b/docs/reference/as.rsi.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.0.9001 + 1.7.1
                                  diff --git a/docs/reference/atc_online.html b/docs/reference/atc_online.html index 5529c7fc..834fb4e2 100644 --- a/docs/reference/atc_online.html +++ b/docs/reference/atc_online.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.0.9001 + 1.7.1
                              diff --git a/docs/reference/availability.html b/docs/reference/availability.html index 1bdae0fd..6e315cf9 100644 --- a/docs/reference/availability.html +++ b/docs/reference/availability.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.0.9001 + 1.7.1
                              diff --git a/docs/reference/bug_drug_combinations.html b/docs/reference/bug_drug_combinations.html index d38637c1..af779e8d 100644 --- a/docs/reference/bug_drug_combinations.html +++ b/docs/reference/bug_drug_combinations.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.0.9001 + 1.7.1
                              diff --git a/docs/reference/catalogue_of_life.html b/docs/reference/catalogue_of_life.html index 4ea117a3..aeaea1dd 100644 --- a/docs/reference/catalogue_of_life.html +++ b/docs/reference/catalogue_of_life.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.0.9001 + 1.7.1
                              diff --git a/docs/reference/catalogue_of_life_version.html b/docs/reference/catalogue_of_life_version.html index 54c5fd4d..1ed96192 100644 --- a/docs/reference/catalogue_of_life_version.html +++ b/docs/reference/catalogue_of_life_version.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.0.9001 + 1.7.1
                              diff --git a/docs/reference/count.html b/docs/reference/count.html index 60c747ee..a73e3a60 100644 --- a/docs/reference/count.html +++ b/docs/reference/count.html @@ -83,7 +83,7 @@ count_resistant() should be used to count resistant isolates, count_susceptible( AMR (for R) - 1.7.0.9001 + 1.7.1
                              diff --git a/docs/reference/custom_eucast_rules.html b/docs/reference/custom_eucast_rules.html index ff8e43e1..dad07e22 100644 --- a/docs/reference/custom_eucast_rules.html +++ b/docs/reference/custom_eucast_rules.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.0.9001 + 1.7.1
                            diff --git a/docs/reference/dosage.html b/docs/reference/dosage.html index 6820d47e..c0ce2c78 100644 --- a/docs/reference/dosage.html +++ b/docs/reference/dosage.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.0.9001 + 1.7.1
                            diff --git a/docs/reference/eucast_rules.html b/docs/reference/eucast_rules.html index 7a1687bf..e956b192 100644 --- a/docs/reference/eucast_rules.html +++ b/docs/reference/eucast_rules.html @@ -83,7 +83,7 @@ To improve the interpretation of the antibiogram before EUCAST rules are applied AMR (for R) - 1.7.0.9001 + 1.7.1
                            diff --git a/docs/reference/example_isolates.html b/docs/reference/example_isolates.html index 368f7027..785b9b2a 100644 --- a/docs/reference/example_isolates.html +++ b/docs/reference/example_isolates.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.0.9001 + 1.7.1
                            diff --git a/docs/reference/example_isolates_unclean.html b/docs/reference/example_isolates_unclean.html index 3e6f3784..358e42ed 100644 --- a/docs/reference/example_isolates_unclean.html +++ b/docs/reference/example_isolates_unclean.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.0.9001 + 1.7.1
                          diff --git a/docs/reference/first_isolate.html b/docs/reference/first_isolate.html index 258ad887..fd9006aa 100644 --- a/docs/reference/first_isolate.html +++ b/docs/reference/first_isolate.html @@ -83,7 +83,7 @@ AMR (for R) - 1.7.0.9001 + 1.7.1
                          diff --git a/docs/reference/g.test.html b/docs/reference/g.test.html index 283714bc..8c3e6404 100644 --- a/docs/reference/g.test.html +++ b/docs/reference/g.test.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.0.9001 + 1.7.1
                          diff --git a/docs/reference/get_episode.html b/docs/reference/get_episode.html index d1c0fc02..74e6f278 100644 --- a/docs/reference/get_episode.html +++ b/docs/reference/get_episode.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.0.9001 + 1.7.1
                          diff --git a/docs/reference/ggplot_pca.html b/docs/reference/ggplot_pca.html index cb4ab3da..36044004 100644 --- a/docs/reference/ggplot_pca.html +++ b/docs/reference/ggplot_pca.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.0.9000 + 1.7.1
                      diff --git a/docs/reference/ggplot_rsi.html b/docs/reference/ggplot_rsi.html index fbb5cf46..381436cf 100644 --- a/docs/reference/ggplot_rsi.html +++ b/docs/reference/ggplot_rsi.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.0.9001 + 1.7.1
                      diff --git a/docs/reference/guess_ab_col.html b/docs/reference/guess_ab_col.html index 26dab9e7..74dbee1d 100644 --- a/docs/reference/guess_ab_col.html +++ b/docs/reference/guess_ab_col.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.0.9001 + 1.7.1
                      diff --git a/docs/reference/index.html b/docs/reference/index.html index f68e4dd0..3a840f2c 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -81,7 +81,7 @@ AMR (for R) - 1.7.0.9002 + 1.7.1
                      diff --git a/docs/reference/intrinsic_resistant.html b/docs/reference/intrinsic_resistant.html index c8e247c3..07236286 100644 --- a/docs/reference/intrinsic_resistant.html +++ b/docs/reference/intrinsic_resistant.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.0.9001 + 1.7.1
                      diff --git a/docs/reference/italicise_taxonomy.html b/docs/reference/italicise_taxonomy.html index 70977c26..1126d631 100644 --- a/docs/reference/italicise_taxonomy.html +++ b/docs/reference/italicise_taxonomy.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.0.9001 + 1.7.1
                    diff --git a/docs/reference/join.html b/docs/reference/join.html index 09449988..96f89dee 100644 --- a/docs/reference/join.html +++ b/docs/reference/join.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.0.9001 + 1.7.1
                    diff --git a/docs/reference/key_antimicrobials.html b/docs/reference/key_antimicrobials.html index 47093624..a1b16ea0 100644 --- a/docs/reference/key_antimicrobials.html +++ b/docs/reference/key_antimicrobials.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.0.9001 + 1.7.1
                    diff --git a/docs/reference/kurtosis.html b/docs/reference/kurtosis.html index 4ac577ad..a0a72674 100644 --- a/docs/reference/kurtosis.html +++ b/docs/reference/kurtosis.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.0.9001 + 1.7.1
                diff --git a/docs/reference/lifecycle.html b/docs/reference/lifecycle.html index dd983c18..91ce22ec 100644 --- a/docs/reference/lifecycle.html +++ b/docs/reference/lifecycle.html @@ -84,7 +84,7 @@ This page contains a section for every lifecycle (with text borrowed from the af AMR (for R) - 1.7.0 + 1.7.1
                diff --git a/docs/reference/like.html b/docs/reference/like.html index e988f856..e864fe84 100644 --- a/docs/reference/like.html +++ b/docs/reference/like.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.0.9001 + 1.7.1
                diff --git a/docs/reference/mdro.html b/docs/reference/mdro.html index 18b931bc..50e1f0d8 100644 --- a/docs/reference/mdro.html +++ b/docs/reference/mdro.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.0.9001 + 1.7.1
                diff --git a/docs/reference/microorganisms.codes.html b/docs/reference/microorganisms.codes.html index c64e5e0a..d2f4e7ad 100644 --- a/docs/reference/microorganisms.codes.html +++ b/docs/reference/microorganisms.codes.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.0.9001 + 1.7.1
            diff --git a/docs/reference/microorganisms.html b/docs/reference/microorganisms.html index 6cdacdbc..3637d2c4 100644 --- a/docs/reference/microorganisms.html +++ b/docs/reference/microorganisms.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.0.9001 + 1.7.1
            diff --git a/docs/reference/microorganisms.old.html b/docs/reference/microorganisms.old.html index 91316c28..29a3cd8c 100644 --- a/docs/reference/microorganisms.old.html +++ b/docs/reference/microorganisms.old.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.0.9001 + 1.7.1
            diff --git a/docs/reference/mo_matching_score.html b/docs/reference/mo_matching_score.html index e670d871..86837cac 100644 --- a/docs/reference/mo_matching_score.html +++ b/docs/reference/mo_matching_score.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.0.9001 + 1.7.1
            diff --git a/docs/reference/mo_property.html b/docs/reference/mo_property.html index fc7da911..94dd756a 100644 --- a/docs/reference/mo_property.html +++ b/docs/reference/mo_property.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.0.9001 + 1.7.1
            diff --git a/docs/reference/mo_source.html b/docs/reference/mo_source.html index 5dec67ca..8aad054b 100644 --- a/docs/reference/mo_source.html +++ b/docs/reference/mo_source.html @@ -83,7 +83,7 @@ This is the fastest way to have your organisation (or analysis) specific codes p AMR (for R) - 1.7.0.9001 + 1.7.1
          diff --git a/docs/reference/pca.html b/docs/reference/pca.html index 0006be7b..ee78cf0d 100644 --- a/docs/reference/pca.html +++ b/docs/reference/pca.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.0.9001 + 1.7.1
          diff --git a/docs/reference/plot.html b/docs/reference/plot.html index bc692652..92aa2f84 100644 --- a/docs/reference/plot.html +++ b/docs/reference/plot.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.0.9001 + 1.7.1
          diff --git a/docs/reference/proportion.html b/docs/reference/proportion.html index fc1da429..aaf5d73d 100644 --- a/docs/reference/proportion.html +++ b/docs/reference/proportion.html @@ -83,7 +83,7 @@ resistance() should be used to calculate resistance, susceptibility() should be AMR (for R) - 1.7.0.9001 + 1.7.1
          diff --git a/docs/reference/random.html b/docs/reference/random.html index a457055c..2651574c 100644 --- a/docs/reference/random.html +++ b/docs/reference/random.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.0.9001 + 1.7.1
        diff --git a/docs/reference/resistance_predict.html b/docs/reference/resistance_predict.html index 8bd39b1e..7de9618c 100644 --- a/docs/reference/resistance_predict.html +++ b/docs/reference/resistance_predict.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.0.9001 + 1.7.1
        diff --git a/docs/reference/rsi_translation.html b/docs/reference/rsi_translation.html index 8aa20566..867f885c 100644 --- a/docs/reference/rsi_translation.html +++ b/docs/reference/rsi_translation.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.0.9001 + 1.7.1
        diff --git a/docs/reference/skewness.html b/docs/reference/skewness.html index 2b14c272..71821a99 100644 --- a/docs/reference/skewness.html +++ b/docs/reference/skewness.html @@ -83,7 +83,7 @@ When negative ('left-skewed'): the left tail is longer; the mass of the distribu AMR (for R) - 1.7.0.9001 + 1.7.1
        diff --git a/docs/reference/translate.html b/docs/reference/translate.html index 8cf0d21e..c266a2ea 100644 --- a/docs/reference/translate.html +++ b/docs/reference/translate.html @@ -82,7 +82,7 @@ AMR (for R) - 1.7.0.9001 + 1.7.1
    diff --git a/docs/survey.html b/docs/survey.html index c8a8a630..2b2e9284 100644 --- a/docs/survey.html +++ b/docs/survey.html @@ -81,7 +81,7 @@ AMR (for R) - 1.7.0.9002 + 1.7.1
    diff --git a/index.md b/index.md index 58143d30..3f4ee79a 100644 --- a/index.md +++ b/index.md @@ -98,16 +98,10 @@ This package can be used for: #### Latest released version -This package is [available here](https://msberends.r-universe.dev) on the [rOpenSci R-universe platform](https://ropensci.org/r-universe/), as CRAN does not allow frequent updates of large packages (though the `AMR` package is only 7-9 MB). We are working on splitting this package into two: a new data package containing the microbial taxonomy, and the `AMR` package that only contains all functions. +[![CRAN](https://www.r-pkg.org/badges/version-ago/AMR)](https://cran.r-project.org/package=AMR) +[![CRANlogs](https://cranlogs.r-pkg.org/badges/grand-total/AMR)](https://cran.r-project.org/package=AMR) -In the meanwhile, you have to add [our R-universe address](https://msberends.r-universe.dev) to your list of repositories ('repos'), by running: - -```r -options(repos = c(getOption("repos"), - msberends = "https://msberends.r-universe.dev")) -``` - -You can now install or update the `AMR` package in the same way you are used to: +This package is available [here on the official R network (CRAN)](https://cran.r-project.org/package=AMR). Install this package in R from CRAN by using the command: ```r install.packages("AMR") @@ -117,19 +111,28 @@ It will be downloaded and installed automatically. For RStudio, click on the men **Note:** Not all functions on this website may be available in this latest release. To use all functions and data sets mentioned on this website, install the latest development version. + #### Latest development version -The latest and unpublished development version can be installed from GitHub using: - -```r -install.packages("remotes") # if you haven't already -remotes::install_github("msberends/AMR") -``` - ![R-code-check](https://github.com/msberends/AMR/workflows/R-code-check/badge.svg?branch=master) ![[CodeFactor](https://www.codefactor.io/repository/github/msberends/amr/badge)](https://www.codefactor.io/repository/github/msberends/amr) ![[Codecov](https://codecov.io/gh/msberends/AMR/branch/master/graph/badge.svg)](https://codecov.io/gh/msberends/AMR?branch=master) +The latest and unpublished development version can be installed from GitHub in two ways: + +1. Directly, using: + ```r + install.packages("remotes") # if you haven't already + remotes::install_github("msberends/AMR") + ``` + +2. From the [rOpenSci R-universe platform](https://ropensci.org/r-universe/), by adding [our R-universe address](https://msberends.r-universe.dev) to your list of repositories ('repos'): + ```r + options(repos = c(getOption("repos"), + msberends = "https://msberends.r-universe.dev")) + ``` + After this, you can install and update this `AMR` package like any official release (e.g., using `install.packages("AMR")` or in RStudio via *Tools* > *Check for Package Updates...*). + You can also download the latest build from our repository: ### Get started diff --git a/man/antibiotic_class_selectors.Rd b/man/antibiotic_class_selectors.Rd index eeef6c72..083bb579 100644 --- a/man/antibiotic_class_selectors.Rd +++ b/man/antibiotic_class_selectors.Rd @@ -118,6 +118,11 @@ example_isolates[any(carbapenems() == "R"), penicillins()] \donttest{ if (require("dplyr")) { + # get AMR for all aminoglycosides e.g., per hospital: + example_isolates \%>\% + group_by(hospital_id) \%>\% + summarise(across(aminoglycosides(), resistance)) + # this will select columns 'IPM' (imipenem) and 'MEM' (meropenem): example_isolates \%>\% select(carbapenems())