diff --git a/404.html b/404.html index 0619fb46..836d0148 100644 --- a/404.html +++ b/404.html @@ -36,7 +36,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -116,28 +116,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/LICENSE-text.html b/LICENSE-text.html index 507ceb2b..c7dcea8d 100644 --- a/LICENSE-text.html +++ b/LICENSE-text.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/articles/AMR.html b/articles/AMR.html index 8dfb0bf4..5f99f403 100644 --- a/articles/AMR.html +++ b/articles/AMR.html @@ -38,7 +38,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -118,28 +118,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R @@ -204,7 +204,7 @@ 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 2023. +generated on 26 May 2023. Introduction @@ -260,21 +260,21 @@ make the structure of your data generally look like this: -2023-05-24 +2023-05-26 abcd Escherichia coli S S -2023-05-24 +2023-05-26 abcd Escherichia coli S R -2023-05-24 +2023-05-26 efgh Escherichia coli R @@ -347,7 +347,7 @@ supports all kinds of input: #> [1] B_KLBSL_PNMN as.mo("KLPN") #> Class 'mo' -#> [1] B_BCLLS_THRN_KRST +#> [1] B_KLBSL_PNMN The first character in above codes denote their taxonomic kingdom, such as Bacteria (B), Fungi (F), and Protozoa (P). The AMR package also contain functions to directly @@ -388,37 +388,35 @@ taxonomic codes. Let’s check this: #> #> -------------------------------------------------------------------------------- #> "E. coli" -> Escherichia coli (B_ESCHR_COLI, 0.688) -#> Also matched: Enterobacter cowanii (0.600), Eubacterium combesii -#> (0.600), Eggerthia catenaformis (0.591), Eubacterium callanderi -#> (0.591), Enterocloster citroniae (0.587), Eubacterium cylindroides -#> (0.583), Enterococcus casseliflavus (0.577), Enterobacter cloacae -#> cloacae (0.571), Ehrlichia canis (0.567), and Enterobacter cloacae -#> dissolvens (0.565) +#> Also matched: Eubacterium alactolyticum (0.620), Erwinia herbicola +#> (0.618), Campylobacter coli (0.611), Enterobacter cowanii (0.600), +#> Eubacterium combesii (0.600), Enterococcus faecalis (0.595), Eggerthia +#> catenaformis (0.591), Enterocloster aldensis (0.591), Eubacterium +#> callanderi (0.591), and Rhodococcus corallinus (0.591) #> -------------------------------------------------------------------------------- #> "K. pneumoniae" -> Klebsiella pneumoniae (B_KLBSL_PNMN, 0.786) -#> Also matched: Klebsiella pneumoniae ozaenae (0.707), Klebsiella -#> pneumoniae pneumoniae (0.688), Klebsiella pneumoniae rhinoscleromatis -#> (0.658), Klebsiella pasteurii (0.500), Klebsiella planticola (0.500), -#> Kingella potus (0.400), Kosakonia pseudosacchari (0.361), Kaistella -#> palustris (0.333), Kocuria palustris (0.333), and Kocuria pelophila -#> (0.333) +#> Also matched: Nocardia pneumoniae (0.763), Chlamydia pneumoniae +#> (0.750), Mycoplasma pneumoniae (0.738), Klebsiella quasipneumoniae +#> (0.731), Chlamydophila pneumoniae (0.708), Streptococcus pneumoniae +#> (0.708), Klebsiella pneumoniae ozaenae (0.707), Mycoplasmoides +#> pneumoniae (0.700), Klebsiella pneumoniae pneumoniae (0.688), and +#> Haemophilus pleuropneumoniae (0.679) #> -------------------------------------------------------------------------------- #> "S. aureus" -> Staphylococcus aureus (B_STPHY_AURS, 0.690) #> Also matched: Staphylococcus aureus aureus (0.643), Staphylococcus #> argenteus (0.625), Staphylococcus aureus anaerobius (0.625), -#> Streptomyces argenteolus (0.483), Streptomyces aureus (0.474), -#> Streptomyces azureus (0.467), Streptomyces aureorectus (0.444), -#> Streptomyces auratus (0.433), Streptomyces aurantiogriseus (0.429), and -#> Streptomyces aureocirculatus (0.429) +#> Staphylococcus capitis urealyticus (0.618), Staphylococcus capitis +#> ureolyticus (0.618), Staphylococcus intermedius (0.615), Salmonella +#> choleraesuis choleraesuis (0.611), Staphylococcus sciuri lentus +#> (0.607), Salmonella Reubeuss (0.605), and Schaalia turicensis (0.605) #> -------------------------------------------------------------------------------- -#> "S. pneumoniae" -> Streptococcus pneumoniae (B_STRPT_PNMN, 0.750) -#> Also matched: Streptococcus pseudopneumoniae (0.700), Serratia -#> proteamaculans quinovora (0.545), Streptococcus pseudoporcinus (0.536), -#> Staphylococcus pseudintermedius (0.532), Serratia proteamaculans -#> proteamaculans (0.526), Salmonella Portanigra (0.524), Sphingomonas -#> paucimobilis (0.520), Streptococcus pluranimalium (0.519), -#> Streptococcus constellatus pharyngis (0.514), and Salmonella Pakistan -#> (0.500) +#> "S. pneumoniae" -> Nocardia pneumoniae (B_NOCRD_PNMN, 0.763) +#> Also matched: Chlamydia pneumoniae (0.750), Streptococcus pneumoniae +#> (0.750), Klebsiella pneumoniae (0.738), Mycoplasma pneumoniae (0.738), +#> Chlamydophila pneumoniae (0.708), Mycoplasmoides pneumoniae (0.700), +#> Streptococcus pseudopneumoniae (0.700), Haemophilus pleuropneumoniae +#> (0.679), Klebsiella pneumoniae ozaenae (0.672), and Actinobacillus +#> pleuropneumoniae (0.661) #> #> Only the first 10 other matches of each record are shown. Run #> print(mo_uncertainties(), n = ...) to view more entries, or save @@ -515,8 +513,8 @@ the methods on the first_isolate #> ℹ Using column 'patient_id' as input for col_patient_id. #> ℹ Basing inclusion on all antimicrobial results, using a points threshold #> of 2 -#> => Found 2,626 'phenotype-based' first isolates (87.6% within scope and -#> 87.5% of total where a microbial ID was available) +#> => Found 2,637 'phenotype-based' first isolates (87.9% of total where a +#> microbial ID was available) So only 88% is suitable for resistance analysis! We can now filter on it with the filter() function, also from the dplyr package: @@ -527,11 +525,11 @@ it with the our_data_1st <- our_data %>% filter_first_isolate() -So we end up with 2 626 isolates for analysis. Now our data looks +So we end up with 2 637 isolates for analysis. Now our data looks like: our_data_1st -#> # A tibble: 2,626 × 9 +#> # A tibble: 2,637 × 9 #> patient_id hospital date bacteria AMX AMC CIP GEN first #> <chr> <chr> <date> <mo> <sir> <sir> <sir> <sir> <lgl> #> 1 J3 A 2012-11-21 B_ESCHR_COLI R I S S TRUE @@ -544,7 +542,7 @@ like: #> 8 J3 A 2019-06-19 B_ESCHR_COLI S S S S TRUE #> 9 G6 A 2015-04-27 B_STPHY_AURS S S S S TRUE #> 10 P4 A 2011-06-21 B_ESCHR_COLI S S S S TRUE -#> # ℹ 2,616 more rows +#> # ℹ 2,627 more rows Time for the analysis. @@ -557,29 +555,29 @@ impression, as it comes with support for the new mo and summary(our_data_1st) #> patient_id hospital date -#> Length:2626 Length:2626 Min. :2011-01-01 -#> Class :character Class :character 1st Qu.:2013-04-14 -#> Mode :character Mode :character Median :2015-06-05 -#> Mean :2015-06-15 +#> Length:2637 Length:2637 Min. :2011-01-01 +#> Class :character Class :character 1st Qu.:2013-04-13 +#> Mode :character Mode :character Median :2015-06-04 +#> Mean :2015-06-14 #> 3rd Qu.:2017-08-23 #> Max. :2020-01-01 #> bacteria AMX AMC #> Class :mo Class:sir Class:sir -#> <NA> :0 %R :43.2% (n=1134) %R :36.1% (n=947) -#> Unique:4 %SI :56.8% (n=1492) %SI :63.9% (n=1679) -#> #1 :B_ESCHR_COLI - %S :41.1% (n=1080) - %S :52.7% (n=1383) -#> #2 :B_STPHY_AURS - %I :15.7% (n=412) - %I :11.3% (n=296) -#> #3 :B_STRPT_PNMN +#> <NA> :0 %R :43.2% (n=1140) %R :35.9% (n=948) +#> Unique:5 %SI :56.8% (n=1497) %SI :64.1% (n=1689) +#> #1 :B_ESCHR_COLI - %S :41.1% (n=1085) - %S :52.7% (n=1391) +#> #2 :B_STPHY_AURS - %I :15.6% (n=412) - %I :11.3% (n=298) +#> #3 :B_KLBSL_PNMN #> CIP GEN first #> Class:sir Class:sir Mode:logical -#> %R :42.0% (n=1102) %R :37.0% (n=971) TRUE:2626 -#> %SI :58.0% (n=1524) %SI :63.0% (n=1655) -#> - %S :51.9% (n=1362) - %S :59.9% (n=1574) -#> - %I : 6.2% (n=162) - %I : 3.1% (n=81) +#> %R :41.9% (n=1105) %R :36.9% (n=972) TRUE:2637 +#> %SI :58.1% (n=1532) %SI :63.1% (n=1665) +#> - %S :52.0% (n=1370) - %S :60.1% (n=1584) +#> - %I : 6.1% (n=162) - %I : 3.1% (n=81) #> glimpse(our_data_1st) -#> Rows: 2,626 +#> Rows: 2,637 #> Columns: 9 #> $ patient_id <chr> "J3", "R7", "P10", "B7", "W3", "J8", "M3", "J3", "G6", "P4"… #> $ hospital <chr> "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A",… @@ -594,7 +592,7 @@ impression, as it comes with support for the new mo and # number of unique values per column: sapply(our_data_1st, n_distinct) #> patient_id hospital date bacteria AMX AMC CIP -#> 260 3 1808 4 3 3 3 +#> 260 3 1814 5 3 3 3 #> GEN first #> 3 1 @@ -606,23 +604,25 @@ microorganisms: our_data %>% count(mo_name(bacteria), sort = TRUE) -#> # A tibble: 4 × 2 +#> # A tibble: 5 × 2 #> `mo_name(bacteria)` n #> <chr> <int> #> 1 Escherichia coli 1518 #> 2 Staphylococcus aureus 730 -#> 3 Streptococcus pneumoniae 426 -#> 4 Klebsiella pneumoniae 326 +#> 3 Klebsiella pneumoniae 326 +#> 4 Streptococcus pneumoniae 275 +#> 5 Nocardia pneumoniae 151 our_data_1st %>% count(mo_name(bacteria), sort = TRUE) -#> # A tibble: 4 × 2 +#> # A tibble: 5 × 2 #> `mo_name(bacteria)` n #> <chr> <int> #> 1 Escherichia coli 1250 #> 2 Staphylococcus aureus 661 -#> 3 Streptococcus pneumoniae 399 -#> 4 Klebsiella pneumoniae 316 +#> 3 Klebsiella pneumoniae 316 +#> 4 Streptococcus pneumoniae 267 +#> 5 Nocardia pneumoniae 143 Select and filter with antibiotic selectors @@ -634,7 +634,7 @@ in: our_data_1st %>% select(date, aminoglycosides()) #> ℹ For aminoglycosides() using column 'GEN' (gentamicin) -#> # A tibble: 2,626 × 2 +#> # A tibble: 2,637 × 2 #> date GEN #> <date> <sir> #> 1 2012-11-21 S @@ -647,13 +647,13 @@ in: #> 8 2019-06-19 S #> 9 2015-04-27 S #> 10 2011-06-21 S -#> # ℹ 2,616 more rows +#> # ℹ 2,627 more rows our_data_1st %>% select(bacteria, betalactams()) #> ℹ For betalactams() using columns 'AMX' (amoxicillin) and 'AMC' #> (amoxicillin/clavulanic acid) -#> # A tibble: 2,626 × 3 +#> # A tibble: 2,637 × 3 #> bacteria AMX AMC #> <mo> <sir> <sir> #> 1 B_ESCHR_COLI R I @@ -666,11 +666,11 @@ in: #> 8 B_ESCHR_COLI S S #> 9 B_STPHY_AURS S S #> 10 B_ESCHR_COLI S S -#> # ℹ 2,616 more rows +#> # ℹ 2,627 more rows our_data_1st %>% select(bacteria, where(is.sir)) -#> # A tibble: 2,626 × 5 +#> # A tibble: 2,637 × 5 #> bacteria AMX AMC CIP GEN #> <mo> <sir> <sir> <sir> <sir> #> 1 B_ESCHR_COLI R I S S @@ -683,26 +683,26 @@ in: #> 8 B_ESCHR_COLI S S S S #> 9 B_STPHY_AURS S S S S #> 10 B_ESCHR_COLI S S S S -#> # ℹ 2,616 more rows +#> # ℹ 2,627 more rows # filtering using AB selectors is also possible: our_data_1st %>% filter(any(aminoglycosides() == "R")) #> ℹ For aminoglycosides() using column 'GEN' (gentamicin) -#> # A tibble: 971 × 9 +#> # A tibble: 972 × 9 #> patient_id hospital date bacteria AMX AMC CIP GEN first #> <chr> <chr> <date> <mo> <sir> <sir> <sir> <sir> <lgl> -#> 1 J5 A 2017-12-25 B_STRPT_PNMN R S S R TRUE +#> 1 J5 A 2017-12-25 B_NOCRD_PNMN R S S R TRUE #> 2 X1 A 2017-07-04 B_STPHY_AURS R S S R TRUE #> 3 B3 A 2016-07-24 B_ESCHR_COLI S S S R TRUE #> 4 V7 A 2012-04-03 B_ESCHR_COLI S S S R TRUE #> 5 C9 A 2017-03-23 B_ESCHR_COLI S S S R TRUE #> 6 R1 A 2018-06-10 B_STPHY_AURS S S S R TRUE -#> 7 S2 A 2013-07-19 B_STRPT_PNMN S S S R TRUE +#> 7 S2 A 2013-07-19 B_NOCRD_PNMN S S S R TRUE #> 8 P5 A 2019-03-09 B_STPHY_AURS S S S R TRUE #> 9 Q8 A 2019-08-10 B_STPHY_AURS S S S R TRUE -#> 10 K5 A 2013-03-15 B_STRPT_PNMN S S S R TRUE -#> # ℹ 961 more rows +#> 10 K5 A 2013-03-15 B_NOCRD_PNMN S S S R TRUE +#> # ℹ 962 more rows our_data_1st %>% filter(all(betalactams() == "R")) @@ -711,12 +711,12 @@ in: #> # A tibble: 471 × 9 #> patient_id hospital date bacteria AMX AMC CIP GEN first #> <chr> <chr> <date> <mo> <sir> <sir> <sir> <sir> <lgl> -#> 1 M7 A 2013-07-22 B_STRPT_PNMN R R S S TRUE +#> 1 M7 A 2013-07-22 B_NOCRD_PNMN R R S S TRUE #> 2 R10 A 2013-12-20 B_STPHY_AURS R R S S TRUE #> 3 R7 A 2015-10-25 B_STPHY_AURS R R S S TRUE #> 4 R8 A 2019-10-25 B_STPHY_AURS R R S S TRUE #> 5 I7 A 2015-08-19 B_ESCHR_COLI R R S S TRUE -#> 6 N3 A 2014-12-29 B_STRPT_PNMN R R R S TRUE +#> 6 N3 A 2014-12-29 B_NOCRD_PNMN R R R S TRUE #> 7 Q2 A 2019-09-22 B_ESCHR_COLI R R S S TRUE #> 8 X7 A 2011-03-20 B_ESCHR_COLI R R S R TRUE #> 9 C5 A 2015-08-30 B_KLBSL_PNMN R R S R TRUE @@ -730,12 +730,12 @@ in: #> # A tibble: 471 × 9 #> patient_id hospital date bacteria AMX AMC CIP GEN first #> <chr> <chr> <date> <mo> <sir> <sir> <sir> <sir> <lgl> -#> 1 M7 A 2013-07-22 B_STRPT_PNMN R R S S TRUE +#> 1 M7 A 2013-07-22 B_NOCRD_PNMN R R S S TRUE #> 2 R10 A 2013-12-20 B_STPHY_AURS R R S S TRUE #> 3 R7 A 2015-10-25 B_STPHY_AURS R R S S TRUE #> 4 R8 A 2019-10-25 B_STPHY_AURS R R S S TRUE #> 5 I7 A 2015-08-19 B_ESCHR_COLI R R S S TRUE -#> 6 N3 A 2014-12-29 B_STRPT_PNMN R R R S TRUE +#> 6 N3 A 2014-12-29 B_NOCRD_PNMN R R R S TRUE #> 7 Q2 A 2019-09-22 B_ESCHR_COLI R R S S TRUE #> 8 X7 A 2011-03-20 B_ESCHR_COLI R R S R TRUE #> 9 C5 A 2015-08-30 B_KLBSL_PNMN R R S R TRUE @@ -1352,7 +1352,7 @@ I (proportion_SI(), equa own: our_data_1st %>% resistance(AMX) -#> [1] 0.4318355 +#> [1] 0.4323094 Or can be used in conjunction with group_by() and summarise(), both from the dplyr package: @@ -1364,7 +1364,7 @@ own: #> <chr> <dbl> #> 1 A 0.343 #> 2 B 0.569 -#> 3 C 0.375 +#> 3 C 0.378 Author: Dr. Matthijs Berends, 26th Feb 2023 diff --git a/articles/EUCAST.html b/articles/EUCAST.html index fe083f46..64b39d9c 100644 --- a/articles/EUCAST.html +++ b/articles/EUCAST.html @@ -38,7 +38,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -118,28 +118,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/articles/MDR.html b/articles/MDR.html index c1dcacd8..3a432c5f 100644 --- a/articles/MDR.html +++ b/articles/MDR.html @@ -38,7 +38,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -118,28 +118,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R @@ -402,19 +402,19 @@ names or codes, this would have worked exactly the same way: head(my_TB_data) #> rifampicin isoniazid gatifloxacin ethambutol pyrazinamide moxifloxacin -#> 1 S I S S I R -#> 2 R S S I I I -#> 3 R S S S S S -#> 4 R I I S S R -#> 5 R R R R I I -#> 6 S R S I R R +#> 1 R R S S R R +#> 2 R I S I I R +#> 3 I S R S R S +#> 4 I S R R R R +#> 5 R I I R I R +#> 6 I S R R R R #> kanamycin #> 1 S -#> 2 S -#> 3 S -#> 4 I -#> 5 R -#> 6 I +#> 2 I +#> 3 I +#> 4 S +#> 5 I +#> 6 S We can now add the interpretation of MDR-TB to our data set. You can use: @@ -455,40 +455,40 @@ Unique: 5 1 Mono-resistant -3243 -64.86% -3243 -64.86% +3231 +64.62% +3231 +64.62% 2 Negative -971 -19.42% -4214 -84.28% +993 +19.86% +4224 +84.48% 3 Multi-drug-resistant -450 -9.00% -4664 -93.28% +415 +8.30% +4639 +92.78% 4 Poly-resistant -230 -4.60% -4894 -97.88% +264 +5.28% +4903 +98.06% 5 Extensively drug-resistant -106 -2.12% +97 +1.94% 5000 100.00% diff --git a/articles/PCA.html b/articles/PCA.html index 27fd84a0..a16f7f11 100644 --- a/articles/PCA.html +++ b/articles/PCA.html @@ -38,7 +38,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -118,28 +118,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/articles/WHONET.html b/articles/WHONET.html index 3bc4a0c4..19f153a7 100644 --- a/articles/WHONET.html +++ b/articles/WHONET.html @@ -38,7 +38,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -118,28 +118,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/articles/datasets.html b/articles/datasets.html index 03c79f8e..aadfb887 100644 --- a/articles/datasets.html +++ b/articles/datasets.html @@ -38,7 +38,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -118,28 +118,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R @@ -193,7 +193,7 @@ Data sets for download / own use - 24 May 2023 + 26 May 2023 Source: vignettes/datasets.Rmd datasets.Rmd @@ -272,9 +272,9 @@ and the Global Biodiversity Information Facility (GBIF): Parte, AC et al. (2020). List of Prokaryotic names with Standing in Nomenclature (LPSN) moves to the DSMZ. International Journal of Systematic and Evolutionary Microbiology, 70, -5607-5612; . Accessed from https://lpsn.dsmz.de on 11 December, 2022. +5607-5612; . Accessed from https://lpsn.dsmz.de on December 11th, 2022. GBIF Secretariat (2022). GBIF Backbone Taxonomy. Checklist dataset . -Accessed from https://www.gbif.org on 11 December, 2022. +Accessed from https://www.gbif.org on December 11th, 2022. Public Health Information Network Vocabulary Access and Distribution System (PHIN VADS). US Edition of SNOMED CT from 1 September 2020. Value Set Name ‘Microoganism’, OID 2.16.840.1.114222.4.11.1009 (v12). URL: https://phinvads.cdc.gov diff --git a/articles/index.html b/articles/index.html index 91e1ed17..f0bfbf23 100644 --- a/articles/index.html +++ b/articles/index.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/articles/other_pkg.html b/articles/other_pkg.html index ebd4a92b..1f155ea7 100644 --- a/articles/other_pkg.html +++ b/articles/other_pkg.html @@ -38,7 +38,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -118,28 +118,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/articles/resistance_predict.html b/articles/resistance_predict.html index de7f5b4c..d0298f6f 100644 --- a/articles/resistance_predict.html +++ b/articles/resistance_predict.html @@ -38,7 +38,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -118,28 +118,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/articles/welcome_to_AMR.html b/articles/welcome_to_AMR.html index cb15b4d3..afe0aae7 100644 --- a/articles/welcome_to_AMR.html +++ b/articles/welcome_to_AMR.html @@ -38,7 +38,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -118,28 +118,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/authors.html b/authors.html index cc9b1bf6..ec9061f2 100644 --- a/authors.html +++ b/authors.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/index.html b/index.html index 18b6f2a3..1a3087a0 100644 --- a/index.html +++ b/index.html @@ -42,7 +42,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -122,28 +122,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/news/index.html b/news/index.html index d6fe7e90..e3c75bd0 100644 --- a/news/index.html +++ b/news/index.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R @@ -159,12 +159,12 @@ -AMR 2.0.0.9019 +AMR 2.0.0.9020 -Changed -Added oxygen tolerance to over 25,000 bacteria in the microorganisms data set +Changed +Added oxygen tolerance from BacDive to over 25,000 bacteria in the microorganisms data set Added mo_oxygen_tolerance() to retrieve the values -Added mo_is_anaerobic() to determine which species are obligate anaerobic bacteria +Added mo_is_anaerobic() to determine which genera/species are obligate anaerobic bacteria Added LPSN and GBIF identifiers, and oxygen tolerance to mo_info() @@ -180,6 +180,8 @@ Fixed usage of icu_exclude in first_isolates() Improved as.mo() algorithm for searching on only species names +Updated the code table in microorganisms.codes + diff --git a/pkgdown.yml b/pkgdown.yml index 7849dd32..68f1d911 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -11,7 +11,7 @@ articles: other_pkg: other_pkg.html resistance_predict: resistance_predict.html welcome_to_AMR: welcome_to_AMR.html -last_built: 2023-05-24T14:00Z +last_built: 2023-05-26T14:13Z urls: reference: https://msberends.github.io/AMR/reference article: https://msberends.github.io/AMR/articles diff --git a/reference/AMR-deprecated.html b/reference/AMR-deprecated.html index d912639f..3871618e 100644 --- a/reference/AMR-deprecated.html +++ b/reference/AMR-deprecated.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/AMR-options.html b/reference/AMR-options.html index ee5ebdd8..da5a4ab4 100644 --- a/reference/AMR-options.html +++ b/reference/AMR-options.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/AMR.html b/reference/AMR.html index e46de0fb..8b26a571 100644 --- a/reference/AMR.html +++ b/reference/AMR.html @@ -24,7 +24,7 @@ The AMR package is available in English, Chinese, Czech, Danish, Dutch, Finnish, AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -103,28 +103,28 @@ The AMR package is available in English, Chinese, Czech, Danish, Dutch, Finnish, - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/Rplot005.png b/reference/Rplot005.png index 33c99f62..ba13339d 100644 Binary files a/reference/Rplot005.png and b/reference/Rplot005.png differ diff --git a/reference/Rplot006.png b/reference/Rplot006.png index dc8fe36f..93bd60c2 100644 Binary files a/reference/Rplot006.png and b/reference/Rplot006.png differ diff --git a/reference/Rplot007.png b/reference/Rplot007.png index 058ed7b7..dabf61e7 100644 Binary files a/reference/Rplot007.png and b/reference/Rplot007.png differ diff --git a/reference/Rplot008.png b/reference/Rplot008.png index 513287b3..91e17e9f 100644 Binary files a/reference/Rplot008.png and b/reference/Rplot008.png differ diff --git a/reference/Rplot009.png b/reference/Rplot009.png index d66a610a..2765cd1e 100644 Binary files a/reference/Rplot009.png and b/reference/Rplot009.png differ diff --git a/reference/WHOCC.html b/reference/WHOCC.html index 155b0305..c9da3cdb 100644 --- a/reference/WHOCC.html +++ b/reference/WHOCC.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/WHONET.html b/reference/WHONET.html index 899f5eed..f53de93c 100644 --- a/reference/WHONET.html +++ b/reference/WHONET.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/ab_from_text.html b/reference/ab_from_text.html index d5c79ab6..2a81592c 100644 --- a/reference/ab_from_text.html +++ b/reference/ab_from_text.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/ab_property.html b/reference/ab_property.html index 72a59b1c..3e855887 100644 --- a/reference/ab_property.html +++ b/reference/ab_property.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/add_custom_antimicrobials.html b/reference/add_custom_antimicrobials.html index c30c50e8..4674770c 100644 --- a/reference/add_custom_antimicrobials.html +++ b/reference/add_custom_antimicrobials.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/add_custom_microorganisms.html b/reference/add_custom_microorganisms.html index 6dd45426..81d29f2c 100644 --- a/reference/add_custom_microorganisms.html +++ b/reference/add_custom_microorganisms.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R @@ -206,7 +206,7 @@ # a combination of species is not formal taxonomy, so # this will result in only "Enterobacter asburiae": mo_name("Enterobacter asburiae/cloacae") -#> [1] "Enterobacter asburiae" +#> [1] "Enterobacter cloacae cloacae" # now add a custom entry - it will be considered by as.mo() and # all mo_*() functions diff --git a/reference/age.html b/reference/age.html index 82cf85e0..a7bdfcb2 100644 --- a/reference/age.html +++ b/reference/age.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R @@ -222,16 +222,16 @@ df #> birth_date age age_exact age_at_y2k -#> 1 1943-12-07 79 79.46027 56 -#> 2 1973-04-06 50 50.13151 26 -#> 3 1998-12-22 24 24.41918 1 -#> 4 1938-09-05 84 84.71507 61 -#> 5 1994-09-17 28 28.68219 5 -#> 6 1938-01-09 85 85.36986 61 -#> 7 1993-08-21 29 29.75616 6 -#> 8 1937-05-15 86 86.02466 62 -#> 9 1981-07-29 41 41.81918 18 -#> 10 1947-06-12 75 75.94795 52 +#> 1 1951-05-01 72 72.06849 48 +#> 2 1987-07-08 35 35.88219 12 +#> 3 1981-03-24 42 42.17260 18 +#> 4 1955-01-22 68 68.33973 44 +#> 5 1971-12-06 51 51.46849 28 +#> 6 1935-05-02 88 88.06575 64 +#> 7 1934-03-23 89 89.17534 65 +#> 8 1984-02-27 39 39.24110 15 +#> 9 1936-10-03 86 86.64384 63 +#> 10 1990-03-21 33 33.18082 9 - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/antibiogram.html b/reference/antibiogram.html index 7e24553c..568b5703 100644 --- a/reference/antibiogram.html +++ b/reference/antibiogram.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/antibiotic_class_selectors.html b/reference/antibiotic_class_selectors.html index 7cfc6e32..7a123af7 100644 --- a/reference/antibiotic_class_selectors.html +++ b/reference/antibiotic_class_selectors.html @@ -12,7 +12,7 @@ In short, if you have a column name that resembles an antimicrobial drug, it wil AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -91,28 +91,28 @@ In short, if you have a column name that resembles an antimicrobial drug, it wil - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R @@ -627,10 +627,10 @@ In short, if you have a column name that resembles an antimicrobial drug, it wil #> kefzol #> <sir> #> 1 S -#> 2 I -#> 3 S -#> 4 I -#> 5 I +#> 2 R +#> 3 R +#> 4 R +#> 5 R if (require("dplyr")) { # get AMR for all aminoglycosides e.g., per ward: diff --git a/reference/antibiotics.html b/reference/antibiotics.html index b7c789d0..ec87f54d 100644 --- a/reference/antibiotics.html +++ b/reference/antibiotics.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R @@ -214,7 +214,7 @@ Source World Health Organization (WHO) Collaborating Centre for Drug Statistics Methodology (WHOCC): https://www.whocc.no/atc_ddd_index/ -Logical Observation Identifiers Names and Codes (LOINC), Version 2.73 (8 August, 2022). Accessed from https://loinc.org on 30 October, 2022. +Logical Observation Identifiers Names and Codes (LOINC), Version 2.73 (8 August, 2022). Accessed from https://loinc.org on October 30th, 2022. European Commission Public Health PHARMACEUTICALS - COMMUNITY REGISTER: https://ec.europa.eu/health/documents/community-register/html/reg_hum_atc.htm diff --git a/reference/as.ab.html b/reference/as.ab.html index 45d115c2..f3dcef6f 100644 --- a/reference/as.ab.html +++ b/reference/as.ab.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/as.av.html b/reference/as.av.html index d5e5ce76..7974612d 100644 --- a/reference/as.av.html +++ b/reference/as.av.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/as.disk.html b/reference/as.disk.html index aa3301aa..14e1c91b 100644 --- a/reference/as.disk.html +++ b/reference/as.disk.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/as.mic.html b/reference/as.mic.html index 57f4de01..1f5ac84c 100644 --- a/reference/as.mic.html +++ b/reference/as.mic.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/as.mo.html b/reference/as.mo.html index 2f49f410..be36a268 100644 --- a/reference/as.mo.html +++ b/reference/as.mo.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R @@ -299,12 +299,13 @@ Lancefield RC (1933). A serological differentiation of human and other groups of hemolytic streptococci. J Exp Med. 57(4): 571-95; doi:10.1084/jem.57.4.571 Berends MS et al. (2022). Trends in Occurrence and Phenotypic Resistance of Coagulase-Negative Staphylococci (CoNS) Found in Human Blood in the Northern Netherlands between 2013 and 2019/ Micro.rganisms 10(9), 1801; doi:10.3390/microorganisms10091801 Parte, AC et al. (2020). List of Prokaryotic names with Standing in Nomenclature (LPSN) moves to the DSMZ. International Journal of Systematic and Evolutionary Microbiology, 70, 5607-5612; doi:10.1099/ijsem.0.004332 -. Accessed from https://lpsn.dsmz.de on 11 December, 2022. +. Accessed from https://lpsn.dsmz.de on December 11th, 2022. GBIF Secretariat (2022). GBIF Backbone Taxonomy. Checklist dataset doi:10.15468/39omei -. Accessed from https://www.gbif.org on 11 December, 2022. +. Accessed from https://www.gbif.org on December 11th, 2022. +Reimer, LC et al. (2022). BacDive in 2022: the knowledge base for standardized bacterial and archaeal data. Nucleic Acids Res., 50(D1):D741-D74; doi:10.1093/nar/gkab961 +. Accessed from https://bacdive.dsmz.de on May 12th, 2023. Public Health Information Network Vocabulary Access and Distribution System (PHIN VADS). US Edition of SNOMED CT from 1 September 2020. Value Set Name 'Microoganism', OID 2.16.840.1.114222.4.11.1009 (v12). URL: https://phinvads.cdc.gov Bartlett A et al. (2022). A comprehensive list of bacterial pathogens infecting humans Microbiology 168:001269; doi:10.1099/mic.0.001269 -Reimer et al. (2022). BacDive in 2022: the knowledge base for standardized bacterial and archaeal data. Nucleic Acids Res. 2022 Jan 7;50(D1):D741-D746; doi:10.1093/nar/gkab961 Matching Score for Microorganisms @@ -360,9 +361,9 @@ 115329001 # SNOMED CT code )) #> Class 'mo' -#> [1] B_STPHY_AURS B_ROTHI B_ACHRMB_MRPL B_STPHY_AURS B_STPHY_AURS -#> [6] B_STPHY_AURS B_STPHY_AURS B_STPHY_AURS B_STPHY_AURS B_STPHY_AURS -#> [11] B_STPHY_AURS B_STPHY_AURS +#> [1] B_STPHY_AURS B_STPHY_AURS B_STPHY_AURS B_STPHY_AURS B_STPHY_AURS +#> [6] B_STPHY_AURS B_STPHY_AURS B_STPHY_AURS B_STPHY_AURS B_STPHY_AURS +#> [11] B_STPHY_AURS B_STPHY_AURS # Dyslexia is no problem - these all work: as.mo(c( @@ -396,7 +397,7 @@ mo_genus("E. coli") #> [1] "Escherichia" mo_gramstain("ESCO") -#> [1] "Gram-positive" +#> [1] "Gram-negative" mo_is_intrinsic_resistant("ESCCOL", ab = "vanco") #> ℹ Determining intrinsic resistance based on 'EUCAST Expert Rules' and #> 'EUCAST Intrinsic Resistance and Unusual Phenotypes' v3.3 (2021). This note diff --git a/reference/as.sir.html b/reference/as.sir.html index 98d1fe57..68bf5fbc 100644 --- a/reference/as.sir.html +++ b/reference/as.sir.html @@ -12,7 +12,7 @@ All breakpoints used for interpretation are publicly available in the clinical_b AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -91,28 +91,28 @@ All breakpoints used for interpretation are publicly available in the clinical_b - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R @@ -551,16 +551,16 @@ A microorganism is categorised as "Resistant" when there is a high likelihood of #> # A tibble: 50 × 12 #> datetime index ab_input ab_guideline mo_input mo_guideline #> <dttm> <int> <chr> <ab> <chr> <mo> -#> 1 2023-05-24 14:00:50 1 TOB TOB Escherichia… B_[ORD]_ENTRBCTR -#> 2 2023-05-24 14:00:49 1 GEN GEN Escherichia… B_[ORD]_ENTRBCTR -#> 3 2023-05-24 14:00:49 1 CIP CIP Escherichia… B_[ORD]_ENTRBCTR -#> 4 2023-05-24 14:00:49 1 AMP AMP Escherichia… B_[ORD]_ENTRBCTR -#> 5 2023-05-24 14:00:43 1 CIP CIP B_ESCHR_COLI B_[ORD]_ENTRBCTR -#> 6 2023-05-24 14:00:43 2 CIP CIP B_ESCHR_COLI B_[ORD]_ENTRBCTR -#> 7 2023-05-24 14:00:43 3 CIP CIP B_ESCHR_COLI B_[ORD]_ENTRBCTR -#> 8 2023-05-24 14:00:43 4 CIP CIP B_ESCHR_COLI B_[ORD]_ENTRBCTR -#> 9 2023-05-24 14:00:43 5 CIP CIP B_ESCHR_COLI B_[ORD]_ENTRBCTR -#> 10 2023-05-24 14:00:43 6 CIP CIP B_ESCHR_COLI B_[ORD]_ENTRBCTR +#> 1 2023-05-26 14:15:02 1 TOB TOB Escherichia… B_[ORD]_ENTRBCTR +#> 2 2023-05-26 14:15:02 1 GEN GEN Escherichia… B_[ORD]_ENTRBCTR +#> 3 2023-05-26 14:15:01 1 CIP CIP Escherichia… B_[ORD]_ENTRBCTR +#> 4 2023-05-26 14:15:01 1 AMP AMP Escherichia… B_[ORD]_ENTRBCTR +#> 5 2023-05-26 14:14:52 1 CIP CIP B_ESCHR_COLI B_[ORD]_ENTRBCTR +#> 6 2023-05-26 14:14:52 2 CIP CIP B_ESCHR_COLI B_[ORD]_ENTRBCTR +#> 7 2023-05-26 14:14:52 3 CIP CIP B_ESCHR_COLI B_[ORD]_ENTRBCTR +#> 8 2023-05-26 14:14:52 4 CIP CIP B_ESCHR_COLI B_[ORD]_ENTRBCTR +#> 9 2023-05-26 14:14:52 5 CIP CIP B_ESCHR_COLI B_[ORD]_ENTRBCTR +#> 10 2023-05-26 14:14:52 6 CIP CIP B_ESCHR_COLI B_[ORD]_ENTRBCTR #> # ℹ 40 more rows #> # ℹ 6 more variables: guideline <chr>, ref_table <chr>, method <chr>, #> # input <dbl>, outcome <sir>, breakpoint_S_R <chr> @@ -575,10 +575,10 @@ A microorganism is categorised as "Resistant" when there is a high likelihood of #> => Interpreting MIC values of 'AMP' (ampicillin) according to EUCAST #> 2022... #> Note: -#> • Multiple breakpoints available for ampicillin (AMP) in Streptococcus -#> pneumoniae - assuming body site 'Non-meningitis'. +#> • (Some) PK/PD breakpoints were applied - use include_PKPD = FALSE to +#> prevent this #> Class 'sir' -#> [1] R +#> [1] S as.sir( x = as.disk(18), diff --git a/reference/atc_online.html b/reference/atc_online.html index 04e2c428..03d2e08d 100644 --- a/reference/atc_online.html +++ b/reference/atc_online.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/av_from_text.html b/reference/av_from_text.html index 4c8362ab..618b5f3f 100644 --- a/reference/av_from_text.html +++ b/reference/av_from_text.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/av_property.html b/reference/av_property.html index 239e5416..a3f86071 100644 --- a/reference/av_property.html +++ b/reference/av_property.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/availability.html b/reference/availability.html index 6a971778..e68ad555 100644 --- a/reference/availability.html +++ b/reference/availability.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/bug_drug_combinations.html b/reference/bug_drug_combinations.html index e4d27e09..3dee022d 100644 --- a/reference/bug_drug_combinations.html +++ b/reference/bug_drug_combinations.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/clinical_breakpoints.html b/reference/clinical_breakpoints.html index acbeb226..c7e200fd 100644 --- a/reference/clinical_breakpoints.html +++ b/reference/clinical_breakpoints.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/count.html b/reference/count.html index f8941fdd..56c8101c 100644 --- a/reference/count.html +++ b/reference/count.html @@ -12,7 +12,7 @@ count_resistant() should be used to count resistant isolates, count_susceptible( AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -91,28 +91,28 @@ count_resistant() should be used to count resistant isolates, count_susceptible( - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/custom_eucast_rules.html b/reference/custom_eucast_rules.html index d43fef4a..e03d6315 100644 --- a/reference/custom_eucast_rules.html +++ b/reference/custom_eucast_rules.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/dosage.html b/reference/dosage.html index 8038905a..d5a9f87c 100644 --- a/reference/dosage.html +++ b/reference/dosage.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/eucast_rules.html b/reference/eucast_rules.html index cde1d765..44c8ce49 100644 --- a/reference/eucast_rules.html +++ b/reference/eucast_rules.html @@ -12,7 +12,7 @@ To improve the interpretation of the antibiogram before EUCAST rules are applied AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -91,28 +91,28 @@ To improve the interpretation of the antibiogram before EUCAST rules are applied - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R @@ -261,7 +261,7 @@ Leclercq et al. EUCAST expert rules in antimicrobial susceptibility test Details Note: This function does not translate MIC values to SIR values. Use as.sir() for that. Note: When ampicillin (AMP, J01CA01) is not available but amoxicillin (AMX, J01CA04) is, the latter will be used for all rules where there is a dependency on ampicillin. These drugs are interchangeable when it comes to expression of antimicrobial resistance. -The file containing all EUCAST rules is located here: https://github.com/msberends/AMR/blob/main/data-raw/eucast_rules.tsv. Note: Old taxonomic names are replaced with the current taxonomy where applicable. For example, Ochrobactrum anthropi was renamed to Brucella anthropi in 2020; the original EUCAST rules v3.1 and v3.2 did not yet contain this new taxonomic name. The AMR package contains the full microbial taxonomy updated until 11 December, 2022, see microorganisms. +The file containing all EUCAST rules is located here: https://github.com/msberends/AMR/blob/main/data-raw/eucast_rules.tsv. Note: Old taxonomic names are replaced with the current taxonomy where applicable. For example, Ochrobactrum anthropi was renamed to Brucella anthropi in 2020; the original EUCAST rules v3.1 and v3.2 did not yet contain this new taxonomic name. The AMR package contains the full microbial taxonomy updated until December 11th, 2022, see microorganisms. Custom Rules diff --git a/reference/example_isolates.html b/reference/example_isolates.html index e2a28dd1..1222944d 100644 --- a/reference/example_isolates.html +++ b/reference/example_isolates.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/example_isolates_unclean.html b/reference/example_isolates_unclean.html index 8e95c012..358f255d 100644 --- a/reference/example_isolates_unclean.html +++ b/reference/example_isolates_unclean.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/first_isolate.html b/reference/first_isolate.html index d1853e30..f62bf004 100644 --- a/reference/first_isolate.html +++ b/reference/first_isolate.html @@ -12,7 +12,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -91,28 +91,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/g.test.html b/reference/g.test.html index eb34f3f8..9ad2ab36 100644 --- a/reference/g.test.html +++ b/reference/g.test.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/get_episode.html b/reference/get_episode.html index e15f1948..c4cee40b 100644 --- a/reference/get_episode.html +++ b/reference/get_episode.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R @@ -263,35 +263,33 @@ df <- example_isolates[sample(seq_len(2000), size = 100), ] get_episode(df$date, episode_days = 60) # indices -#> [1] 42 35 39 44 44 10 48 22 28 31 30 37 30 45 28 2 17 33 36 13 43 41 22 23 50 -#> [26] 17 23 22 46 15 44 24 37 48 9 14 9 32 12 19 31 11 35 18 51 2 47 7 27 20 -#> [51] 39 47 14 1 41 36 7 46 30 21 27 3 38 2 16 34 3 18 24 11 4 24 8 51 3 -#> [76] 29 28 50 33 24 24 19 25 8 6 17 9 51 48 26 10 12 5 40 16 22 49 30 23 11 +#> [1] 48 39 6 18 52 8 12 53 48 6 33 42 23 1 4 5 7 18 32 45 23 10 49 2 7 +#> [26] 1 33 20 31 22 3 43 24 13 38 41 11 38 30 9 46 39 2 10 48 12 25 6 46 40 +#> [51] 36 48 16 35 17 29 11 35 15 47 51 8 42 26 9 16 9 21 13 45 12 34 6 17 29 +#> [76] 19 22 50 44 28 9 44 18 27 24 50 16 37 5 49 52 31 7 2 4 40 51 14 46 52 is_new_episode(df$date, episode_days = 60) # TRUE/FALSE -#> [1] TRUE TRUE TRUE TRUE FALSE TRUE TRUE TRUE TRUE TRUE TRUE TRUE -#> [13] FALSE TRUE FALSE TRUE TRUE TRUE TRUE TRUE TRUE TRUE FALSE TRUE -#> [25] TRUE FALSE FALSE FALSE TRUE TRUE FALSE TRUE FALSE FALSE TRUE TRUE -#> [37] FALSE TRUE TRUE TRUE FALSE TRUE FALSE TRUE TRUE FALSE TRUE TRUE -#> [49] TRUE TRUE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE TRUE -#> [61] FALSE TRUE TRUE FALSE TRUE TRUE FALSE FALSE FALSE FALSE TRUE FALSE -#> [73] TRUE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE -#> [85] TRUE FALSE FALSE FALSE FALSE TRUE FALSE FALSE TRUE TRUE FALSE FALSE -#> [97] TRUE FALSE FALSE FALSE +#> [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE FALSE FALSE TRUE TRUE +#> [13] TRUE TRUE TRUE TRUE TRUE FALSE TRUE TRUE FALSE TRUE TRUE TRUE +#> [25] FALSE FALSE FALSE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE +#> [37] TRUE FALSE TRUE TRUE TRUE FALSE FALSE FALSE FALSE FALSE TRUE FALSE +#> [49] FALSE TRUE TRUE FALSE TRUE TRUE TRUE TRUE FALSE FALSE TRUE TRUE +#> [61] TRUE FALSE FALSE TRUE FALSE FALSE FALSE TRUE FALSE FALSE FALSE TRUE +#> [73] FALSE FALSE FALSE TRUE FALSE TRUE TRUE TRUE FALSE FALSE FALSE TRUE +#> [85] FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE +#> [97] FALSE TRUE FALSE FALSE # filter on results from the third 60-day episode only, using base R df[which(get_episode(df$date, 60) == 3), ] -#> # A tibble: 3 × 46 -#> date patient age gender ward mo PEN OXA FLC AMX -#> <date> <chr> <dbl> <chr> <chr> <mo> <sir> <sir> <sir> <sir> -#> 1 2002-07-23 F35553 51 M ICU B_STPHY_AURS R NA S R -#> 2 2002-08-28 390178 57 M Clinical B_STRPT_SLVR S NA NA S -#> 3 2002-08-31 149442 80 F ICU B_STPHY_AURS R NA S R -#> # ℹ 36 more variables: AMC <sir>, AMP <sir>, TZP <sir>, CZO <sir>, FEP <sir>, -#> # CXM <sir>, FOX <sir>, CTX <sir>, CAZ <sir>, CRO <sir>, GEN <sir>, -#> # TOB <sir>, AMK <sir>, KAN <sir>, TMP <sir>, SXT <sir>, NIT <sir>, -#> # FOS <sir>, LNZ <sir>, CIP <sir>, MFX <sir>, VAN <sir>, TEC <sir>, -#> # TCY <sir>, TGC <sir>, DOX <sir>, ERY <sir>, CLI <sir>, AZM <sir>, -#> # IPM <sir>, MEM <sir>, MTR <sir>, CHL <sir>, COL <sir>, MUP <sir>, RIF <sir> +#> # A tibble: 1 × 46 +#> date patient age gender ward mo PEN OXA FLC AMX AMC +#> <date> <chr> <dbl> <chr> <chr> <mo> <sir> <sir> <sir> <sir> <sir> +#> 1 2003-04-21 6BC362 62 M ICU B_ENTRC NA NA NA NA NA +#> # ℹ 35 more variables: AMP <sir>, TZP <sir>, CZO <sir>, FEP <sir>, CXM <sir>, +#> # FOX <sir>, CTX <sir>, CAZ <sir>, CRO <sir>, GEN <sir>, TOB <sir>, +#> # AMK <sir>, KAN <sir>, TMP <sir>, SXT <sir>, NIT <sir>, FOS <sir>, +#> # LNZ <sir>, CIP <sir>, MFX <sir>, VAN <sir>, TEC <sir>, TCY <sir>, +#> # TGC <sir>, DOX <sir>, ERY <sir>, CLI <sir>, AZM <sir>, IPM <sir>, +#> # MEM <sir>, MTR <sir>, CHL <sir>, COL <sir>, MUP <sir>, RIF <sir> # the functions also work for less than a day, e.g. to include one per hour: get_episode( @@ -319,19 +317,19 @@ arrange(patient, condition, date) } #> # A tibble: 100 × 4 -#> # Groups: patient, condition [96] +#> # Groups: patient, condition [100] #> patient date condition new_episode #> <chr> <date> <chr> <lgl> -#> 1 058917 2002-11-14 A TRUE -#> 2 074321 2015-09-20 C TRUE -#> 3 082413 2002-06-04 B TRUE -#> 4 0DBB93 2009-05-08 A TRUE -#> 5 0E2483 2007-05-29 B TRUE -#> 6 0F9638 2014-09-22 B TRUE -#> 7 149442 2002-08-31 C TRUE -#> 8 156730 2012-04-12 C TRUE -#> 9 173401 2011-06-06 C TRUE -#> 10 175532 2010-04-10 B TRUE +#> 1 000090 2003-10-08 C TRUE +#> 2 023456 2009-11-02 C TRUE +#> 3 05B00F 2004-05-11 B TRUE +#> 4 05C73F 2006-01-12 B TRUE +#> 5 066601 2013-10-30 C TRUE +#> 6 067927 2002-01-13 A TRUE +#> 7 067927 2002-01-07 C TRUE +#> 8 069276 2015-06-18 A TRUE +#> 9 078381 2014-06-28 B TRUE +#> 10 080086 2010-08-08 A TRUE #> # ℹ 90 more rows if (require("dplyr")) { @@ -345,19 +343,19 @@ arrange(patient, ward, date) } #> # A tibble: 100 × 5 -#> # Groups: ward, patient [94] +#> # Groups: ward, patient [97] #> ward date patient new_index new_logical #> <chr> <date> <chr> <int> <lgl> -#> 1 ICU 2002-11-14 058917 1 TRUE -#> 2 ICU 2015-09-20 074321 1 TRUE -#> 3 ICU 2002-06-04 082413 1 TRUE -#> 4 ICU 2009-05-08 0DBB93 1 TRUE -#> 5 Clinical 2007-05-29 0E2483 1 TRUE -#> 6 Clinical 2014-09-22 0F9638 1 TRUE -#> 7 ICU 2002-08-31 149442 1 TRUE -#> 8 Clinical 2012-04-12 156730 1 TRUE -#> 9 ICU 2011-06-06 173401 1 TRUE -#> 10 ICU 2010-04-10 175532 1 TRUE +#> 1 ICU 2003-10-08 000090 1 TRUE +#> 2 Clinical 2009-11-02 023456 1 TRUE +#> 3 ICU 2004-05-11 05B00F 1 TRUE +#> 4 Clinical 2006-01-12 05C73F 1 TRUE +#> 5 Clinical 2013-10-30 066601 1 TRUE +#> 6 ICU 2002-01-07 067927 1 TRUE +#> 7 ICU 2002-01-13 067927 1 FALSE +#> 8 Clinical 2015-06-18 069276 1 TRUE +#> 9 ICU 2014-06-28 078381 1 TRUE +#> 10 Clinical 2010-08-08 080086 1 TRUE #> # ℹ 90 more rows if (require("dplyr")) { @@ -373,9 +371,9 @@ #> # A tibble: 3 × 5 #> ward n_patients n_episodes_365 n_episodes_60 n_episodes_30 #> <chr> <int> <int> <int> <int> -#> 1 Clinical 54 13 39 43 -#> 2 ICU 33 11 26 31 -#> 3 Outpatient 7 4 5 6 +#> 1 Clinical 56 12 38 47 +#> 2 ICU 33 10 25 29 +#> 3 Outpatient 8 5 7 7 # grouping on patients and microorganisms leads to the same # results as first_isolate() when using 'episode-based': @@ -405,18 +403,18 @@ } #> # A tibble: 100 × 4 #> # Groups: patient, mo, ward [98] -#> patient mo ward flag_episode -#> <chr> <mo> <chr> <lgl> -#> 1 715822 B_STPHY_EPDR Clinical TRUE -#> 2 156730 B_STPHY_CONS Clinical TRUE -#> 3 992282 B_STRPT_GRPA Clinical TRUE -#> 4 C54153 B_STPHY_EPDR Clinical TRUE -#> 5 074321 B_STPHY_HMLY ICU TRUE -#> 6 E56935 B_ESCHR_COLI Clinical TRUE -#> 7 BF4515 B_STPHY_EPDR Clinical TRUE -#> 8 D08605 B_ESCHR_COLI Clinical TRUE -#> 9 EC9741 B_ESCHR_COLI Outpatient TRUE -#> 10 F54287 B_KLBSL_OXYT Clinical TRUE +#> patient mo ward flag_episode +#> <chr> <mo> <chr> <lgl> +#> 1 A79917 B_PSDMN_AERG Clinical TRUE +#> 2 600967 B_SERRT_MRCS ICU TRUE +#> 3 118928 B_STPHY_AURS Clinical TRUE +#> 4 650870 B_ENTRBC_CLOC ICU TRUE +#> 5 BF4515 B_ESCHR_COLI Clinical TRUE +#> 6 F35553 B_STPHY_AURS ICU TRUE +#> 7 6B8C75 B_STPHY_CONS Clinical TRUE +#> 8 F50400 B_STPHY_HMNS ICU TRUE +#> 9 784436 B_STPHY_HMNS ICU TRUE +#> 10 C36883 B_ESCHR_COLI Clinical TRUE #> # ℹ 90 more rows # } diff --git a/reference/ggplot_pca.html b/reference/ggplot_pca.html index d7f48e61..7b9aca35 100644 --- a/reference/ggplot_pca.html +++ b/reference/ggplot_pca.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/ggplot_sir.html b/reference/ggplot_sir.html index 812c403a..039300ec 100644 --- a/reference/ggplot_sir.html +++ b/reference/ggplot_sir.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/guess_ab_col.html b/reference/guess_ab_col.html index 641b2a40..3d497507 100644 --- a/reference/guess_ab_col.html +++ b/reference/guess_ab_col.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/index.html b/reference/index.html index 452997bc..c3788dd8 100644 --- a/reference/index.html +++ b/reference/index.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R @@ -413,7 +413,7 @@ microorganisms.codes - Data Set with 5 754 Common Microorganism Codes + Data Set with 4 909 Common Microorganism Codes antibiotics antivirals diff --git a/reference/intrinsic_resistant.html b/reference/intrinsic_resistant.html index 546a8549..a4fe0d64 100644 --- a/reference/intrinsic_resistant.html +++ b/reference/intrinsic_resistant.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/italicise_taxonomy.html b/reference/italicise_taxonomy.html index 0bc9b768..49e0cd3f 100644 --- a/reference/italicise_taxonomy.html +++ b/reference/italicise_taxonomy.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/join.html b/reference/join.html index e57db11c..7c3ca509 100644 --- a/reference/join.html +++ b/reference/join.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/key_antimicrobials.html b/reference/key_antimicrobials.html index cc7a4657..a1d95183 100644 --- a/reference/key_antimicrobials.html +++ b/reference/key_antimicrobials.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/kurtosis.html b/reference/kurtosis.html index b09b1546..a7629c4b 100644 --- a/reference/kurtosis.html +++ b/reference/kurtosis.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R @@ -199,9 +199,9 @@ Examples kurtosis(rnorm(10000)) -#> [1] 2.954493 +#> [1] 3.071168 kurtosis(rnorm(10000), excess = TRUE) -#> [1] 0.02115676 +#> [1] 0.02596136
The first character in above codes denote their taxonomic kingdom, such as Bacteria (B), Fungi (F), and Protozoa (P).
The AMR package also contain functions to directly @@ -388,37 +388,35 @@ taxonomic codes. Let’s check this:
AMR
first_isolate #> ℹ Using column 'patient_id' as input for col_patient_id. #> ℹ Basing inclusion on all antimicrobial results, using a points threshold #> of 2 -#> => Found 2,626 'phenotype-based' first isolates (87.6% within scope and -#> 87.5% of total where a microbial ID was available)
So only 88% is suitable for resistance analysis! We can now filter on it with the filter() function, also from the dplyr package:
filter()
dplyr
our_data_1st <- our_data %>% filter_first_isolate() -So we end up with 2 626 isolates for analysis. Now our data looks +So we end up with 2 637 isolates for analysis. Now our data looks like: our_data_1st -#> # A tibble: 2,626 × 9 +#> # A tibble: 2,637 × 9 #> patient_id hospital date bacteria AMX AMC CIP GEN first #> <chr> <chr> <date> <mo> <sir> <sir> <sir> <sir> <lgl> #> 1 J3 A 2012-11-21 B_ESCHR_COLI R I S S TRUE @@ -544,7 +542,7 @@ like: #> 8 J3 A 2019-06-19 B_ESCHR_COLI S S S S TRUE #> 9 G6 A 2015-04-27 B_STPHY_AURS S S S S TRUE #> 10 P4 A 2011-06-21 B_ESCHR_COLI S S S S TRUE -#> # ℹ 2,616 more rows +#> # ℹ 2,627 more rows
our_data_1st <- our_data %>% filter_first_isolate()
So we end up with 2 626 isolates for analysis. Now our data looks +
So we end up with 2 637 isolates for analysis. Now our data looks like:
our_data_1st -#> # A tibble: 2,626 × 9 +#> # A tibble: 2,637 × 9 #> patient_id hospital date bacteria AMX AMC CIP GEN first #> <chr> <chr> <date> <mo> <sir> <sir> <sir> <sir> <lgl> #> 1 J3 A 2012-11-21 B_ESCHR_COLI R I S S TRUE @@ -544,7 +542,7 @@ like: #> 8 J3 A 2019-06-19 B_ESCHR_COLI S S S S TRUE #> 9 G6 A 2015-04-27 B_STPHY_AURS S S S S TRUE #> 10 P4 A 2011-06-21 B_ESCHR_COLI S S S S TRUE -#> # ℹ 2,616 more rows
Time for the analysis.
mo
summary(our_data_1st) #> patient_id hospital date -#> Length:2626 Length:2626 Min. :2011-01-01 -#> Class :character Class :character 1st Qu.:2013-04-14 -#> Mode :character Mode :character Median :2015-06-05 -#> Mean :2015-06-15 +#> Length:2637 Length:2637 Min. :2011-01-01 +#> Class :character Class :character 1st Qu.:2013-04-13 +#> Mode :character Mode :character Median :2015-06-04 +#> Mean :2015-06-14 #> 3rd Qu.:2017-08-23 #> Max. :2020-01-01 #> bacteria AMX AMC #> Class :mo Class:sir Class:sir -#> <NA> :0 %R :43.2% (n=1134) %R :36.1% (n=947) -#> Unique:4 %SI :56.8% (n=1492) %SI :63.9% (n=1679) -#> #1 :B_ESCHR_COLI - %S :41.1% (n=1080) - %S :52.7% (n=1383) -#> #2 :B_STPHY_AURS - %I :15.7% (n=412) - %I :11.3% (n=296) -#> #3 :B_STRPT_PNMN +#> <NA> :0 %R :43.2% (n=1140) %R :35.9% (n=948) +#> Unique:5 %SI :56.8% (n=1497) %SI :64.1% (n=1689) +#> #1 :B_ESCHR_COLI - %S :41.1% (n=1085) - %S :52.7% (n=1391) +#> #2 :B_STPHY_AURS - %I :15.6% (n=412) - %I :11.3% (n=298) +#> #3 :B_KLBSL_PNMN #> CIP GEN first #> Class:sir Class:sir Mode:logical -#> %R :42.0% (n=1102) %R :37.0% (n=971) TRUE:2626 -#> %SI :58.0% (n=1524) %SI :63.0% (n=1655) -#> - %S :51.9% (n=1362) - %S :59.9% (n=1574) -#> - %I : 6.2% (n=162) - %I : 3.1% (n=81) +#> %R :41.9% (n=1105) %R :36.9% (n=972) TRUE:2637 +#> %SI :58.1% (n=1532) %SI :63.1% (n=1665) +#> - %S :52.0% (n=1370) - %S :60.1% (n=1584) +#> - %I : 6.1% (n=162) - %I : 3.1% (n=81) #> glimpse(our_data_1st) -#> Rows: 2,626 +#> Rows: 2,637 #> Columns: 9 #> $ patient_id <chr> "J3", "R7", "P10", "B7", "W3", "J8", "M3", "J3", "G6", "P4"… #> $ hospital <chr> "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A",… @@ -594,7 +592,7 @@ impression, as it comes with support for the new mo and # number of unique values per column: sapply(our_data_1st, n_distinct) #> patient_id hospital date bacteria AMX AMC CIP -#> 260 3 1808 4 3 3 3 +#> 260 3 1814 5 3 3 3 #> GEN first #> 3 1
our_data %>% count(mo_name(bacteria), sort = TRUE) -#> # A tibble: 4 × 2 +#> # A tibble: 5 × 2 #> `mo_name(bacteria)` n #> <chr> <int> #> 1 Escherichia coli 1518 #> 2 Staphylococcus aureus 730 -#> 3 Streptococcus pneumoniae 426 -#> 4 Klebsiella pneumoniae 326 +#> 3 Klebsiella pneumoniae 326 +#> 4 Streptococcus pneumoniae 275 +#> 5 Nocardia pneumoniae 151 our_data_1st %>% count(mo_name(bacteria), sort = TRUE) -#> # A tibble: 4 × 2 +#> # A tibble: 5 × 2 #> `mo_name(bacteria)` n #> <chr> <int> #> 1 Escherichia coli 1250 #> 2 Staphylococcus aureus 661 -#> 3 Streptococcus pneumoniae 399 -#> 4 Klebsiella pneumoniae 316
our_data_1st %>% select(date, aminoglycosides()) #> ℹ For aminoglycosides() using column 'GEN' (gentamicin) -#> # A tibble: 2,626 × 2 +#> # A tibble: 2,637 × 2 #> date GEN #> <date> <sir> #> 1 2012-11-21 S @@ -647,13 +647,13 @@ in: #> 8 2019-06-19 S #> 9 2015-04-27 S #> 10 2011-06-21 S -#> # ℹ 2,616 more rows +#> # ℹ 2,627 more rows our_data_1st %>% select(bacteria, betalactams()) #> ℹ For betalactams() using columns 'AMX' (amoxicillin) and 'AMC' #> (amoxicillin/clavulanic acid) -#> # A tibble: 2,626 × 3 +#> # A tibble: 2,637 × 3 #> bacteria AMX AMC #> <mo> <sir> <sir> #> 1 B_ESCHR_COLI R I @@ -666,11 +666,11 @@ in: #> 8 B_ESCHR_COLI S S #> 9 B_STPHY_AURS S S #> 10 B_ESCHR_COLI S S -#> # ℹ 2,616 more rows +#> # ℹ 2,627 more rows our_data_1st %>% select(bacteria, where(is.sir)) -#> # A tibble: 2,626 × 5 +#> # A tibble: 2,637 × 5 #> bacteria AMX AMC CIP GEN #> <mo> <sir> <sir> <sir> <sir> #> 1 B_ESCHR_COLI R I S S @@ -683,26 +683,26 @@ in: #> 8 B_ESCHR_COLI S S S S #> 9 B_STPHY_AURS S S S S #> 10 B_ESCHR_COLI S S S S -#> # ℹ 2,616 more rows +#> # ℹ 2,627 more rows # filtering using AB selectors is also possible: our_data_1st %>% filter(any(aminoglycosides() == "R")) #> ℹ For aminoglycosides() using column 'GEN' (gentamicin) -#> # A tibble: 971 × 9 +#> # A tibble: 972 × 9 #> patient_id hospital date bacteria AMX AMC CIP GEN first #> <chr> <chr> <date> <mo> <sir> <sir> <sir> <sir> <lgl> -#> 1 J5 A 2017-12-25 B_STRPT_PNMN R S S R TRUE +#> 1 J5 A 2017-12-25 B_NOCRD_PNMN R S S R TRUE #> 2 X1 A 2017-07-04 B_STPHY_AURS R S S R TRUE #> 3 B3 A 2016-07-24 B_ESCHR_COLI S S S R TRUE #> 4 V7 A 2012-04-03 B_ESCHR_COLI S S S R TRUE #> 5 C9 A 2017-03-23 B_ESCHR_COLI S S S R TRUE #> 6 R1 A 2018-06-10 B_STPHY_AURS S S S R TRUE -#> 7 S2 A 2013-07-19 B_STRPT_PNMN S S S R TRUE +#> 7 S2 A 2013-07-19 B_NOCRD_PNMN S S S R TRUE #> 8 P5 A 2019-03-09 B_STPHY_AURS S S S R TRUE #> 9 Q8 A 2019-08-10 B_STPHY_AURS S S S R TRUE -#> 10 K5 A 2013-03-15 B_STRPT_PNMN S S S R TRUE -#> # ℹ 961 more rows +#> 10 K5 A 2013-03-15 B_NOCRD_PNMN S S S R TRUE +#> # ℹ 962 more rows our_data_1st %>% filter(all(betalactams() == "R")) @@ -711,12 +711,12 @@ in: #> # A tibble: 471 × 9 #> patient_id hospital date bacteria AMX AMC CIP GEN first #> <chr> <chr> <date> <mo> <sir> <sir> <sir> <sir> <lgl> -#> 1 M7 A 2013-07-22 B_STRPT_PNMN R R S S TRUE +#> 1 M7 A 2013-07-22 B_NOCRD_PNMN R R S S TRUE #> 2 R10 A 2013-12-20 B_STPHY_AURS R R S S TRUE #> 3 R7 A 2015-10-25 B_STPHY_AURS R R S S TRUE #> 4 R8 A 2019-10-25 B_STPHY_AURS R R S S TRUE #> 5 I7 A 2015-08-19 B_ESCHR_COLI R R S S TRUE -#> 6 N3 A 2014-12-29 B_STRPT_PNMN R R R S TRUE +#> 6 N3 A 2014-12-29 B_NOCRD_PNMN R R R S TRUE #> 7 Q2 A 2019-09-22 B_ESCHR_COLI R R S S TRUE #> 8 X7 A 2011-03-20 B_ESCHR_COLI R R S R TRUE #> 9 C5 A 2015-08-30 B_KLBSL_PNMN R R S R TRUE @@ -730,12 +730,12 @@ in: #> # A tibble: 471 × 9 #> patient_id hospital date bacteria AMX AMC CIP GEN first #> <chr> <chr> <date> <mo> <sir> <sir> <sir> <sir> <lgl> -#> 1 M7 A 2013-07-22 B_STRPT_PNMN R R S S TRUE +#> 1 M7 A 2013-07-22 B_NOCRD_PNMN R R S S TRUE #> 2 R10 A 2013-12-20 B_STPHY_AURS R R S S TRUE #> 3 R7 A 2015-10-25 B_STPHY_AURS R R S S TRUE #> 4 R8 A 2019-10-25 B_STPHY_AURS R R S S TRUE #> 5 I7 A 2015-08-19 B_ESCHR_COLI R R S S TRUE -#> 6 N3 A 2014-12-29 B_STRPT_PNMN R R R S TRUE +#> 6 N3 A 2014-12-29 B_NOCRD_PNMN R R R S TRUE #> 7 Q2 A 2019-09-22 B_ESCHR_COLI R R S S TRUE #> 8 X7 A 2011-03-20 B_ESCHR_COLI R R S R TRUE #> 9 C5 A 2015-08-30 B_KLBSL_PNMN R R S R TRUE @@ -1352,7 +1352,7 @@ I (proportion_SI(), equa own: our_data_1st %>% resistance(AMX) -#> [1] 0.4318355 +#> [1] 0.4323094
proportion_SI()
our_data_1st %>% resistance(AMX) -#> [1] 0.4318355
Or can be used in conjunction with group_by() and summarise(), both from the dplyr package:
group_by()
summarise()
@@ -1364,7 +1364,7 @@ own: #> <chr> <dbl> #> 1 A 0.343 #> 2 B 0.569 -#> 3 C 0.375
Author: Dr. Matthijs Berends, 26th Feb 2023
head(my_TB_data) #> rifampicin isoniazid gatifloxacin ethambutol pyrazinamide moxifloxacin -#> 1 S I S S I R -#> 2 R S S I I I -#> 3 R S S S S S -#> 4 R I I S S R -#> 5 R R R R I I -#> 6 S R S I R R +#> 1 R R S S R R +#> 2 R I S I I R +#> 3 I S R S R S +#> 4 I S R R R R +#> 5 R I I R I R +#> 6 I S R R R R #> kanamycin #> 1 S -#> 2 S -#> 3 S -#> 4 I -#> 5 R -#> 6 I
We can now add the interpretation of MDR-TB to our data set. You can use:
@@ -455,40 +455,40 @@ Unique: 5 1 Mono-resistant -3243 -64.86% -3243 -64.86% +3231 +64.62% +3231 +64.62% 2 Negative -971 -19.42% -4214 -84.28% +993 +19.86% +4224 +84.48% 3 Multi-drug-resistant -450 -9.00% -4664 -93.28% +415 +8.30% +4639 +92.78% 4 Poly-resistant -230 -4.60% -4894 -97.88% +264 +5.28% +4903 +98.06% 5 Extensively drug-resistant -106 -2.12% +97 +1.94% 5000 100.00% diff --git a/articles/PCA.html b/articles/PCA.html index 27fd84a0..a16f7f11 100644 --- a/articles/PCA.html +++ b/articles/PCA.html @@ -38,7 +38,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -118,28 +118,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/articles/WHONET.html b/articles/WHONET.html index 3bc4a0c4..19f153a7 100644 --- a/articles/WHONET.html +++ b/articles/WHONET.html @@ -38,7 +38,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -118,28 +118,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/articles/datasets.html b/articles/datasets.html index 03c79f8e..aadfb887 100644 --- a/articles/datasets.html +++ b/articles/datasets.html @@ -38,7 +38,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -118,28 +118,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R @@ -193,7 +193,7 @@ Data sets for download / own use - 24 May 2023 + 26 May 2023 Source: vignettes/datasets.Rmd datasets.Rmd @@ -272,9 +272,9 @@ and the Global Biodiversity Information Facility (GBIF): Parte, AC et al. (2020). List of Prokaryotic names with Standing in Nomenclature (LPSN) moves to the DSMZ. International Journal of Systematic and Evolutionary Microbiology, 70, -5607-5612; . Accessed from https://lpsn.dsmz.de on 11 December, 2022. +5607-5612; . Accessed from https://lpsn.dsmz.de on December 11th, 2022. GBIF Secretariat (2022). GBIF Backbone Taxonomy. Checklist dataset . -Accessed from https://www.gbif.org on 11 December, 2022. +Accessed from https://www.gbif.org on December 11th, 2022. Public Health Information Network Vocabulary Access and Distribution System (PHIN VADS). US Edition of SNOMED CT from 1 September 2020. Value Set Name ‘Microoganism’, OID 2.16.840.1.114222.4.11.1009 (v12). URL: https://phinvads.cdc.gov diff --git a/articles/index.html b/articles/index.html index 91e1ed17..f0bfbf23 100644 --- a/articles/index.html +++ b/articles/index.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/articles/other_pkg.html b/articles/other_pkg.html index ebd4a92b..1f155ea7 100644 --- a/articles/other_pkg.html +++ b/articles/other_pkg.html @@ -38,7 +38,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -118,28 +118,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/articles/resistance_predict.html b/articles/resistance_predict.html index de7f5b4c..d0298f6f 100644 --- a/articles/resistance_predict.html +++ b/articles/resistance_predict.html @@ -38,7 +38,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -118,28 +118,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/articles/welcome_to_AMR.html b/articles/welcome_to_AMR.html index cb15b4d3..afe0aae7 100644 --- a/articles/welcome_to_AMR.html +++ b/articles/welcome_to_AMR.html @@ -38,7 +38,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -118,28 +118,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/authors.html b/authors.html index cc9b1bf6..ec9061f2 100644 --- a/authors.html +++ b/authors.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/index.html b/index.html index 18b6f2a3..1a3087a0 100644 --- a/index.html +++ b/index.html @@ -42,7 +42,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -122,28 +122,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/news/index.html b/news/index.html index d6fe7e90..e3c75bd0 100644 --- a/news/index.html +++ b/news/index.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R @@ -159,12 +159,12 @@ -AMR 2.0.0.9019 +AMR 2.0.0.9020 -Changed -Added oxygen tolerance to over 25,000 bacteria in the microorganisms data set +Changed +Added oxygen tolerance from BacDive to over 25,000 bacteria in the microorganisms data set Added mo_oxygen_tolerance() to retrieve the values -Added mo_is_anaerobic() to determine which species are obligate anaerobic bacteria +Added mo_is_anaerobic() to determine which genera/species are obligate anaerobic bacteria Added LPSN and GBIF identifiers, and oxygen tolerance to mo_info() @@ -180,6 +180,8 @@ Fixed usage of icu_exclude in first_isolates() Improved as.mo() algorithm for searching on only species names +Updated the code table in microorganisms.codes + diff --git a/pkgdown.yml b/pkgdown.yml index 7849dd32..68f1d911 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -11,7 +11,7 @@ articles: other_pkg: other_pkg.html resistance_predict: resistance_predict.html welcome_to_AMR: welcome_to_AMR.html -last_built: 2023-05-24T14:00Z +last_built: 2023-05-26T14:13Z urls: reference: https://msberends.github.io/AMR/reference article: https://msberends.github.io/AMR/articles diff --git a/reference/AMR-deprecated.html b/reference/AMR-deprecated.html index d912639f..3871618e 100644 --- a/reference/AMR-deprecated.html +++ b/reference/AMR-deprecated.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/AMR-options.html b/reference/AMR-options.html index ee5ebdd8..da5a4ab4 100644 --- a/reference/AMR-options.html +++ b/reference/AMR-options.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/AMR.html b/reference/AMR.html index e46de0fb..8b26a571 100644 --- a/reference/AMR.html +++ b/reference/AMR.html @@ -24,7 +24,7 @@ The AMR package is available in English, Chinese, Czech, Danish, Dutch, Finnish, AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -103,28 +103,28 @@ The AMR package is available in English, Chinese, Czech, Danish, Dutch, Finnish, - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/Rplot005.png b/reference/Rplot005.png index 33c99f62..ba13339d 100644 Binary files a/reference/Rplot005.png and b/reference/Rplot005.png differ diff --git a/reference/Rplot006.png b/reference/Rplot006.png index dc8fe36f..93bd60c2 100644 Binary files a/reference/Rplot006.png and b/reference/Rplot006.png differ diff --git a/reference/Rplot007.png b/reference/Rplot007.png index 058ed7b7..dabf61e7 100644 Binary files a/reference/Rplot007.png and b/reference/Rplot007.png differ diff --git a/reference/Rplot008.png b/reference/Rplot008.png index 513287b3..91e17e9f 100644 Binary files a/reference/Rplot008.png and b/reference/Rplot008.png differ diff --git a/reference/Rplot009.png b/reference/Rplot009.png index d66a610a..2765cd1e 100644 Binary files a/reference/Rplot009.png and b/reference/Rplot009.png differ diff --git a/reference/WHOCC.html b/reference/WHOCC.html index 155b0305..c9da3cdb 100644 --- a/reference/WHOCC.html +++ b/reference/WHOCC.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/WHONET.html b/reference/WHONET.html index 899f5eed..f53de93c 100644 --- a/reference/WHONET.html +++ b/reference/WHONET.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/ab_from_text.html b/reference/ab_from_text.html index d5c79ab6..2a81592c 100644 --- a/reference/ab_from_text.html +++ b/reference/ab_from_text.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/ab_property.html b/reference/ab_property.html index 72a59b1c..3e855887 100644 --- a/reference/ab_property.html +++ b/reference/ab_property.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/add_custom_antimicrobials.html b/reference/add_custom_antimicrobials.html index c30c50e8..4674770c 100644 --- a/reference/add_custom_antimicrobials.html +++ b/reference/add_custom_antimicrobials.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/add_custom_microorganisms.html b/reference/add_custom_microorganisms.html index 6dd45426..81d29f2c 100644 --- a/reference/add_custom_microorganisms.html +++ b/reference/add_custom_microorganisms.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R @@ -206,7 +206,7 @@ # a combination of species is not formal taxonomy, so # this will result in only "Enterobacter asburiae": mo_name("Enterobacter asburiae/cloacae") -#> [1] "Enterobacter asburiae" +#> [1] "Enterobacter cloacae cloacae" # now add a custom entry - it will be considered by as.mo() and # all mo_*() functions diff --git a/reference/age.html b/reference/age.html index 82cf85e0..a7bdfcb2 100644 --- a/reference/age.html +++ b/reference/age.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R @@ -222,16 +222,16 @@ df #> birth_date age age_exact age_at_y2k -#> 1 1943-12-07 79 79.46027 56 -#> 2 1973-04-06 50 50.13151 26 -#> 3 1998-12-22 24 24.41918 1 -#> 4 1938-09-05 84 84.71507 61 -#> 5 1994-09-17 28 28.68219 5 -#> 6 1938-01-09 85 85.36986 61 -#> 7 1993-08-21 29 29.75616 6 -#> 8 1937-05-15 86 86.02466 62 -#> 9 1981-07-29 41 41.81918 18 -#> 10 1947-06-12 75 75.94795 52 +#> 1 1951-05-01 72 72.06849 48 +#> 2 1987-07-08 35 35.88219 12 +#> 3 1981-03-24 42 42.17260 18 +#> 4 1955-01-22 68 68.33973 44 +#> 5 1971-12-06 51 51.46849 28 +#> 6 1935-05-02 88 88.06575 64 +#> 7 1934-03-23 89 89.17534 65 +#> 8 1984-02-27 39 39.24110 15 +#> 9 1936-10-03 86 86.64384 63 +#> 10 1990-03-21 33 33.18082 9 - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/antibiogram.html b/reference/antibiogram.html index 7e24553c..568b5703 100644 --- a/reference/antibiogram.html +++ b/reference/antibiogram.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/antibiotic_class_selectors.html b/reference/antibiotic_class_selectors.html index 7cfc6e32..7a123af7 100644 --- a/reference/antibiotic_class_selectors.html +++ b/reference/antibiotic_class_selectors.html @@ -12,7 +12,7 @@ In short, if you have a column name that resembles an antimicrobial drug, it wil AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -91,28 +91,28 @@ In short, if you have a column name that resembles an antimicrobial drug, it wil - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R @@ -627,10 +627,10 @@ In short, if you have a column name that resembles an antimicrobial drug, it wil #> kefzol #> <sir> #> 1 S -#> 2 I -#> 3 S -#> 4 I -#> 5 I +#> 2 R +#> 3 R +#> 4 R +#> 5 R if (require("dplyr")) { # get AMR for all aminoglycosides e.g., per ward: diff --git a/reference/antibiotics.html b/reference/antibiotics.html index b7c789d0..ec87f54d 100644 --- a/reference/antibiotics.html +++ b/reference/antibiotics.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R @@ -214,7 +214,7 @@ Source World Health Organization (WHO) Collaborating Centre for Drug Statistics Methodology (WHOCC): https://www.whocc.no/atc_ddd_index/ -Logical Observation Identifiers Names and Codes (LOINC), Version 2.73 (8 August, 2022). Accessed from https://loinc.org on 30 October, 2022. +Logical Observation Identifiers Names and Codes (LOINC), Version 2.73 (8 August, 2022). Accessed from https://loinc.org on October 30th, 2022. European Commission Public Health PHARMACEUTICALS - COMMUNITY REGISTER: https://ec.europa.eu/health/documents/community-register/html/reg_hum_atc.htm diff --git a/reference/as.ab.html b/reference/as.ab.html index 45d115c2..f3dcef6f 100644 --- a/reference/as.ab.html +++ b/reference/as.ab.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/as.av.html b/reference/as.av.html index d5e5ce76..7974612d 100644 --- a/reference/as.av.html +++ b/reference/as.av.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/as.disk.html b/reference/as.disk.html index aa3301aa..14e1c91b 100644 --- a/reference/as.disk.html +++ b/reference/as.disk.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/as.mic.html b/reference/as.mic.html index 57f4de01..1f5ac84c 100644 --- a/reference/as.mic.html +++ b/reference/as.mic.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/as.mo.html b/reference/as.mo.html index 2f49f410..be36a268 100644 --- a/reference/as.mo.html +++ b/reference/as.mo.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R @@ -299,12 +299,13 @@ Lancefield RC (1933). A serological differentiation of human and other groups of hemolytic streptococci. J Exp Med. 57(4): 571-95; doi:10.1084/jem.57.4.571 Berends MS et al. (2022). Trends in Occurrence and Phenotypic Resistance of Coagulase-Negative Staphylococci (CoNS) Found in Human Blood in the Northern Netherlands between 2013 and 2019/ Micro.rganisms 10(9), 1801; doi:10.3390/microorganisms10091801 Parte, AC et al. (2020). List of Prokaryotic names with Standing in Nomenclature (LPSN) moves to the DSMZ. International Journal of Systematic and Evolutionary Microbiology, 70, 5607-5612; doi:10.1099/ijsem.0.004332 -. Accessed from https://lpsn.dsmz.de on 11 December, 2022. +. Accessed from https://lpsn.dsmz.de on December 11th, 2022. GBIF Secretariat (2022). GBIF Backbone Taxonomy. Checklist dataset doi:10.15468/39omei -. Accessed from https://www.gbif.org on 11 December, 2022. +. Accessed from https://www.gbif.org on December 11th, 2022. +Reimer, LC et al. (2022). BacDive in 2022: the knowledge base for standardized bacterial and archaeal data. Nucleic Acids Res., 50(D1):D741-D74; doi:10.1093/nar/gkab961 +. Accessed from https://bacdive.dsmz.de on May 12th, 2023. Public Health Information Network Vocabulary Access and Distribution System (PHIN VADS). US Edition of SNOMED CT from 1 September 2020. Value Set Name 'Microoganism', OID 2.16.840.1.114222.4.11.1009 (v12). URL: https://phinvads.cdc.gov Bartlett A et al. (2022). A comprehensive list of bacterial pathogens infecting humans Microbiology 168:001269; doi:10.1099/mic.0.001269 -Reimer et al. (2022). BacDive in 2022: the knowledge base for standardized bacterial and archaeal data. Nucleic Acids Res. 2022 Jan 7;50(D1):D741-D746; doi:10.1093/nar/gkab961 Matching Score for Microorganisms @@ -360,9 +361,9 @@ 115329001 # SNOMED CT code )) #> Class 'mo' -#> [1] B_STPHY_AURS B_ROTHI B_ACHRMB_MRPL B_STPHY_AURS B_STPHY_AURS -#> [6] B_STPHY_AURS B_STPHY_AURS B_STPHY_AURS B_STPHY_AURS B_STPHY_AURS -#> [11] B_STPHY_AURS B_STPHY_AURS +#> [1] B_STPHY_AURS B_STPHY_AURS B_STPHY_AURS B_STPHY_AURS B_STPHY_AURS +#> [6] B_STPHY_AURS B_STPHY_AURS B_STPHY_AURS B_STPHY_AURS B_STPHY_AURS +#> [11] B_STPHY_AURS B_STPHY_AURS # Dyslexia is no problem - these all work: as.mo(c( @@ -396,7 +397,7 @@ mo_genus("E. coli") #> [1] "Escherichia" mo_gramstain("ESCO") -#> [1] "Gram-positive" +#> [1] "Gram-negative" mo_is_intrinsic_resistant("ESCCOL", ab = "vanco") #> ℹ Determining intrinsic resistance based on 'EUCAST Expert Rules' and #> 'EUCAST Intrinsic Resistance and Unusual Phenotypes' v3.3 (2021). This note diff --git a/reference/as.sir.html b/reference/as.sir.html index 98d1fe57..68bf5fbc 100644 --- a/reference/as.sir.html +++ b/reference/as.sir.html @@ -12,7 +12,7 @@ All breakpoints used for interpretation are publicly available in the clinical_b AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -91,28 +91,28 @@ All breakpoints used for interpretation are publicly available in the clinical_b - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R @@ -551,16 +551,16 @@ A microorganism is categorised as "Resistant" when there is a high likelihood of #> # A tibble: 50 × 12 #> datetime index ab_input ab_guideline mo_input mo_guideline #> <dttm> <int> <chr> <ab> <chr> <mo> -#> 1 2023-05-24 14:00:50 1 TOB TOB Escherichia… B_[ORD]_ENTRBCTR -#> 2 2023-05-24 14:00:49 1 GEN GEN Escherichia… B_[ORD]_ENTRBCTR -#> 3 2023-05-24 14:00:49 1 CIP CIP Escherichia… B_[ORD]_ENTRBCTR -#> 4 2023-05-24 14:00:49 1 AMP AMP Escherichia… B_[ORD]_ENTRBCTR -#> 5 2023-05-24 14:00:43 1 CIP CIP B_ESCHR_COLI B_[ORD]_ENTRBCTR -#> 6 2023-05-24 14:00:43 2 CIP CIP B_ESCHR_COLI B_[ORD]_ENTRBCTR -#> 7 2023-05-24 14:00:43 3 CIP CIP B_ESCHR_COLI B_[ORD]_ENTRBCTR -#> 8 2023-05-24 14:00:43 4 CIP CIP B_ESCHR_COLI B_[ORD]_ENTRBCTR -#> 9 2023-05-24 14:00:43 5 CIP CIP B_ESCHR_COLI B_[ORD]_ENTRBCTR -#> 10 2023-05-24 14:00:43 6 CIP CIP B_ESCHR_COLI B_[ORD]_ENTRBCTR +#> 1 2023-05-26 14:15:02 1 TOB TOB Escherichia… B_[ORD]_ENTRBCTR +#> 2 2023-05-26 14:15:02 1 GEN GEN Escherichia… B_[ORD]_ENTRBCTR +#> 3 2023-05-26 14:15:01 1 CIP CIP Escherichia… B_[ORD]_ENTRBCTR +#> 4 2023-05-26 14:15:01 1 AMP AMP Escherichia… B_[ORD]_ENTRBCTR +#> 5 2023-05-26 14:14:52 1 CIP CIP B_ESCHR_COLI B_[ORD]_ENTRBCTR +#> 6 2023-05-26 14:14:52 2 CIP CIP B_ESCHR_COLI B_[ORD]_ENTRBCTR +#> 7 2023-05-26 14:14:52 3 CIP CIP B_ESCHR_COLI B_[ORD]_ENTRBCTR +#> 8 2023-05-26 14:14:52 4 CIP CIP B_ESCHR_COLI B_[ORD]_ENTRBCTR +#> 9 2023-05-26 14:14:52 5 CIP CIP B_ESCHR_COLI B_[ORD]_ENTRBCTR +#> 10 2023-05-26 14:14:52 6 CIP CIP B_ESCHR_COLI B_[ORD]_ENTRBCTR #> # ℹ 40 more rows #> # ℹ 6 more variables: guideline <chr>, ref_table <chr>, method <chr>, #> # input <dbl>, outcome <sir>, breakpoint_S_R <chr> @@ -575,10 +575,10 @@ A microorganism is categorised as "Resistant" when there is a high likelihood of #> => Interpreting MIC values of 'AMP' (ampicillin) according to EUCAST #> 2022... #> Note: -#> • Multiple breakpoints available for ampicillin (AMP) in Streptococcus -#> pneumoniae - assuming body site 'Non-meningitis'. +#> • (Some) PK/PD breakpoints were applied - use include_PKPD = FALSE to +#> prevent this #> Class 'sir' -#> [1] R +#> [1] S as.sir( x = as.disk(18), diff --git a/reference/atc_online.html b/reference/atc_online.html index 04e2c428..03d2e08d 100644 --- a/reference/atc_online.html +++ b/reference/atc_online.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/av_from_text.html b/reference/av_from_text.html index 4c8362ab..618b5f3f 100644 --- a/reference/av_from_text.html +++ b/reference/av_from_text.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/av_property.html b/reference/av_property.html index 239e5416..a3f86071 100644 --- a/reference/av_property.html +++ b/reference/av_property.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/availability.html b/reference/availability.html index 6a971778..e68ad555 100644 --- a/reference/availability.html +++ b/reference/availability.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/bug_drug_combinations.html b/reference/bug_drug_combinations.html index e4d27e09..3dee022d 100644 --- a/reference/bug_drug_combinations.html +++ b/reference/bug_drug_combinations.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/clinical_breakpoints.html b/reference/clinical_breakpoints.html index acbeb226..c7e200fd 100644 --- a/reference/clinical_breakpoints.html +++ b/reference/clinical_breakpoints.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/count.html b/reference/count.html index f8941fdd..56c8101c 100644 --- a/reference/count.html +++ b/reference/count.html @@ -12,7 +12,7 @@ count_resistant() should be used to count resistant isolates, count_susceptible( AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -91,28 +91,28 @@ count_resistant() should be used to count resistant isolates, count_susceptible( - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/custom_eucast_rules.html b/reference/custom_eucast_rules.html index d43fef4a..e03d6315 100644 --- a/reference/custom_eucast_rules.html +++ b/reference/custom_eucast_rules.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/dosage.html b/reference/dosage.html index 8038905a..d5a9f87c 100644 --- a/reference/dosage.html +++ b/reference/dosage.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/eucast_rules.html b/reference/eucast_rules.html index cde1d765..44c8ce49 100644 --- a/reference/eucast_rules.html +++ b/reference/eucast_rules.html @@ -12,7 +12,7 @@ To improve the interpretation of the antibiogram before EUCAST rules are applied AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -91,28 +91,28 @@ To improve the interpretation of the antibiogram before EUCAST rules are applied - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R @@ -261,7 +261,7 @@ Leclercq et al. EUCAST expert rules in antimicrobial susceptibility test Details Note: This function does not translate MIC values to SIR values. Use as.sir() for that. Note: When ampicillin (AMP, J01CA01) is not available but amoxicillin (AMX, J01CA04) is, the latter will be used for all rules where there is a dependency on ampicillin. These drugs are interchangeable when it comes to expression of antimicrobial resistance. -The file containing all EUCAST rules is located here: https://github.com/msberends/AMR/blob/main/data-raw/eucast_rules.tsv. Note: Old taxonomic names are replaced with the current taxonomy where applicable. For example, Ochrobactrum anthropi was renamed to Brucella anthropi in 2020; the original EUCAST rules v3.1 and v3.2 did not yet contain this new taxonomic name. The AMR package contains the full microbial taxonomy updated until 11 December, 2022, see microorganisms. +The file containing all EUCAST rules is located here: https://github.com/msberends/AMR/blob/main/data-raw/eucast_rules.tsv. Note: Old taxonomic names are replaced with the current taxonomy where applicable. For example, Ochrobactrum anthropi was renamed to Brucella anthropi in 2020; the original EUCAST rules v3.1 and v3.2 did not yet contain this new taxonomic name. The AMR package contains the full microbial taxonomy updated until December 11th, 2022, see microorganisms. Custom Rules diff --git a/reference/example_isolates.html b/reference/example_isolates.html index e2a28dd1..1222944d 100644 --- a/reference/example_isolates.html +++ b/reference/example_isolates.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/example_isolates_unclean.html b/reference/example_isolates_unclean.html index 8e95c012..358f255d 100644 --- a/reference/example_isolates_unclean.html +++ b/reference/example_isolates_unclean.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/first_isolate.html b/reference/first_isolate.html index d1853e30..f62bf004 100644 --- a/reference/first_isolate.html +++ b/reference/first_isolate.html @@ -12,7 +12,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -91,28 +91,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/g.test.html b/reference/g.test.html index eb34f3f8..9ad2ab36 100644 --- a/reference/g.test.html +++ b/reference/g.test.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/get_episode.html b/reference/get_episode.html index e15f1948..c4cee40b 100644 --- a/reference/get_episode.html +++ b/reference/get_episode.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R @@ -263,35 +263,33 @@ df <- example_isolates[sample(seq_len(2000), size = 100), ] get_episode(df$date, episode_days = 60) # indices -#> [1] 42 35 39 44 44 10 48 22 28 31 30 37 30 45 28 2 17 33 36 13 43 41 22 23 50 -#> [26] 17 23 22 46 15 44 24 37 48 9 14 9 32 12 19 31 11 35 18 51 2 47 7 27 20 -#> [51] 39 47 14 1 41 36 7 46 30 21 27 3 38 2 16 34 3 18 24 11 4 24 8 51 3 -#> [76] 29 28 50 33 24 24 19 25 8 6 17 9 51 48 26 10 12 5 40 16 22 49 30 23 11 +#> [1] 48 39 6 18 52 8 12 53 48 6 33 42 23 1 4 5 7 18 32 45 23 10 49 2 7 +#> [26] 1 33 20 31 22 3 43 24 13 38 41 11 38 30 9 46 39 2 10 48 12 25 6 46 40 +#> [51] 36 48 16 35 17 29 11 35 15 47 51 8 42 26 9 16 9 21 13 45 12 34 6 17 29 +#> [76] 19 22 50 44 28 9 44 18 27 24 50 16 37 5 49 52 31 7 2 4 40 51 14 46 52 is_new_episode(df$date, episode_days = 60) # TRUE/FALSE -#> [1] TRUE TRUE TRUE TRUE FALSE TRUE TRUE TRUE TRUE TRUE TRUE TRUE -#> [13] FALSE TRUE FALSE TRUE TRUE TRUE TRUE TRUE TRUE TRUE FALSE TRUE -#> [25] TRUE FALSE FALSE FALSE TRUE TRUE FALSE TRUE FALSE FALSE TRUE TRUE -#> [37] FALSE TRUE TRUE TRUE FALSE TRUE FALSE TRUE TRUE FALSE TRUE TRUE -#> [49] TRUE TRUE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE TRUE -#> [61] FALSE TRUE TRUE FALSE TRUE TRUE FALSE FALSE FALSE FALSE TRUE FALSE -#> [73] TRUE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE -#> [85] TRUE FALSE FALSE FALSE FALSE TRUE FALSE FALSE TRUE TRUE FALSE FALSE -#> [97] TRUE FALSE FALSE FALSE +#> [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE FALSE FALSE TRUE TRUE +#> [13] TRUE TRUE TRUE TRUE TRUE FALSE TRUE TRUE FALSE TRUE TRUE TRUE +#> [25] FALSE FALSE FALSE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE +#> [37] TRUE FALSE TRUE TRUE TRUE FALSE FALSE FALSE FALSE FALSE TRUE FALSE +#> [49] FALSE TRUE TRUE FALSE TRUE TRUE TRUE TRUE FALSE FALSE TRUE TRUE +#> [61] TRUE FALSE FALSE TRUE FALSE FALSE FALSE TRUE FALSE FALSE FALSE TRUE +#> [73] FALSE FALSE FALSE TRUE FALSE TRUE TRUE TRUE FALSE FALSE FALSE TRUE +#> [85] FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE +#> [97] FALSE TRUE FALSE FALSE # filter on results from the third 60-day episode only, using base R df[which(get_episode(df$date, 60) == 3), ] -#> # A tibble: 3 × 46 -#> date patient age gender ward mo PEN OXA FLC AMX -#> <date> <chr> <dbl> <chr> <chr> <mo> <sir> <sir> <sir> <sir> -#> 1 2002-07-23 F35553 51 M ICU B_STPHY_AURS R NA S R -#> 2 2002-08-28 390178 57 M Clinical B_STRPT_SLVR S NA NA S -#> 3 2002-08-31 149442 80 F ICU B_STPHY_AURS R NA S R -#> # ℹ 36 more variables: AMC <sir>, AMP <sir>, TZP <sir>, CZO <sir>, FEP <sir>, -#> # CXM <sir>, FOX <sir>, CTX <sir>, CAZ <sir>, CRO <sir>, GEN <sir>, -#> # TOB <sir>, AMK <sir>, KAN <sir>, TMP <sir>, SXT <sir>, NIT <sir>, -#> # FOS <sir>, LNZ <sir>, CIP <sir>, MFX <sir>, VAN <sir>, TEC <sir>, -#> # TCY <sir>, TGC <sir>, DOX <sir>, ERY <sir>, CLI <sir>, AZM <sir>, -#> # IPM <sir>, MEM <sir>, MTR <sir>, CHL <sir>, COL <sir>, MUP <sir>, RIF <sir> +#> # A tibble: 1 × 46 +#> date patient age gender ward mo PEN OXA FLC AMX AMC +#> <date> <chr> <dbl> <chr> <chr> <mo> <sir> <sir> <sir> <sir> <sir> +#> 1 2003-04-21 6BC362 62 M ICU B_ENTRC NA NA NA NA NA +#> # ℹ 35 more variables: AMP <sir>, TZP <sir>, CZO <sir>, FEP <sir>, CXM <sir>, +#> # FOX <sir>, CTX <sir>, CAZ <sir>, CRO <sir>, GEN <sir>, TOB <sir>, +#> # AMK <sir>, KAN <sir>, TMP <sir>, SXT <sir>, NIT <sir>, FOS <sir>, +#> # LNZ <sir>, CIP <sir>, MFX <sir>, VAN <sir>, TEC <sir>, TCY <sir>, +#> # TGC <sir>, DOX <sir>, ERY <sir>, CLI <sir>, AZM <sir>, IPM <sir>, +#> # MEM <sir>, MTR <sir>, CHL <sir>, COL <sir>, MUP <sir>, RIF <sir> # the functions also work for less than a day, e.g. to include one per hour: get_episode( @@ -319,19 +317,19 @@ arrange(patient, condition, date) } #> # A tibble: 100 × 4 -#> # Groups: patient, condition [96] +#> # Groups: patient, condition [100] #> patient date condition new_episode #> <chr> <date> <chr> <lgl> -#> 1 058917 2002-11-14 A TRUE -#> 2 074321 2015-09-20 C TRUE -#> 3 082413 2002-06-04 B TRUE -#> 4 0DBB93 2009-05-08 A TRUE -#> 5 0E2483 2007-05-29 B TRUE -#> 6 0F9638 2014-09-22 B TRUE -#> 7 149442 2002-08-31 C TRUE -#> 8 156730 2012-04-12 C TRUE -#> 9 173401 2011-06-06 C TRUE -#> 10 175532 2010-04-10 B TRUE +#> 1 000090 2003-10-08 C TRUE +#> 2 023456 2009-11-02 C TRUE +#> 3 05B00F 2004-05-11 B TRUE +#> 4 05C73F 2006-01-12 B TRUE +#> 5 066601 2013-10-30 C TRUE +#> 6 067927 2002-01-13 A TRUE +#> 7 067927 2002-01-07 C TRUE +#> 8 069276 2015-06-18 A TRUE +#> 9 078381 2014-06-28 B TRUE +#> 10 080086 2010-08-08 A TRUE #> # ℹ 90 more rows if (require("dplyr")) { @@ -345,19 +343,19 @@ arrange(patient, ward, date) } #> # A tibble: 100 × 5 -#> # Groups: ward, patient [94] +#> # Groups: ward, patient [97] #> ward date patient new_index new_logical #> <chr> <date> <chr> <int> <lgl> -#> 1 ICU 2002-11-14 058917 1 TRUE -#> 2 ICU 2015-09-20 074321 1 TRUE -#> 3 ICU 2002-06-04 082413 1 TRUE -#> 4 ICU 2009-05-08 0DBB93 1 TRUE -#> 5 Clinical 2007-05-29 0E2483 1 TRUE -#> 6 Clinical 2014-09-22 0F9638 1 TRUE -#> 7 ICU 2002-08-31 149442 1 TRUE -#> 8 Clinical 2012-04-12 156730 1 TRUE -#> 9 ICU 2011-06-06 173401 1 TRUE -#> 10 ICU 2010-04-10 175532 1 TRUE +#> 1 ICU 2003-10-08 000090 1 TRUE +#> 2 Clinical 2009-11-02 023456 1 TRUE +#> 3 ICU 2004-05-11 05B00F 1 TRUE +#> 4 Clinical 2006-01-12 05C73F 1 TRUE +#> 5 Clinical 2013-10-30 066601 1 TRUE +#> 6 ICU 2002-01-07 067927 1 TRUE +#> 7 ICU 2002-01-13 067927 1 FALSE +#> 8 Clinical 2015-06-18 069276 1 TRUE +#> 9 ICU 2014-06-28 078381 1 TRUE +#> 10 Clinical 2010-08-08 080086 1 TRUE #> # ℹ 90 more rows if (require("dplyr")) { @@ -373,9 +371,9 @@ #> # A tibble: 3 × 5 #> ward n_patients n_episodes_365 n_episodes_60 n_episodes_30 #> <chr> <int> <int> <int> <int> -#> 1 Clinical 54 13 39 43 -#> 2 ICU 33 11 26 31 -#> 3 Outpatient 7 4 5 6 +#> 1 Clinical 56 12 38 47 +#> 2 ICU 33 10 25 29 +#> 3 Outpatient 8 5 7 7 # grouping on patients and microorganisms leads to the same # results as first_isolate() when using 'episode-based': @@ -405,18 +403,18 @@ } #> # A tibble: 100 × 4 #> # Groups: patient, mo, ward [98] -#> patient mo ward flag_episode -#> <chr> <mo> <chr> <lgl> -#> 1 715822 B_STPHY_EPDR Clinical TRUE -#> 2 156730 B_STPHY_CONS Clinical TRUE -#> 3 992282 B_STRPT_GRPA Clinical TRUE -#> 4 C54153 B_STPHY_EPDR Clinical TRUE -#> 5 074321 B_STPHY_HMLY ICU TRUE -#> 6 E56935 B_ESCHR_COLI Clinical TRUE -#> 7 BF4515 B_STPHY_EPDR Clinical TRUE -#> 8 D08605 B_ESCHR_COLI Clinical TRUE -#> 9 EC9741 B_ESCHR_COLI Outpatient TRUE -#> 10 F54287 B_KLBSL_OXYT Clinical TRUE +#> patient mo ward flag_episode +#> <chr> <mo> <chr> <lgl> +#> 1 A79917 B_PSDMN_AERG Clinical TRUE +#> 2 600967 B_SERRT_MRCS ICU TRUE +#> 3 118928 B_STPHY_AURS Clinical TRUE +#> 4 650870 B_ENTRBC_CLOC ICU TRUE +#> 5 BF4515 B_ESCHR_COLI Clinical TRUE +#> 6 F35553 B_STPHY_AURS ICU TRUE +#> 7 6B8C75 B_STPHY_CONS Clinical TRUE +#> 8 F50400 B_STPHY_HMNS ICU TRUE +#> 9 784436 B_STPHY_HMNS ICU TRUE +#> 10 C36883 B_ESCHR_COLI Clinical TRUE #> # ℹ 90 more rows # } diff --git a/reference/ggplot_pca.html b/reference/ggplot_pca.html index d7f48e61..7b9aca35 100644 --- a/reference/ggplot_pca.html +++ b/reference/ggplot_pca.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/ggplot_sir.html b/reference/ggplot_sir.html index 812c403a..039300ec 100644 --- a/reference/ggplot_sir.html +++ b/reference/ggplot_sir.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/guess_ab_col.html b/reference/guess_ab_col.html index 641b2a40..3d497507 100644 --- a/reference/guess_ab_col.html +++ b/reference/guess_ab_col.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/index.html b/reference/index.html index 452997bc..c3788dd8 100644 --- a/reference/index.html +++ b/reference/index.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R @@ -413,7 +413,7 @@ microorganisms.codes - Data Set with 5 754 Common Microorganism Codes + Data Set with 4 909 Common Microorganism Codes antibiotics antivirals diff --git a/reference/intrinsic_resistant.html b/reference/intrinsic_resistant.html index 546a8549..a4fe0d64 100644 --- a/reference/intrinsic_resistant.html +++ b/reference/intrinsic_resistant.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/italicise_taxonomy.html b/reference/italicise_taxonomy.html index 0bc9b768..49e0cd3f 100644 --- a/reference/italicise_taxonomy.html +++ b/reference/italicise_taxonomy.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/join.html b/reference/join.html index e57db11c..7c3ca509 100644 --- a/reference/join.html +++ b/reference/join.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/key_antimicrobials.html b/reference/key_antimicrobials.html index cc7a4657..a1d95183 100644 --- a/reference/key_antimicrobials.html +++ b/reference/key_antimicrobials.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R diff --git a/reference/kurtosis.html b/reference/kurtosis.html index b09b1546..a7629c4b 100644 --- a/reference/kurtosis.html +++ b/reference/kurtosis.html @@ -10,7 +10,7 @@ AMR (for R) - 2.0.0.9019 + 2.0.0.9020 @@ -89,28 +89,28 @@ - + With other pkgs - + AMR & dplyr/tidyverse - + AMR & data.table - + AMR & tidymodels - + AMR & base R @@ -199,9 +199,9 @@ Examples kurtosis(rnorm(10000)) -#> [1] 2.954493 +#> [1] 3.071168 kurtosis(rnorm(10000), excess = TRUE) -#> [1] 0.02115676 +#> [1] 0.02596136
vignettes/datasets.Rmd
datasets.Rmd
microorganisms
mo_oxygen_tolerance()
mo_is_anaerobic()
mo_info()
icu_exclude
first_isolates()
as.mo()
microorganisms.codes
World Health Organization (WHO) Collaborating Centre for Drug Statistics Methodology (WHOCC): https://www.whocc.no/atc_ddd_index/
Logical Observation Identifiers Names and Codes (LOINC), Version 2.73 (8 August, 2022). Accessed from https://loinc.org on 30 October, 2022.
Logical Observation Identifiers Names and Codes (LOINC), Version 2.73 (8 August, 2022). Accessed from https://loinc.org on October 30th, 2022.
European Commission Public Health PHARMACEUTICALS - COMMUNITY REGISTER: https://ec.europa.eu/health/documents/community-register/html/reg_hum_atc.htm
Lancefield RC (1933). A serological differentiation of human and other groups of hemolytic streptococci. J Exp Med. 57(4): 571-95; doi:10.1084/jem.57.4.571
Berends MS et al. (2022). Trends in Occurrence and Phenotypic Resistance of Coagulase-Negative Staphylococci (CoNS) Found in Human Blood in the Northern Netherlands between 2013 and 2019/ Micro.rganisms 10(9), 1801; doi:10.3390/microorganisms10091801
Parte, AC et al. (2020). List of Prokaryotic names with Standing in Nomenclature (LPSN) moves to the DSMZ. International Journal of Systematic and Evolutionary Microbiology, 70, 5607-5612; doi:10.1099/ijsem.0.004332 -. Accessed from https://lpsn.dsmz.de on 11 December, 2022.
GBIF Secretariat (2022). GBIF Backbone Taxonomy. Checklist dataset doi:10.15468/39omei -. Accessed from https://www.gbif.org on 11 December, 2022.
Reimer, LC et al. (2022). BacDive in 2022: the knowledge base for standardized bacterial and archaeal data. Nucleic Acids Res., 50(D1):D741-D74; doi:10.1093/nar/gkab961 +. Accessed from https://bacdive.dsmz.de on May 12th, 2023.
Public Health Information Network Vocabulary Access and Distribution System (PHIN VADS). US Edition of SNOMED CT from 1 September 2020. Value Set Name 'Microoganism', OID 2.16.840.1.114222.4.11.1009 (v12). URL: https://phinvads.cdc.gov
Bartlett A et al. (2022). A comprehensive list of bacterial pathogens infecting humans Microbiology 168:001269; doi:10.1099/mic.0.001269
Reimer et al. (2022). BacDive in 2022: the knowledge base for standardized bacterial and archaeal data. Nucleic Acids Res. 2022 Jan 7;50(D1):D741-D746; doi:10.1093/nar/gkab961
Note: This function does not translate MIC values to SIR values. Use as.sir() for that. Note: When ampicillin (AMP, J01CA01) is not available but amoxicillin (AMX, J01CA04) is, the latter will be used for all rules where there is a dependency on ampicillin. These drugs are interchangeable when it comes to expression of antimicrobial resistance.
as.sir()
The file containing all EUCAST rules is located here: https://github.com/msberends/AMR/blob/main/data-raw/eucast_rules.tsv. Note: Old taxonomic names are replaced with the current taxonomy where applicable. For example, Ochrobactrum anthropi was renamed to Brucella anthropi in 2020; the original EUCAST rules v3.1 and v3.2 did not yet contain this new taxonomic name. The AMR package contains the full microbial taxonomy updated until 11 December, 2022, see microorganisms.
The file containing all EUCAST rules is located here: https://github.com/msberends/AMR/blob/main/data-raw/eucast_rules.tsv. Note: Old taxonomic names are replaced with the current taxonomy where applicable. For example, Ochrobactrum anthropi was renamed to Brucella anthropi in 2020; the original EUCAST rules v3.1 and v3.2 did not yet contain this new taxonomic name. The AMR package contains the full microbial taxonomy updated until December 11th, 2022, see microorganisms.
antibiotics
antivirals
kurtosis(rnorm(10000)) -#> [1] 2.954493 +#> [1] 3.071168 kurtosis(rnorm(10000), excess = TRUE) -#> [1] 0.02115676 +#> [1] 0.02596136