diff --git a/DESCRIPTION b/DESCRIPTION index 9187fe63..2505ed51 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: AMR Version: 1.7.0 -Date: 2021-05-24 +Date: 2021-05-26 Title: Antimicrobial Resistance Data Analysis Authors@R: c( person(role = c("aut", "cre"), diff --git a/data-raw/AMR_latest.tar.gz b/data-raw/AMR_latest.tar.gz index 635da6bf..4d1b5d59 100644 Binary files a/data-raw/AMR_latest.tar.gz and b/data-raw/AMR_latest.tar.gz differ diff --git a/docs/articles/AMR.html b/docs/articles/AMR.html index c57448a3..092cb056 100644 --- a/docs/articles/AMR.html +++ b/docs/articles/AMR.html @@ -193,7 +193,7 @@
vignettes/AMR.Rmd
AMR.Rmd
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 24 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 26 May 2021.
Frequency table
Class: character
Length: 20,000
-Available: 20,000 (100%, NA: 0 = 0%)
+Available: 20,000 (100.0%, NA: 0 = 0.0%)
Unique: 2
Shortest: 1
Longest: 1
So only 53.5% is suitable for resistance analysis! We can now filter on it with the filter()
function, also from the dplyr
package:
So only 53.4% 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)
data_1st <- data %>%
filter_first_isolate()
So we end up with 10,696 isolates for analysis. Now our data looks like:
+So we end up with 10,682 isolates for analysis. Now our data looks like:
head(data_1st)
6 | -2011-01-31 | -E5 | -Hospital B | -B_ESCHR_COLI | -S | -S | -R | -S | -M | -Gram-negative | -Escherichia | -coli | -TRUE | -|||||||
8 | -2016-02-04 | -A9 | -Hospital B | -B_ESCHR_COLI | -R | -R | -S | -R | -M | -Gram-negative | -Escherichia | -coli | -TRUE | -|||||||
9 | -2015-07-09 | -N1 | -Hospital B | +4 | +2016-08-07 | +J6 | +Hospital A | B_STRPT_PNMN | -S | -S | +R | +R | S | R | M | @@ -601,30 +569,46 @@ Longest: 1TRUE | ||||
10 | -2013-11-10 | -M10 | -Hospital B | +6 | +2016-04-25 | +R4 | +Hospital A | B_ESCHR_COLI | R | -R | S | S | -M | +S | +F | Gram-negative | Escherichia | coli | TRUE | |
12 | -2013-12-10 | -W8 | -Hospital A | -B_ESCHR_COLI | -I | -I | +10 | +2016-01-17 | +R3 | +Hospital D | +B_STRPT_PNMN | +S | +S | +S | R | +F | +Gram-positive | +Streptococcus | +pneumoniae | +TRUE | +
11 | +2013-01-18 | +S1 | +Hospital B | +B_ESCHR_COLI | +R | +R | +S | S | F | Gram-negative | @@ -632,20 +616,36 @@ Longest: 1coli | TRUE | ||||||||
15 | -2016-11-20 | -U2 | -Hospital C | -B_ESCHR_COLI | +||||||||||||||||
16 | +2017-07-05 | +X9 | +Hospital D | +B_STRPT_PNMN | +S | S | S | R | -S | F | -Gram-negative | -Escherichia | -coli | +Gram-positive | +Streptococcus | +pneumoniae | +TRUE | +|||
19 | +2013-10-30 | +D4 | +Hospital B | +B_STRPT_PNMN | +R | +R | +S | +R | +M | +Gram-positive | +Streptococcus | +pneumoniae | TRUE | |||||||
1 | Escherichia coli | -4,648 | -43.46% | -4,648 | -43.46% | +4,559 | +42.68% | +4,559 | +42.68% | |||||||||||
2 | Staphylococcus aureus | -2,729 | -25.51% | -7,377 | -68.97% | +2,844 | +26.62% | +7,403 | +69.30% | |||||||||||
3 | Streptococcus pneumoniae | -2,136 | -19.97% | -9,513 | -88.94% | +2,082 | +19.49% | +9,485 | +88.79% | |||||||||||
4 | Klebsiella pneumoniae | -1,183 | -11.06% | -10,696 | +1,197 | +11.21% | +10,682 | 100.00% | ||||||||||||
2016-02-04 | -A9 | -Hospital B | -B_ESCHR_COLI | -R | -R | -S | -R | -M | -Gram-negative | -Escherichia | -coli | -TRUE | -||||||||
2015-07-09 | -N1 | -Hospital B | -B_STRPT_PNMN | -S | -S | -S | -R | -M | -Gram-positive | -Streptococcus | -pneumoniae | -TRUE | -||||||||
2017-06-21 | -M8 | -Hospital B | -B_ESCHR_COLI | -S | -S | -R | -R | -M | -Gram-negative | -Escherichia | -coli | -TRUE | -||||||||
2010-09-28 | -V7 | +2016-08-07 | +J6 | Hospital A | B_STRPT_PNMN | -S | -S | -S | -R | -F | -Gram-positive | -Streptococcus | -pneumoniae | -TRUE | -||||||
2012-08-30 | -N9 | -Hospital A | -B_STRPT_PNMN | -S | -S | R | R | -F | +S | +R | +M | Gram-positive | Streptococcus | pneumoniae | TRUE | |||||
2010-08-23 | -I4 | +2016-01-17 | +R3 | Hospital D | B_STRPT_PNMN | S | S | S | R | +F | +Gram-positive | +Streptococcus | +pneumoniae | +TRUE | +||||||
2017-07-05 | +X9 | +Hospital D | +B_STRPT_PNMN | +S | +S | +S | +R | +F | +Gram-positive | +Streptococcus | +pneumoniae | +TRUE | +||||||||
2013-10-30 | +D4 | +Hospital B | +B_STRPT_PNMN | +R | +R | +S | +R | +M | +Gram-positive | +Streptococcus | +pneumoniae | +TRUE | +||||||||
2012-02-20 | +M7 | +Hospital B | +B_ESCHR_COLI | +R | +S | +S | +R | +M | +Gram-negative | +Escherichia | +coli | +TRUE | +||||||||
2010-02-18 | +F5 | +Hospital C | +B_STRPT_PNMN | +R | +R | +S | +R | M | Gram-positive | Streptococcus | @@ -870,50 +870,50 @@ Longest: 24||||||||||
E. coli | AMX | -2236 | -124 | -2288 | -4648 | +2129 | +151 | +2279 | +4559 | |||||||||||
E. coli | AMC | -3462 | -154 | -1032 | -4648 | +3355 | +151 | +1053 | +4559 | |||||||||||
E. coli | CIP | -3400 | +3320 | 0 | -1248 | -4648 | +1239 | +4559 | ||||||||||||
E. coli | GEN | -4040 | +3995 | 0 | -608 | -4648 | +564 | +4559 | ||||||||||||
K. pneumoniae | AMX | 0 | 0 | -1183 | -1183 | +1197 | +1197 | |||||||||||||
K. pneumoniae | AMC | -937 | -48 | -198 | -1183 | +949 | +46 | +202 | +1197 |
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.5431002
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.5389075
+0.5437286
Hospital B
-0.5612520
+0.5478284
Hospital C
-0.5325596
+0.5407268
Hospital D
-0.5259019
+0.5448113
@@ -1022,23 +1022,23 @@ Longest: 24
Hospital A
-0.5389075
-3277
+0.5437286
+3213
Hospital B
-0.5612520
-3706
+0.5478284
+3753
Hospital C
-0.5325596
-1551
+0.5407268
+1596
Hospital D
-0.5259019
-2162
+0.5448113
+2120
@@ -1059,27 +1059,27 @@ Longest: 24
Escherichia
-0.7779690
-0.8691910
-0.9733219
+0.7690283
+0.8762887
+0.9782847
Klebsiella
-0.8326289
-0.9010989
-0.9805579
+0.8312448
+0.8997494
+0.9874687
Staphylococcus
-0.7933309
-0.8860388
-0.9805790
+0.7960619
+0.8871308
+0.9820675
Streptococcus
-0.5397940
+0.5249760
0.0000000
-0.5397940
+0.5249760
@@ -1163,19 +1163,19 @@ Longest: 24
mic_values <- random_mic(size = 100)
mic_values
# Class <mic>
-# [1] >=128 <=0.0625 64 4 0.25 16 8 2
-# [9] 0.25 >=128 0.25 >=128 0.25 0.5 64 0.125
-# [17] 2 <=0.0625 0.5 2 1 0.5 32 >=128
-# [25] 0.5 32 >=128 0.25 <=0.0625 <=0.0625 0.5 2
-# [33] >=128 >=128 4 8 <=0.0625 <=0.0625 4 16
-# [41] >=128 32 <=0.0625 >=128 1 <=0.0625 0.5 8
-# [49] 0.125 4 <=0.0625 16 4 32 0.125 8
-# [57] 4 4 16 4 >=128 <=0.0625 4 32
-# [65] 0.125 64 0.5 0.125 0.5 4 16 32
-# [73] 0.125 0.25 4 0.25 4 >=128 >=128 16
-# [81] 1 <=0.0625 0.125 1 4 4 <=0.0625 0.125
-# [89] 0.125 >=128 16 2 0.25 64 8 16
-# [97] 4 >=128 8 >=128
# base R:
plot(mic_values)
# base R:
plot(disk_values, mo = "E. coli", ab = "cipro")
vignettes/datasets.Rmd
datasets.Rmd
This package is available here on the official R network (CRAN), which has a peer-reviewed submission process. Install this package in R from CRAN by using the command:
+This package is available on the rOpenSci R-universe platform, as CRAN does not allow frequent updates of large packages. With CRAN, we cannot update this package frequently enough to implement the latest EUCAST/CLSI guidelines or the latest microbial taxonomy.
+Install this package in R by using the command:
-install.packages("AMR")
It will be downloaded and installed automatically. For RStudio, click on the menu Tools > Install Packages… and then type in “AMR” and press Install.
+install.packages("AMR", repos = "https://msberends.r-universe.dev")
It will be downloaded and installed automatically.
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.
is.rsi.eligible()
now detects if the column name resembles an antibiotic name or code and now returns TRUE
immediately if the input contains any of the values “R”, “S” or “I”. This drastically improves speed, also for a lot of other functions that rely on automatic determination of antibiotic columns.
get_episode()
and is_new_episode()
now support less than a day as value for argument episode_days
(e.g., to include one patient/test per hour)ampc_cephalosporin_resistance
in eucast_rules()
now also applies to value “I” (not only “S”)print()
and summary()
on a Principal Components Analysis object (pca()
) now print additional group info if the original data was grouped using dplyr::group_by()
+print()
and summary()
on a Principal Components Analysis object (pca()
) now print additional group info if the original data was grouped using dplyr::group_by()
guess_ab_col()
. As this also internally improves the reliability of first_isolate()
and mdro()
, this might have a slight impact on the results of those functions.mo_name()
when used in other languages than English