head(my_TB_data)#> rifampicin isoniazid gatifloxacin ethambutol pyrazinamide moxifloxacin
-#> 1 R I I I I S
-#> 2 S S S R R S
-#> 3 I S I I I I
-#> 4 S I R S I R
-#> 5 R I S R R S
-#> 6 S I I S I I
+#> 1 R R R S S S
+#> 2 S R S S R S
+#> 3 S R I R I I
+#> 4 R I S I S R
+#> 5 S I R I I S
+#> 6 R R I S S I#> kanamycin
-#> 1 R
-#> 2 S
+#> 1 I
+#> 2 I#> 3 I
-#> 4 R
-#> 5 I
+#> 4 S
+#> 5 S#> 6 R
We can now add the interpretation of MDR-TB to our data set. You can
use:
Added mo_is_anaerobic() to determine which genera/species are obligate anaerobic bacteria
diff --git a/pkgdown.yml b/pkgdown.yml
index 69cbf1cb..6f181499 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-26T17:26Z
+last_built: 2023-05-26T18:41Z
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 6ec5f0a2..ad21b46b 100644
--- a/reference/AMR-deprecated.html
+++ b/reference/AMR-deprecated.html
@@ -10,7 +10,7 @@
AMR (for R)
- 2.0.0.9021
+ 2.0.0.9022
diff --git a/reference/AMR-options.html b/reference/AMR-options.html
index 361e36df..4b1d1f13 100644
--- a/reference/AMR-options.html
+++ b/reference/AMR-options.html
@@ -10,7 +10,7 @@
AMR (for R)
- 2.0.0.9021
+ 2.0.0.9022
diff --git a/reference/AMR.html b/reference/AMR.html
index be535a70..59b91ab0 100644
--- a/reference/AMR.html
+++ b/reference/AMR.html
@@ -5,14 +5,14 @@ This work was published in the Journal of Statistical Software (Volume 104(3); d
) and formed the basis of two PhD theses (doi:10.33612/diss.177417131
and doi:10.33612/diss.192486375
).
-After installing this package, R knows ~52 000 microorganisms (updated december 2022) and all ~600 antibiotic, antimycotic and antiviral drugs by name and code (including ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid SIR and MIC values. The integral breakpoint guidelines from CLSI and EUCAST are included from the last 10 years. It supports and can read any data format, including WHONET data. This package works on Windows, macOS and Linux with all versions of R since R-3.0 (April 2013). It was designed to work in any setting, including those with very limited resources. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the University of Groningen, in collaboration with non-profit organisations Certe Medical Diagnostics and Advice Foundation and University Medical Center Groningen.
+After installing this package, R knows ~52 000 microorganisms (updated December 2022) and all ~600 antibiotic, antimycotic and antiviral drugs by name and code (including ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid SIR and MIC values. The integral breakpoint guidelines from CLSI and EUCAST are included from the last 10 years. It supports and can read any data format, including WHONET data. This package works on Windows, macOS and Linux with all versions of R since R-3.0 (April 2013). It was designed to work in any setting, including those with very limited resources. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the University of Groningen, in collaboration with non-profit organisations Certe Medical Diagnostics and Advice Foundation and University Medical Center Groningen.
The AMR package is available in English, Chinese, Czech, Danish, Dutch, Finnish, French, German, Greek, Italian, Japanese, Norwegian, Polish, Portuguese, Romanian, Russian, Spanish, Swedish, Turkish, and Ukrainian. Antimicrobial drug (group) names and colloquial microorganism names are provided in these languages.">The AMR Package — AMR • AMR (for R) subspecies, a 3-5 letter acronym | | \\----> species, a 3-6 letter acronym | \\----> genus, a 4-8 letter acronym \\----> taxonomic kingdom: A (Archaea), AN (Animalia), B (Bacteria), F (Fungi), PL (Plantae), P (Protozoa)"},{"path":"https://msberends.github.io/AMR/reference/as.mo.html","id":"coping-with-uncertain-results","dir":"Reference","previous_headings":"","what":"Coping with Uncertain Results","title":"Transform Arbitrary Input to Valid Microbial Taxonomy — as.mo","text":"Results non-exact taxonomic input based matching score. lowest allowed score can set minimum_matching_score argument. default determined based character length input, taxonomic kingdom human pathogenicity taxonomic outcome. values matched uncertainty, message shown suggest user evaluate results mo_uncertainties(), returns data.frame specifications. increase quality matching, cleaning_regex argument can used clean input (.e., x). must regular expression matches parts input removed input matched available microbial taxonomy. matched Perl-compatible case-insensitive. default value cleaning_regex outcome helper function mo_cleaning_regex(). three helper functions can run using .mo() function: Use mo_uncertainties() get data.frame prints pretty format taxonomic names guessed. output contains matching score matches (see Matching Score Microorganisms ). Use mo_failures() get character vector values coerced valid value. Use mo_renamed() get data.frame values coerced based old, previously accepted taxonomic names.","code":""},{"path":"https://msberends.github.io/AMR/reference/as.mo.html","id":"microbial-prevalence-of-pathogens-in-humans","dir":"Reference","previous_headings":"","what":"Microbial Prevalence of Pathogens in Humans","title":"Transform Arbitrary Input to Valid Microbial Taxonomy — as.mo","text":"coercion rules consider prevalence microorganisms humans, available prevalence column microorganisms data set. grouping human pathogenic prevalence explained section Matching Score Microorganisms .","code":""},{"path":"https://msberends.github.io/AMR/reference/as.mo.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Transform Arbitrary Input to Valid Microbial Taxonomy — as.mo","text":"Berends MS et al. (2022). AMR: R Package Working Antimicrobial Resistance Data. Journal Statistical Software, 104(3), 1-31; doi:10.18637/jss.v104.i03 Becker K et al. (2014). Coagulase-Negative Staphylococci. Clin Microbiol Rev. 27(4): 870-926; doi:10.1128/CMR.00109-13 Becker K et al. (2019). Implications identifying recently defined members S. aureus complex, S. argenteus S. schweitzeri: position paper members ESCMID Study Group staphylococci Staphylococcal Diseases (ESGS). Clin Microbiol Infect; doi:10.1016/j.cmi.2019.02.028 Becker K et al. (2020). Emergence coagulase-negative staphylococci. Expert Rev Anti Infect Ther. 18(4):349-366; doi:10.1080/14787210.2020.1730813 Lancefield RC (1933). serological differentiation human groups hemolytic streptococci. J Exp Med. 57(4): 571-95; doi:10.1084/jem.57.4.571 Berends MS et al. (2022). Trends Occurrence Phenotypic Resistance Coagulase-Negative Staphylococci (CoNS) Found Human Blood Northern Netherlands 2013 2019/ Micro.rganisms 10(9), 1801; doi:10.3390/microorganisms10091801 Parte, AC et al. (2020). List Prokaryotic names Standing Nomenclature (LPSN) moves DSMZ. International Journal Systematic Evolutionary Microbiology, 70, 5607-5612; doi:10.1099/ijsem.0.004332 . Accessed https://lpsn.dsmz.de December 11th, 2022. GBIF Secretariat (2022). GBIF Backbone Taxonomy. Checklist dataset doi:10.15468/39omei . Accessed https://www.gbif.org December 11th, 2022. Reimer, LC et al. (2022). BacDive 2022: knowledge base standardized bacterial archaeal data. Nucleic Acids Res., 50(D1):D741-D74; doi:10.1093/nar/gkab961 . Accessed https://bacdive.dsmz.de May 12th, 2023. Public Health Information Network Vocabulary Access Distribution System (PHIN VADS). US Edition SNOMED CT 1 September 2020. Value Set Name 'Microoganism', OID 2.16.840.1.114222.4.11.1009 (v12). URL: https://phinvads.cdc.gov Bartlett et al. (2022). comprehensive list bacterial pathogens infecting humans Microbiology 168:001269; doi:10.1099/mic.0.001269","code":""},{"path":"https://msberends.github.io/AMR/reference/as.mo.html","id":"matching-score-for-microorganisms","dir":"Reference","previous_headings":"","what":"Matching Score for Microorganisms","title":"Transform Arbitrary Input to Valid Microbial Taxonomy — as.mo","text":"ambiguous user input .mo() mo_* functions, returned results chosen based matching score using mo_matching_score(). matching score \\(m\\), calculated : : \\(x\\) user input; \\(n\\) taxonomic name (genus, species, subspecies); \\(l_n\\) length \\(n\\); \\(lev\\) Levenshtein distance function (counting insertion 1, deletion substitution 2) needed change \\(x\\) \\(n\\); \\(p_n\\) human pathogenic prevalence group \\(n\\), described ; \\(k_n\\) taxonomic kingdom \\(n\\), set Bacteria = 1, Fungi = 2, Protozoa = 3, Archaea = 4, others = 5. grouping human pathogenic prevalence \\(p\\) based recent work Bartlett et al. (2022, doi:10.1099/mic.0.001269 ) extensively studied medical-scientific literature categorise bacterial species groups: Established, taxonomic species infected least three persons three references. records prevalence = 1.0 microorganisms data set; Putative, taxonomic species fewer three known cases. records prevalence = 1.25 microorganisms data set. Furthermore, genus present established list also prevalence = 1.0 microorganisms data set; genus present putative list prevalence = 1.25 microorganisms data set; species subspecies genus present two aforementioned groups, prevalence = 1.5 microorganisms data set; non-bacterial genus, species subspecies genus present following list, prevalence = 1.5 microorganisms data set: Absidia, Acanthamoeba, Acremonium, Aedes, Alternaria, Amoeba, Ancylostoma, Angiostrongylus, Anisakis, Anopheles, Apophysomyces, Aspergillus, Aureobasidium, Basidiobolus, Beauveria, Blastocystis, Blastomyces, Candida, Capillaria, Chaetomium, Chrysonilia, Cladophialophora, Cladosporium, Conidiobolus, Contracaecum, Cordylobia, Cryptococcus, Curvularia, Demodex, Dermatobia, Dientamoeba, Diphyllobothrium, Dirofilaria, Echinostoma, Entamoeba, Enterobius, Exophiala, Exserohilum, Fasciola, Fonsecaea, Fusarium, Giardia, Haloarcula, Halobacterium, Halococcus, Hendersonula, Heterophyes, Histomonas, Histoplasma, Hymenolepis, Hypomyces, Hysterothylacium, Leishmania, Malassezia, Malbranchea, Metagonimus, Meyerozyma, Microsporidium, Microsporum, Mortierella, Mucor, Mycocentrospora, Necator, Nectria, Ochroconis, Oesophagostomum, Oidiodendron, Opisthorchis, Pediculus, Penicillium, Phlebotomus, Phoma, Pichia, Piedraia, Pithomyces, Pityrosporum, Pneumocystis, Pseudallescheria, Pseudoterranova, Pulex, Rhizomucor, Rhizopus, Rhodotorula, Saccharomyces, Sarcoptes, Scolecobasidium, Scopulariopsis, Scytalidium, Spirometra, Sporobolomyces, Stachybotrys, Strongyloides, Syngamus, Taenia, Talaromyces, Toxocara, Trichinella, Trichobilharzia, Trichoderma, Trichomonas, Trichophyton, Trichosporon, Trichostrongylus, Trichuris, Tritirachium, Trombicula, Trypanosoma, Tunga, Wuchereria; records prevalence = 2.0 microorganisms data set. calculating matching score, characters \\(x\\) \\(n\\) ignored -Z, -z, 0-9, spaces parentheses. matches sorted descending matching score user input values, top match returned. lead effect e.g., \"E. coli\" return microbial ID Escherichia coli (\\(m = 0.688\\), highly prevalent microorganism found humans) Entamoeba coli (\\(m = 0.159\\), less prevalent microorganism humans), although latter alphabetically come first.","code":""},{"path":"https://msberends.github.io/AMR/reference/as.mo.html","id":"reference-data-publicly-available","dir":"Reference","previous_headings":"","what":"Reference Data Publicly Available","title":"Transform Arbitrary Input to Valid Microbial Taxonomy — as.mo","text":"data sets AMR package (microorganisms, antibiotics, SIR interpretation, EUCAST rules, etc.) publicly freely available download following formats: R, MS Excel, Apache Feather, Apache Parquet, SPSS, SAS, Stata. also provide tab-separated plain text files machine-readable suitable input software program, laboratory information systems. Please visit website download links. actual files course available GitHub repository.","code":""},{"path":[]},{"path":"https://msberends.github.io/AMR/reference/as.mo.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Transform Arbitrary Input to Valid Microbial Taxonomy — as.mo","text":"","code":"# \\donttest{ # These examples all return \"B_STPHY_AURS\", the ID of S. aureus: as.mo(c( \"sau\", # WHONET code \"stau\", \"STAU\", \"staaur\", \"S. aureus\", \"S aureus\", \"Sthafilokkockus aureus\", # handles incorrect spelling \"Staphylococcus aureus (MRSA)\", \"MRSA\", # Methicillin Resistant S. aureus \"VISA\", # Vancomycin Intermediate S. aureus \"VRSA\", # Vancomycin Resistant S. aureus 115329001 # SNOMED CT code )) #> Class 'mo' #> [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( \"Ureaplasma urealyticum\", \"Ureaplasma urealyticus\", \"Ureaplasmium urealytica\", \"Ureaplazma urealitycium\" )) #> Class 'mo' #> [1] B_URPLS_URLY B_URPLS_URLY B_URPLS_URLY B_URPLS_URLY as.mo(\"Streptococcus group A\") #> Class 'mo' #> [1] B_STRPT_GRPA as.mo(\"S. epidermidis\") # will remain species: B_STPHY_EPDR #> Class 'mo' #> [1] B_STPHY_EPDR as.mo(\"S. epidermidis\", Becker = TRUE) # will not remain species: B_STPHY_CONS #> Class 'mo' #> [1] B_STPHY_CONS as.mo(\"S. pyogenes\") # will remain species: B_STRPT_PYGN #> Class 'mo' #> [1] B_STRPT_PYGN as.mo(\"S. pyogenes\", Lancefield = TRUE) # will not remain species: B_STRPT_GRPA #> Class 'mo' #> [1] B_STRPT_GRPA # All mo_* functions use as.mo() internally too (see ?mo_property): mo_genus(\"E. coli\") #> [1] \"Escherichia\" mo_gramstain(\"ESCO\") #> [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 #> will be shown once per session. #> [1] TRUE # }"},{"path":"https://msberends.github.io/AMR/reference/as.sir.html","id":null,"dir":"Reference","previous_headings":"","what":"Translate MIC and Disk Diffusion to SIR, or Clean Existing SIR Data — as.sir","title":"Translate MIC and Disk Diffusion to SIR, or Clean Existing SIR Data — as.sir","text":"Interpret minimum inhibitory concentration (MIC) values disk diffusion diameters according EUCAST CLSI, clean existing SIR values. transforms input new class sir, ordered factor levels S < < R. breakpoints used interpretation publicly available clinical_breakpoints data set.","code":""},{"path":"https://msberends.github.io/AMR/reference/as.sir.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Translate MIC and Disk Diffusion to SIR, or Clean Existing SIR Data — as.sir","text":"","code":"as.sir(x, ...) NA_sir_ is.sir(x) is_sir_eligible(x, threshold = 0.05) # S3 method for mic as.sir( x, mo = NULL, ab = deparse(substitute(x)), guideline = getOption(\"AMR_guideline\", \"EUCAST\"), uti = NULL, conserve_capped_values = FALSE, add_intrinsic_resistance = FALSE, reference_data = AMR::clinical_breakpoints, include_screening = getOption(\"AMR_include_screening\", FALSE), include_PKPD = getOption(\"AMR_include_PKPD\", TRUE), ... ) # S3 method for disk as.sir( x, mo = NULL, ab = deparse(substitute(x)), guideline = getOption(\"AMR_guideline\", \"EUCAST\"), uti = NULL, add_intrinsic_resistance = FALSE, reference_data = AMR::clinical_breakpoints, include_screening = getOption(\"AMR_include_screening\", FALSE), include_PKPD = getOption(\"AMR_include_PKPD\", TRUE), ... ) # S3 method for data.frame as.sir( x, ..., col_mo = NULL, guideline = getOption(\"AMR_guideline\", \"EUCAST\"), uti = NULL, conserve_capped_values = FALSE, add_intrinsic_resistance = FALSE, reference_data = AMR::clinical_breakpoints, include_screening = getOption(\"AMR_include_screening\", FALSE), include_PKPD = getOption(\"AMR_include_PKPD\", TRUE) ) sir_interpretation_history(clean = FALSE)"},{"path":"https://msberends.github.io/AMR/reference/as.sir.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Translate MIC and Disk Diffusion to SIR, or Clean Existing SIR Data — as.sir","text":"object class sir (inherits ordered, factor) length 1.","code":""},{"path":"https://msberends.github.io/AMR/reference/as.sir.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Translate MIC and Disk Diffusion to SIR, or Clean Existing SIR Data — as.sir","text":"interpretations minimum inhibitory concentration (MIC) values disk diffusion diameters: M39 Analysis Presentation Cumulative Antimicrobial Susceptibility Test Data, 2013-2022, Clinical Laboratory Standards Institute (CLSI). https://clsi.org/standards/products/microbiology/documents/m39/. M100 Performance Standard Antimicrobial Susceptibility Testing, 2013-2022, Clinical Laboratory Standards Institute (CLSI). https://clsi.org/standards/products/microbiology/documents/m100/. Breakpoint tables interpretation MICs zone diameters, 2013-2022, European Committee Antimicrobial Susceptibility Testing (EUCAST). https://www.eucast.org/clinical_breakpoints.","code":""},{"path":"https://msberends.github.io/AMR/reference/as.sir.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Translate MIC and Disk Diffusion to SIR, or Clean Existing SIR Data — as.sir","text":"x vector values (class mic: MIC values mg/L, class disk: disk diffusion radius millimetres) ... using data.frame: names columns apply .sir() (supports tidy selection column1:column4). Otherwise: arguments passed methods. threshold maximum fraction invalid antimicrobial interpretations x, see Examples mo (vector ) text can coerced valid microorganism codes .mo(), can left empty determine automatically ab (vector ) text can coerced valid antimicrobial drug code .ab() guideline defaults EUCAST 2022 (latest implemented EUCAST guideline clinical_breakpoints data set), can set package option AMR_guideline. Currently supports EUCAST (2013-2022) CLSI (2013-2022), see Details. uti (Urinary Tract Infection) vector logicals (TRUE FALSE) specify whether UTI specific interpretation guideline chosen. using .sir() data.frame, can also column containing logicals left blank, data set searched column 'specimen', rows within column containing 'urin' ('urine', 'urina') regarded isolates UTI. See Examples. conserve_capped_values logical indicate MIC values starting \">\" (\">=\") must always return \"R\" , MIC values starting \"<\" (\"<=\") must always return \"S\" add_intrinsic_resistance (useful using EUCAST guideline) logical indicate whether intrinsic antibiotic resistance must also considered applicable bug-drug combinations, meaning e.g. ampicillin always return \"R\" Klebsiella species. Determination based intrinsic_resistant data set, based 'EUCAST Expert Rules' 'EUCAST Intrinsic Resistance Unusual Phenotypes' v3.3 (2021). reference_data data.frame used interpretation, defaults clinical_breakpoints data set. Changing argument allows using interpretation guidelines. argument must contain data set equal structure clinical_breakpoints data set (column names column types). Please note guideline argument ignored reference_data manually set. include_screening logical indicate clinical breakpoints screening allowed - default FALSE. Can also set package option AMR_include_screening. include_PKPD logical indicate PK/PD clinical breakpoints must applied last resort - default TRUE. Can also set package option AMR_include_PKPD. col_mo column name names codes microorganisms (see .mo()) - default first column class mo. Values coerced using .mo(). clean logical indicate whether previously stored results forgotten returning 'logbook' results","code":""},{"path":"https://msberends.github.io/AMR/reference/as.sir.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Translate MIC and Disk Diffusion to SIR, or Clean Existing SIR Data — as.sir","text":"Ordered factor new class sir","code":""},{"path":"https://msberends.github.io/AMR/reference/as.sir.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Translate MIC and Disk Diffusion to SIR, or Clean Existing SIR Data — as.sir","text":"NA_sir_ missing value new sir class, analogous e.g. base R's NA_character_.","code":""},{"path":"https://msberends.github.io/AMR/reference/as.sir.html","id":"how-it-works","dir":"Reference","previous_headings":"","what":"How it Works","title":"Translate MIC and Disk Diffusion to SIR, or Clean Existing SIR Data — as.sir","text":".sir() function works four ways: cleaning raw / untransformed data. data cleaned contain values S, R try best determine intelligence. example, mixed values SIR interpretations MIC values \"<0.25; S\" coerced \"S\". Combined interpretations multiple test methods (seen laboratory records) \"S; S\" coerced \"S\", value like \"S; \" return NA warning input unclear. interpreting minimum inhibitory concentration (MIC) values according EUCAST CLSI. must clean MIC values first using .mic(), also gives columns new data class mic. Also, sure column microorganism names codes. found automatically, can set manually using mo argument. Using dplyr, SIR interpretation can done easily either: Operators like \"<=\" stripped interpretation. using conserve_capped_values = TRUE, MIC value e.g. \">2\" always return \"R\", even breakpoint according chosen guideline \">=4\". prevent capped values raw laboratory data treated conservatively. default behaviour (conserve_capped_values = FALSE) considers \">2\" lower \">=4\" might case return \"S\" \"\". interpreting disk diffusion diameters according EUCAST CLSI. must clean disk zones first using .disk(), also gives columns new data class disk. Also, sure column microorganism names codes. found automatically, can set manually using mo argument. Using dplyr, SIR interpretation can done easily either: interpreting complete data set, automatic determination MIC values, disk diffusion diameters, microorganism names codes, antimicrobial test results. done simply running .sir(your_data). points 2, 3 4: Use sir_interpretation_history() retrieve data.frame (tibble tibble package installed) results last .sir() call.","code":"your_data %>% mutate_if(is.mic, as.sir) your_data %>% mutate(across(where(is.mic), as.sir)) your_data %>% mutate_if(is.disk, as.sir) your_data %>% mutate(across(where(is.disk), as.sir))"},{"path":"https://msberends.github.io/AMR/reference/as.sir.html","id":"supported-guidelines","dir":"Reference","previous_headings":"","what":"Supported Guidelines","title":"Translate MIC and Disk Diffusion to SIR, or Clean Existing SIR Data — as.sir","text":"interpreting MIC values well disk diffusion diameters, currently implemented guidelines EUCAST (2013-2022) CLSI (2013-2022). Thus, guideline argument must set e.g., \"EUCAST 2022\" \"CLSI 2022\". simply using \"EUCAST\" (default) \"CLSI\" input, latest included version guideline automatically selected. can set data set using reference_data argument. guideline argument ignored. can set default guideline package option AMR_guideline (e.g. .Rprofile file), :","code":"options(AMR_guideline = \"CLSI\") options(AMR_guideline = \"CLSI 2018\") options(AMR_guideline = \"EUCAST 2020\") # or to reset: options(AMR_guideline = NULL)"},{"path":"https://msberends.github.io/AMR/reference/as.sir.html","id":"after-interpretation","dir":"Reference","previous_headings":"","what":"After Interpretation","title":"Translate MIC and Disk Diffusion to SIR, or Clean Existing SIR Data — as.sir","text":"using .sir(), can use eucast_rules() defined EUCAST (1) apply inferred susceptibility resistance based results antimicrobials (2) apply intrinsic resistance based taxonomic properties microorganism.","code":""},{"path":"https://msberends.github.io/AMR/reference/as.sir.html","id":"machine-readable-clinical-breakpoints","dir":"Reference","previous_headings":"","what":"Machine-Readable Clinical Breakpoints","title":"Translate MIC and Disk Diffusion to SIR, or Clean Existing SIR Data — as.sir","text":"repository package contains machine-readable version guidelines. CSV file consisting 18 271 rows 11 columns. file machine-readable, since contains one row every unique combination test method (MIC disk diffusion), antimicrobial drug microorganism. allows easy implementation rules laboratory information systems (LIS). Note contains interpretation guidelines humans - interpretation guidelines CLSI animals removed.","code":""},{"path":"https://msberends.github.io/AMR/reference/as.sir.html","id":"other","dir":"Reference","previous_headings":"","what":"Other","title":"Translate MIC and Disk Diffusion to SIR, or Clean Existing SIR Data — as.sir","text":"function .sir() detects input contains class sir. input data.frame, iterates columns returns logical vector. function is_sir_eligible() returns TRUE columns contains 5% invalid antimicrobial interpretations (S //R), FALSE otherwise. threshold 5% can set threshold argument. input data.frame, iterates columns returns logical vector.","code":""},{"path":"https://msberends.github.io/AMR/reference/as.sir.html","id":"interpretation-of-sir","dir":"Reference","previous_headings":"","what":"Interpretation of SIR","title":"Translate MIC and Disk Diffusion to SIR, or Clean Existing SIR Data — as.sir","text":"2019, European Committee Antimicrobial Susceptibility Testing (EUCAST) decided change definitions susceptibility testing categories S, , R shown (https://www.eucast.org/newsiandr/): S - Susceptible, standard dosing regimen microorganism categorised \"Susceptible, standard dosing regimen\", high likelihood therapeutic success using standard dosing regimen agent. - Susceptible, increased exposure microorganism categorised \"Susceptible, Increased exposure\" high likelihood therapeutic success exposure agent increased adjusting dosing regimen concentration site infection. R = Resistant microorganism categorised \"Resistant\" high likelihood therapeutic failure even increased exposure. Exposure function mode administration, dose, dosing interval, infusion time, well distribution excretion antimicrobial agent influence infecting organism site infection. AMR package honours insight. Use susceptibility() (equal proportion_SI()) determine antimicrobial susceptibility count_susceptible() (equal count_SI()) count susceptible isolates.","code":""},{"path":"https://msberends.github.io/AMR/reference/as.sir.html","id":"reference-data-publicly-available","dir":"Reference","previous_headings":"","what":"Reference Data Publicly Available","title":"Translate MIC and Disk Diffusion to SIR, or Clean Existing SIR Data — as.sir","text":"data sets AMR package (microorganisms, antibiotics, SIR interpretation, EUCAST rules, etc.) publicly freely available download following formats: R, MS Excel, Apache Feather, Apache Parquet, SPSS, SAS, Stata. also provide tab-separated plain text files machine-readable suitable input software program, laboratory information systems. Please visit website download links. actual files course available GitHub repository.","code":""},{"path":[]},{"path":"https://msberends.github.io/AMR/reference/as.sir.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Translate MIC and Disk Diffusion to SIR, or Clean Existing SIR Data — as.sir","text":"","code":"example_isolates #> # A tibble: 2,000 × 46 #> date patient age gender ward mo PEN OXA FLC AMX #> #> 1 2002-01-02 A77334 65 F Clinical B_ESCHR_COLI R NA NA NA #> 2 2002-01-03 A77334 65 F Clinical B_ESCHR_COLI R NA NA NA #> 3 2002-01-07 067927 45 F ICU B_STPHY_EPDR R NA R NA #> 4 2002-01-07 067927 45 F ICU B_STPHY_EPDR R NA R NA #> 5 2002-01-13 067927 45 F ICU B_STPHY_EPDR R NA R NA #> 6 2002-01-13 067927 45 F ICU B_STPHY_EPDR R NA R NA #> 7 2002-01-14 462729 78 M Clinical B_STPHY_AURS R NA S R #> 8 2002-01-14 462729 78 M Clinical B_STPHY_AURS R NA S R #> 9 2002-01-16 067927 45 F ICU B_STPHY_EPDR R NA R NA #> 10 2002-01-17 858515 79 F ICU B_STPHY_EPDR R NA S NA #> # ℹ 1,990 more rows #> # ℹ 36 more variables: AMC , AMP , TZP , CZO , FEP , #> # CXM , FOX , CTX , CAZ , CRO , GEN , #> # TOB , AMK , KAN , TMP , SXT , NIT , #> # FOS , LNZ , CIP , MFX , VAN , TEC , #> # TCY , TGC , DOX , ERY , CLI , AZM , #> # IPM , MEM , MTR , CHL , COL , MUP , … summary(example_isolates) # see all SIR results at a glance #> date patient age gender #> Min. :2002-01-02 Length:2000 Min. : 0.00 Length:2000 #> 1st Qu.:2005-07-31 Class :character 1st Qu.:63.00 Class :character #> Median :2009-07-31 Mode :character Median :74.00 Mode :character #> Mean :2009-11-20 Mean :70.69 #> 3rd Qu.:2014-05-30 3rd Qu.:82.00 #> Max. :2017-12-28 Max. :97.00 #> ward mo PEN #> Length:2000 Class :mo Class:sir #> Class :character :0 %R :73.7% (n=1201) #> Mode :character Unique:90 %SI :26.3% (n=428) #> #1 :B_ESCHR_COLI - %S :25.6% (n=417) #> #2 :B_STPHY_CONS - %I : 0.7% (n=11) #> #3 :B_STPHY_AURS #> OXA FLC AMX #> Class:sir Class:sir Class:sir #> %R :31.2% (n=114) %R :29.5% (n=278) %R :59.6% (n=804) #> %SI :68.8% (n=251) %SI :70.5% (n=665) %SI :40.4% (n=546) #> - %S :68.8% (n=251) - %S :70.5% (n=665) - %S :40.2% (n=543) #> - %I : 0.0% (n=0) - %I : 0.0% (n=0) - %I : 0.2% (n=3) #> #> AMC AMP TZP #> Class:sir Class:sir Class:sir #> %R :23.7% (n=446) %R :59.6% (n=804) %R :12.6% (n=126) #> %SI :76.3% (n=1433) %SI :40.4% (n=546) %SI :87.4% (n=875) #> - %S :71.4% (n=1342) - %S :40.2% (n=543) - %S :86.1% (n=862) #> - %I : 4.8% (n=91) - %I : 0.2% (n=3) - %I : 1.3% (n=13) #> #> CZO FEP CXM #> Class:sir Class:sir Class:sir #> %R :44.6% (n=199) %R :14.2% (n=103) %R :26.3% (n=470) #> %SI :55.4% (n=247) %SI :85.8% (n=621) %SI :73.7% (n=1319) #> - %S :54.9% (n=245) - %S :85.6% (n=620) - %S :72.5% (n=1297) #> - %I : 0.4% (n=2) - %I : 0.1% (n=1) - %I : 1.2% (n=22) #> #> FOX CTX CAZ #> Class:sir Class:sir Class:sir #> %R :27.4% (n=224) %R :15.5% (n=146) %R :66.5% (n=1204) #> %SI :72.6% (n=594) %SI :84.5% (n=797) %SI :33.5% (n=607) #> - %S :71.6% (n=586) - %S :84.4% (n=796) - %S :33.5% (n=607) #> - %I : 1.0% (n=8) - %I : 0.1% (n=1) - %I : 0.0% (n=0) #> #> CRO GEN TOB #> Class:sir Class:sir Class:sir #> %R :15.5% (n=146) %R :24.6% (n=456) %R :34.4% (n=465) #> %SI :84.5% (n=797) %SI :75.4% (n=1399) %SI :65.6% (n=886) #> - %S :84.4% (n=796) - %S :74.0% (n=1372) - %S :65.1% (n=879) #> - %I : 0.1% (n=1) - %I : 1.5% (n=27) - %I : 0.5% (n=7) #> #> AMK KAN TMP #> Class:sir Class:sir Class:sir #> %R :63.7% (n=441) %R :100.0% (n=471) %R :38.1% (n=571) #> %SI :36.3% (n=251) %SI : 0.0% (n=0) %SI :61.9% (n=928) #> - %S :36.3% (n=251) - %S : 0.0% (n=0) - %S :61.2% (n=918) #> - %I : 0.0% (n=0) - %I : 0.0% (n=0) - %I : 0.7% (n=10) #> #> SXT NIT FOS #> Class:sir Class:sir Class:sir #> %R :20.5% (n=361) %R :17.1% (n=127) %R :42.2% (n=148) #> %SI :79.5% (n=1398) %SI :82.9% (n=616) %SI :57.8% (n=203) #> - %S :79.1% (n=1392) - %S :76.0% (n=565) - %S :57.8% (n=203) #> - %I : 0.3% (n=6) - %I : 6.9% (n=51) - %I : 0.0% (n=0) #> #> LNZ CIP MFX #> Class:sir Class:sir Class:sir #> %R :69.3% (n=709) %R :16.2% (n=228) %R :33.6% (n=71) #> %SI :30.7% (n=314) %SI :83.8% (n=1181) %SI :66.4% (n=140) #> - %S :30.7% (n=314) - %S :78.9% (n=1112) - %S :64.5% (n=136) #> - %I : 0.0% (n=0) - %I : 4.9% (n=69) - %I : 1.9% (n=4) #> #> VAN TEC TCY #> Class:sir Class:sir Class:sir #> %R :38.3% (n=712) %R :75.7% (n=739) %R :29.8% (n=357) #> %SI :61.7% (n=1149) %SI :24.3% (n=237) %SI :70.3% (n=843) #> - %S :61.7% (n=1149) - %S :24.3% (n=237) - %S :68.3% (n=820) #> - %I : 0.0% (n=0) - %I : 0.0% (n=0) - %I : 1.9% (n=23) #> #> TGC DOX ERY #> Class:sir Class:sir Class:sir #> %R :12.7% (n=101) %R :27.7% (n=315) %R :57.2% (n=1084) #> %SI :87.3% (n=697) %SI :72.3% (n=821) %SI :42.8% (n=810) #> - %S :87.3% (n=697) - %S :71.7% (n=814) - %S :42.3% (n=801) #> - %I : 0.0% (n=0) - %I : 0.6% (n=7) - %I : 0.5% (n=9) #> #> CLI AZM IPM #> Class:sir Class:sir Class:sir #> %R :61.2% (n=930) %R :57.2% (n=1084) %R : 6.2% (n=55) #> %SI :38.8% (n=590) %SI :42.8% (n=810) %SI :93.8% (n=834) #> - %S :38.6% (n=586) - %S :42.3% (n=801) - %S :92.7% (n=824) #> - %I : 0.3% (n=4) - %I : 0.5% (n=9) - %I : 1.1% (n=10) #> #> MEM MTR CHL #> Class:sir Class:sir Class:sir #> %R : 5.9% (n=49) %R :14.7% (n=5) %R :21.4% (n=33) #> %SI :94.1% (n=780) %SI :85.3% (n=29) %SI :78.6% (n=121) #> - %S :94.1% (n=780) - %S :85.3% (n=29) - %S :78.6% (n=121) #> - %I : 0.0% (n=0) - %I : 0.0% (n=0) - %I : 0.0% (n=0) #> #> COL MUP RIF #> Class:sir Class:sir Class:sir #> %R :81.2% (n=1331) %R : 5.9% (n=16) %R :69.6% (n=698) #> %SI :18.8% (n=309) %SI :94.1% (n=254) %SI :30.4% (n=305) #> - %S :18.8% (n=309) - %S :93.0% (n=251) - %S :30.2% (n=303) #> - %I : 0.0% (n=0) - %I : 1.1% (n=3) - %I : 0.2% (n=2) #> # For INTERPRETING disk diffusion and MIC values ----------------------- # a whole data set, even with combined MIC values and disk zones df <- data.frame( microorganism = \"Escherichia coli\", AMP = as.mic(8), CIP = as.mic(0.256), GEN = as.disk(18), TOB = as.disk(16), ERY = \"R\" ) as.sir(df) #> => Interpreting MIC values of column 'AMP' (ampicillin) according to EUCAST #> 2022... #> OK. #> => Interpreting MIC values of column 'CIP' (ciprofloxacin) according to #> EUCAST 2022... #> OK. #> => Interpreting disk diffusion zones of column 'GEN' (gentamicin) according #> to EUCAST 2022... #> Note: #> • Breakpoints for UTI and non-UTI available for gentamicin (GEN) in #> Escherichia coli - assuming non-UTI. Use argument uti to set which #> isolates are from urine. See ?as.sir. #> => Interpreting disk diffusion zones of column 'TOB' (tobramycin) according #> to EUCAST 2022... #> Note: #> • Breakpoints for UTI and non-UTI available for tobramycin (TOB) in #> Escherichia coli - assuming non-UTI. Use argument uti to set which #> isolates are from urine. See ?as.sir. #> => Assigning class 'sir' to already clean column 'ERY' (erythromycin)... #> OK. #> microorganism AMP CIP GEN TOB ERY #> 1 Escherichia coli S I S S R # return a 'logbook' about the results: sir_interpretation_history() #> # A tibble: 50 × 12 #> datetime index ab_input ab_guideline mo_input mo_guideline #> #> 1 2023-05-26 17:28:00 1 TOB TOB Escherichia… B_[ORD]_ENTRBCTR #> 2 2023-05-26 17:27:59 1 GEN GEN Escherichia… B_[ORD]_ENTRBCTR #> 3 2023-05-26 17:27:58 1 CIP CIP Escherichia… B_[ORD]_ENTRBCTR #> 4 2023-05-26 17:27:58 1 AMP AMP Escherichia… B_[ORD]_ENTRBCTR #> 5 2023-05-26 17:27:51 1 CIP CIP B_ESCHR_COLI B_[ORD]_ENTRBCTR #> 6 2023-05-26 17:27:51 2 CIP CIP B_ESCHR_COLI B_[ORD]_ENTRBCTR #> 7 2023-05-26 17:27:51 3 CIP CIP B_ESCHR_COLI B_[ORD]_ENTRBCTR #> 8 2023-05-26 17:27:51 4 CIP CIP B_ESCHR_COLI B_[ORD]_ENTRBCTR #> 9 2023-05-26 17:27:51 5 CIP CIP B_ESCHR_COLI B_[ORD]_ENTRBCTR #> 10 2023-05-26 17:27:51 6 CIP CIP B_ESCHR_COLI B_[ORD]_ENTRBCTR #> # ℹ 40 more rows #> # ℹ 6 more variables: guideline , ref_table , method , #> # input , outcome , breakpoint_S_R # for single values as.sir( x = as.mic(2), mo = as.mo(\"S. pneumoniae\"), ab = \"AMP\", guideline = \"EUCAST\" ) #> => 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'. #> Class 'sir' #> [1] R as.sir( x = as.disk(18), mo = \"Strep pneu\", # `mo` will be coerced with as.mo() ab = \"ampicillin\", # and `ab` with as.ab() guideline = \"EUCAST\" ) #> => Interpreting disk diffusion zones of 'ampicillin' (AMP) according to #> EUCAST 2022... #> OK. #> Class 'sir' #> [1] R # \\donttest{ # the dplyr way if (require(\"dplyr\")) { df %>% mutate_if(is.mic, as.sir) df %>% mutate_if(function(x) is.mic(x) | is.disk(x), as.sir) df %>% mutate(across(where(is.mic), as.sir)) df %>% mutate_at(vars(AMP:TOB), as.sir) df %>% mutate(across(AMP:TOB, as.sir)) df %>% mutate_at(vars(AMP:TOB), as.sir, mo = .$microorganism) # to include information about urinary tract infections (UTI) data.frame( mo = \"E. coli\", NIT = c(\"<= 2\", 32), from_the_bladder = c(TRUE, FALSE) ) %>% as.sir(uti = \"from_the_bladder\") data.frame( mo = \"E. coli\", NIT = c(\"<= 2\", 32), specimen = c(\"urine\", \"blood\") ) %>% as.sir() # automatically determines urine isolates df %>% mutate_at(vars(AMP:TOB), as.sir, mo = \"E. coli\", uti = TRUE) } #> => Interpreting MIC values of 'AMP' (ampicillin) based on column #> 'microorganism' according to EUCAST 2022... #> OK. #> => Interpreting MIC values of 'CIP' (ciprofloxacin) based on column #> 'microorganism' according to EUCAST 2022... #> OK. #> => Interpreting MIC values of 'AMP' (ampicillin) based on column #> 'microorganism' according to EUCAST 2022... #> OK. #> => Interpreting MIC values of 'CIP' (ciprofloxacin) based on column #> 'microorganism' according to EUCAST 2022... #> OK. #> => Interpreting disk diffusion zones of 'GEN' (gentamicin) based on column #> 'microorganism' according to EUCAST 2022... #> Note: #> • Breakpoints for UTI and non-UTI available for gentamicin (GEN) in #> Escherichia coli - assuming non-UTI. Use argument uti to set which #> isolates are from urine. See ?as.sir. #> => Interpreting disk diffusion zones of 'TOB' (tobramycin) based on column #> 'microorganism' according to EUCAST 2022... #> Note: #> • Breakpoints for UTI and non-UTI available for tobramycin (TOB) in #> Escherichia coli - assuming non-UTI. Use argument uti to set which #> isolates are from urine. See ?as.sir. #> => Interpreting MIC values of 'AMP' (ampicillin) based on column #> 'microorganism' according to EUCAST 2022... #> OK. #> => Interpreting MIC values of 'CIP' (ciprofloxacin) based on column #> 'microorganism' according to EUCAST 2022... #> OK. #> => Interpreting MIC values of 'AMP' (ampicillin) based on column #> 'microorganism' according to EUCAST 2022... #> OK. #> => Interpreting MIC values of 'CIP' (ciprofloxacin) based on column #> 'microorganism' according to EUCAST 2022... #> OK. #> => Interpreting disk diffusion zones of 'GEN' (gentamicin) based on column #> 'microorganism' according to EUCAST 2022... #> Note: #> • Breakpoints for UTI and non-UTI available for gentamicin (GEN) in #> Escherichia coli - assuming non-UTI. Use argument uti to set which #> isolates are from urine. See ?as.sir. #> => Interpreting disk diffusion zones of 'TOB' (tobramycin) based on column #> 'microorganism' according to EUCAST 2022... #> Note: #> • Breakpoints for UTI and non-UTI available for tobramycin (TOB) in #> Escherichia coli - assuming non-UTI. Use argument uti to set which #> isolates are from urine. See ?as.sir. #> => Interpreting MIC values of 'AMP' (ampicillin) based on column #> 'microorganism' according to EUCAST 2022... #> OK. #> => Interpreting MIC values of 'CIP' (ciprofloxacin) based on column #> 'microorganism' according to EUCAST 2022... #> OK. #> => Interpreting disk diffusion zones of 'GEN' (gentamicin) based on column #> 'microorganism' according to EUCAST 2022... #> Note: #> • Breakpoints for UTI and non-UTI available for gentamicin (GEN) in #> Escherichia coli - assuming non-UTI. Use argument uti to set which #> isolates are from urine. See ?as.sir. #> => Interpreting disk diffusion zones of 'TOB' (tobramycin) based on column #> 'microorganism' according to EUCAST 2022... #> Note: #> • Breakpoints for UTI and non-UTI available for tobramycin (TOB) in #> Escherichia coli - assuming non-UTI. Use argument uti to set which #> isolates are from urine. See ?as.sir. #> => Interpreting MIC values of 'AMP' (ampicillin) according to EUCAST #> 2022... #> OK. #> => Interpreting MIC values of 'CIP' (ciprofloxacin) according to EUCAST #> 2022... #> OK. #> => Interpreting disk diffusion zones of 'GEN' (gentamicin) according to #> EUCAST 2022... #> Note: #> • Breakpoints for UTI and non-UTI available for gentamicin (GEN) in #> Escherichia coli - assuming non-UTI. Use argument uti to set which #> isolates are from urine. See ?as.sir. #> => Interpreting disk diffusion zones of 'TOB' (tobramycin) according to #> EUCAST 2022... #> Note: #> • Breakpoints for UTI and non-UTI available for tobramycin (TOB) in #> Escherichia coli - assuming non-UTI. Use argument uti to set which #> isolates are from urine. See ?as.sir. #> => Interpreting MIC values of column 'NIT' (nitrofurantoin) according to #> EUCAST 2022... #> Warning: in as.sir(): interpretation of nitrofurantoin (NIT) is only available for #> (uncomplicated) urinary tract infections (UTI) for some microorganisms, #> thus assuming uti = TRUE. See ?as.sir. #> * WARNING * #> ℹ Assuming value \"urine\" in column 'specimen' reflects a urinary tract #> infection. #> Use as.sir(uti = FALSE) to prevent this. #> => Interpreting MIC values of column 'NIT' (nitrofurantoin) according to #> EUCAST 2022... #> Warning: in as.sir(): interpretation of nitrofurantoin (NIT) is only available for #> (uncomplicated) urinary tract infections (UTI) for some microorganisms, #> thus assuming uti = TRUE. See ?as.sir. #> * WARNING * #> => Interpreting MIC values of 'AMP' (ampicillin) according to EUCAST #> 2022... #> OK. #> => Interpreting MIC values of 'CIP' (ciprofloxacin) according to EUCAST #> 2022... #> OK. #> => Interpreting disk diffusion zones of 'GEN' (gentamicin) according to #> EUCAST 2022... #> OK. #> => Interpreting disk diffusion zones of 'TOB' (tobramycin) according to #> EUCAST 2022... #> OK. #> microorganism AMP CIP GEN TOB ERY #> 1 Escherichia coli S I S S R # For CLEANING existing SIR values ------------------------------------ as.sir(c(\"S\", \"I\", \"R\", \"A\", \"B\", \"C\")) #> Warning: in as.sir(): 3 results in column '24' truncated (50%) that were invalid #> antimicrobial interpretations: \"A\", \"B\", and \"C\" #> Class 'sir' #> [1] S I R as.sir(\"<= 0.002; S\") # will return \"S\" #> Class 'sir' #> [1] S sir_data <- as.sir(c(rep(\"S\", 474), rep(\"I\", 36), rep(\"R\", 370))) is.sir(sir_data) #> [1] TRUE plot(sir_data) # for percentages barplot(sir_data) # for frequencies # the dplyr way if (require(\"dplyr\")) { example_isolates %>% mutate_at(vars(PEN:RIF), as.sir) # same: example_isolates %>% as.sir(PEN:RIF) # fastest way to transform all columns with already valid AMR results to class `sir`: example_isolates %>% mutate_if(is_sir_eligible, as.sir) # since dplyr 1.0.0, this can also be: # example_isolates %>% # mutate(across(where(is_sir_eligible), as.sir)) } #> # A tibble: 2,000 × 46 #> date patient age gender ward mo PEN OXA FLC AMX #> #> 1 2002-01-02 A77334 65 F Clinical B_ESCHR_COLI R NA NA NA #> 2 2002-01-03 A77334 65 F Clinical B_ESCHR_COLI R NA NA NA #> 3 2002-01-07 067927 45 F ICU B_STPHY_EPDR R NA R NA #> 4 2002-01-07 067927 45 F ICU B_STPHY_EPDR R NA R NA #> 5 2002-01-13 067927 45 F ICU B_STPHY_EPDR R NA R NA #> 6 2002-01-13 067927 45 F ICU B_STPHY_EPDR R NA R NA #> 7 2002-01-14 462729 78 M Clinical B_STPHY_AURS R NA S R #> 8 2002-01-14 462729 78 M Clinical B_STPHY_AURS R NA S R #> 9 2002-01-16 067927 45 F ICU B_STPHY_EPDR R NA R NA #> 10 2002-01-17 858515 79 F ICU B_STPHY_EPDR R NA S NA #> # ℹ 1,990 more rows #> # ℹ 36 more variables: AMC , AMP , TZP , CZO , FEP , #> # CXM , FOX , CTX , CAZ , CRO , GEN , #> # TOB , AMK , KAN , TMP , SXT , NIT , #> # FOS , LNZ , CIP , MFX , VAN , TEC , #> # TCY , TGC , DOX , ERY , CLI , AZM , #> # IPM , MEM , MTR , CHL , COL , MUP , … # }"},{"path":"https://msberends.github.io/AMR/reference/atc_online.html","id":null,"dir":"Reference","previous_headings":"","what":"Get ATC Properties from WHOCC Website — atc_online_property","title":"Get ATC Properties from WHOCC Website — atc_online_property","text":"Gets data WHOCC website determine properties Anatomical Therapeutic Chemical (ATC) (e.g. antibiotic), name, defined daily dose (DDD) standard unit.","code":""},{"path":"https://msberends.github.io/AMR/reference/atc_online.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get ATC Properties from WHOCC Website — atc_online_property","text":"","code":"atc_online_property( atc_code, property, administration = \"O\", url = \"https://www.whocc.no/atc_ddd_index/?code=%s&showdescription=no\", url_vet = \"https://www.whocc.no/atcvet/atcvet_index/?code=%s&showdescription=no\" ) atc_online_groups(atc_code, ...) atc_online_ddd(atc_code, ...) atc_online_ddd_units(atc_code, ...)"},{"path":"https://msberends.github.io/AMR/reference/atc_online.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Get ATC Properties from WHOCC Website — atc_online_property","text":"https://www.whocc./atc_ddd_alterations__cumulative/ddd_alterations/abbrevations/","code":""},{"path":"https://msberends.github.io/AMR/reference/atc_online.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get ATC Properties from WHOCC Website — atc_online_property","text":"atc_code character (vector) ATC code(s) antibiotics, coerced .ab() ab_atc() internally valid ATC code property property ATC code. Valid values \"ATC\", \"Name\", \"DDD\", \"U\" (\"unit\"), \"Adm.R\", \"Note\" groups. last option, hierarchical groups ATC code returned, see Examples. administration type administration using property = \"Adm.R\", see Details url url website WHOCC. sign %s can used placeholder ATC codes. url_vet url website WHOCC veterinary medicine. sign %s can used placeholder ATC_vet codes (start \"Q\"). ... arguments pass atc_property","code":""},{"path":"https://msberends.github.io/AMR/reference/atc_online.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get ATC Properties from WHOCC Website — atc_online_property","text":"Options argument administration: \"Implant\" = Implant \"Inhal\" = Inhalation \"Instill\" = Instillation \"N\" = nasal \"O\" = oral \"P\" = parenteral \"R\" = rectal \"SL\" = sublingual/buccal \"TD\" = transdermal \"V\" = vaginal Abbreviations return values using property = \"U\" (unit): \"g\" = gram \"mg\" = milligram \"mcg\" = microgram \"U\" = unit \"TU\" = thousand units \"MU\" = million units \"mmol\" = millimole \"ml\" = millilitre (e.g. eyedrops) N.B. function requires internet connection works following packages installed: curl, rvest, xml2.","code":""},{"path":"https://msberends.github.io/AMR/reference/atc_online.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get ATC Properties from WHOCC Website — atc_online_property","text":"","code":"# \\donttest{ if (requireNamespace(\"curl\") && requireNamespace(\"rvest\") && requireNamespace(\"xml2\")) { # oral DDD (Defined Daily Dose) of amoxicillin atc_online_property(\"J01CA04\", \"DDD\", \"O\") atc_online_ddd(ab_atc(\"amox\")) # parenteral DDD (Defined Daily Dose) of amoxicillin atc_online_property(\"J01CA04\", \"DDD\", \"P\") atc_online_property(\"J01CA04\", property = \"groups\") # search hierarchical groups of amoxicillin } #> Loading required namespace: rvest #> [1] \"ANTIINFECTIVES FOR SYSTEMIC USE\" #> [2] \"ANTIBACTERIALS FOR SYSTEMIC USE\" #> [3] \"BETA-LACTAM ANTIBACTERIALS, PENICILLINS\" #> [4] \"Penicillins with extended spectrum\" # }"},{"path":"https://msberends.github.io/AMR/reference/av_from_text.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrieve Antiviral Drug Names and Doses from Clinical Text — av_from_text","title":"Retrieve Antiviral Drug Names and Doses from Clinical Text — av_from_text","text":"Use function e.g. clinical texts health care records. returns list antiviral drugs, doses forms administration found texts.","code":""},{"path":"https://msberends.github.io/AMR/reference/av_from_text.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrieve Antiviral Drug Names and Doses from Clinical Text — av_from_text","text":"","code":"av_from_text( text, type = c(\"drug\", \"dose\", \"administration\"), collapse = NULL, translate_av = FALSE, thorough_search = NULL, info = interactive(), ... )"},{"path":"https://msberends.github.io/AMR/reference/av_from_text.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Retrieve Antiviral Drug Names and Doses from Clinical Text — av_from_text","text":"text text analyse type type property search , either \"drug\", \"dose\" \"administration\", see Examples collapse character pass paste(, collapse = ...) return one character per element text, see Examples translate_av type = \"drug\": column name antivirals data set translate antibiotic abbreviations , using av_property(). default FALSE. Using TRUE equal using \"name\". thorough_search logical indicate whether input must extensively searched misspelling faulty input values. Setting TRUE take considerably time using FALSE. default, turn TRUE input elements contain maximum three words. info logical indicate whether progress bar printed - default TRUE interactive mode ... arguments passed .av()","code":""},{"path":"https://msberends.github.io/AMR/reference/av_from_text.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Retrieve Antiviral Drug Names and Doses from Clinical Text — av_from_text","text":"list, character collapse NULL","code":""},{"path":"https://msberends.github.io/AMR/reference/av_from_text.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Retrieve Antiviral Drug Names and Doses from Clinical Text — av_from_text","text":"function also internally used .av(), although searches first drug name throw note drug names returned. Note: .av() function may use long regular expression match brand names antiviral drugs. may fail systems.","code":""},{"path":"https://msberends.github.io/AMR/reference/av_from_text.html","id":"argument-type","dir":"Reference","previous_headings":"","what":"Argument type","title":"Retrieve Antiviral Drug Names and Doses from Clinical Text — av_from_text","text":"default, function search antiviral drug names. text elements searched official names, ATC codes brand names. uses .av() internally, correct misspelling. type = \"dose\" (similar, like \"dosing\", \"doses\"), text elements searched numeric values higher 100 resemble years. output numeric. supports unit (g, mg, IE, etc.) multiple values one clinical text, see Examples. type = \"administration\" (abbreviations, like \"admin\", \"adm\"), text elements searched form drug administration. supports following forms (including common abbreviations): buccal, implant, inhalation, instillation, intravenous, nasal, oral, parenteral, rectal, sublingual, transdermal vaginal. Abbreviations oral ('po', 'per os') become \"oral\", values intravenous ('iv', 'intraven') become \"iv\". supports multiple values one clinical text, see Examples.","code":""},{"path":"https://msberends.github.io/AMR/reference/av_from_text.html","id":"argument-collapse","dir":"Reference","previous_headings":"","what":"Argument collapse","title":"Retrieve Antiviral Drug Names and Doses from Clinical Text — av_from_text","text":"Without using collapse, function return list. can convenient use e.g. inside mutate()):df %>% mutate(avx = av_from_text(clinical_text)) returned AV codes can transformed official names, groups, etc. av_* functions av_name() av_group(), using translate_av argument. using collapse, function return character:df %>% mutate(avx = av_from_text(clinical_text, collapse = \"|\"))","code":""},{"path":"https://msberends.github.io/AMR/reference/av_from_text.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Retrieve Antiviral Drug Names and Doses from Clinical Text — av_from_text","text":"","code":"av_from_text(\"28/03/2020 valaciclovir po tid\") #> [[1]] #> Class 'av' #> [1] VALA #> av_from_text(\"28/03/2020 valaciclovir po tid\", type = \"admin\") #> [[1]] #> [1] \"oral\" #>"},{"path":"https://msberends.github.io/AMR/reference/av_property.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Properties of an Antiviral Drug — av_property","title":"Get Properties of an Antiviral Drug — av_property","text":"Use functions return specific property antiviral drug antivirals data set. input values evaluated internally .av().","code":""},{"path":"https://msberends.github.io/AMR/reference/av_property.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Properties of an Antiviral Drug — av_property","text":"","code":"av_name(x, language = get_AMR_locale(), tolower = FALSE, ...) av_cid(x, ...) av_synonyms(x, ...) av_tradenames(x, ...) av_group(x, language = get_AMR_locale(), ...) av_atc(x, ...) av_loinc(x, ...) av_ddd(x, administration = \"oral\", ...) av_ddd_units(x, administration = \"oral\", ...) av_info(x, language = get_AMR_locale(), ...) av_url(x, open = FALSE, ...) av_property(x, property = \"name\", language = get_AMR_locale(), ...)"},{"path":"https://msberends.github.io/AMR/reference/av_property.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Properties of an Antiviral Drug — av_property","text":"x (vector ) text can coerced valid antiviral drug code .av() language language returned text - default system language (see get_AMR_locale()) can also set package option AMR_locale. Use language = NULL language = \"\" prevent translation. tolower logical indicate whether first character every output transformed lower case character. ... arguments passed .av() administration way administration, either \"oral\" \"iv\" open browse URL using utils::browseURL() property one column names one antivirals data set: vector_or(colnames(antivirals), sort = FALSE).","code":""},{"path":"https://msberends.github.io/AMR/reference/av_property.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Properties of an Antiviral Drug — av_property","text":"integer case av_cid() named list case av_info() multiple av_atc()/av_synonyms()/av_tradenames() double case av_ddd() character cases","code":""},{"path":"https://msberends.github.io/AMR/reference/av_property.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get Properties of an Antiviral Drug — av_property","text":"output translated possible. function av_url() return direct URL official website. warning returned required ATC code available.","code":""},{"path":"https://msberends.github.io/AMR/reference/av_property.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Get Properties of an Antiviral Drug — av_property","text":"World Health Organization () Collaborating Centre Drug Statistics Methodology: https://www.whocc./atc_ddd_index/ European Commission Public Health PHARMACEUTICALS - COMMUNITY REGISTER: https://ec.europa.eu/health/documents/community-register/html/reg_hum_atc.htm","code":""},{"path":"https://msberends.github.io/AMR/reference/av_property.html","id":"reference-data-publicly-available","dir":"Reference","previous_headings":"","what":"Reference Data Publicly Available","title":"Get Properties of an Antiviral Drug — av_property","text":"data sets AMR package (microorganisms, antibiotics, SIR interpretation, EUCAST rules, etc.) publicly freely available download following formats: R, MS Excel, Apache Feather, Apache Parquet, SPSS, SAS, Stata. also provide tab-separated plain text files machine-readable suitable input software program, laboratory information systems. Please visit website download links. actual files course available GitHub repository.","code":""},{"path":[]},{"path":"https://msberends.github.io/AMR/reference/av_property.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get Properties of an Antiviral Drug — av_property","text":"","code":"# all properties: av_name(\"ACI\") #> [1] \"Aciclovir\" av_atc(\"ACI\") #> [1] \"J05AB01\" av_cid(\"ACI\") #> [1] 135398513 av_synonyms(\"ACI\") #> [1] \"acicloftal\" \"aciclovier\" \"aciclovirum\" #> [4] \"activir\" \"acyclofoam\" \"acycloguanosine\" #> [7] \"acyclovir\" \"acyclovir lauriad\" \"avaclyr\" #> [10] \"cargosil\" \"cyclovir\" \"genvir\" #> [13] \"gerpevir\" \"hascovir\" \"maynar\" #> [16] \"novirus\" \"poviral\" \"sitavig\" #> [19] \"sitavir\" \"vipral\" \"viropump\" #> [22] \"virorax\" \"zovirax\" \"zyclir\" av_tradenames(\"ACI\") #> [1] \"acicloftal\" \"aciclovier\" \"aciclovirum\" #> [4] \"activir\" \"acyclofoam\" \"acycloguanosine\" #> [7] \"acyclovir\" \"acyclovir lauriad\" \"avaclyr\" #> [10] \"cargosil\" \"cyclovir\" \"genvir\" #> [13] \"gerpevir\" \"hascovir\" \"maynar\" #> [16] \"novirus\" \"poviral\" \"sitavig\" #> [19] \"sitavir\" \"vipral\" \"viropump\" #> [22] \"virorax\" \"zovirax\" \"zyclir\" av_group(\"ACI\") #> [1] \"Nucleosides and nucleotides excl. reverse transcriptase inhibitors\" av_url(\"ACI\") #> Aciclovir #> \"https://www.whocc.no/atc_ddd_index/?code=J05AB01&showdescription=no\" # lowercase transformation av_name(x = c(\"ACI\", \"VALA\")) #> [1] \"Aciclovir\" \"Valaciclovir\" av_name(x = c(\"ACI\", \"VALA\"), tolower = TRUE) #> [1] \"aciclovir\" \"valaciclovir\" # defined daily doses (DDD) av_ddd(\"ACI\", \"oral\") #> [1] 4 av_ddd_units(\"ACI\", \"oral\") #> [1] \"g\" av_ddd(\"ACI\", \"iv\") #> [1] 4 av_ddd_units(\"ACI\", \"iv\") #> [1] \"g\" av_info(\"ACI\") # all properties as a list #> $av #> [1] \"ACI\" #> #> $cid #> [1] 135398513 #> #> $name #> [1] \"Aciclovir\" #> #> $group #> [1] \"Nucleosides and nucleotides excl. reverse transcriptase inhibitors\" #> #> $atc #> [1] \"J05AB01\" #> #> $tradenames #> [1] \"acicloftal\" \"aciclovier\" \"aciclovirum\" #> [4] \"activir\" \"acyclofoam\" \"acycloguanosine\" #> [7] \"acyclovir\" \"acyclovir lauriad\" \"avaclyr\" #> [10] \"cargosil\" \"cyclovir\" \"genvir\" #> [13] \"gerpevir\" \"hascovir\" \"maynar\" #> [16] \"novirus\" \"poviral\" \"sitavig\" #> [19] \"sitavir\" \"vipral\" \"viropump\" #> [22] \"virorax\" \"zovirax\" \"zyclir\" #> #> $loinc #> [1] \"\" #> #> $ddd #> $ddd$oral #> $ddd$oral$amount #> [1] 4 #> #> $ddd$oral$units #> [1] \"g\" #> #> #> $ddd$iv #> $ddd$iv$amount #> [1] 4 #> #> $ddd$iv$units #> [1] \"g\" #> #> #> # all av_* functions use as.av() internally, so you can go from 'any' to 'any': av_atc(\"ACI\") #> [1] \"J05AB01\" av_group(\"J05AB01\") #> [1] \"Nucleosides and nucleotides excl. reverse transcriptase inhibitors\" av_loinc(\"abacavir\") #> [1] \"29113-8\" \"78772-1\" \"78773-9\" \"79134-3\" \"80118-3\" av_name(\"29113-8\") #> [1] \"Abacavir\" av_name(135398513) #> [1] \"Aciclovir\" av_name(\"J05AB01\") #> [1] \"Aciclovir\""},{"path":"https://msberends.github.io/AMR/reference/availability.html","id":null,"dir":"Reference","previous_headings":"","what":"Check Availability of Columns — availability","title":"Check Availability of Columns — availability","text":"Easy check data availability columns data set. makes easy get idea antimicrobial combinations can used calculation e.g. susceptibility() resistance().","code":""},{"path":"https://msberends.github.io/AMR/reference/availability.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check Availability of Columns — availability","text":"","code":"availability(tbl, width = NULL)"},{"path":"https://msberends.github.io/AMR/reference/availability.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check Availability of Columns — availability","text":"tbl data.frame list width number characters present visual availability - default filling width console","code":""},{"path":"https://msberends.github.io/AMR/reference/availability.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check Availability of Columns — availability","text":"data.frame column names tbl row names","code":""},{"path":"https://msberends.github.io/AMR/reference/availability.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Check Availability of Columns — availability","text":"function returns data.frame columns \"resistant\" \"visual_resistance\". values columns calculated resistance().","code":""},{"path":"https://msberends.github.io/AMR/reference/availability.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check Availability of Columns — availability","text":"","code":"availability(example_isolates) #> count available visual_availabilty resistant visual_resistance #> date 2000 100.0% |####################| #> patient 2000 100.0% |####################| #> age 2000 100.0% |####################| #> gender 2000 100.0% |####################| #> ward 2000 100.0% |####################| #> mo 2000 100.0% |####################| #> PEN 1629 81.5% |################----| 73.7% |##############------| #> OXA 365 18.3% |###-----------------| 31.2% |######--------------| #> FLC 943 47.2% |#########-----------| 29.5% |#####---------------| #> AMX 1350 67.5% |#############-------| 59.6% |###########---------| #> AMC 1879 94.0% |##################--| 23.7% |####----------------| #> AMP 1350 67.5% |#############-------| 59.6% |###########---------| #> TZP 1001 50.0% |##########----------| 12.6% |##------------------| #> CZO 446 22.3% |####----------------| 44.6% |########------------| #> FEP 724 36.2% |#######-------------| 14.2% |##------------------| #> CXM 1789 89.5% |#################---| 26.3% |#####---------------| #> FOX 818 40.9% |########------------| 27.4% |#####---------------| #> CTX 943 47.2% |#########-----------| 15.5% |###-----------------| #> CAZ 1811 90.6% |##################--| 66.5% |#############-------| #> CRO 943 47.2% |#########-----------| 15.5% |###-----------------| #> GEN 1855 92.8% |##################--| 24.6% |####----------------| #> TOB 1351 67.6% |#############-------| 34.4% |######--------------| #> AMK 692 34.6% |######--------------| 63.7% |############--------| #> KAN 471 23.6% |####----------------| 100.0% |####################| #> TMP 1499 75.0% |###############-----| 38.1% |#######-------------| #> SXT 1759 88.0% |#################---| 20.5% |####----------------| #> NIT 743 37.2% |#######-------------| 17.1% |###-----------------| #> FOS 351 17.6% |###-----------------| 42.2% |########------------| #> LNZ 1023 51.2% |##########----------| 69.3% |#############-------| #> CIP 1409 70.5% |#############-------| 16.2% |###-----------------| #> MFX 211 10.6% |##------------------| 33.6% |######--------------| #> VAN 1861 93.1% |##################--| 38.3% |#######-------------| #> TEC 976 48.8% |#########-----------| 75.7% |###############-----| #> TCY 1200 60.0% |###########---------| 29.8% |#####---------------| #> TGC 798 39.9% |########------------| 12.7% |##------------------| #> DOX 1136 56.8% |###########---------| 27.7% |#####---------------| #> ERY 1894 94.7% |##################--| 57.2% |###########---------| #> CLI 1520 76.0% |###############-----| 61.2% |############--------| #> AZM 1894 94.7% |##################--| 57.2% |###########---------| #> IPM 889 44.5% |########------------| 6.2% |#-------------------| #> MEM 829 41.5% |########------------| 5.9% |#-------------------| #> MTR 34 1.7% |--------------------| 14.7% |##------------------| #> CHL 154 7.7% |#-------------------| 21.4% |####----------------| #> COL 1640 82.0% |################----| 81.2% |################----| #> MUP 270 13.5% |##------------------| 5.9% |#-------------------| #> RIF 1003 50.2% |##########----------| 69.6% |#############-------| # \\donttest{ if (require(\"dplyr\")) { example_isolates %>% filter(mo == as.mo(\"Escherichia coli\")) %>% select_if(is.sir) %>% availability() } #> count available visual_availabilty resistant visual_resistance #> PEN 467 100.0% |######################| 100.0% |######################| #> OXA 0 0.0% |----------------------| #> FLC 0 0.0% |----------------------| #> AMX 392 83.9% |##################----| 50.0% |###########-----------| #> AMC 467 100.0% |######################| 13.1% |##--------------------| #> AMP 392 83.9% |##################----| 50.0% |###########-----------| #> TZP 416 89.1% |###################---| 5.5% |#---------------------| #> CZO 82 17.6% |###-------------------| 2.4% |----------------------| #> FEP 317 67.9% |##############--------| 2.8% |----------------------| #> CXM 465 99.6% |######################| 5.4% |#---------------------| #> FOX 377 80.7% |#################-----| 6.9% |#---------------------| #> CTX 459 98.3% |#####################-| 2.4% |----------------------| #> CAZ 460 98.5% |#####################-| 2.4% |----------------------| #> CRO 459 98.3% |#####################-| 2.4% |----------------------| #> GEN 460 98.5% |#####################-| 2.0% |----------------------| #> TOB 462 98.9% |#####################-| 2.6% |----------------------| #> AMK 171 36.6% |########--------------| 0.0% |----------------------| #> KAN 0 0.0% |----------------------| #> TMP 396 84.8% |##################----| 39.1% |########--------------| #> SXT 465 99.6% |######################| 31.6% |######----------------| #> NIT 458 98.1% |#####################-| 2.8% |----------------------| #> FOS 61 13.1% |##--------------------| 0.0% |----------------------| #> LNZ 467 100.0% |######################| 100.0% |######################| #> CIP 456 97.6% |#####################-| 12.5% |##--------------------| #> MFX 57 12.2% |##--------------------| 100.0% |######################| #> VAN 467 100.0% |######################| 100.0% |######################| #> TEC 467 100.0% |######################| 100.0% |######################| #> TCY 3 0.6% |----------------------| 66.7% |##############--------| #> TGC 68 14.6% |###-------------------| 0.0% |----------------------| #> DOX 0 0.0% |----------------------| #> ERY 467 100.0% |######################| 100.0% |######################| #> CLI 467 100.0% |######################| 100.0% |######################| #> AZM 467 100.0% |######################| 100.0% |######################| #> IPM 422 90.4% |###################---| 0.0% |----------------------| #> MEM 418 89.5% |###################---| 0.0% |----------------------| #> MTR 2 0.4% |----------------------| 0.0% |----------------------| #> CHL 0 0.0% |----------------------| #> COL 240 51.4% |###########-----------| 0.0% |----------------------| #> MUP 0 0.0% |----------------------| #> RIF 467 100.0% |######################| 100.0% |######################| # }"},{"path":"https://msberends.github.io/AMR/reference/bug_drug_combinations.html","id":null,"dir":"Reference","previous_headings":"","what":"Determine Bug-Drug Combinations — bug_drug_combinations","title":"Determine Bug-Drug Combinations — bug_drug_combinations","text":"Determine antimicrobial resistance (AMR) bug-drug combinations data set least 30 (default) isolates available per species. Use format() result prettify publishable/printable format, see Examples.","code":""},{"path":"https://msberends.github.io/AMR/reference/bug_drug_combinations.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Determine Bug-Drug Combinations — bug_drug_combinations","text":"","code":"bug_drug_combinations(x, col_mo = NULL, FUN = mo_shortname, ...) # S3 method for bug_drug_combinations format( x, translate_ab = \"name (ab, atc)\", language = get_AMR_locale(), minimum = 30, combine_SI = TRUE, add_ab_group = TRUE, remove_intrinsic_resistant = FALSE, decimal.mark = getOption(\"OutDec\"), big.mark = ifelse(decimal.mark == \",\", \".\", \",\"), ... )"},{"path":"https://msberends.github.io/AMR/reference/bug_drug_combinations.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Determine Bug-Drug Combinations — bug_drug_combinations","text":"x data set antibiotic columns, amox, AMX AMC col_mo column name names codes microorganisms (see .mo()) - default first column class mo. Values coerced using .mo(). FUN function call mo column transform microorganism codes - default mo_shortname() ... arguments passed FUN translate_ab character length 1 containing column names antibiotics data set language language returned text - default current system language (see get_AMR_locale()) can also set package option AMR_locale. Use language = NULL language = \"\" prevent translation. minimum minimum allowed number available (tested) isolates. isolate count lower minimum return NA warning. default number 30 isolates advised Clinical Laboratory Standards Institute (CLSI) best practice, see Source. combine_SI logical indicate whether values S summed, resistance based R - default TRUE add_ab_group logical indicate group antimicrobials must included first column remove_intrinsic_resistant logical indicate rows columns 100% resistance tested antimicrobials must removed table decimal.mark character used indicate numeric decimal point. big.mark character; empty used mark every big.interval decimals (hence big) decimal point.","code":""},{"path":"https://msberends.github.io/AMR/reference/bug_drug_combinations.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Determine Bug-Drug Combinations — bug_drug_combinations","text":"function bug_drug_combinations() returns data.frame columns \"mo\", \"ab\", \"S\", \"\", \"R\" \"total\".","code":""},{"path":"https://msberends.github.io/AMR/reference/bug_drug_combinations.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Determine Bug-Drug Combinations — bug_drug_combinations","text":"function format() calculates resistance per bug-drug combination returns table ready reporting/publishing. Use combine_SI = TRUE (default) test R vs. S+combine_SI = FALSE test R+vs. S. table can also directly used R Markdown / Quarto without need e.g. knitr::kable().","code":""},{"path":"https://msberends.github.io/AMR/reference/bug_drug_combinations.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Determine Bug-Drug Combinations — bug_drug_combinations","text":"","code":"# example_isolates is a data set available in the AMR package. # run ?example_isolates for more info. example_isolates #> # A tibble: 2,000 × 46 #> date patient age gender ward mo PEN OXA FLC AMX #> #> 1 2002-01-02 A77334 65 F Clinical B_ESCHR_COLI R NA NA NA #> 2 2002-01-03 A77334 65 F Clinical B_ESCHR_COLI R NA NA NA #> 3 2002-01-07 067927 45 F ICU B_STPHY_EPDR R NA R NA #> 4 2002-01-07 067927 45 F ICU B_STPHY_EPDR R NA R NA #> 5 2002-01-13 067927 45 F ICU B_STPHY_EPDR R NA R NA #> 6 2002-01-13 067927 45 F ICU B_STPHY_EPDR R NA R NA #> 7 2002-01-14 462729 78 M Clinical B_STPHY_AURS R NA S R #> 8 2002-01-14 462729 78 M Clinical B_STPHY_AURS R NA S R #> 9 2002-01-16 067927 45 F ICU B_STPHY_EPDR R NA R NA #> 10 2002-01-17 858515 79 F ICU B_STPHY_EPDR R NA S NA #> # ℹ 1,990 more rows #> # ℹ 36 more variables: AMC , AMP , TZP , CZO , FEP , #> # CXM , FOX , CTX , CAZ , CRO , GEN , #> # TOB , AMK , KAN , TMP , SXT , NIT , #> # FOS , LNZ , CIP , MFX , VAN , TEC , #> # TCY , TGC , DOX , ERY , CLI , AZM , #> # IPM , MEM , MTR , CHL , COL , MUP , … # \\donttest{ x <- bug_drug_combinations(example_isolates) head(x) #> # A tibble: 6 × 6 #> mo ab S I R total #> #> 1 (unknown species) AMC 15 0 0 15 #> 2 (unknown species) AMK 0 0 0 0 #> 3 (unknown species) AMP 15 0 1 16 #> 4 (unknown species) AMX 15 0 1 16 #> 5 (unknown species) AZM 3 0 3 6 #> 6 (unknown species) CAZ 0 0 0 0 #> Use 'format()' on this result to get a publishable/printable format. format(x, translate_ab = \"name (atc)\") #> # A tibble: 39 × 12 #> Group Drug CoNS `E. coli` `E. faecalis` `K. pneumoniae` `P. aeruginosa` #> #> 1 \"Aminogl… Amik… \"100… \" 0.0% … \"100.0% (39/… \"\" \"\" #> 2 \"\" Gent… \" 13… \" 2.0% … \"100.0% (39/… \" 10.3% (6/58)\" \" 0.0% (0/30)\" #> 3 \"\" Kana… \"100… \"\" \"100.0% (39/… \"\" \"100.0% (30/30… #> 4 \"\" Tobr… \" 78… \" 2.6% … \"100.0% (39/… \" 10.3% (6/58)\" \" 0.0% (0/30)\" #> 5 \"Ampheni… Chlo… \"\" \"\" \"\" \"\" \"100.0% (30/30… #> 6 \"Antimyc… Rifa… \"\" \"100.0% … \"\" \"100.0% (58/58… \"100.0% (30/30… #> 7 \"Beta-la… Amox… \" 93… \" 50.0% … \"\" \"100.0% (58/58… \"100.0% (30/30… #> 8 \"\" Amox… \" 42… \" 13.1% … \"\" \" 10.3% (6/58)\" \"100.0% (30/30… #> 9 \"\" Ampi… \" 93… \" 50.0% … \"\" \"100.0% (58/58… \"100.0% (30/30… #> 10 \"\" Benz… \" 77… \"100.0% … \"\" \"100.0% (58/58… \"100.0% (30/30… #> # ℹ 29 more rows #> # ℹ 5 more variables: `P. mirabilis` , `S. aureus` , #> # `S. epidermidis` , `S. hominis` , `S. pneumoniae` # Use FUN to change to transformation of microorganism codes bug_drug_combinations(example_isolates, FUN = mo_gramstain ) #> # A tibble: 80 × 6 #> mo ab S I R total #> * #> 1 Gram-negative AMC 463 89 174 726 #> 2 Gram-negative AMK 251 0 5 256 #> 3 Gram-negative AMP 226 0 405 631 #> 4 Gram-negative AMX 226 0 405 631 #> 5 Gram-negative AZM 1 2 696 699 #> 6 Gram-negative CAZ 607 0 27 634 #> 7 Gram-negative CHL 1 0 30 31 #> 8 Gram-negative CIP 610 11 63 684 #> 9 Gram-negative CLI 18 1 709 728 #> 10 Gram-negative COL 309 0 78 387 #> # ℹ 70 more rows #> Use 'format()' on this result to get a publishable/printable format. bug_drug_combinations(example_isolates, FUN = function(x) { ifelse(x == as.mo(\"Escherichia coli\"), \"E. coli\", \"Others\" ) } ) #> # A tibble: 80 × 6 #> mo ab S I R total #> * #> 1 E. coli AMC 332 74 61 467 #> 2 E. coli AMK 171 0 0 171 #> 3 E. coli AMP 196 0 196 392 #> 4 E. coli AMX 196 0 196 392 #> 5 E. coli AZM 0 0 467 467 #> 6 E. coli CAZ 449 0 11 460 #> 7 E. coli CHL 0 0 0 0 #> 8 E. coli CIP 398 1 57 456 #> 9 E. coli CLI 0 0 467 467 #> 10 E. coli COL 240 0 0 240 #> # ℹ 70 more rows #> Use 'format()' on this result to get a publishable/printable format. # }"},{"path":"https://msberends.github.io/AMR/reference/clinical_breakpoints.html","id":null,"dir":"Reference","previous_headings":"","what":"Data Set with Clinical Breakpoints for SIR Interpretation — clinical_breakpoints","title":"Data Set with Clinical Breakpoints for SIR Interpretation — clinical_breakpoints","text":"Data set containing clinical breakpoints interpret MIC disk diffusion SIR values, according international guidelines. Currently implemented guidelines EUCAST (2013-2022) CLSI (2013-2022). Use .sir() transform MICs disks measurements SIR values.","code":""},{"path":"https://msberends.github.io/AMR/reference/clinical_breakpoints.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Data Set with Clinical Breakpoints for SIR Interpretation — clinical_breakpoints","text":"","code":"clinical_breakpoints"},{"path":"https://msberends.github.io/AMR/reference/clinical_breakpoints.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Data Set with Clinical Breakpoints for SIR Interpretation — clinical_breakpoints","text":"tibble 18 271 observations 11 variables: guideline Name guideline method Either \"DISK\" \"MIC\" site Body site, e.g. \"Oral\" \"Respiratory\" mo Microbial ID, see .mo() rank_index Taxonomic rank index mo 1 (subspecies/infraspecies) 5 (unknown microorganism) ab Antibiotic ID, see .ab() ref_tbl Info guideline rule can found disk_dose Dose used disk diffusion method breakpoint_S Lowest MIC value highest number millimetres leads \"S\" breakpoint_R Highest MIC value lowest number millimetres leads \"R\" uti logical value (TRUE/FALSE) indicate whether rule applies urinary tract infection (UTI)","code":""},{"path":"https://msberends.github.io/AMR/reference/clinical_breakpoints.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Data Set with Clinical Breakpoints for SIR Interpretation — clinical_breakpoints","text":"Like data sets package, data set publicly available download following formats: R, MS Excel, Apache Feather, Apache Parquet, SPSS, SAS, Stata. Please visit website download links. actual files course available GitHub repository. allow machine reading EUCAST CLSI guidelines, almost impossible MS Excel PDF files distributed EUCAST CLSI.","code":""},{"path":[]},{"path":"https://msberends.github.io/AMR/reference/clinical_breakpoints.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Data Set with Clinical Breakpoints for SIR Interpretation — clinical_breakpoints","text":"","code":"clinical_breakpoints #> # A tibble: 18,271 × 11 #> guideline method site mo rank_index ab ref_tbl disk_dose #> #> 1 EUCAST 2022 MIC NA F_ASPRG_MGTS 2 AMB Aspergil… NA #> 2 EUCAST 2022 MIC NA F_ASPRG_NIGR 2 AMB Aspergil… NA #> 3 EUCAST 2022 MIC NA F_CANDD_ALBC 2 AMB Candida NA #> 4 EUCAST 2022 MIC NA F_CANDD_DBLN 2 AMB Candida NA #> 5 EUCAST 2022 MIC NA F_CANDD_GLBR 2 AMB Candida NA #> 6 EUCAST 2022 MIC NA F_CANDD_KRUS 2 AMB Candida NA #> 7 EUCAST 2022 MIC NA F_CANDD_PRPS 2 AMB Candida NA #> 8 EUCAST 2022 MIC NA F_CANDD_TRPC 2 AMB Candida NA #> 9 EUCAST 2022 MIC NA F_CRYPT_NFRM 2 AMB Candida NA #> 10 EUCAST 2022 DISK NA B_[ORD]_ENTRBCTR 5 AMC Enteroba… 20ug/10ug #> # ℹ 18,261 more rows #> # ℹ 3 more variables: breakpoint_S , breakpoint_R , uti "},{"path":"https://msberends.github.io/AMR/reference/count.html","id":null,"dir":"Reference","previous_headings":"","what":"Count Available Isolates — count","title":"Count Available Isolates — count","text":"functions can used count resistant/susceptible microbial isolates. functions support quasiquotation pipes, can used summarise() dplyr package also support grouped variables, see Examples. count_resistant() used count resistant isolates, count_susceptible() used count susceptible isolates.","code":""},{"path":"https://msberends.github.io/AMR/reference/count.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Count Available Isolates — count","text":"","code":"count_resistant(..., only_all_tested = FALSE) count_susceptible(..., only_all_tested = FALSE) count_R(..., only_all_tested = FALSE) count_IR(..., only_all_tested = FALSE) count_I(..., only_all_tested = FALSE) count_SI(..., only_all_tested = FALSE) count_S(..., only_all_tested = FALSE) count_all(..., only_all_tested = FALSE) n_sir(..., only_all_tested = FALSE) count_df( data, translate_ab = \"name\", language = get_AMR_locale(), combine_SI = TRUE )"},{"path":"https://msberends.github.io/AMR/reference/count.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Count Available Isolates — count","text":"... one vectors (columns) antibiotic interpretations. transformed internally .sir() needed. only_all_tested (combination therapies, .e. using one variable ...): logical indicate isolates must tested antibiotics, see section Combination Therapy data data.frame containing columns class sir (see .sir()) translate_ab column name antibiotics data set translate antibiotic abbreviations , using ab_property() language language returned text - default current system language (see get_AMR_locale()) can also set package option AMR_locale. Use language = NULL language = \"\" prevent translation. combine_SI logical indicate whether values S must merged one, output consists S+vs. R (susceptible vs. resistant) - default TRUE","code":""},{"path":"https://msberends.github.io/AMR/reference/count.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Count Available Isolates — count","text":"integer","code":""},{"path":"https://msberends.github.io/AMR/reference/count.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Count Available Isolates — count","text":"functions meant count isolates. Use resistance()/susceptibility() functions calculate microbial resistance/susceptibility. function count_resistant() equal function count_R(). function count_susceptible() equal function count_SI(). function n_sir() alias count_all(). can used count available isolates, .e. input antibiotics available result (S, R). use equal n_distinct(). function equal count_susceptible(...) + count_resistant(...). function count_df() takes variable data sir class (created .sir()) counts number S's, 's R's. also supports grouped variables. function sir_df() works exactly like count_df(), adds percentage S, R.","code":""},{"path":"https://msberends.github.io/AMR/reference/count.html","id":"interpretation-of-sir","dir":"Reference","previous_headings":"","what":"Interpretation of SIR","title":"Count Available Isolates — count","text":"2019, European Committee Antimicrobial Susceptibility Testing (EUCAST) decided change definitions susceptibility testing categories S, , R shown (https://www.eucast.org/newsiandr/): S - Susceptible, standard dosing regimen microorganism categorised \"Susceptible, standard dosing regimen\", high likelihood therapeutic success using standard dosing regimen agent. - Susceptible, increased exposure microorganism categorised \"Susceptible, Increased exposure\" high likelihood therapeutic success exposure agent increased adjusting dosing regimen concentration site infection. R = Resistant microorganism categorised \"Resistant\" high likelihood therapeutic failure even increased exposure. Exposure function mode administration, dose, dosing interval, infusion time, well distribution excretion antimicrobial agent influence infecting organism site infection. AMR package honours insight. Use susceptibility() (equal proportion_SI()) determine antimicrobial susceptibility count_susceptible() (equal count_SI()) count susceptible isolates.","code":""},{"path":"https://msberends.github.io/AMR/reference/count.html","id":"combination-therapy","dir":"Reference","previous_headings":"","what":"Combination Therapy","title":"Count Available Isolates — count","text":"using one variable ... (= combination therapy), use only_all_tested count isolates tested antibiotics/variables test . See example two antibiotics, Drug Drug B, susceptibility() works calculate %SI: Please note , combination therapies, only_all_tested = TRUE applies : , combination therapies, only_all_tested = FALSE applies : Using only_all_tested impact using one antibiotic input.","code":"-------------------------------------------------------------------- only_all_tested = FALSE only_all_tested = TRUE ----------------------- ----------------------- Drug A Drug B include as include as include as include as numerator denominator numerator denominator -------- -------- ---------- ----------- ---------- ----------- S or I S or I X X X X R S or I X X X X S or I X X - - S or I R X X X X R R - X - X R - - - - S or I X X - - R - - - - - - - - -------------------------------------------------------------------- count_S() + count_I() + count_R() = count_all() proportion_S() + proportion_I() + proportion_R() = 1 count_S() + count_I() + count_R() >= count_all() proportion_S() + proportion_I() + proportion_R() >= 1"},{"path":[]},{"path":"https://msberends.github.io/AMR/reference/count.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Count Available Isolates — count","text":"","code":"# example_isolates is a data set available in the AMR package. # run ?example_isolates for more info. # base R ------------------------------------------------------------ count_resistant(example_isolates$AMX) # counts \"R\" #> [1] 804 count_susceptible(example_isolates$AMX) # counts \"S\" and \"I\" #> [1] 546 count_all(example_isolates$AMX) # counts \"S\", \"I\" and \"R\" #> [1] 1350 # be more specific count_S(example_isolates$AMX) #> Using count_S() is discouraged; use count_susceptible() instead to also #> consider \"I\" being susceptible. This note will be shown once for this #> session. #> [1] 543 count_SI(example_isolates$AMX) #> [1] 546 count_I(example_isolates$AMX) #> [1] 3 count_IR(example_isolates$AMX) #> Using count_IR() is discouraged; use count_resistant() instead to not #> consider \"I\" being resistant. This note will be shown once for this #> session. #> [1] 807 count_R(example_isolates$AMX) #> [1] 804 # Count all available isolates count_all(example_isolates$AMX) #> [1] 1350 n_sir(example_isolates$AMX) #> [1] 1350 # n_sir() is an alias of count_all(). # Since it counts all available isolates, you can # calculate back to count e.g. susceptible isolates. # These results are the same: count_susceptible(example_isolates$AMX) #> [1] 546 susceptibility(example_isolates$AMX) * n_sir(example_isolates$AMX) #> [1] 546 # dplyr ------------------------------------------------------------- # \\donttest{ if (require(\"dplyr\")) { example_isolates %>% group_by(ward) %>% summarise( R = count_R(CIP), I = count_I(CIP), S = count_S(CIP), n1 = count_all(CIP), # the actual total; sum of all three n2 = n_sir(CIP), # same - analogous to n_distinct total = n() ) # NOT the number of tested isolates! # Number of available isolates for a whole antibiotic class # (i.e., in this data set columns GEN, TOB, AMK, KAN) example_isolates %>% group_by(ward) %>% summarise(across(aminoglycosides(), n_sir)) # Count co-resistance between amoxicillin/clav acid and gentamicin, # so we can see that combination therapy does a lot more than mono therapy. # Please mind that `susceptibility()` calculates percentages right away instead. example_isolates %>% count_susceptible(AMC) # 1433 example_isolates %>% count_all(AMC) # 1879 example_isolates %>% count_susceptible(GEN) # 1399 example_isolates %>% count_all(GEN) # 1855 example_isolates %>% count_susceptible(AMC, GEN) # 1764 example_isolates %>% count_all(AMC, GEN) # 1936 # Get number of S+I vs. R immediately of selected columns example_isolates %>% select(AMX, CIP) %>% count_df(translate = FALSE) # It also supports grouping variables example_isolates %>% select(ward, AMX, CIP) %>% group_by(ward) %>% count_df(translate = FALSE) } #> ℹ For aminoglycosides() using columns 'GEN' (gentamicin), 'TOB' #> (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin) #> # A tibble: 12 × 4 #> ward antibiotic interpretation value #> * #> 1 Clinical AMX SI 357 #> 2 Clinical AMX R 487 #> 3 Clinical CIP SI 741 #> 4 Clinical CIP R 128 #> 5 ICU AMX SI 158 #> 6 ICU AMX R 270 #> 7 ICU CIP SI 362 #> 8 ICU CIP R 85 #> 9 Outpatient AMX SI 31 #> 10 Outpatient AMX R 47 #> 11 Outpatient CIP SI 78 #> 12 Outpatient CIP R 15 # }"},{"path":"https://msberends.github.io/AMR/reference/custom_eucast_rules.html","id":null,"dir":"Reference","previous_headings":"","what":"Define Custom EUCAST Rules — custom_eucast_rules","title":"Define Custom EUCAST Rules — custom_eucast_rules","text":"Define custom EUCAST rules organisation specific analysis use output function eucast_rules().","code":""},{"path":"https://msberends.github.io/AMR/reference/custom_eucast_rules.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Define Custom EUCAST Rules — custom_eucast_rules","text":"","code":"custom_eucast_rules(...)"},{"path":"https://msberends.github.io/AMR/reference/custom_eucast_rules.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Define Custom EUCAST Rules — custom_eucast_rules","text":"... rules formula notation, see Examples","code":""},{"path":"https://msberends.github.io/AMR/reference/custom_eucast_rules.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Define Custom EUCAST Rules — custom_eucast_rules","text":"list containing custom rules","code":""},{"path":"https://msberends.github.io/AMR/reference/custom_eucast_rules.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Define Custom EUCAST Rules — custom_eucast_rules","text":"organisations adoption EUCAST rules. function can used define custom EUCAST rules used eucast_rules() function.","code":""},{"path":[]},{"path":"https://msberends.github.io/AMR/reference/custom_eucast_rules.html","id":"basics","dir":"Reference","previous_headings":"","what":"Basics","title":"Define Custom EUCAST Rules — custom_eucast_rules","text":"familiar case_when() function dplyr package, recognise input method set rules. Rules must set using R considers 'formula notation'. rule written tilde (~) consequence rule written tilde: two custom EUCAST rules: TZP (piperacillin/tazobactam) \"S\", aminopenicillins (ampicillin amoxicillin) must made \"S\", TZP \"R\", aminopenicillins must made \"R\". rules can also printed console, immediately clear work: rules (part tilde, example TZP == \"S\" TZP == \"R\") must evaluable data set: able run filter data set without errors. means example column TZP must exist. create sample data set test rules set:","code":"x <- custom_eucast_rules(TZP == \"S\" ~ aminopenicillins == \"S\", TZP == \"R\" ~ aminopenicillins == \"R\") x #> A set of custom EUCAST rules: #> #> 1. If TZP is \"S\" then set to S : #> amoxicillin (AMX), ampicillin (AMP) #> #> 2. If TZP is \"R\" then set to R : #> amoxicillin (AMX), ampicillin (AMP) df <- data.frame(mo = c(\"Escherichia coli\", \"Klebsiella pneumoniae\"), TZP = as.sir(\"R\"), ampi = as.sir(\"S\"), cipro = as.sir(\"S\")) df #> mo TZP ampi cipro #> 1 Escherichia coli R S S #> 2 Klebsiella pneumoniae R S S eucast_rules(df, rules = \"custom\", custom_rules = x, info = FALSE) #> mo TZP ampi cipro #> 1 Escherichia coli R R S #> 2 Klebsiella pneumoniae R R S"},{"path":"https://msberends.github.io/AMR/reference/custom_eucast_rules.html","id":"using-taxonomic-properties-in-rules","dir":"Reference","previous_headings":"","what":"Using taxonomic properties in rules","title":"Define Custom EUCAST Rules — custom_eucast_rules","text":"one exception columns used rules: column names microorganisms data set can also used, exist data set. column names : \"mo\", \"fullname\", \"status\", \"kingdom\", \"phylum\", \"class\", \"order\", \"family\", \"genus\", \"species\", \"subspecies\", \"rank\", \"ref\", \"oxygen_tolerance\", \"source\", \"lpsn\", \"lpsn_parent\", \"lpsn_renamed_to\", \"gbif\", \"gbif_parent\", \"gbif_renamed_to\", \"prevalence\", \"snomed\". Thus, next example work well, despite fact df data set contain column genus:","code":"y <- custom_eucast_rules(TZP == \"S\" & genus == \"Klebsiella\" ~ aminopenicillins == \"S\", TZP == \"R\" & genus == \"Klebsiella\" ~ aminopenicillins == \"R\") eucast_rules(df, rules = \"custom\", custom_rules = y, info = FALSE) #> mo TZP ampi cipro #> 1 Escherichia coli R S S #> 2 Klebsiella pneumoniae R R S"},{"path":"https://msberends.github.io/AMR/reference/custom_eucast_rules.html","id":"usage-of-antibiotic-group-names","dir":"Reference","previous_headings":"","what":"Usage of antibiotic group names","title":"Define Custom EUCAST Rules — custom_eucast_rules","text":"possible define antibiotic groups instead single antibiotics rule consequence, part tilde. examples, antibiotic group aminopenicillins used include ampicillin amoxicillin. following groups allowed (case-insensitive). Within parentheses drugs matched running rule. \"aminoglycosides\"(amikacin, amikacin/fosfomycin, amphotericin B-high, apramycin, arbekacin, astromicin, bekanamycin, dibekacin, framycetin, gentamicin, gentamicin-high, habekacin, hygromycin, isepamicin, kanamycin, kanamycin-high, kanamycin/cephalexin, micronomicin, neomycin, netilmicin, pentisomicin, plazomicin, propikacin, ribostamycin, sisomicin, streptoduocin, streptomycin, streptomycin-high, tobramycin, tobramycin-high) \"aminopenicillins\"(amoxicillin ampicillin) \"antifungals\"(amphotericin B, anidulafungin, butoconazole, caspofungin, ciclopirox, clotrimazole, econazole, fluconazole, flucytosine, fosfluconazole, griseofulvin, hachimycin, ibrexafungerp, isavuconazole, isoconazole, itraconazole, ketoconazole, manogepix, micafungin, miconazole, nystatin, oteseconazole, pimaricin, posaconazole, rezafungin, ribociclib, sulconazole, terbinafine, terconazole, voriconazole) \"antimycobacterials\"(4-aminosalicylic acid, calcium aminosalicylate, capreomycin, clofazimine, delamanid, enviomycin, ethambutol, ethambutol/isoniazid, ethionamide, isoniazid, isoniazid/sulfamethoxazole/trimethoprim/pyridoxine, morinamide, p-aminosalicylic acid, pretomanid, protionamide, pyrazinamide, rifabutin, rifampicin, rifampicin/ethambutol/isoniazid, rifampicin/isoniazid, rifampicin/pyrazinamide/ethambutol/isoniazid, rifampicin/pyrazinamide/isoniazid, rifamycin, rifapentine, simvastatin/fenofibrate, sodium aminosalicylate, streptomycin/isoniazid, terizidone, thioacetazone, thioacetazone/isoniazid, tiocarlide, viomycin) \"betalactams\"(amoxicillin, amoxicillin/clavulanic acid, amoxicillin/sulbactam, ampicillin, ampicillin/sulbactam, apalcillin, aspoxicillin, avibactam, azidocillin, azlocillin, aztreonam, aztreonam/avibactam, aztreonam/nacubactam, bacampicillin, benzathine benzylpenicillin, benzathine phenoxymethylpenicillin, benzylpenicillin, biapenem, carbenicillin, carindacillin, cefacetrile, cefaclor, cefadroxil, cefalexin, cefaloridine, cefalotin, cefamandole, cefapirin, cefatrizine, cefazedone, cefazolin, cefcapene, cefcapene pivoxil, cefdinir, cefditoren, cefditoren pivoxil, cefepime, cefepime/clavulanic acid, cefepime/nacubactam, cefepime/tazobactam, cefetamet, cefetamet pivoxil, cefetecol, cefetrizole, cefixime, cefmenoxime, cefmetazole, cefodizime, cefonicid, cefoperazone, cefoperazone/sulbactam, ceforanide, cefoselis, cefotaxime, cefotaxime/clavulanic acid, cefotaxime/sulbactam, cefotetan, cefotiam, cefotiam hexetil, cefovecin, cefoxitin, cefoxitin screening, cefozopran, cefpimizole, cefpiramide, cefpirome, cefpodoxime, cefpodoxime proxetil, cefpodoxime/clavulanic acid, cefprozil, cefquinome, cefroxadine, cefsulodin, cefsumide, ceftaroline, ceftaroline/avibactam, ceftazidime, ceftazidime/avibactam, ceftazidime/clavulanic acid, cefteram, cefteram pivoxil, ceftezole, ceftibuten, ceftiofur, ceftizoxime, ceftizoxime alapivoxil, ceftobiprole, ceftobiprole medocaril, ceftolozane/tazobactam, ceftriaxone, ceftriaxone/beta-lactamase inhibitor, cefuroxime, cefuroxime axetil, cephradine, ciclacillin, clometocillin, cloxacillin, dicloxacillin, doripenem, epicillin, ertapenem, flucloxacillin, hetacillin, imipenem, imipenem/EDTA, imipenem/relebactam, latamoxef, lenampicillin, loracarbef, mecillinam, meropenem, meropenem/nacubactam, meropenem/vaborbactam, metampicillin, meticillin, mezlocillin, mezlocillin/sulbactam, nacubactam, nafcillin, oxacillin, panipenem, penamecillin, penicillin/novobiocin, penicillin/sulbactam, pheneticillin, phenoxymethylpenicillin, piperacillin, piperacillin/sulbactam, piperacillin/tazobactam, piridicillin, pivampicillin, pivmecillinam, procaine benzylpenicillin, propicillin, razupenem, ritipenem, ritipenem acoxil, sarmoxicillin, sulbactam, sulbenicillin, sultamicillin, talampicillin, tazobactam, tebipenem, temocillin, ticarcillin, ticarcillin/clavulanic acid) \"carbapenems\"(biapenem, doripenem, ertapenem, imipenem, imipenem/EDTA, imipenem/relebactam, meropenem, meropenem/nacubactam, meropenem/vaborbactam, panipenem, razupenem, ritipenem, ritipenem acoxil, tebipenem) \"cephalosporins\"(cefacetrile, cefaclor, cefadroxil, cefalexin, cefaloridine, cefalotin, cefamandole, cefapirin, cefatrizine, cefazedone, cefazolin, cefcapene, cefcapene pivoxil, cefdinir, cefditoren, cefditoren pivoxil, cefepime, cefepime/clavulanic acid, cefepime/tazobactam, cefetamet, cefetamet pivoxil, cefetecol, cefetrizole, cefixime, cefmenoxime, cefmetazole, cefodizime, cefonicid, cefoperazone, cefoperazone/sulbactam, ceforanide, cefoselis, cefotaxime, cefotaxime/clavulanic acid, cefotaxime/sulbactam, cefotetan, cefotiam, cefotiam hexetil, cefovecin, cefoxitin, cefoxitin screening, cefozopran, cefpimizole, cefpiramide, cefpirome, cefpodoxime, cefpodoxime proxetil, cefpodoxime/clavulanic acid, cefprozil, cefquinome, cefroxadine, cefsulodin, cefsumide, ceftaroline, ceftaroline/avibactam, ceftazidime, ceftazidime/avibactam, ceftazidime/clavulanic acid, cefteram, cefteram pivoxil, ceftezole, ceftibuten, ceftiofur, ceftizoxime, ceftizoxime alapivoxil, ceftobiprole, ceftobiprole medocaril, ceftolozane/tazobactam, ceftriaxone, ceftriaxone/beta-lactamase inhibitor, cefuroxime, cefuroxime axetil, cephradine, latamoxef, loracarbef) \"cephalosporins_1st\"(cefacetrile, cefadroxil, cefalexin, cefaloridine, cefalotin, cefapirin, cefatrizine, cefazedone, cefazolin, cefroxadine, ceftezole, cephradine) \"cephalosporins_2nd\"(cefaclor, cefamandole, cefmetazole, cefonicid, ceforanide, cefotetan, cefotiam, cefoxitin, cefoxitin screening, cefprozil, cefuroxime, cefuroxime axetil, loracarbef) \"cephalosporins_3rd\"(cefcapene, cefcapene pivoxil, cefdinir, cefditoren, cefditoren pivoxil, cefetamet, cefetamet pivoxil, cefixime, cefmenoxime, cefodizime, cefoperazone, cefoperazone/sulbactam, cefotaxime, cefotaxime/clavulanic acid, cefotaxime/sulbactam, cefotiam hexetil, cefovecin, cefpimizole, cefpiramide, cefpodoxime, cefpodoxime proxetil, cefpodoxime/clavulanic acid, cefsulodin, ceftazidime, ceftazidime/avibactam, ceftazidime/clavulanic acid, cefteram, cefteram pivoxil, ceftibuten, ceftiofur, ceftizoxime, ceftizoxime alapivoxil, ceftriaxone, ceftriaxone/beta-lactamase inhibitor, latamoxef) \"cephalosporins_4th\"(cefepime, cefepime/clavulanic acid, cefepime/tazobactam, cefetecol, cefoselis, cefozopran, cefpirome, cefquinome) \"cephalosporins_5th\"(ceftaroline, ceftaroline/avibactam, ceftobiprole, ceftobiprole medocaril, ceftolozane/tazobactam) \"cephalosporins_except_caz\"(cefacetrile, cefaclor, cefadroxil, cefalexin, cefaloridine, cefalotin, cefamandole, cefapirin, cefatrizine, cefazedone, cefazolin, cefcapene, cefcapene pivoxil, cefdinir, cefditoren, cefditoren pivoxil, cefepime, cefepime/clavulanic acid, cefepime/tazobactam, cefetamet, cefetamet pivoxil, cefetecol, cefetrizole, cefixime, cefmenoxime, cefmetazole, cefodizime, cefonicid, cefoperazone, cefoperazone/sulbactam, ceforanide, cefoselis, cefotaxime, cefotaxime/clavulanic acid, cefotaxime/sulbactam, cefotetan, cefotiam, cefotiam hexetil, cefovecin, cefoxitin, cefoxitin screening, cefozopran, cefpimizole, cefpiramide, cefpirome, cefpodoxime, cefpodoxime proxetil, cefpodoxime/clavulanic acid, cefprozil, cefquinome, cefroxadine, cefsulodin, cefsumide, ceftaroline, ceftaroline/avibactam, ceftazidime/avibactam, ceftazidime/clavulanic acid, cefteram, cefteram pivoxil, ceftezole, ceftibuten, ceftiofur, ceftizoxime, ceftizoxime alapivoxil, ceftobiprole, ceftobiprole medocaril, ceftolozane/tazobactam, ceftriaxone, ceftriaxone/beta-lactamase inhibitor, cefuroxime, cefuroxime axetil, cephradine, latamoxef, loracarbef) \"fluoroquinolones\"(besifloxacin, ciprofloxacin, clinafloxacin, danofloxacin, delafloxacin, difloxacin, enoxacin, enrofloxacin, finafloxacin, fleroxacin, garenoxacin, gatifloxacin, gemifloxacin, grepafloxacin, lascufloxacin, levofloxacin, levonadifloxacin, lomefloxacin, marbofloxacin, metioxate, miloxacin, moxifloxacin, nadifloxacin, nifuroquine, norfloxacin, ofloxacin, orbifloxacin, pazufloxacin, pefloxacin, pradofloxacin, premafloxacin, prulifloxacin, rufloxacin, sarafloxacin, sitafloxacin, sparfloxacin, temafloxacin, tilbroquinol, tioxacin, tosufloxacin, trovafloxacin) \"glycopeptides\"(avoparcin, dalbavancin, norvancomycin, oritavancin, ramoplanin, teicoplanin, teicoplanin-macromethod, telavancin, vancomycin, vancomycin-macromethod) \"glycopeptides_except_lipo\"(avoparcin, norvancomycin, ramoplanin, teicoplanin, teicoplanin-macromethod, vancomycin, vancomycin-macromethod) \"lincosamides\"(acetylmidecamycin, acetylspiramycin, clindamycin, gamithromycin, kitasamycin, lincomycin, meleumycin, nafithromycin, pirlimycin, primycin, solithromycin, tildipirosin, tilmicosin, tulathromycin, tylosin, tylvalosin) \"lipoglycopeptides\"(dalbavancin, oritavancin, telavancin) \"macrolides\"(acetylmidecamycin, acetylspiramycin, azithromycin, clarithromycin, dirithromycin, erythromycin, flurithromycin, gamithromycin, josamycin, kitasamycin, meleumycin, midecamycin, miocamycin, nafithromycin, oleandomycin, pirlimycin, primycin, rokitamycin, roxithromycin, solithromycin, spiramycin, telithromycin, tildipirosin, tilmicosin, troleandomycin, tulathromycin, tylosin, tylvalosin) \"oxazolidinones\"(cadazolid, cycloserine, linezolid, tedizolid, thiacetazone) \"penicillins\"(amoxicillin, amoxicillin/clavulanic acid, amoxicillin/sulbactam, ampicillin, ampicillin/sulbactam, apalcillin, aspoxicillin, avibactam, azidocillin, azlocillin, aztreonam, aztreonam/avibactam, aztreonam/nacubactam, bacampicillin, benzathine benzylpenicillin, benzathine phenoxymethylpenicillin, benzylpenicillin, carbenicillin, carindacillin, cefepime/nacubactam, ciclacillin, clometocillin, cloxacillin, dicloxacillin, epicillin, flucloxacillin, hetacillin, lenampicillin, mecillinam, metampicillin, meticillin, mezlocillin, mezlocillin/sulbactam, nacubactam, nafcillin, oxacillin, penamecillin, penicillin/novobiocin, penicillin/sulbactam, pheneticillin, phenoxymethylpenicillin, piperacillin, piperacillin/sulbactam, piperacillin/tazobactam, piridicillin, pivampicillin, pivmecillinam, procaine benzylpenicillin, propicillin, sarmoxicillin, sulbactam, sulbenicillin, sultamicillin, talampicillin, tazobactam, temocillin, ticarcillin, ticarcillin/clavulanic acid) \"polymyxins\"(colistin, polymyxin B, polymyxin B/polysorbate 80) \"quinolones\"(besifloxacin, cinoxacin, ciprofloxacin, clinafloxacin, danofloxacin, delafloxacin, difloxacin, enoxacin, enrofloxacin, finafloxacin, fleroxacin, flumequine, garenoxacin, gatifloxacin, gemifloxacin, grepafloxacin, lascufloxacin, levofloxacin, levonadifloxacin, lomefloxacin, marbofloxacin, metioxate, miloxacin, moxifloxacin, nadifloxacin, nalidixic acid, nemonoxacin, nifuroquine, nitroxoline, norfloxacin, ofloxacin, orbifloxacin, oxolinic acid, pazufloxacin, pefloxacin, pipemidic acid, piromidic acid, pradofloxacin, premafloxacin, prulifloxacin, rosoxacin, rufloxacin, sarafloxacin, sitafloxacin, sparfloxacin, temafloxacin, tilbroquinol, tioxacin, tosufloxacin, trovafloxacin) \"streptogramins\"(pristinamycin quinupristin/dalfopristin) \"tetracyclines\"(cetocycline, chlortetracycline, clomocycline, demeclocycline, doxycycline, eravacycline, lymecycline, metacycline, minocycline, omadacycline, oxytetracycline, penimepicycline, rolitetracycline, sarecycline, tetracycline, tigecycline) \"tetracyclines_except_tgc\"(cetocycline, chlortetracycline, clomocycline, demeclocycline, doxycycline, eravacycline, lymecycline, metacycline, minocycline, omadacycline, oxytetracycline, penimepicycline, rolitetracycline, sarecycline, tetracycline) \"trimethoprims\"(brodimoprim, sulfadiazine, sulfadiazine/tetroxoprim, sulfadiazine/trimethoprim, sulfadimethoxine, sulfadimidine, sulfadimidine/trimethoprim, sulfafurazole, sulfaisodimidine, sulfalene, sulfamazone, sulfamerazine, sulfamerazine/trimethoprim, sulfamethizole, sulfamethoxazole, sulfamethoxypyridazine, sulfametomidine, sulfametoxydiazine, sulfametrole/trimethoprim, sulfamoxole, sulfamoxole/trimethoprim, sulfanilamide, sulfaperin, sulfaphenazole, sulfapyridine, sulfathiazole, sulfathiourea, trimethoprim, trimethoprim/sulfamethoxazole) \"ureidopenicillins\"(azlocillin, mezlocillin, piperacillin, piperacillin/tazobactam)","code":""},{"path":"https://msberends.github.io/AMR/reference/custom_eucast_rules.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Define Custom EUCAST Rules — custom_eucast_rules","text":"","code":"x <- custom_eucast_rules( AMC == \"R\" & genus == \"Klebsiella\" ~ aminopenicillins == \"R\", AMC == \"I\" & genus == \"Klebsiella\" ~ aminopenicillins == \"I\" ) x #> A set of custom EUCAST rules: #> #> 1. If AMC is \"R\" and genus is \"Klebsiella\" then set to R : #> amoxicillin (AMX), ampicillin (AMP) #> #> 2. If AMC is \"I\" and genus is \"Klebsiella\" then set to I : #> amoxicillin (AMX), ampicillin (AMP) # run the custom rule set (verbose = TRUE will return a logbook instead of the data set): eucast_rules(example_isolates, rules = \"custom\", custom_rules = x, info = FALSE, verbose = TRUE ) #> # A tibble: 8 × 9 #> row col mo_fullname old new rule rule_group rule_name rule_source #> #> 1 33 AMP Klebsiella pne… R I \"rep… Custom EU… Custom E… Object 'x'… #> 2 33 AMX Klebsiella pne… R I \"rep… Custom EU… Custom E… Object 'x'… #> 3 34 AMP Klebsiella pne… R I \"rep… Custom EU… Custom E… Object 'x'… #> 4 34 AMX Klebsiella pne… R I \"rep… Custom EU… Custom E… Object 'x'… #> 5 531 AMP Klebsiella pne… R I \"rep… Custom EU… Custom E… Object 'x'… #> 6 531 AMX Klebsiella pne… R I \"rep… Custom EU… Custom E… Object 'x'… #> 7 1485 AMP Klebsiella oxy… R I \"rep… Custom EU… Custom E… Object 'x'… #> 8 1485 AMX Klebsiella oxy… R I \"rep… Custom EU… Custom E… Object 'x'… # combine rule sets x2 <- c( x, custom_eucast_rules(TZP == \"R\" ~ carbapenems == \"R\") ) x2 #> A set of custom EUCAST rules: #> #> 1. If AMC is \"R\" and genus is \"Klebsiella\" then set to R : #> amoxicillin (AMX), ampicillin (AMP) #> #> 2. If AMC is \"I\" and genus is \"Klebsiella\" then set to I : #> amoxicillin (AMX), ampicillin (AMP) #> #> 3. If TZP is \"R\" then set to R : #> biapenem (BIA), doripenem (DOR), ertapenem (ETP), imipenem (IPM), #> imipenem/EDTA (IPE), imipenem/relebactam (IMR), meropenem (MEM), #> meropenem/nacubactam (MNC), meropenem/vaborbactam (MEV), panipenem (PAN), #> razupenem (RZM), ritipenem (RIT), ritipenem acoxil (RIA), tebipenem (TBP)"},{"path":"https://msberends.github.io/AMR/reference/dosage.html","id":null,"dir":"Reference","previous_headings":"","what":"Data Set with Treatment Dosages as Defined by EUCAST — dosage","title":"Data Set with Treatment Dosages as Defined by EUCAST — dosage","text":"EUCAST breakpoints used package based dosages data set. can retrieved eucast_dosage().","code":""},{"path":"https://msberends.github.io/AMR/reference/dosage.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Data Set with Treatment Dosages as Defined by EUCAST — dosage","text":"","code":"dosage"},{"path":"https://msberends.github.io/AMR/reference/dosage.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Data Set with Treatment Dosages as Defined by EUCAST — dosage","text":"tibble 336 observations 9 variables: ab Antibiotic ID used package (AMC), using official EARS-Net (European Antimicrobial Resistance Surveillance Network) codes available name Official name antimicrobial drug used WHONET/EARS-Net type Type dosage, either \"high_dosage\", \"standard_dosage\", \"uncomplicated_uti\" dose Dose, \"2 g\" \"25 mg/kg\" dose_times Number times dose must administered administration Route administration, either \"im\", \"iv\", \"oral\" notes Additional dosage notes original_txt Original text PDF file EUCAST eucast_version Version number EUCAST Clinical Breakpoints guideline dosages apply","code":""},{"path":"https://msberends.github.io/AMR/reference/dosage.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Data Set with Treatment Dosages as Defined by EUCAST — dosage","text":"data set based 'EUCAST Clinical Breakpoint Tables' v12.0 (2022) 'EUCAST Clinical Breakpoint Tables' v11.0 (2021).","code":""},{"path":"https://msberends.github.io/AMR/reference/dosage.html","id":"direct-download","dir":"Reference","previous_headings":"","what":"Direct download","title":"Data Set with Treatment Dosages as Defined by EUCAST — dosage","text":"Like data sets package, data set publicly available download following formats: R, MS Excel, Apache Feather, Apache Parquet, SPSS, SAS, Stata. Please visit website download links. actual files course available GitHub repository.","code":""},{"path":"https://msberends.github.io/AMR/reference/dosage.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Data Set with Treatment Dosages as Defined by EUCAST — dosage","text":"","code":"dosage #> # A tibble: 336 × 9 #> ab name type dose dose_times administration notes original_txt #> #> 1 AMK Amikacin stan… 25-3… 1 iv \"\" 25-30 mg/kg… #> 2 AMX Amoxicillin high… 2 g 6 iv \"\" 2 g x 6 iv #> 3 AMX Amoxicillin stan… 1 g 3 iv \"\" 1 g x 3-4 iv #> 4 AMX Amoxicillin high… 0.75… 3 oral \"\" 0.75-1 g x … #> 5 AMX Amoxicillin stan… 0.5 g 3 oral \"\" 0.5 g x 3 o… #> 6 AMX Amoxicillin unco… 0.5 g 3 oral \"\" 0.5 g x 3 o… #> 7 AMC Amoxicillin/cl… high… 2 g … 3 iv \"\" (2 g amoxic… #> 8 AMC Amoxicillin/cl… stan… 1 g … 3 iv \"\" (1 g amoxic… #> 9 AMC Amoxicillin/cl… high… 0.87… 3 oral \"\" (0.875 g am… #> 10 AMC Amoxicillin/cl… stan… 0.5 … 3 oral \"\" (0.5 g amox… #> # ℹ 326 more rows #> # ℹ 1 more variable: eucast_version "},{"path":"https://msberends.github.io/AMR/reference/eucast_rules.html","id":null,"dir":"Reference","previous_headings":"","what":"Apply EUCAST Rules — eucast_rules","title":"Apply EUCAST Rules — eucast_rules","text":"Apply rules clinical breakpoints intrinsic resistance defined European Committee Antimicrobial Susceptibility Testing (EUCAST, https://www.eucast.org), see Source. Use eucast_dosage() get data.frame advised dosages certain bug-drug combination, based dosage data set. improve interpretation antibiogram EUCAST rules applied, non-EUCAST rules can applied default, see Details.","code":""},{"path":"https://msberends.github.io/AMR/reference/eucast_rules.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Apply EUCAST Rules — eucast_rules","text":"","code":"eucast_rules( x, col_mo = NULL, info = interactive(), rules = getOption(\"AMR_eucastrules\", default = c(\"breakpoints\", \"expert\")), verbose = FALSE, version_breakpoints = 12, version_expertrules = 3.3, ampc_cephalosporin_resistance = NA, only_sir_columns = FALSE, custom_rules = NULL, ... ) eucast_dosage(ab, administration = \"iv\", version_breakpoints = 12)"},{"path":"https://msberends.github.io/AMR/reference/eucast_rules.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Apply EUCAST Rules — eucast_rules","text":"EUCAST Expert Rules. Version 2.0, 2012. Leclercq et al. EUCAST expert rules antimicrobial susceptibility testing. Clin Microbiol Infect. 2013;19(2):141-60; doi:10.1111/j.1469-0691.2011.03703.x EUCAST Expert Rules, Intrinsic Resistance Exceptional Phenotypes Tables. Version 3.1, 2016. (link) EUCAST Intrinsic Resistance Unusual Phenotypes. Version 3.2, 2020. (link) EUCAST Intrinsic Resistance Unusual Phenotypes. Version 3.3, 2021. (link) EUCAST Breakpoint tables interpretation MICs zone diameters. Version 9.0, 2019. (link) EUCAST Breakpoint tables interpretation MICs zone diameters. Version 10.0, 2020. (link) EUCAST Breakpoint tables interpretation MICs zone diameters. Version 11.0, 2021. (link) EUCAST Breakpoint tables interpretation MICs zone diameters. Version 12.0, 2022. (link)","code":""},{"path":"https://msberends.github.io/AMR/reference/eucast_rules.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Apply EUCAST Rules — eucast_rules","text":"x data set antibiotic columns, amox, AMX AMC col_mo column name names codes microorganisms (see .mo()) - default first column class mo. Values coerced using .mo(). info logical indicate whether progress printed console - default print interactive sessions rules character vector specifies rules applied. Must one \"breakpoints\", \"expert\", \"\", \"custom\", \"\", defaults c(\"breakpoints\", \"expert\"). default value can set another value using package option AMR_eucastrules: options(AMR_eucastrules = \"\"). using \"custom\", sure fill argument custom_rules . Custom rules can created custom_eucast_rules(). verbose logical turn Verbose mode (default ). Verbose mode, function apply rules data, instead returns data set logbook form extensive info rows columns effected way. Using Verbose mode takes lot time. version_breakpoints version number use EUCAST Clinical Breakpoints guideline. Can either \"12.0\", \"11.0\", \"10.0\". version_expertrules version number use EUCAST Expert Rules Intrinsic Resistance guideline. Can either \"3.3\", \"3.2\", \"3.1\". ampc_cephalosporin_resistance character value applied cefotaxime, ceftriaxone ceftazidime AmpC de-repressed cephalosporin-resistant mutants - default NA. Currently works version_expertrules 3.2 higher; version 'EUCAST Expert Rules Enterobacterales' state results cefotaxime, ceftriaxone ceftazidime reported note, results suppressed (emptied) three drugs. value NA (default) argument remove results three drugs, e.g. value \"R\" make results drugs resistant. Use NULL FALSE alter results three drugs AmpC de-repressed cephalosporin-resistant mutants. Using TRUE equal using \"R\". EUCAST Expert Rules v3.2, rule applies : Citrobacter braakii, Citrobacter freundii, Citrobacter gillenii, Citrobacter murliniae, Citrobacter rodenticum, Citrobacter sedlakii, Citrobacter werkmanii, Citrobacter youngae, Enterobacter, Hafnia alvei, Klebsiella aerogenes, Morganella morganii, Providencia, Serratia. only_sir_columns logical indicate whether antibiotic columns must detected transformed class sir (see .sir()) beforehand (default FALSE) custom_rules custom rules apply, created custom_eucast_rules() ... column name antibiotic, see section Antibiotics ab (vector ) text can coerced valid antibiotic drug code .ab() administration route administration, either \"im\", \"iv\", \"oral\"","code":""},{"path":"https://msberends.github.io/AMR/reference/eucast_rules.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Apply EUCAST Rules — eucast_rules","text":"input x, possibly edited values antibiotics. , verbose = TRUE, data.frame original new values affected bug-drug combinations.","code":""},{"path":"https://msberends.github.io/AMR/reference/eucast_rules.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Apply EUCAST Rules — eucast_rules","text":"Note: function translate MIC values SIR values. Use .sir() . Note: ampicillin (AMP, J01CA01) available amoxicillin (AMX, J01CA04) , latter used rules dependency ampicillin. drugs interchangeable comes expression antimicrobial resistance. file containing EUCAST rules located : https://github.com/msberends/AMR/blob/main/data-raw/eucast_rules.tsv. Note: Old taxonomic names replaced current taxonomy applicable. example, Ochrobactrum anthropi renamed Brucella anthropi 2020; original EUCAST rules v3.1 v3.2 yet contain new taxonomic name. AMR package contains full microbial taxonomy updated December 11th, 2022, see microorganisms.","code":""},{"path":"https://msberends.github.io/AMR/reference/eucast_rules.html","id":"custom-rules","dir":"Reference","previous_headings":"","what":"Custom Rules","title":"Apply EUCAST Rules — eucast_rules","text":"Custom rules can created using custom_eucast_rules(), e.g.:","code":"x <- custom_eucast_rules(AMC == \"R\" & genus == \"Klebsiella\" ~ aminopenicillins == \"R\", AMC == \"I\" & genus == \"Klebsiella\" ~ aminopenicillins == \"I\") eucast_rules(example_isolates, rules = \"custom\", custom_rules = x)"},{"path":"https://msberends.github.io/AMR/reference/eucast_rules.html","id":"-other-rules","dir":"Reference","previous_headings":"","what":"'Other' Rules","title":"Apply EUCAST Rules — eucast_rules","text":"processing, two non-EUCAST rules drug combinations can applied improve efficacy EUCAST rules, reliability data (analysis). rules : drug enzyme inhibitor set S drug without enzyme inhibitor S drug without enzyme inhibitor set R drug enzyme inhibitor R Important examples include amoxicillin amoxicillin/clavulanic acid, trimethoprim trimethoprim/sulfamethoxazole. Needless say, rules work, drugs must available data set. Since rules officially approved EUCAST, applied default. use rules, include \"\" rules argument, use eucast_rules(..., rules = \"\"). can also set package option AMR_eucastrules, .e. run options(AMR_eucastrules = \"\").","code":""},{"path":"https://msberends.github.io/AMR/reference/eucast_rules.html","id":"antibiotics","dir":"Reference","previous_headings":"","what":"Antibiotics","title":"Apply EUCAST Rules — eucast_rules","text":"define antibiotics column names, leave determine automatically guess_ab_col() input text (case-insensitive), use NULL skip column (e.g. TIC = NULL skip ticarcillin). Manually defined non-existing columns skipped warning. following antibiotics eligible functions eucast_rules() mdro(). shown format 'name (antimicrobial ID, ATC code)', sorted alphabetically: Amikacin (AMK, J01GB06), amoxicillin (AMX, J01CA04), amoxicillin/clavulanic acid (AMC, J01CR02), ampicillin (AMP, J01CA01), ampicillin/sulbactam (SAM, J01CR01), arbekacin (ARB, J01GB12), aspoxicillin (APX, J01CA19), azidocillin (AZD, J01CE04), azithromycin (AZM, J01FA10), azlocillin (AZL, J01CA09), aztreonam (ATM, J01DF01), bacampicillin (BAM, J01CA06), bekanamycin (BEK, J01GB13), benzathine benzylpenicillin (BNB, J01CE08), benzathine phenoxymethylpenicillin (BNP, J01CE10), benzylpenicillin (PEN, J01CE01), besifloxacin (BES, S01AE08), biapenem (BIA, J01DH05), carbenicillin (CRB, J01CA03), carindacillin (CRN, J01CA05), cefacetrile (CAC, J01DB10), cefaclor (CEC, J01DC04), cefadroxil (CFR, J01DB05), cefalexin (LEX, J01DB01), cefaloridine (RID, J01DB02), cefalotin (CEP, J01DB03), cefamandole (MAN, J01DC03), cefapirin (HAP, J01DB08), cefatrizine (CTZ, J01DB07), cefazedone (CZD, J01DB06), cefazolin (CZO, J01DB04), cefcapene (CCP, J01DD17), cefdinir (CDR, J01DD15), cefditoren (DIT, J01DD16), cefepime (FEP, J01DE01), cefetamet (CAT, J01DD10), cefixime (CFM, J01DD08), cefmenoxime (CMX, J01DD05), cefmetazole (CMZ, J01DC09), cefodizime (DIZ, J01DD09), cefonicid (CID, J01DC06), cefoperazone (CFP, J01DD12), cefoperazone/sulbactam (CSL, J01DD62), ceforanide (CND, J01DC11), cefotaxime (CTX, J01DD01), cefotaxime/clavulanic acid (CTC, J01DD51), cefotetan (CTT, J01DC05), cefotiam (CTF, J01DC07), cefoxitin (FOX, J01DC01), cefozopran (ZOP, J01DE03), cefpiramide (CPM, J01DD11), cefpirome (CPO, J01DE02), cefpodoxime (CPD, J01DD13), cefprozil (CPR, J01DC10), cefroxadine (CRD, J01DB11), cefsulodin (CFS, J01DD03), ceftaroline (CPT, J01DI02), ceftazidime (CAZ, J01DD02), ceftazidime/clavulanic acid (CCV, J01DD52), cefteram (CEM, J01DD18), ceftezole (CTL, J01DB12), ceftibuten (CTB, J01DD14), ceftizoxime (CZX, J01DD07), ceftobiprole medocaril (CFM1, J01DI01), ceftolozane/tazobactam (CZT, J01DI54), ceftriaxone (CRO, J01DD04), ceftriaxone/beta-lactamase inhibitor (CEB, J01DD63), cefuroxime (CXM, J01DC02), cephradine (CED, J01DB09), chloramphenicol (CHL, J01BA01), ciprofloxacin (CIP, J01MA02), clarithromycin (CLR, J01FA09), clindamycin (CLI, J01FF01), clometocillin (CLM, J01CE07), cloxacillin (CLO, J01CF02), colistin (COL, J01XB01), cycloserine (CYC, J04AB01), dalbavancin (DAL, J01XA04), daptomycin (DAP, J01XX09), delafloxacin (DFX, J01MA23), dibekacin (DKB, J01GB09), dicloxacillin (DIC, J01CF01), dirithromycin (DIR, J01FA13), doripenem (DOR, J01DH04), doxycycline (DOX, J01AA02), enoxacin (ENX, J01MA04), epicillin (EPC, J01CA07), ertapenem (ETP, J01DH03), erythromycin (ERY, J01FA01), fleroxacin (FLE, J01MA08), flucloxacillin (FLC, J01CF05), flurithromycin (FLR1, J01FA14), fosfomycin (FOS, J01XX01), framycetin (FRM, D09AA01), fusidic acid (FUS, J01XC01), garenoxacin (GRN, J01MA19), gatifloxacin (GAT, J01MA16), gemifloxacin (GEM, J01MA15), gentamicin (GEN, J01GB03), grepafloxacin (GRX, J01MA11), hetacillin (HET, J01CA18), imipenem (IPM, J01DH51), imipenem/relebactam (IMR, J01DH56), isepamicin (ISE, J01GB11), josamycin (JOS, J01FA07), kanamycin (KAN, J01GB04), lascufloxacin (LSC, J01MA25), latamoxef (LTM, J01DD06), levofloxacin (LVX, J01MA12), levonadifloxacin (LND, J01MA24), lincomycin (LIN, J01FF02), linezolid (LNZ, J01XX08), lomefloxacin (LOM, J01MA07), loracarbef (LOR, J01DC08), mecillinam (MEC, J01CA11), meropenem (MEM, J01DH02), meropenem/vaborbactam (MEV, J01DH52), metampicillin (MTM, J01CA14), meticillin (MET, J01CF03), mezlocillin (MEZ, J01CA10), micronomicin (MCR, S01AA22), midecamycin (MID, J01FA03), minocycline (MNO, J01AA08), miocamycin (MCM, J01FA11), moxifloxacin (MFX, J01MA14), nadifloxacin (NAD, D10AF05), nafcillin (NAF, J01CF06), nalidixic acid (NAL, J01MB02), neomycin (NEO, J01GB05), netilmicin (NET, J01GB07), nitrofurantoin (NIT, J01XE01), norfloxacin (, J01MA06), ofloxacin (OFX, J01MA01), oleandomycin (OLE, J01FA05), oritavancin (ORI, J01XA05), oxacillin (OXA, J01CF04), panipenem (PAN, J01DH55), pazufloxacin (PAZ, J01MA18), pefloxacin (PEF, J01MA03), penamecillin (PNM, J01CE06), pheneticillin (PHE, J01CE05), phenoxymethylpenicillin (PHN, J01CE02), piperacillin (PIP, J01CA12), piperacillin/tazobactam (TZP, J01CR05), pivampicillin (PVM, J01CA02), pivmecillinam (PME, J01CA08), plazomicin (PLZ, J01GB14), polymyxin B (PLB, J01XB02), pristinamycin (PRI, J01FG01), procaine benzylpenicillin (PRB, J01CE09), propicillin (PRP, J01CE03), prulifloxacin (PRU, J01MA17), quinupristin/dalfopristin (QDA, J01FG02), ribostamycin (RST, J01GB10), rifampicin (RIF, J04AB02), rokitamycin (ROK, J01FA12), roxithromycin (RXT, J01FA06), rufloxacin (RFL, J01MA10), sisomicin (SIS, J01GB08), sitafloxacin (SIT, J01MA21), solithromycin (SOL, J01FA16), sparfloxacin (SPX, J01MA09), spiramycin (SPI, J01FA02), streptoduocin (STR, J01GA02), streptomycin (STR1, J01GA01), sulbactam (SUL, J01CG01), sulbenicillin (SBC, J01CA16), sulfadiazine (SDI, J01EC02), sulfadiazine/trimethoprim (SLT1, J01EE02), sulfadimethoxine (SUD, J01ED01), sulfadimidine (SDM, J01EB03), sulfadimidine/trimethoprim (SLT2, J01EE05), sulfafurazole (SLF, J01EB05), sulfaisodimidine (SLF1, J01EB01), sulfalene (SLF2, J01ED02), sulfamazone (SZO, J01ED09), sulfamerazine (SLF3, J01ED07), sulfamerazine/trimethoprim (SLT3, J01EE07), sulfamethizole (SLF4, J01EB02), sulfamethoxazole (SMX, J01EC01), sulfamethoxypyridazine (SLF5, J01ED05), sulfametomidine (SLF6, J01ED03), sulfametoxydiazine (SLF7, J01ED04), sulfametrole/trimethoprim (SLT4, J01EE03), sulfamoxole (SLF8, J01EC03), sulfamoxole/trimethoprim (SLT5, J01EE04), sulfanilamide (SLF9, J01EB06), sulfaperin (SLF10, J01ED06), sulfaphenazole (SLF11, J01ED08), sulfapyridine (SLF12, J01EB04), sulfathiazole (SUT, J01EB07), sulfathiourea (SLF13, J01EB08), sultamicillin (SLT6, J01CR04), talampicillin (TAL, J01CA15), tazobactam (TAZ, J01CG02), tebipenem (TBP, J01DH06), tedizolid (TZD, J01XX11), teicoplanin (TEC, J01XA02), telavancin (TLV, J01XA03), telithromycin (TLT, J01FA15), temafloxacin (TMX, J01MA05), temocillin (TEM, J01CA17), tetracycline (TCY, J01AA07), ticarcillin (TIC, J01CA13), ticarcillin/clavulanic acid (TCC, J01CR03), tigecycline (TGC, J01AA12), tilbroquinol (TBQ, P01AA05), tobramycin (TOB, J01GB01), tosufloxacin (TFX, J01MA22), trimethoprim (TMP, J01EA01), trimethoprim/sulfamethoxazole (SXT, J01EE01), troleandomycin (TRL, J01FA08), trovafloxacin (TVA, J01MA13), vancomycin (VAN, J01XA01)","code":""},{"path":"https://msberends.github.io/AMR/reference/eucast_rules.html","id":"reference-data-publicly-available","dir":"Reference","previous_headings":"","what":"Reference Data Publicly Available","title":"Apply EUCAST Rules — eucast_rules","text":"data sets AMR package (microorganisms, antibiotics, SIR interpretation, EUCAST rules, etc.) publicly freely available download following formats: R, MS Excel, Apache Feather, Apache Parquet, SPSS, SAS, Stata. also provide tab-separated plain text files machine-readable suitable input software program, laboratory information systems. Please visit website download links. actual files course available GitHub repository.","code":""},{"path":"https://msberends.github.io/AMR/reference/eucast_rules.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Apply EUCAST Rules — eucast_rules","text":"","code":"# \\donttest{ a <- data.frame( mo = c( \"Staphylococcus aureus\", \"Enterococcus faecalis\", \"Escherichia coli\", \"Klebsiella pneumoniae\", \"Pseudomonas aeruginosa\" ), VAN = \"-\", # Vancomycin AMX = \"-\", # Amoxicillin COL = \"-\", # Colistin CAZ = \"-\", # Ceftazidime CXM = \"-\", # Cefuroxime PEN = \"S\", # Benzylpenicillin FOX = \"S\", # Cefoxitin stringsAsFactors = FALSE ) head(a) #> mo VAN AMX COL CAZ CXM PEN FOX #> 1 Staphylococcus aureus - - - - - S S #> 2 Enterococcus faecalis - - - - - S S #> 3 Escherichia coli - - - - - S S #> 4 Klebsiella pneumoniae - - - - - S S #> 5 Pseudomonas aeruginosa - - - - - S S # apply EUCAST rules: some results wil be changed b <- eucast_rules(a) #> Warning: in eucast_rules(): not all columns with antimicrobial results are of #> class 'sir'. Transform them on beforehand, with e.g.: #> - a %>% as.sir(CXM:AMX) #> - a %>% mutate_if(is_sir_eligible, as.sir) #> - a %>% mutate(across(where(is_sir_eligible), as.sir)) head(b) #> mo VAN AMX COL CAZ CXM PEN FOX #> 1 Staphylococcus aureus - S R S S S S #> 2 Enterococcus faecalis - - R R R S R #> 3 Escherichia coli R - - - - R S #> 4 Klebsiella pneumoniae R R - - - R S #> 5 Pseudomonas aeruginosa R R - - R R R # do not apply EUCAST rules, but rather get a data.frame # containing all details about the transformations: c <- eucast_rules(a, verbose = TRUE) #> Warning: in eucast_rules(): not all columns with antimicrobial results are of #> class 'sir'. Transform them on beforehand, with e.g.: #> - a %>% as.sir(CXM:AMX) #> - a %>% mutate_if(is_sir_eligible, as.sir) #> - a %>% mutate(across(where(is_sir_eligible), as.sir)) head(c) #> row col mo_fullname old new rule rule_group #> 1 1 AMX Staphylococcus aureus - S Breakpoints #> 2 1 CXM Staphylococcus aureus - S Breakpoints #> 3 1 CAZ Staphylococcus aureus R S Expert Rules #> 4 1 CAZ Staphylococcus aureus - R Expert Rules #> 5 1 COL Staphylococcus aureus - R Expert Rules #> 6 2 CAZ Enterococcus faecalis - R Expert Rules #> rule_name #> 1 Staphylococcus #> 2 Staphylococcus #> 3 Expert Rules on Staphylococcus #> 4 Table 4: Intrinsic resistance in gram-positive bacteria #> 5 Table 4: Intrinsic resistance in gram-positive bacteria #> 6 Table 4: Intrinsic resistance in gram-positive bacteria #> rule_source #> 1 'EUCAST Clinical Breakpoint Tables' v12.0, 2022 #> 2 'EUCAST Clinical Breakpoint Tables' v12.0, 2022 #> 3 'EUCAST Expert Rules' and 'EUCAST Intrinsic Resistance and Unusual Phenotypes' v3.3, 2021 #> 4 'EUCAST Expert Rules' and 'EUCAST Intrinsic Resistance and Unusual Phenotypes' v3.3, 2021 #> 5 'EUCAST Expert Rules' and 'EUCAST Intrinsic Resistance and Unusual Phenotypes' v3.3, 2021 #> 6 'EUCAST Expert Rules' and 'EUCAST Intrinsic Resistance and Unusual Phenotypes' v3.3, 2021 # } # Dosage guidelines: eucast_dosage(c(\"tobra\", \"genta\", \"cipro\"), \"iv\") #> ℹ Dosages for antimicrobial drugs, as meant for 'EUCAST Clinical Breakpoint #> Tables' v12.0 (2022). This note will be shown once per session. #> # A tibble: 3 × 4 #> ab name standard_dosage high_dosage #> #> 1 TOB Tobramycin 6-7 mg/kg x 1 iv NA #> 2 GEN Gentamicin 6-7 mg/kg x 1 iv NA #> 3 CIP Ciprofloxacin 0.4 g x 2 iv 0.4 g x 3 iv eucast_dosage(c(\"tobra\", \"genta\", \"cipro\"), \"iv\", version_breakpoints = 10) #> ℹ Dosages for antimicrobial drugs, as meant for 'EUCAST Clinical Breakpoint #> Tables' v10.0 (2020). This note will be shown once per session. #> # A tibble: 3 × 4 #> ab name standard_dosage high_dosage #> #> 1 TOB Tobramycin 6-7 mg/kg x 1 iv NA #> 2 GEN Gentamicin 6-7 mg/kg x 1 iv NA #> 3 CIP Ciprofloxacin 0.4 g x 2 iv 0.4 g x 3 iv"},{"path":"https://msberends.github.io/AMR/reference/example_isolates.html","id":null,"dir":"Reference","previous_headings":"","what":"Data Set with 2 000 Example Isolates — example_isolates","title":"Data Set with 2 000 Example Isolates — example_isolates","text":"data set containing 2 000 microbial isolates full antibiograms. data set contains randomised fictitious data, reflects reality can used practise AMR data analysis. examples, please read tutorial website.","code":""},{"path":"https://msberends.github.io/AMR/reference/example_isolates.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Data Set with 2 000 Example Isolates — example_isolates","text":"","code":"example_isolates"},{"path":"https://msberends.github.io/AMR/reference/example_isolates.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Data Set with 2 000 Example Isolates — example_isolates","text":"tibble 2 000 observations 46 variables: date Date receipt laboratory patient ID patient age Age patient gender Gender patient, either \"F\" \"M\" ward Ward type patient admitted, either \"Clinical\", \"ICU\", \"Outpatient\" mo ID microorganism created .mo(), see also microorganisms data set PEN:RIF 40 different antibiotics class sir (see .sir()); column names occur antibiotics data set can translated set_ab_names() ab_name()","code":""},{"path":"https://msberends.github.io/AMR/reference/example_isolates.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Data Set with 2 000 Example Isolates — example_isolates","text":"Like data sets package, data set publicly available download following formats: R, MS Excel, Apache Feather, Apache Parquet, SPSS, SAS, Stata. Please visit website download links. actual files course available GitHub repository.","code":""},{"path":"https://msberends.github.io/AMR/reference/example_isolates.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Data Set with 2 000 Example Isolates — example_isolates","text":"","code":"example_isolates #> # A tibble: 2,000 × 46 #> date patient age gender ward mo PEN OXA FLC AMX #>