diff --git a/DESCRIPTION b/DESCRIPTION index 4fb8a474..5a0ed1ae 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: AMR Version: 1.3.0 -Date: 2020-07-29 +Date: 2020-07-30 Title: Antimicrobial Resistance Analysis Authors@R: c( person(role = c("aut", "cre"), diff --git a/R/mic.R b/R/mic.R index 32c64ad4..1243e89c 100755 --- a/R/mic.R +++ b/R/mic.R @@ -71,8 +71,8 @@ as.mic <- function(x, na.rm = FALSE) { # transform => to >= and =< to <= x <- gsub("=<", "<=", x, fixed = TRUE) x <- gsub("=>", ">=", x, fixed = TRUE) - # starting dots must start with 0 - x <- gsub("^[.]+", "0.", x) + # dots without a leading zero must start with 0 + x <- gsub("([^0-9]|^)[.]", "\\10.", x) # values like "<=0.2560.512" should be 0.512 x <- gsub(".*[.].*[.]", "0.", x) # remove ending .0 diff --git a/docs/articles/AMR.html b/docs/articles/AMR.html index f6101862..aa04f346 100644 --- a/docs/articles/AMR.html +++ b/docs/articles/AMR.html @@ -39,7 +39,7 @@ AMR (for R) - 1.2.0.9037 + 1.3.0 @@ -186,7 +186,7 @@

How to conduct AMR analysis

Matthijs S. Berends

-

24 July 2020

+

30 July 2020

Source: vignettes/AMR.Rmd @@ -195,7 +195,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 24 July 2020.

+

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 30 July 2020.

Introduction

@@ -226,21 +226,21 @@ -2020-07-24 +2020-07-30 abcd Escherichia coli S S -2020-07-24 +2020-07-30 abcd Escherichia coli S R -2020-07-24 +2020-07-30 efgh Escherichia coli R @@ -336,68 +336,68 @@ -2014-06-04 -V5 +2017-06-10 +J6 Hospital B Escherichia coli +I R S S +M + + +2013-08-26 +H10 +Hospital A +Escherichia coli +S +S +R +S +M + + +2016-02-09 +S7 +Hospital D +Escherichia coli +R +S +R S F -2015-09-20 -M6 -Hospital A +2013-06-27 +A5 +Hospital B Escherichia coli -R +S S S S M -2017-05-14 -Q6 -Hospital C -Streptococcus pneumoniae -R -S -S -S -F - - -2017-03-12 -O3 +2017-03-03 +Q4 Hospital D -Klebsiella pneumoniae -S -R -S -S -F - - -2017-12-27 -P8 -Hospital B Escherichia coli -S +R S S S F -2013-11-30 -B10 -Hospital B +2015-07-13 +I5 +Hospital A Staphylococcus aureus -I S S +R S M @@ -432,16 +432,16 @@ Longest: 1

1 M -10,487 -52.44% -10,487 -52.44% +10,312 +51.56% +10,312 +51.56% 2 F -9,513 -47.57% +9,688 +48.44% 20,000 100.00% @@ -481,7 +481,7 @@ Longest: 1

# NOTE: Using column `bacteria` as input for `col_mo`. # NOTE: Using column `date` as input for `col_date`. # NOTE: Using column `patient_id` as input for `col_patient_id`.
-

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

+

So only 28.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)

For future use, the above two syntaxes can be shortened with the filter_first_isolate() function:

@@ -491,7 +491,7 @@ Longest: 1

First weighted isolates

-

We made a slight twist to the CLSI algorithm, to take into account the antimicrobial susceptibility profile. Have a look at all isolates of patient J1, sorted on date:

+

We made a slight twist to the CLSI algorithm, to take into account the antimicrobial susceptibility profile. Have a look at all isolates of patient Q3, sorted on date:

@@ -507,19 +507,19 @@ Longest: 1

- - + + - - - + + + - - + + @@ -529,76 +529,76 @@ Longest: 1

- - + + - + - - + + - + - - + + - - + + - - + + - + - - + + + - - + - - + + - - - + + + - - + + - + @@ -606,14 +606,14 @@ Longest: 1

- - + + - - - + + +
isolate
12010-04-08J12010-02-06Q3 B_ESCHR_COLIRI SRSSS TRUE
22010-06-01J12010-04-09Q3 B_ESCHR_COLI S S
32010-06-21J12010-07-03Q3 B_ESCHR_COLI S SSR S FALSE
42010-07-08J12010-07-31Q3 B_ESCHR_COLI S S SSR FALSE
52011-01-29J12010-10-26Q3 B_ESCHR_COLIR SRSS S FALSE
62011-02-23J12010-12-11Q3 B_ESCHR_COLI S S SSR FALSE
72011-02-23J12011-03-20Q3 B_ESCHR_COLIR S S SSFALSETRUE
82011-02-28J12011-04-08Q3 B_ESCHR_COLIR SRRSSS FALSE
92011-03-13J12011-04-24Q3 B_ESCHR_COLISR S S S
102011-05-14J12011-05-08Q3 B_ESCHR_COLIRR S STRUESSFALSE
@@ -644,106 +644,106 @@ Longest: 1

1 -2010-04-08 -J1 +2010-02-06 +Q3 B_ESCHR_COLI -R -I S -R +S +S +S TRUE TRUE 2 -2010-06-01 -J1 +2010-04-09 +Q3 B_ESCHR_COLI S S S S FALSE +FALSE + + +3 +2010-07-03 +Q3 +B_ESCHR_COLI +S +S +R +S +FALSE TRUE - -3 -2010-06-21 -J1 -B_ESCHR_COLI -S -S -S -S -FALSE -FALSE - 4 -2010-07-08 -J1 +2010-07-31 +Q3 B_ESCHR_COLI S S S -S -FALSE +R FALSE +TRUE 5 -2011-01-29 -J1 +2010-10-26 +Q3 B_ESCHR_COLI -R S -R +S +S S FALSE TRUE 6 -2011-02-23 -J1 +2010-12-11 +Q3 B_ESCHR_COLI S S S -S +R FALSE TRUE 7 -2011-02-23 -J1 +2011-03-20 +Q3 B_ESCHR_COLI +R S S S -S -FALSE -FALSE +TRUE +TRUE 8 -2011-02-28 -J1 +2011-04-08 +Q3 B_ESCHR_COLI -R S -R -R +S +S +S FALSE TRUE 9 -2011-03-13 -J1 +2011-04-24 +Q3 B_ESCHR_COLI -S +R S S S @@ -752,23 +752,23 @@ Longest: 1

10 -2011-05-14 -J1 +2011-05-08 +Q3 B_ESCHR_COLI -R -R S S -TRUE +S +S +FALSE TRUE -

Instead of 2, now 7 isolates are flagged. In total, 78.6% of all isolates are marked ‘first weighted’ - 50.2% more than when using the CLSI guideline. In real life, this novel algorithm will yield 5-10% more isolates than the classic CLSI guideline.

+

Instead of 2, now 9 isolates are flagged. In total, 78.8% of all isolates are marked ‘first weighted’ - 50.6% more than when using the CLSI guideline. In real life, this novel algorithm will yield 5-10% more isolates than the classic CLSI guideline.

As with filter_first_isolate(), there’s a shortcut for this new algorithm too:

data_1st <- data %>%
   filter_first_weighted_isolate()
-

So we end up with 15,719 isolates for analysis.

+

So we end up with 15,769 isolates for analysis.

We can remove unneeded columns:

data_1st <- data_1st %>%
   select(-c(first, keyab))
@@ -788,7 +788,7 @@ Longest: 1

- + @@ -810,75 +810,91 @@ Longest: 1

1 -2014-06-04 -V5 +2017-06-10 +J6 Hospital B B_ESCHR_COLI R +R S S -S -F +M Gram-negative Escherichia coli TRUE +2 +2013-08-26 +H10 +Hospital A +B_ESCHR_COLI +S +S +R +S +M +Gram-negative +Escherichia +coli +TRUE + + 3 -2017-05-14 -Q6 -Hospital C -B_STRPT_PNMN -R -R -S -R -F -Gram-positive -Streptococcus -pneumoniae -TRUE - - -4 -2017-03-12 -O3 +2016-02-09 +S7 Hospital D -B_KLBSL_PNMN -R +B_ESCHR_COLI R S +R S F Gram-negative -Klebsiella -pneumoniae +Escherichia +coli TRUE -5 -2017-12-27 -P8 +4 +2013-06-27 +A5 Hospital B B_ESCHR_COLI S S S S +M +Gram-negative +Escherichia +coli +TRUE + + +5 +2017-03-03 +Q4 +Hospital D +B_ESCHR_COLI +R +S +S +S F Gram-negative Escherichia coli TRUE - -6 -2013-11-30 -B10 + +7 +2015-08-02 +N2 Hospital B B_STPHY_AURS -I +R S S S @@ -888,22 +904,6 @@ Longest: 1

aureus TRUE - -8 -2011-06-14 -A2 -Hospital D -B_ESCHR_COLI -R -R -S -S -M -Gram-negative -Escherichia -coli -TRUE -

Time for the analysis!

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

data_1st %>% freq(genus, species)

Frequency table

Class: character
-Length: 15,719
-Available: 15,719 (100%, NA: 0 = 0%)
+Length: 15,769
+Available: 15,769 (100%, NA: 0 = 0%)
Unique: 4

Shortest: 16
Longest: 24

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

1 Escherichia coli -7,902 -50.27% -7,902 -50.27% +7,969 +50.54% +7,969 +50.54% 2 Staphylococcus aureus -3,926 -24.98% -11,828 -75.25% +3,947 +25.03% +11,916 +75.57% 3 Streptococcus pneumoniae -2,350 -14.95% -14,178 -90.20% +2,311 +14.66% +14,227 +90.22% 4 Klebsiella pneumoniae -1,541 -9.80% -15,719 +1,542 +9.78% +15,769 100.00% @@ -994,50 +994,50 @@ Longest: 24

E. coli AMX -3775 -258 -3869 -7902 +3769 +276 +3924 +7969 E. coli AMC -6238 -319 -1345 -7902 +6242 +307 +1420 +7969 E. coli CIP -6031 +6044 0 -1871 -7902 +1925 +7969 E. coli GEN -7105 +7149 0 -797 -7902 +820 +7969 K. pneumoniae AMX 0 0 -1541 -1541 +1542 +1542 K. pneumoniae AMC -1230 -43 -268 -1541 +1209 +69 +264 +1542 @@ -1060,34 +1060,34 @@ Longest: 24

E. coli CIP -6031 +6044 0 -1871 -7902 +1925 +7969 K. pneumoniae CIP -1174 +1182 0 -367 -1541 +360 +1542 S. aureus CIP -2993 +3010 0 -933 -3926 +937 +3947 S. pneumoniae CIP -1807 +1777 0 -543 -2350 +534 +2311 @@ -1099,7 +1099,7 @@ Longest: 24

The functions resistance() and susceptibility() can be used to calculate antimicrobial resistance or susceptibility. For more specific analyses, the functions proportion_S(), proportion_SI(), proportion_I(), proportion_IR() and proportion_R() can be used to determine the proportion of a specific antimicrobial outcome.

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.5350213
+# [1] 0.5378908

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

data_1st %>%
   group_by(hospital) %>%
@@ -1113,19 +1113,19 @@ Longest: 24

Hospital A -0.5308117 +0.5322241 Hospital B -0.5304522 +0.5324628 Hospital C -0.5364381 +0.5388535 Hospital D -0.5479751 +0.5552030 @@ -1144,23 +1144,23 @@ Longest: 24

Hospital A -0.5308117 -4706 +0.5322241 +4748 Hospital B -0.5304522 -5484 +0.5324628 +5514 Hospital C -0.5364381 -2319 +0.5388535 +2355 Hospital D -0.5479751 -3210 +0.5552030 +3152 @@ -1181,27 +1181,27 @@ Longest: 24

Escherichia -0.8297899 -0.8991395 -0.9851936 +0.8218095 +0.8971013 +0.9858201 Klebsiella -0.8260870 -0.8994160 -0.9883193 +0.8287938 +0.8949416 +0.9883268 Staphylococcus -0.8352012 -0.9238411 -0.9852267 +0.8198632 +0.9191791 +0.9863187 Streptococcus -0.5425532 +0.5374297 0.0000000 -0.5425532 +0.5374297 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 c9f877b7..9bba859b 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 1d638c0c..ca339004 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 4f287779..2261caed 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 8bcf53ce..cda73c9e 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 f37a56e8..9b8b2e08 100644 --- a/docs/articles/EUCAST.html +++ b/docs/articles/EUCAST.html @@ -39,7 +39,7 @@ AMR (for R) - 1.2.0.9037 + 1.3.0
@@ -186,7 +186,7 @@

How to apply EUCAST rules

Matthijs S. Berends

-

24 July 2020

+

30 July 2020

Source: vignettes/EUCAST.Rmd diff --git a/docs/articles/MDR.html b/docs/articles/MDR.html index 9ff6aeaf..689d6a41 100644 --- a/docs/articles/MDR.html +++ b/docs/articles/MDR.html @@ -39,7 +39,7 @@ AMR (for R) - 1.2.0.9037 + 1.3.0 @@ -186,7 +186,7 @@

How to determine multi-drug resistance (MDR)

Matthijs S. Berends

-

24 July 2020

+

30 July 2020

Source: vignettes/MDR.Rmd @@ -306,19 +306,19 @@ Unique: 2

The data set now looks like this:

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

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

mdro(my_TB_data, guideline = "TB")

or its shortcut mdr_tb():

@@ -347,40 +347,40 @@ Unique: 5

1 Mono-resistant -3196 -63.92% -3196 -63.92% +3215 +64.30% +3215 +64.30% 2 -Negative -694 -13.88% -3890 -77.80% +Multi-drug-resistant +643 +12.86% +3858 +77.16% 3 -Multi-drug-resistant -606 -12.12% -4496 -89.92% +Negative +637 +12.74% +4495 +89.90% 4 Poly-resistant -311 -6.22% -4807 -96.14% +292 +5.84% +4787 +95.74% 5 Extensively drug-resistant -193 -3.86% +213 +4.26% 5000 100.00% diff --git a/docs/articles/PCA.html b/docs/articles/PCA.html index 169dc5f3..4e5521cc 100644 --- a/docs/articles/PCA.html +++ b/docs/articles/PCA.html @@ -39,7 +39,7 @@ AMR (for R) - 1.2.0.9038 + 1.3.0 @@ -186,7 +186,7 @@

How to conduct principal component analysis (PCA) for AMR

Matthijs S. Berends

-

29 July 2020

+

30 July 2020

Source: vignettes/PCA.Rmd diff --git a/docs/articles/SPSS.html b/docs/articles/SPSS.html index 933a8c2f..fed8f110 100644 --- a/docs/articles/SPSS.html +++ b/docs/articles/SPSS.html @@ -39,7 +39,7 @@ AMR (for R) - 1.2.0.9037 + 1.3.0 @@ -186,7 +186,7 @@

How to import data from SPSS / SAS / Stata

Matthijs S. Berends

-

24 July 2020

+

30 July 2020

Source: vignettes/SPSS.Rmd diff --git a/docs/articles/WHONET.html b/docs/articles/WHONET.html index eda5c4a8..d5e1eccc 100644 --- a/docs/articles/WHONET.html +++ b/docs/articles/WHONET.html @@ -39,7 +39,7 @@ AMR (for R) - 1.2.0.9037 + 1.3.0 @@ -186,7 +186,7 @@

How to work with WHONET data

Matthijs S. Berends

-

24 July 2020

+

30 July 2020

Source: vignettes/WHONET.Rmd diff --git a/docs/articles/benchmarks.html b/docs/articles/benchmarks.html index 663d96c5..05445cfe 100644 --- a/docs/articles/benchmarks.html +++ b/docs/articles/benchmarks.html @@ -39,7 +39,7 @@ AMR (for R) - 1.2.0.9037 + 1.3.0 @@ -186,7 +186,7 @@

Benchmarks

Matthijs S. Berends

-

24 July 2020

+

30 July 2020

Source: vignettes/benchmarks.Rmd @@ -222,20 +222,20 @@ print(S.aureus, unit = "ms", signif = 2) # Unit: milliseconds # expr min lq mean median uq max neval -# as.mo("sau") 11 13 16 14 15 38 10 -# as.mo("stau") 170 170 180 180 190 200 10 -# as.mo("STAU") 160 170 190 190 200 210 10 -# as.mo("staaur") 12 13 15 14 15 20 10 -# as.mo("STAAUR") 13 14 17 15 15 38 10 -# as.mo("S. aureus") 13 14 23 17 36 42 10 -# as.mo("S aureus") 14 15 31 25 43 82 10 -# as.mo("Staphylococcus aureus") 11 11 17 12 14 42 10 -# as.mo("Staphylococcus aureus (MRSA)") 920 940 960 950 970 1100 10 -# as.mo("Sthafilokkockus aaureuz") 420 440 460 460 460 500 10 -# as.mo("MRSA") 13 14 20 14 16 43 10 -# as.mo("VISA") 15 15 28 27 40 42 10 -# as.mo("VRSA") 13 15 18 15 17 45 10 -# as.mo(22242419) 130 140 150 150 170 180 10 +# as.mo("sau") 11 12 17 13 15 51 10 +# as.mo("stau") 150 160 170 170 190 200 10 +# as.mo("STAU") 160 160 180 190 190 210 10 +# as.mo("staaur") 12 13 23 15 20 68 10 +# as.mo("STAAUR") 11 12 20 16 18 44 10 +# as.mo("S. aureus") 11 13 29 17 44 84 10 +# as.mo("S aureus") 11 15 21 16 18 46 10 +# as.mo("Staphylococcus aureus") 11 13 16 13 15 41 10 +# as.mo("Staphylococcus aureus (MRSA)") 870 890 920 900 950 1100 10 +# as.mo("Sthafilokkockus aaureuz") 400 410 430 440 450 490 10 +# as.mo("MRSA") 13 13 17 14 16 40 10 +# as.mo("VISA") 14 17 25 19 36 46 10 +# as.mo("VRSA") 13 15 21 17 21 50 10 +# as.mo(22242419) 130 140 150 150 150 180 10

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 100 milliseconds, this is only 10 input values per second.

To achieve this speed, the as.mo function also takes into account the prevalence of human pathogenic microorganisms. The downside of this is of course that less prevalent microorganisms will be determined less fast. See this example for the ID of Methanosarcina semesiae (B_MTHNSR_SEMS), a bug probably never found before in humans:

@@ -247,12 +247,12 @@ times = 10) print(M.semesiae, unit = "ms", signif = 4) # Unit: milliseconds -# expr min lq mean median uq max -# as.mo("metsem") 180.20 190.40 199.00 199.10 204.40 218.80 -# as.mo("METSEM") 190.00 191.50 203.30 193.70 221.00 236.30 -# as.mo("M. semesiae") 11.60 12.58 15.84 13.42 14.40 37.45 -# as.mo("M. semesiae") 12.14 12.59 19.44 14.19 14.78 43.90 -# as.mo("Methanosarcina semesiae") 10.65 10.78 16.81 12.13 14.08 37.01 +# expr min lq mean median uq max +# as.mo("metsem") 176.800 179.200 189.20 185.90 194.00 212.60 +# as.mo("METSEM") 164.400 170.800 193.00 188.20 211.10 243.00 +# as.mo("M. semesiae") 10.950 11.310 19.92 15.41 18.79 50.84 +# as.mo("M. semesiae") 11.560 11.860 17.66 14.15 16.96 50.76 +# as.mo("Methanosarcina semesiae") 9.408 9.669 18.03 14.12 15.24 42.57 # neval # 10 # 10 @@ -292,8 +292,8 @@ print(run_it, unit = "ms", signif = 3) # Unit: milliseconds # expr min lq mean median uq max neval -# mo_name(x) 1840 1850 1910 1900 1950 2020 10 -

So transforming 500,000 values (!!) of 50 unique values only takes 1.9 seconds. You only lose time on your unique input values.

+# mo_name(x) 1720 1760 1820 1800 1830 1990 10 +

So transforming 500,000 values (!!) of 50 unique values only takes 1.8 seconds. You only lose time on your unique input values.

@@ -306,9 +306,9 @@ print(run_it, unit = "ms", signif = 3) # Unit: milliseconds # expr min lq mean median uq max neval -# A 8.08 8.52 8.94 8.57 9.49 10.50 10 -# B 10.40 10.70 14.60 11.00 11.70 45.70 10 -# C 1.04 1.10 1.19 1.15 1.29 1.46 10

+# A 8.16 8.35 9.06 8.97 9.75 10.20 10 +# B 10.50 10.60 15.50 12.20 12.80 49.90 10 +# C 1.04 1.15 1.21 1.19 1.27 1.53 10

So going from mo_name("Staphylococcus aureus") to "Staphylococcus aureus" takes 0.0012 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"),
@@ -321,15 +321,15 @@
                          times = 10)
 print(run_it, unit = "ms", signif = 3)
 # Unit: milliseconds
-#  expr   min    lq  mean median   uq  max neval
-#     A 0.862 1.030 1.070  1.060 1.08 1.33    10
-#     B 0.837 1.020 1.010  1.030 1.05 1.13    10
-#     C 0.836 0.936 0.993  1.020 1.03 1.17    10
-#     D 0.838 0.947 1.030  1.050 1.10 1.31    10
-#     E 0.807 0.906 0.994  1.010 1.03 1.28    10
-#     F 0.804 0.920 1.060  1.040 1.11 1.54    10
-#     G 0.805 0.906 1.000  1.030 1.07 1.25    10
-#     H 0.792 0.805 0.949  0.941 1.04 1.29    10
+# expr min lq mean median uq max neval +# A 0.948 0.971 1.14 1.020 1.39 1.52 10 +# B 0.968 1.040 1.22 1.190 1.41 1.56 10 +# C 0.979 1.020 1.31 1.260 1.58 1.66 10 +# D 0.964 1.010 1.24 1.190 1.45 1.83 10 +# E 0.977 0.995 1.15 1.030 1.40 1.45 10 +# F 0.878 0.982 1.11 1.010 1.37 1.43 10 +# G 0.929 0.961 1.18 1.000 1.43 1.58 10 +# H 0.901 0.967 1.09 0.998 1.35 1.40 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 ‘knows’ all phyla of all known bacteria (according to the Catalogue of Life), it can just return the initial value immediately.

@@ -355,14 +355,14 @@ times = 100) print(run_it, unit = "ms", signif = 4) # Unit: milliseconds -# expr min lq mean median uq max neval -# en 12.09 12.45 16.18 12.63 13.57 48.69 100 -# de 13.01 13.51 16.67 13.82 15.26 48.22 100 -# nl 16.88 17.25 19.13 17.54 18.36 51.99 100 -# es 13.13 13.42 18.26 13.69 14.59 53.66 100 -# it 13.01 13.35 17.33 13.71 15.16 50.65 100 -# fr 13.13 13.40 16.31 13.64 13.88 49.44 100 -# pt 13.17 13.38 15.10 13.54 13.94 49.61 100
+# expr min lq mean median uq max neval +# en 12.09 12.46 15.90 13.86 14.55 57.62 100 +# de 12.92 13.26 19.73 14.63 16.01 61.55 100 +# nl 16.53 17.00 20.26 17.64 19.93 57.54 100 +# es 12.98 13.28 18.27 14.76 15.64 179.30 100 +# it 12.92 13.15 19.20 14.08 16.08 64.07 100 +# fr 12.99 13.21 17.81 13.59 15.71 67.97 100 +# pt 13.00 13.23 17.30 14.35 15.65 69.85 100

Currently supported 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 bcfa992f..5e394fd2 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/benchmarks_files/figure-html/unnamed-chunk-6-1.png b/docs/articles/benchmarks_files/figure-html/unnamed-chunk-6-1.png index 60942120..d2fab453 100644 Binary files a/docs/articles/benchmarks_files/figure-html/unnamed-chunk-6-1.png and b/docs/articles/benchmarks_files/figure-html/unnamed-chunk-6-1.png differ diff --git a/docs/articles/resistance_predict.html b/docs/articles/resistance_predict.html index 13eb883a..6f4926fa 100644 --- a/docs/articles/resistance_predict.html +++ b/docs/articles/resistance_predict.html @@ -39,7 +39,7 @@ AMR (for R) - 1.2.0.9037 + 1.3.0 @@ -186,7 +186,7 @@

How to predict antimicrobial resistance

Matthijs S. Berends

-

24 July 2020

+

30 July 2020

Source: vignettes/resistance_predict.Rmd diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 8e95ba84..5dbee0a9 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -10,7 +10,7 @@ articles: WHONET: WHONET.html benchmarks: benchmarks.html resistance_predict: resistance_predict.html -last_built: 2020-07-29T11:47Z +last_built: 2020-07-30T10:26Z 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 820f50ba..a528997b 100644 --- a/docs/reference/AMR-deprecated.html +++ b/docs/reference/AMR-deprecated.html @@ -82,7 +82,7 @@ AMR (for R) - 1.2.0.9038 + 1.3.0 diff --git a/docs/reference/AMR.html b/docs/reference/AMR.html index 10c75fb1..ccb72a77 100644 --- a/docs/reference/AMR.html +++ b/docs/reference/AMR.html @@ -82,7 +82,7 @@ AMR (for R) - 1.2.0.9038 + 1.3.0 diff --git a/docs/reference/WHOCC.html b/docs/reference/WHOCC.html index b94b7c7c..e71ffe6e 100644 --- a/docs/reference/WHOCC.html +++ b/docs/reference/WHOCC.html @@ -82,7 +82,7 @@ AMR (for R) - 1.2.0.9038 + 1.3.0 diff --git a/docs/reference/WHONET.html b/docs/reference/WHONET.html index 7a48f772..7f27d93b 100644 --- a/docs/reference/WHONET.html +++ b/docs/reference/WHONET.html @@ -82,7 +82,7 @@ AMR (for R) - 1.2.0.9038 + 1.3.0 diff --git a/docs/reference/ab_from_text.html b/docs/reference/ab_from_text.html index 71117013..c1dbf2c0 100644 --- a/docs/reference/ab_from_text.html +++ b/docs/reference/ab_from_text.html @@ -82,7 +82,7 @@ AMR (for R) - 1.2.0.9038 + 1.3.0 diff --git a/docs/reference/ab_property.html b/docs/reference/ab_property.html index 4b7a1085..3823387d 100644 --- a/docs/reference/ab_property.html +++ b/docs/reference/ab_property.html @@ -82,7 +82,7 @@ AMR (for R) - 1.2.0.9038 + 1.3.0 diff --git a/docs/reference/age.html b/docs/reference/age.html index f34e02e6..221f8146 100644 --- a/docs/reference/age.html +++ b/docs/reference/age.html @@ -82,7 +82,7 @@ AMR (for R) - 1.2.0.9038 + 1.3.0 diff --git a/docs/reference/age_groups.html b/docs/reference/age_groups.html index d857848a..5da40e86 100644 --- a/docs/reference/age_groups.html +++ b/docs/reference/age_groups.html @@ -82,7 +82,7 @@ AMR (for R) - 1.2.0.9038 + 1.3.0 diff --git a/docs/reference/antibiotic_class_selectors.html b/docs/reference/antibiotic_class_selectors.html index 2d5e7ac4..73ddbd40 100644 --- a/docs/reference/antibiotic_class_selectors.html +++ b/docs/reference/antibiotic_class_selectors.html @@ -82,7 +82,7 @@ AMR (for R) - 1.2.0.9037 + 1.3.0 diff --git a/docs/reference/antibiotics.html b/docs/reference/antibiotics.html index 25b0d10b..48bdec28 100644 --- a/docs/reference/antibiotics.html +++ b/docs/reference/antibiotics.html @@ -82,7 +82,7 @@ AMR (for R) - 1.2.0.9038 + 1.3.0 diff --git a/docs/reference/as.ab.html b/docs/reference/as.ab.html index f0236a82..6c07232e 100644 --- a/docs/reference/as.ab.html +++ b/docs/reference/as.ab.html @@ -82,7 +82,7 @@ AMR (for R) - 1.2.0.9038 + 1.3.0 diff --git a/docs/reference/as.disk.html b/docs/reference/as.disk.html index f30782bd..a632832d 100644 --- a/docs/reference/as.disk.html +++ b/docs/reference/as.disk.html @@ -82,7 +82,7 @@ AMR (for R) - 1.2.0.9038 + 1.3.0 diff --git a/docs/reference/as.mic.html b/docs/reference/as.mic.html index 0d86d749..387a1603 100644 --- a/docs/reference/as.mic.html +++ b/docs/reference/as.mic.html @@ -82,7 +82,7 @@ AMR (for R) - 1.2.0.9038 + 1.3.0 diff --git a/docs/reference/as.mo.html b/docs/reference/as.mo.html index afc9dc61..32774528 100644 --- a/docs/reference/as.mo.html +++ b/docs/reference/as.mo.html @@ -82,7 +82,7 @@ AMR (for R) - 1.2.0.9038 + 1.3.0 diff --git a/docs/reference/atc_online.html b/docs/reference/atc_online.html index 46d476aa..90c4476e 100644 --- a/docs/reference/atc_online.html +++ b/docs/reference/atc_online.html @@ -83,7 +83,7 @@ This function requires an internet connection." /> AMR (for R) - 1.2.0.9038 + 1.3.0 diff --git a/docs/reference/availability.html b/docs/reference/availability.html index 1edb45cd..0974f3f0 100644 --- a/docs/reference/availability.html +++ b/docs/reference/availability.html @@ -82,7 +82,7 @@ AMR (for R) - 1.2.0.9038 + 1.3.0 diff --git a/docs/reference/bug_drug_combinations.html b/docs/reference/bug_drug_combinations.html index 65a03901..51c757a7 100644 --- a/docs/reference/bug_drug_combinations.html +++ b/docs/reference/bug_drug_combinations.html @@ -82,7 +82,7 @@ AMR (for R) - 1.2.0.9038 + 1.3.0 diff --git a/docs/reference/catalogue_of_life.html b/docs/reference/catalogue_of_life.html index 42be0eb4..e9b31fd7 100644 --- a/docs/reference/catalogue_of_life.html +++ b/docs/reference/catalogue_of_life.html @@ -82,7 +82,7 @@ AMR (for R) - 1.2.0.9038 + 1.3.0 diff --git a/docs/reference/catalogue_of_life_version.html b/docs/reference/catalogue_of_life_version.html index 78c6f431..4c9c8cd1 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.2.0.9038 + 1.3.0 diff --git a/docs/reference/count.html b/docs/reference/count.html index f575df19..d247b241 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.2.0.9038 + 1.3.0 diff --git a/docs/reference/eucast_rules.html b/docs/reference/eucast_rules.html index 4b389ad0..74e0a2f0 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.2.0.9038 + 1.3.0 diff --git a/docs/reference/example_isolates.html b/docs/reference/example_isolates.html index 74166ca0..1f75b61a 100644 --- a/docs/reference/example_isolates.html +++ b/docs/reference/example_isolates.html @@ -82,7 +82,7 @@ AMR (for R) - 1.2.0.9038 + 1.3.0 diff --git a/docs/reference/example_isolates_unclean.html b/docs/reference/example_isolates_unclean.html index dff6c27b..48513854 100644 --- a/docs/reference/example_isolates_unclean.html +++ b/docs/reference/example_isolates_unclean.html @@ -82,7 +82,7 @@ AMR (for R) - 1.2.0.9038 + 1.3.0 diff --git a/docs/reference/filter_ab_class.html b/docs/reference/filter_ab_class.html index 3c37c95d..18c5fe1f 100644 --- a/docs/reference/filter_ab_class.html +++ b/docs/reference/filter_ab_class.html @@ -82,7 +82,7 @@ AMR (for R) - 1.2.0.9038 + 1.3.0 diff --git a/docs/reference/first_isolate.html b/docs/reference/first_isolate.html index ff977d06..8e29d34e 100644 --- a/docs/reference/first_isolate.html +++ b/docs/reference/first_isolate.html @@ -82,7 +82,7 @@ AMR (for R) - 1.2.0.9038 + 1.3.0 diff --git a/docs/reference/g.test.html b/docs/reference/g.test.html index 4561a5c7..d0656816 100644 --- a/docs/reference/g.test.html +++ b/docs/reference/g.test.html @@ -82,7 +82,7 @@ AMR (for R) - 1.2.0.9038 + 1.3.0 diff --git a/docs/reference/ggplot_pca.html b/docs/reference/ggplot_pca.html index 7147cb45..6281548c 100644 --- a/docs/reference/ggplot_pca.html +++ b/docs/reference/ggplot_pca.html @@ -82,7 +82,7 @@ AMR (for R) - 1.2.0.9038 + 1.3.0 diff --git a/docs/reference/ggplot_rsi.html b/docs/reference/ggplot_rsi.html index 98ed96cc..4a87b683 100644 --- a/docs/reference/ggplot_rsi.html +++ b/docs/reference/ggplot_rsi.html @@ -82,7 +82,7 @@ AMR (for R) - 1.2.0.9038 + 1.3.0 diff --git a/docs/reference/guess_ab_col.html b/docs/reference/guess_ab_col.html index 3344cef1..5e8949e8 100644 --- a/docs/reference/guess_ab_col.html +++ b/docs/reference/guess_ab_col.html @@ -82,7 +82,7 @@ AMR (for R) - 1.2.0.9038 + 1.3.0 diff --git a/docs/reference/join.html b/docs/reference/join.html index 7658d8cf..aeb28456 100644 --- a/docs/reference/join.html +++ b/docs/reference/join.html @@ -82,7 +82,7 @@ AMR (for R) - 1.2.0.9038 + 1.3.0 diff --git a/docs/reference/key_antibiotics.html b/docs/reference/key_antibiotics.html index ecb93527..419bd666 100644 --- a/docs/reference/key_antibiotics.html +++ b/docs/reference/key_antibiotics.html @@ -82,7 +82,7 @@ AMR (for R) - 1.2.0.9038 + 1.3.0 diff --git a/docs/reference/kurtosis.html b/docs/reference/kurtosis.html index 5f82f1e8..f78339e9 100644 --- a/docs/reference/kurtosis.html +++ b/docs/reference/kurtosis.html @@ -82,7 +82,7 @@ AMR (for R) - 1.2.0.9038 + 1.3.0 diff --git a/docs/reference/lifecycle.html b/docs/reference/lifecycle.html index 420ff8b9..9e48a75b 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.2.0.9037 + 1.3.0 diff --git a/docs/reference/like.html b/docs/reference/like.html index 0798d2d2..92ed65d0 100644 --- a/docs/reference/like.html +++ b/docs/reference/like.html @@ -82,7 +82,7 @@ AMR (for R) - 1.2.0.9038 + 1.3.0 diff --git a/docs/reference/mdro.html b/docs/reference/mdro.html index 993c317e..21b6e701 100644 --- a/docs/reference/mdro.html +++ b/docs/reference/mdro.html @@ -82,7 +82,7 @@ AMR (for R) - 1.2.0.9038 + 1.3.0 diff --git a/docs/reference/microorganisms.codes.html b/docs/reference/microorganisms.codes.html index f583f3db..47155030 100644 --- a/docs/reference/microorganisms.codes.html +++ b/docs/reference/microorganisms.codes.html @@ -82,7 +82,7 @@ AMR (for R) - 1.2.0.9038 + 1.3.0 diff --git a/docs/reference/microorganisms.html b/docs/reference/microorganisms.html index 85337f8a..4bb435e9 100644 --- a/docs/reference/microorganisms.html +++ b/docs/reference/microorganisms.html @@ -82,7 +82,7 @@ AMR (for R) - 1.2.0.9038 + 1.3.0 diff --git a/docs/reference/microorganisms.old.html b/docs/reference/microorganisms.old.html index bf55ead7..f657ce0e 100644 --- a/docs/reference/microorganisms.old.html +++ b/docs/reference/microorganisms.old.html @@ -82,7 +82,7 @@ AMR (for R) - 1.2.0.9038 + 1.3.0 diff --git a/docs/reference/mo_property.html b/docs/reference/mo_property.html index 010443cb..e71c1f42 100644 --- a/docs/reference/mo_property.html +++ b/docs/reference/mo_property.html @@ -82,7 +82,7 @@ AMR (for R) - 1.2.0.9038 + 1.3.0 diff --git a/docs/reference/mo_source.html b/docs/reference/mo_source.html index 09ca233e..75d49810 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.2.0.9038 + 1.3.0 diff --git a/docs/reference/p_symbol.html b/docs/reference/p_symbol.html index 0b71887c..c608db25 100644 --- a/docs/reference/p_symbol.html +++ b/docs/reference/p_symbol.html @@ -82,7 +82,7 @@ AMR (for R) - 1.2.0.9038 + 1.3.0 diff --git a/docs/reference/pca.html b/docs/reference/pca.html index 5efe7407..e276c82e 100644 --- a/docs/reference/pca.html +++ b/docs/reference/pca.html @@ -82,7 +82,7 @@ AMR (for R) - 1.2.0.9037 + 1.3.0 diff --git a/docs/reference/proportion.html b/docs/reference/proportion.html index 849f7d35..47cf409c 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.2.0.9038 + 1.3.0 diff --git a/docs/reference/resistance_predict.html b/docs/reference/resistance_predict.html index 06c77e5d..8528eb4a 100644 --- a/docs/reference/resistance_predict.html +++ b/docs/reference/resistance_predict.html @@ -82,7 +82,7 @@ AMR (for R) - 1.2.0.9038 + 1.3.0 diff --git a/docs/reference/skewness.html b/docs/reference/skewness.html index 783ba751..067d1097 100644 --- a/docs/reference/skewness.html +++ b/docs/reference/skewness.html @@ -83,7 +83,7 @@ When negative: the left tail is longer; the mass of the distribution is concentr AMR (for R) - 1.2.0.9038 + 1.3.0 diff --git a/docs/reference/translate.html b/docs/reference/translate.html index 92068050..336e299e 100644 --- a/docs/reference/translate.html +++ b/docs/reference/translate.html @@ -82,7 +82,7 @@ AMR (for R) - 1.2.0.9038 + 1.3.0