* Support for CLSI 2020 guideline for interpreting MICs and disk diffusion values (using `as.rsi()`)
### Changed
* `bug_drug_combinations()` now supports grouping using the `dplyr` package
* As requested by CRAN administrators: decreased package size by 3 MB in costs of a ~50 times slower loading time of the package (i.e., `library(AMR)`)
#' All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this `AMR` package are publicly and freely available. We continually export our data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also supply flat files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please find [all download links on our website](https://msberends.github.io/AMR/articles/datasets.html), which is automatically updated with every code change.
#' @section Read more on Our Website!:
#' On our website <https://msberends.github.io/AMR/> you can find [a comprehensive tutorial](https://msberends.github.io/AMR/articles/AMR.html) about how to conduct AMR data analysis, the [complete documentation of all functions](https://msberends.github.io/AMR/reference/) and [an example analysis using WHONET data](https://msberends.github.io/AMR/articles/WHONET.html). As we would like to better understand the backgrounds and needs of our users, please [participate in our survey](https://msberends.github.io/AMR/survey.html)!
#' On our website <https://msberends.github.io/AMR/> you can find [a comprehensive tutorial](https://msberends.github.io/AMR/articles/AMR.html) about how to conduct AMR data analysis, the [complete documentation of all functions](https://msberends.github.io/AMR/reference/) and [an example analysis using WHONET data](https://msberends.github.io/AMR/articles/WHONET.html).
#' @section Contact Us:
#' For suggestions, comments or questions, please contact us at:
#'
#' Matthijs S. Berends \cr
#' m.s.berends \[at\] umcg \[dot\] nl \cr
#' University of Groningen
#' Department of Medical Microbiology
#' Department of Medical Microbiology and Infection Prevention
#' @param combine_IR a [logical] to indicate whether values R and I should be summed
#' @param add_ab_group a [logical] to indicate where the group of the antimicrobials must be included as a first column
#' @param remove_intrinsic_resistant [logical] to indicate that rows and columns with 100% resistance for all tested antimicrobials must be removed from the table
#' @param FUN the function to call on the `mo` column to transform the microorganism IDs, defaults to [mo_shortname()]
#' @param FUN the function to call on the `mo` column to transform the microorganism codes, defaults to [mo_shortname()]
#' @param translate_ab a [character] of length 1 containing column names of the [antibiotics] data set
#' Data set to interpret MIC and disk diffusion to R/SI values. Included guidelines are CLSI (`r min(as.integer(gsub("[^0-9]", "", subset(rsi_translation, guideline %like% "CLSI")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(rsi_translation, guideline %like% "CLSI")$guideline)))`) and EUCAST (`r min(as.integer(gsub("[^0-9]", "", subset(rsi_translation, guideline %like% "EUCAST")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(rsi_translation, guideline %like% "EUCAST")$guideline)))`). Use [as.rsi()] to transform MICs or disks measurements to R/SI values.
#' Data set containing reference data to interpret MIC and disk diffusion to R/SI values, according to international guidelines. Currently implemented guidelines are EUCAST (`r min(as.integer(gsub("[^0-9]", "", subset(rsi_translation, guideline %like% "EUCAST")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(rsi_translation, guideline %like% "EUCAST")$guideline)))`) and CLSI (`r min(as.integer(gsub("[^0-9]", "", subset(rsi_translation, guideline %like% "CLSI")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(rsi_translation, guideline %like% "CLSI")$guideline)))`). Use [as.rsi()] to transform MICs or disks measurements to R/SI values.
#' @format A [data.frame] with `r format(nrow(rsi_translation), big.mark = ",")` observations and `r ncol(rsi_translation)` variables:
#' - `guideline`\cr Name of the guideline
#' - `method`\cr Either `r vector_or(rsi_translation$method)`
#' Use this function to determine a valid microorganism ID ([`mo`]). Determination is done using intelligent rules and the complete taxonomic kingdoms Bacteria, Chromista, Protozoa, Archaea and most microbial species from the kingdom Fungi (see *Source*). The input can be almost anything: a full name (like `"Staphylococcus aureus"`), an abbreviated name (such as `"S. aureus"`), an abbreviation known in the field (such as `"MRSA"`), or just a genus. See *Examples*.
#' Use this function to determine a valid microorganism code ([`mo`]). Determination is done using intelligent rules and the complete taxonomic kingdoms Bacteria, Chromista, Protozoa, Archaea and most microbial species from the kingdom Fungi (see *Source*). The input can be almost anything: a full name (like `"Staphylococcus aureus"`), an abbreviated name (such as `"S. aureus"`), an abbreviation known in the field (such as `"MRSA"`), or just a genus. See *Examples*.
#' @inheritSection lifecycle Stable Lifecycle
#' @param x a [character] vector or a [data.frame] with one or two columns
#' @param Becker a [logical] to indicate whether staphylococci should be categorised into coagulase-negative staphylococci ("CoNS") and coagulase-positive staphylococci ("CoPS") instead of their own species, according to Karsten Becker *et al.* (1,2,3).
@ -46,7 +46,7 @@
@@ -46,7 +46,7 @@
#' @details
#' ## General Info
#'
#' A microorganism ID from this package (class: [`mo`]) is human readable and typically looks like these examples:
#' A microorganism (MO) code from this package (class: [`mo`]) is human readable and typically looks like these examples:
#' For interpreting MIC values as well as disk diffusion diameters, currently supported guidelines to be used as input for the `guideline` argument are: `r vector_and(AMR::rsi_translation$guideline, quotes = TRUE, reverse = TRUE)`.
#' For interpreting MIC values as well as disk diffusion diameters, currently implemented guidelines are EUCAST (`r min(as.integer(gsub("[^0-9]", "", subset(rsi_translation, guideline %like% "EUCAST")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(rsi_translation, guideline %like% "EUCAST")$guideline)))`) and CLSI (`r min(as.integer(gsub("[^0-9]", "", subset(rsi_translation, guideline %like% "CLSI")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(rsi_translation, guideline %like% "CLSI")$guideline)))`).
#'
#' Simply using `"CLSI"` or `"EUCAST"` as input will automatically select the latest version of that guideline. You can set your own data set using the `reference_data` argument. The `guideline` argument will then be ignored.
#' Thus, the `guideline` argument must be set to e.g., ``r paste0('"', subset(rsi_translation, guideline %like% "EUCAST")$guideline[1], '"')`` or ``r paste0('"', subset(rsi_translation, guideline %like% "CLSI")$guideline[1], '"')``. By simply using `"EUCAST"` (the default) or `"CLSI"` as input, the latest version of that guideline will automatically be selected. You can set your own data set using the `reference_data` argument. The `guideline` argument will then be ignored.
#'
#' ## After Interpretation
#'
@ -92,7 +92,7 @@
@@ -92,7 +92,7 @@
#' - **I = Increased exposure, but still susceptible**\cr
#' A microorganism is categorised as *Susceptible, Increased exposure* when there is a high likelihood of therapeutic success because exposure to the agent is increased by adjusting the dosing regimen or by its concentration at the site of infection.
#'
#' This AMR package honours this new insight. Use [susceptibility()] (equal to [proportion_SI()]) to determine antimicrobial susceptibility and [count_susceptible()] (equal to [count_SI()]) to count susceptible isolates.
#' This AMR package honours this (new) insight. Use [susceptibility()] (equal to [proportion_SI()]) to determine antimicrobial susceptibility and [count_susceptible()] (equal to [count_SI()]) to count susceptible isolates.
#' @return Ordered [factor] with new class `<rsi>`
@ -23,7 +23,20 @@ This is the development source of the `AMR` package for R. Not a developer? Then
@@ -23,7 +23,20 @@ This is the development source of the `AMR` package for R. Not a developer? Then
### How to get this package
Please see [our website](https://msberends.github.io/AMR/#get-this-package).
You have to add [our R-universe address](https://msberends.r-universe.dev) to your list of repositories ('repos'), by running:
```r
options(repos = c(getOption("repos"),
msberends = "https://msberends.r-universe.dev"))
```
You can now install or update the `AMR` package in the same way you are used to:
```r
install.packages("AMR")
```
It will be downloaded and installed automatically. For RStudio, click on the menu *Tools* > *Install Packages...* and then type in "AMR" and press <kbd>Install</kbd>.
* This package has been archived on 22 May 2021 because of errors in the dplyr package, causing the skimr package to fail: <https://github.com/tidyverse/dplyr/issues/5881>. This AMR package contains a fix around this error. Perhaps an idea for future development of CRAN to send an automated email to a maintainer with a warning that a package will be archived in due time?
* This package continuously has a tarball size of over 7 MB and an installation size of over 5 MB, which will return a NOTE on R CMD CHECK. This has been the case in the last releases as well. The package size is needed to offer users reference data for the complete taxonomy of microorganisms - one of the most important features of this package. This was written and explained in a manuscript that was accepted for publication in the Journal of Statistical Software earlier this year. We will add the paper as a vignette after publication in a next version. All data sets were compressed using `compression = "xz"` to make them as small as possible.
* This package now has a data folder size of ~2.8 MB (this was ~5.6 MB), which will return a NOTE on R CMD CHECK. The package size is needed to provide users reference data for the complete taxonomy of microorganisms - one of the most important features of this package. This was written and explained in a manuscript that was accepted for publication in the Journal of Statistical Software earlier this year. We will add the paper as a vignette after publication in a next version. All data sets were compressed using `compression = "xz"` to make them as small as possible. We try to update as infrequent as possible.
<spanclass="version label label-default"data-toggle="tooltip"data-placement="bottom"title="Latest development version">1.7.0</span>
<spanclass="version label label-default"data-toggle="tooltip"data-placement="bottom"title="Latest development version">1.7.0.9001</span>
</span>
</div>
@ -221,7 +221,7 @@
@@ -221,7 +221,7 @@
<spanclass="kw"><ahref="https://rdrr.io/r/base/library.html">library</a></span><spanclass="op">(</span><spanclass="va"><ahref="https://github.com/msberends/cleaner">cleaner</a></span><spanclass="op">)</span><spanclass="co"># to create frequency tables</span></code></pre></div>
<p>We will have to transform some variables to simplify and automate the analysis:</p>
<ul>
<li>Microorganisms should be transformed to our own microorganism IDs (called an <code>mo</code>) using <ahref="https://msberends.github.io/AMR/reference/catalogue_of_life">our Catalogue of Life reference data set</a>, which contains all ~70,000 microorganisms from the taxonomic kingdoms Bacteria, Fungi and Protozoa. We do the tranformation with <code><ahref="../reference/as.mo.html">as.mo()</a></code>. This function also recognises almost all WHONET abbreviations of microorganisms.</li>
<li>Microorganisms should be transformed to our own microorganism codes (called an <code>mo</code>) using <ahref="https://msberends.github.io/AMR/reference/catalogue_of_life">our Catalogue of Life reference data set</a>, which contains all ~70,000 microorganisms from the taxonomic kingdoms Bacteria, Fungi and Protozoa. We do the tranformation with <code><ahref="../reference/as.mo.html">as.mo()</a></code>. This function also recognises almost all WHONET abbreviations of microorganisms.</li>
<li>Antimicrobial results or interpretations have to be clean and valid. In other words, they should only contain values <code>"S"</code>, <code>"I"</code> or <code>"R"</code>. That is exactly where the <code><ahref="../reference/as.rsi.html">as.rsi()</a></code> function is for.</li>
@ -1005,27 +1005,27 @@ If you are reading this page from within R, please <a href="https://msberends.gi
@@ -1005,27 +1005,27 @@ If you are reading this page from within R, please <a href="https://msberends.gi
<ahref="#interpretation-from-mic-values-disk-diameters-to-rsi"class="anchor"></a>Interpretation from MIC values / disk diameters to R/SI</h2>
<p>A data set with 20,486 rows and 10 columns, containing the following column names:<br><em>guideline</em>, <em>method</em>, <em>site</em>, <em>mo</em>, <em>ab</em>, <em>ref_tbl</em>, <em>disk_dose</em>, <em>breakpoint_S</em>, <em>breakpoint_R</em> and <em>uti</em>.</p>
<p>A data set with 21,996 rows and 10 columns, containing the following column names:<br><em>guideline</em>, <em>method</em>, <em>site</em>, <em>mo</em>, <em>ab</em>, <em>ref_tbl</em>, <em>disk_dose</em>, <em>breakpoint_S</em>, <em>breakpoint_R</em> and <em>uti</em>.</p>
<p>This data set is in R available as <code>rsi_translation</code>, after you load the <code>AMR</code> package.</p>
<p>It was last updated on 5 March 2021 09:46:55 UTC. Find more info about the structure of this data set <ahref="https://msberends.github.io/AMR/reference/rsi_translation.html">here</a>.</p>
<p>It was last updated on 1 June 2021 06:44:05 UTC. Find more info about the structure of this data set <ahref="https://msberends.github.io/AMR/reference/rsi_translation.html">here</a>.</p>
<p><strong>Direct download links:</strong></p>
<ul>
<li>Download as <ahref="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/rsi_translation.rds">R file</a> (34 kB)<br>
<li>Download as <ahref="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/rsi_translation.rds">R file</a> (37 kB)<br>
</li>
<li>Download as <ahref="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/rsi_translation.xlsx">Excel file</a> (0.7 MB)<br>
</li>
<li>Download as <ahref="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/rsi_translation.txt">plain text file</a> (1.7 MB)<br>
<li>Download as <ahref="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/rsi_translation.txt">plain text file</a> (1.8 MB)<br>
</li>
<li>Download as <ahref="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/rsi_translation.sas">SAS file</a> (3.5 MB)<br>
<li>Download as <ahref="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/rsi_translation.sas">SAS file</a> (3.8 MB)<br>
</li>
<li>Download as <ahref="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/rsi_translation.sav">SPSS file</a> (3.8 MB)<br>
<li>Download as <ahref="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/rsi_translation.sav">SPSS file</a> (2.4 MB)<br>
</li>
<li>Download as <ahref="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/rsi_translation.dta">Stata file</a> (3.3 MB)</li>
<li>Download as <ahref="https://github.com/msberends/AMR/raw/master/data-raw/../data-raw/rsi_translation.dta">Stata file</a> (3.5 MB)</li>
</ul>
<divid="source-5"class="section level3">
<h3class="hasAnchor">
<ahref="#source-5"class="anchor"></a>Source</h3>
<p>This data set contains interpretation rules for MIC values and disk diffusion diameters. Included guidelines are CLSI (2010-2019) and EUCAST (2011-2021).</p>
<p>This data set contains interpretation rules for MIC values and disk diffusion diameters. Included guidelines are CLSI (2010-2020) and EUCAST (2011-2021).</p>
<ahref="#latest-released-version"class="anchor"></a>Latest released version</h4>
<p>This package is <ahref="https://msberends.r-universe.dev">available here</a> on the <ahref="https://ropensci.org/r-universe/">rOpenSci R-universe platform</a>, as CRAN does not allow frequent updates of large packages (though the <code>AMR</code> package is only 7-9 MB). With CRAN, we apparently cannot update this package frequently enough to implement the latest EUCAST/CLSI guidelines or the latest microbial taxonomy.</p>
<p>Install this package in R by using the command:</p>
<p>This package is <ahref="https://msberends.r-universe.dev">available here</a> on the <ahref="https://ropensci.org/r-universe/">rOpenSci R-universe platform</a>, as CRAN does not allow frequent updates of large packages (though the <code>AMR</code> package is only 7-9 MB). We are working on splitting this package into two: a new data package containing the microbial taxonomy, and the <code>AMR</code> package that only contains all functions.</p>
<p>In the meanwhile, you have to add <ahref="https://msberends.r-universe.dev">our R-universe address</a> to your list of repositories (โreposโ), by running:</p>
<p>It will be downloaded and installed automatically. For RStudio, click on the menu <em>Tools</em>><em>Install Packagesโฆ</em> and then type in โAMRโ and press <kbd>Install</kbd>.</p>
<p><strong>Note:</strong> Not all functions on this website may be available in this latest release. To use all functions and data sets mentioned on this website, install the latest development version.</p>
<codeclass="sourceCode R"><spanclass="fu"><ahref="https://rdrr.io/r/utils/install.packages.html">install.packages</a></span><spanclass="op">(</span><spanclass="st">"remotes"</span><spanclass="op">)</span><spanclass="co"># if you haven't already</span>
<ahref="#last-updated-30-may-2021"class="anchor"></a><small>Last updated: 30 May 2021</small>
<ahref="#last-updated-1-june-2021"class="anchor"></a><small>Last updated: 1 June 2021</small>
</h2>
<divid="new"class="section level3">
<h3class="hasAnchor">
<ahref="#new"class="anchor"></a>New</h3>
<ul>
<li>Support for CLSI 2020 guideline for interpreting MICs and disk diffusion values (using <code><ahref="../reference/as.rsi.html">as.rsi()</a></code>)</li>
</ul>
</div>
<divid="changed"class="section level3">
<h3class="hasAnchor">
<ahref="#changed"class="anchor"></a>Changed</h3>
<ul>
<li>
<code><ahref="../reference/bug_drug_combinations.html">bug_drug_combinations()</a></code> now supports grouping using the <code>dplyr</code> package</li>
<li>As requested by CRAN administrators: decreased package size by 3 MB in costs of a ~50 times slower loading time of the package (i.e., <code><ahref="https://msberends.github.io/AMR/">library(AMR)</a></code>)</li>
</ul>
</div>
@ -280,9 +289,9 @@
@@ -280,9 +289,9 @@
</li>
</ul>
</div>
<divid="new"class="section level3">
<divid="new-1"class="section level3">
<h3class="hasAnchor">
<ahref="#new"class="anchor"></a>New</h3>
<ahref="#new-1"class="anchor"></a>New</h3>
<ul>
<li>Function <code><ahref="../reference/custom_eucast_rules.html">custom_eucast_rules()</a></code> that brings support for custom AMR rules in <code><ahref="../reference/eucast_rules.html">eucast_rules()</a></code>
<p>Support for EUCAST Clinical Breakpoints v11.0 (2021), effective in the <code><ahref="../reference/eucast_rules.html">eucast_rules()</a></code> function and in <code><ahref="../reference/as.rsi.html">as.rsi()</a></code> to interpret MIC and disk diffusion values. This is now the default guideline in this package.</p>
<p>Functions <code><ahref="../reference/get_episode.html">get_episode()</a></code> and <code><ahref="../reference/get_episode.html">is_new_episode()</a></code> to determine (patient) episodes which are not necessarily based on microorganisms. The <code><ahref="../reference/get_episode.html">get_episode()</a></code> function returns the index number of the episode per group, while the <code><ahref="../reference/get_episode.html">is_new_episode()</a></code> function returns values <code>TRUE</code>/<code>FALSE</code> to indicate whether an item in a vector is the start of a new episode. They also support <code>dplyr</code>s grouping (i.e.ย using <code><ahref="https://dplyr.tidyverse.org/reference/group_by.html">group_by()</a></code>):</p>
<li><p>Support for โEUCAST Expert Rulesโ / โEUCAST Intrinsic Resistance and Unusual Phenotypesโ version 3.2 of May 2020. With this addition to the previously implemented version 3.1 of 2016, the <code><ahref="../reference/eucast_rules.html">eucast_rules()</a></code> function can now correct for more than 180 different antibiotics and the <code><ahref="../reference/mdro.html">mdro()</a></code> function can determine multidrug resistance based on more than 150 different antibiotics. All previously implemented versions of the EUCAST rules are now maintained and kept available in this package. The <code><ahref="../reference/eucast_rules.html">eucast_rules()</a></code> function consequently gained the arguments <code>version_breakpoints</code> (at the moment defaults to v10.0, 2020) and <code>version_expertrules</code> (at the moment defaults to v3.2, 2020). The <code>example_isolates</code> data set now also reflects the change from v3.1 to v3.2. The <code><ahref="../reference/mdro.html">mdro()</a></code> function now accepts <code>guideline == "EUCAST3.1"</code> and <code>guideline == "EUCAST3.2"</code>.</p></li>
<li><p>A new vignette and website page with info about all our public and freely available data sets, that can be downloaded as flat files or in formats for use in R, SPSS, SAS, Stata and Excel: <ahref="https://msberends.github.io/AMR/articles/datasets.html"class="uri">https://msberends.github.io/AMR/articles/datasets.html</a></p></li>
<li><p>Function <code><ahref="../reference/ab_from_text.html">ab_from_text()</a></code> to retrieve antimicrobial drug names, doses and forms of administration from clinical texts in e.g.ย health care records, which also corrects for misspelling since it uses <code><ahref="../reference/as.ab.html">as.ab()</a></code> internally</p></li>
<li>
@ -807,7 +816,7 @@
@@ -807,7 +816,7 @@
<p>Making this package independent of especially the tidyverse (e.g.ย packages <code>dplyr</code> and <code>tidyr</code>) tremendously increases sustainability on the long term, since tidyverse functions change quite often. Good for users, but hard for package maintainers. Most of our functions are replaced with versions that only rely on base R, which keeps this package fully functional for many years to come, without requiring a lot of maintenance to keep up with other packages anymore. Another upside it that this package can now be used with all versions of R since R-3.0.0 (April 2013). Our package is being used in settings where the resources are very limited. Fewer dependencies on newer software is helpful for such settings.</p>
<p>Negative effects of this change are:</p>
<ul>
<li>Function <code>freq()</code> that was borrowed from the <code>cleaner</code> package was removed. Use <code><ahref="https://rdrr.io/pkg/cleaner/man/freq.html">cleaner::freq()</a></code>, or run <code><ahref="https://github.com/msberends/cleaner">library("cleaner")</a></code> before you use <code>freq()</code>.</li>
<li>Function <code><ahref="https://rdrr.io/pkg/cleaner/man/freq.html">freq()</a></code> that was borrowed from the <code>cleaner</code> package was removed. Use <code><ahref="https://rdrr.io/pkg/cleaner/man/freq.html">cleaner::freq()</a></code>, or run <code><ahref="https://github.com/msberends/cleaner">library("cleaner")</a></code> before you use <code><ahref="https://rdrr.io/pkg/cleaner/man/freq.html">freq()</a></code>.</li>
<li><del>Printing values of class <code>mo</code> or <code>rsi</code> in a tibble will no longer be in colour and printing <code>rsi</code> in a tibble will show the class <code><ord></code>, not <code><rsi></code> anymore. This is purely a visual effect.</del></li>
<li><del>All functions from the <code>mo_*</code> family (like <code><ahref="../reference/mo_property.html">mo_name()</a></code> and <code><ahref="../reference/mo_property.html">mo_gramstain()</a></code>) are noticeably slower when running on hundreds of thousands of rows.</del></li>
<li>For developers: classes <code>mo</code> and <code>ab</code> now both also inherit class <code>character</code>, to support any data transformation. This change invalidates code that checks for class length == 1.</li>
@ -861,9 +870,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
@@ -861,9 +870,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<li>Support for easy principal component analysis for AMR, using the new <code><ahref="../reference/pca.html">pca()</a></code> function</li>
<li>Plotting biplots for principal component analysis using the new <code><ahref="../reference/ggplot_pca.html">ggplot_pca()</a></code> function</li>
@ -927,9 +936,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
@@ -927,9 +936,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<p>This software is now out of beta and considered stable. Nonetheless, this package will be developed continually.</p>
<divid="new-6"class="section level3">
<divid="new-7"class="section level3">
<h3class="hasAnchor">
<ahref="#new-6"class="anchor"></a>New</h3>
<ahref="#new-7"class="anchor"></a>New</h3>
<ul>
<li>Support for the newest <ahref="https://www.eucast.org/clinical_breakpoints/">EUCAST Clinical Breakpoint Tables v.10.0</a>, valid from 1 January 2020. This affects translation of MIC and disk zones using <code><ahref="../reference/as.rsi.html">as.rsi()</a></code> and inferred resistance and susceptibility using <code><ahref="../reference/eucast_rules.html">eucast_rules()</a></code>.</li>
<li>The repository of this package now contains a clean version of the EUCAST and CLSI guidelines from 2011-2020 to translate MIC and disk diffusion values to R/SI: <ahref="https://github.com/msberends/AMR/blob/master/data-raw/rsi_translation.txt"class="uri">https://github.com/msberends/AMR/blob/master/data-raw/rsi_translation.txt</a>. This <strong>allows for machine reading these guidelines</strong>, which is almost impossible with the Excel and PDF files distributed by EUCAST and CLSI. This file used to process the EUCAST Clinical Breakpoints Excel file <ahref="https://github.com/msberends/AMR/blob/master/data-raw/read_EUCAST.R">can be found here</a>.</li>
@ -1024,9 +1033,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
@@ -1024,9 +1033,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
</li>
</ul>
</div>
<divid="new-7"class="section level3">
<divid="new-8"class="section level3">
<h3class="hasAnchor">
<ahref="#new-7"class="anchor"></a>New</h3>
<ahref="#new-8"class="anchor"></a>New</h3>
<ul>
<li>
<p>Functions <code><ahref="../reference/proportion.html">susceptibility()</a></code> and <code><ahref="../reference/proportion.html">resistance()</a></code> as aliases of <code><ahref="../reference/proportion.html">proportion_SI()</a></code> and <code><ahref="../reference/proportion.html">proportion_R()</a></code>, respectively. These functions were added to make it more clear that โIโ should be considered susceptible and not resistant.</p>
@ -1139,13 +1148,13 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
@@ -1139,13 +1148,13 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<spanclass="co">#> invalid microorganism code, NA generated</span></code></pre></div>
<p>This is important, because a value like <code>"testvalue"</code> could never be understood by e.g.ย <code><ahref="../reference/mo_property.html">mo_name()</a></code>, although the class would suggest a valid microbial code.</p>
</li>
<li><p>Function <code>freq()</code> has moved to a new package, <ahref="https://github.com/msberends/clean"><code>clean</code></a> (<ahref="https://cran.r-project.org/package=clean">CRAN link</a>), since creating frequency tables actually does not fit the scope of this package. The <code>freq()</code> function still works, since it is re-exported from the <code>clean</code> package (which will be installed automatically upon updating this <code>AMR</code> package).</p></li>
<li><p>Function <code><ahref="https://rdrr.io/pkg/cleaner/man/freq.html">freq()</a></code> has moved to a new package, <ahref="https://github.com/msberends/clean"><code>clean</code></a> (<ahref="https://cran.r-project.org/package=clean">CRAN link</a>), since creating frequency tables actually does not fit the scope of this package. The <code><ahref="https://rdrr.io/pkg/cleaner/man/freq.html">freq()</a></code> function still works, since it is re-exported from the <code>clean</code> package (which will be installed automatically upon updating this <code>AMR</code> package).</p></li>
<li><p>Renamed data set <code>septic_patients</code> to <code>example_isolates</code></p></li>
</ul>
</div>
<divid="new-8"class="section level3">
<divid="new-9"class="section level3">
<h3class="hasAnchor">
<ahref="#new-8"class="anchor"></a>New</h3>
<ahref="#new-9"class="anchor"></a>New</h3>
<ul>
<li>
<p>Function <code><ahref="../reference/bug_drug_combinations.html">bug_drug_combinations()</a></code> to quickly get a <code>data.frame</code> with the results of all bug-drug combinations in a data set. The column containing microorganism codes is guessed automatically and its input is transformed with <code><ahref="../reference/mo_property.html">mo_shortname()</a></code> at default:</p>
@ -1276,9 +1285,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
@@ -1276,9 +1285,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<p>Function <code><ahref="../reference/proportion.html">rsi_df()</a></code> to transform a <code>data.frame</code> to a data set containing only the microbial interpretation (S, I, R), the antibiotic, the percentage of S/I/R and the number of available isolates. This is a convenient combination of the existing functions <code><ahref="../reference/count.html">count_df()</a></code> and <code>portion_df()</code> to immediately show resistance percentages and number of available isolates:</p>
@ -1360,9 +1369,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
@@ -1360,9 +1369,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<li>Support for translation of disk diffusion and MIC values to RSI values (i.e.ย antimicrobial interpretations). Supported guidelines are EUCAST (2011 to 2019) and CLSI (2011 to 2019). Use <code><ahref="../reference/as.rsi.html">as.rsi()</a></code> on an MIC value (created with <code><ahref="../reference/as.mic.html">as.mic()</a></code>), a disk diffusion value (created with the new <code><ahref="../reference/as.disk.html">as.disk()</a></code>) or on a complete date set containing columns with MIC or disk diffusion values.</li>
<li>Function <code><ahref="../reference/mo_property.html">mo_name()</a></code> as alias of <code><ahref="../reference/mo_property.html">mo_fullname()</a></code>
@ -1406,7 +1415,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
@@ -1406,7 +1415,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<li>The <code><ahref="../reference/age.html">age()</a></code> function gained a new argument <code>exact</code> to determine ages with decimals</li>
<li><p>speed improvement for microbial IDs</p></li>
<li><p>fixed factor level names for R Markdown</p></li>
@ -1416,12 +1425,12 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
@@ -1416,12 +1425,12 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
@ -1431,7 +1440,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
@@ -1431,7 +1440,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<li>Added ceftazidim intrinsic resistance to <em>Streptococci</em>
</li>
<li>Changed default settings for <code><ahref="../reference/age_groups.html">age_groups()</a></code>, to let groups of fives and tens end with 100+ instead of 120+</li>
<li>Fix for <code>freq()</code> for when all values are <code>NA</code>
<li>Fix for <code><ahref="https://rdrr.io/pkg/cleaner/man/freq.html">freq()</a></code> for when all values are <code>NA</code>
</li>
<li>Fix for <code><ahref="../reference/first_isolate.html">first_isolate()</a></code> for when dates are missing</li>
<li>Improved speed of <code><ahref="../reference/guess_ab_col.html">guess_ab_col()</a></code>
@ -1475,9 +1484,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
@@ -1475,9 +1484,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<li>Contains the complete manual of this package and all of its functions with an explanation of their arguments</li>
<li>Contains a comprehensive tutorial about how to conduct AMR data analysis, import data from WHONET or SPSS and many more.</li>
</ul>
<divid="new-11"class="section level4">
<divid="new-12"class="section level4">
<h4class="hasAnchor">
<ahref="#new-11"class="anchor"></a>New</h4>
<ahref="#new-12"class="anchor"></a>New</h4>
<ul>
<li><p><strong>BREAKING</strong>: removed deprecated functions, arguments and references to โbactidโ. Use <code><ahref="../reference/as.mo.html">as.mo()</a></code> to identify an MO code.</p></li>
<li>
@ -1670,7 +1679,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
@@ -1670,7 +1679,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<p>Support for tidyverse quasiquotation! Now you can create frequency tables of function outcomes:</p>
@ -1680,15 +1689,15 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
@@ -1680,15 +1689,15 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<li><p>Header info is now available as a list, with the <code>header</code> function</p></li>
<li><p>The argument <code>header</code> is now set to <code>TRUE</code> at default, even for markdown</p></li>
@ -1720,9 +1729,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
@@ -1720,9 +1729,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<li>Function <code>count_all</code> to get all available isolates (that like all <code>portion_*</code> and <code>count_*</code> functions also supports <code>summarise</code> and <code>group_by</code>), the old <code>n_rsi</code> is now an alias of <code>count_all</code>
@ -1770,7 +1779,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
@@ -1770,7 +1779,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<li><p>Using <code>portion_*</code> functions now throws a warning when total available isolate is below argument <code>minimum</code></p></li>
<li><p>Functions <code>as.mo</code>, <code>as.rsi</code>, <code>as.mic</code>, <code>as.atc</code> and <code>freq</code> will not set package name as attribute anymore</p></li>
@ -1778,14 +1787,14 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
@@ -1778,14 +1787,14 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/