<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>
<ul>
<li>Added function <code><ahref="../reference/eucast_rules.html">eucast_dosage()</a></code> to get a <code>data.frame</code> with advised dosages of a certain bug-drug combination, which is based on the new <code>dosage</code> data set</li>
<li>Added data set <code>dosage</code> to fuel the new <code><ahref="../reference/eucast_rules.html">eucast_dosage()</a></code> function and to make this data available in a structured way</li>
<li>Existing data set <code>example_isolates</code> now reflects the latest EUCAST rules</li>
</ul>
</li>
<li>
<p>Added argument <code>only_rsi_columns</code> for some functions, which defaults to <code>FALSE</code>, to indicate if the functions must only be applied to columns that are of class <code><rsi></code> (i.e., transformed with <code><ahref="../reference/as.rsi.html">as.rsi()</a></code>). This increases speed since automatic determination of antibiotic columns is not needed anymore. Affected functions are:</p>
<li>All antibiotic selector functions (<code><ahref="../reference/antibiotic_class_selectors.html">ab_class()</a></code> and its wrappers, such as <code><ahref="../reference/antibiotic_class_selectors.html">aminoglycosides()</a></code>, <code><ahref="../reference/antibiotic_class_selectors.html">carbapenems()</a></code>, <code><ahref="../reference/antibiotic_class_selectors.html">penicillins()</a></code>)</li>
<li>All antibiotic filter functions (<code><ahref="../reference/filter_ab_class.html">filter_ab_class()</a></code> and its wrappers, such as <code><ahref="../reference/filter_ab_class.html">filter_aminoglycosides()</a></code>, <code><ahref="../reference/filter_ab_class.html">filter_carbapenems()</a></code>, <code><ahref="../reference/filter_ab_class.html">filter_penicillins()</a></code>)</li>
<code><ahref="../reference/mdro.html">mdro()</a></code> (including wrappers such as <code><ahref="../reference/mdro.html">brmo()</a></code>, <code><ahref="../reference/mdro.html">mrgn()</a></code> and <code><ahref="../reference/mdro.html">eucast_exceptional_phenotypes()</a></code>)</li>
<p>Functions <code><ahref="../reference/antibiotic_class_selectors.html">oxazolidinones()</a></code> (an antibiotic selector function) and <code><ahref="../reference/filter_ab_class.html">filter_oxazolidinones()</a></code> (an antibiotic filter function) to select/filter on e.g.linezolid and tedizolid</p>
<li><p>Support for custom MDRO guidelines, using the new <code><ahref="../reference/mdro.html">custom_mdro_guideline()</a></code> function, please see <code><ahref="../reference/mdro.html">mdro()</a></code> for additional info</p></li>
<li><p>Function <code><ahref="../reference/isolate_identifier.html">isolate_identifier()</a></code>, which will paste a microorganism code with all antimicrobial results of a data set into one string for each row. This is useful to compare isolates, e.g.between institutions or regions, when there is no genotyping available.</p></li>
<li><p><code><ahref="https://ggplot2.tidyverse.org/reference/ggplot.html">ggplot()</a></code> generics for classes <code><mic></code> and <code><disk></code></p></li>
<p>Function <code><ahref="../reference/mo_property.html">mo_is_yeast()</a></code>, which determines whether a microorganism is a member of the taxonomic class Saccharomycetes or the taxonomic order Saccharomycetales:</p>
<spanclass="co"># usage for filtering data:</span>
<spanclass="va">example_isolates</span><spanclass="op">[</span><spanclass="fu"><ahref="https://rdrr.io/r/base/which.html">which</a></span><spanclass="op">(</span><spanclass="fu"><ahref="../reference/mo_property.html">mo_is_yeast</a></span><spanclass="op">(</span><spanclass="op">)</span><spanclass="op">)</span>, <spanclass="op">]</span><spanclass="co"># base R</span>
<spanclass="fu"><ahref="../reference/mo_property.html">mo_type</a></span><spanclass="op">(</span><spanclass="fu"><ahref="https://rdrr.io/r/base/c.html">c</a></span><spanclass="op">(</span><spanclass="st">"Aspergillus"</span>, <spanclass="st">"Candida"</span><spanclass="op">)</span>, language <spanclass="op">=</span><spanclass="st">"es"</span><spanclass="op">)</span><spanclass="co"># also supported: de, nl, fr, it, pt</span>
<code><ahref="../reference/as.rsi.html">is.rsi()</a></code> and <code><ahref="../reference/as.rsi.html">is.rsi.eligible()</a></code> now return a vector of <code>TRUE</code>/<code>FALSE</code> when the input is a data set, by iterating over all columns</li>
<li>Using functions without setting a data set (e.g., <code><ahref="../reference/mo_property.html">mo_is_gram_negative()</a></code>, <code><ahref="../reference/mo_property.html">mo_is_gram_positive()</a></code>, <code><ahref="../reference/mo_property.html">mo_is_intrinsic_resistant()</a></code>, <code><ahref="../reference/first_isolate.html">first_isolate()</a></code>, <code><ahref="../reference/mdro.html">mdro()</a></code>) now work with <code>dplyr</code>s <code><ahref="https://dplyr.tidyverse.org/reference/group_by.html">group_by()</a></code> again</li>
<code><ahref="../reference/first_isolate.html">first_isolate()</a></code> can be used with <code><ahref="https://dplyr.tidyverse.org/reference/group_by.html">group_by()</a></code> (also when using a dot <code>.</code> as input for the data) and now returns the names of the groups</li>
<li>Updated the data set <code>microorganisms.codes</code> (which contains popular LIS and WHONET codes for microorganisms) for some species of <em>Mycobacterium</em> that previously incorrectly returned <em>M. africanum</em>
</li>
<li>Added Pretomanid (PMD, J04AK08) to the <code>antibiotics</code> data set</li>
<li>WHONET code <code>"PNV"</code> will now correctly be interpreted as <code>PHN</code>, the antibiotic code for phenoxymethylpenicillin (‘peni V’)</li>
<li>Fix for verbose output of <code><ahref="../reference/mdro.html">mdro(..., verbose = TRUE)</a></code> for German guideline (3MGRN and 4MGRN) and Dutch guideline (BRMO, only <em>P. aeruginosa</em>)</li>
<code><ahref="../reference/as.rsi.html">is.rsi.eligible()</a></code> now detects if the column name resembles an antibiotic name or code and now returns <code>TRUE</code> immediately if the input contains any of the values “R”, “S” or “I”. This drastically improves speed, also for a lot of other functions that rely on automatic determination of antibiotic columns.</li>
<li>Functions <code><ahref="../reference/get_episode.html">get_episode()</a></code> and <code><ahref="../reference/get_episode.html">is_new_episode()</a></code> now support less than a day as value for argument <code>episode_days</code> (e.g., to include one patient/test per hour)</li>
<li>Argument <code>ampc_cephalosporin_resistance</code> in <code><ahref="../reference/eucast_rules.html">eucast_rules()</a></code> now also applies to value “I” (not only “S”)</li>
<li>Updated <code><ahref="../reference/plot.html">plot()</a></code> functions for classes <code><mic></code>, <code><disk></code> and <code><rsi></code> - the former two now support colouring if you supply the microorganism and antimicrobial agent</li>
<li>Updated colours to colour-blind friendly version for values R, S and I in tibble printing and for all plot methods (<code><ahref="../reference/ggplot_rsi.html">ggplot_rsi()</a></code> and using <code><ahref="../reference/plot.html">plot()</a></code> on classes <code><mic></code>, <code><disk></code> and <code><rsi></code>)</li>
<li>Functions <code><ahref="https://rdrr.io/r/base/print.html">print()</a></code> and <code><ahref="https://rdrr.io/r/base/summary.html">summary()</a></code> on a Principal Components Analysis object (<code><ahref="../reference/pca.html">pca()</a></code>) now print additional group info if the original data was grouped using <code><ahref="https://dplyr.tidyverse.org/reference/group_by.html">dplyr::group_by()</a></code>
<li>Improved speed and reliability of <code><ahref="../reference/guess_ab_col.html">guess_ab_col()</a></code>. As this also internally improves the reliability of <code><ahref="../reference/first_isolate.html">first_isolate()</a></code> and <code><ahref="../reference/mdro.html">mdro()</a></code>, this might have a slight impact on the results of those functions.</li>
<li>The <code><ahref="../reference/like.html">like()</a></code> function (and its fast alias <code><ahref="../reference/like.html">%like%</a></code>) now always use Perl compatibility, improving speed for many functions in this package (e.g., <code><ahref="../reference/as.mo.html">as.mo()</a></code> is now up to 4 times faster)</li>
<li>
<em>Staphylococcus cornubiensis</em> is now correctly categorised as coagulase-positive</li>
<code><ahref="../reference/random.html">random_disk()</a></code> and <code><ahref="../reference/random.html">random_mic()</a></code> now have an expanded range in their randomisation</li>
<li>Loading the package (i.e., <code><ahref="https://msberends.github.io/AMR/">library(AMR)</a></code>) now is ~50 times faster than before, in costs of package size (which increased by ~3 MB)</li>
<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>Functions <code><ahref="../reference/mo_property.html">mo_is_gram_negative()</a></code> and <code><ahref="../reference/mo_property.html">mo_is_gram_positive()</a></code> as wrappers around <code><ahref="../reference/mo_property.html">mo_gramstain()</a></code>. They always return <code>TRUE</code> or <code>FALSE</code> (except when the input is <code>NA</code> or the MO code is <code>UNKNOWN</code>), thus always return <code>FALSE</code> for species outside the taxonomic kingdom of Bacteria.</p></li>
<li><p>Function <code><ahref="../reference/mo_property.html">mo_is_intrinsic_resistant()</a></code> to test for intrinsic resistance, based on <ahref="https://www.eucast.org/expert_rules_and_intrinsic_resistance/">EUCAST Intrinsic Resistance and Unusual Phenotypes v3.2</a> from 2020.</p></li>
<li><p>Functions <code><ahref="../reference/random.html">random_mic()</a></code>, <code><ahref="../reference/random.html">random_disk()</a></code> and <code><ahref="../reference/random.html">random_rsi()</a></code> for random value generation. The functions <code><ahref="../reference/random.html">random_mic()</a></code> and <code><ahref="../reference/random.html">random_disk()</a></code> take microorganism names and antibiotic names as input to make generation more realistic.</p></li>
<li><p>New argument <code>ampc_cephalosporin_resistance</code> in <code><ahref="../reference/eucast_rules.html">eucast_rules()</a></code> to correct for AmpC de-repressed cephalosporin-resistant mutants</p></li>
<p>Interpretation of antimicrobial resistance - <code><ahref="../reference/as.rsi.html">as.rsi()</a></code>:</p>
<ul>
<li>Reference data used for <code><ahref="../reference/as.rsi.html">as.rsi()</a></code> can now be set by the user, using the <code>reference_data</code> argument. This allows for using own interpretation guidelines. The user-set data must have the same structure as <code>rsi_translation</code>.</li>
<li>Better determination of disk zones and MIC values when running <code><ahref="../reference/as.rsi.html">as.rsi()</a></code> on a data.frame</li>
<li>Fix for using <code><ahref="../reference/as.rsi.html">as.rsi()</a></code> on a data.frame in older R versions</li>
<li>
<code><ahref="../reference/as.rsi.html">as.rsi()</a></code> on a data.frame will not print a message anymore if the values are already clean R/SI values</li>
<li>If using <code><ahref="../reference/as.rsi.html">as.rsi()</a></code> on MICs or disk diffusion while there is intrinsic antimicrobial resistance, a warning will be thrown to remind about this</li>
<li>Fix for using <code><ahref="../reference/as.rsi.html">as.rsi()</a></code> on a <code>data.frame</code> that only contains one column for antibiotic interpretations</li>
<p>Some functions are now context-aware when used inside <code>dplyr</code> verbs, such as <code><ahref="https://dplyr.tidyverse.org/reference/filter.html">filter()</a></code>, <code><ahref="https://dplyr.tidyverse.org/reference/mutate.html">mutate()</a></code> and <code><ahref="https://dplyr.tidyverse.org/reference/summarise.html">summarise()</a></code>. This means that then the data argument does not need to be set anymore. This is the case for the new functions:</p>
<p>For antibiotic selection functions (such as <code><ahref="../reference/antibiotic_class_selectors.html">cephalosporins()</a></code>, <code><ahref="../reference/antibiotic_class_selectors.html">aminoglycosides()</a></code>) to select columns based on a certain antibiotic group, the dependency on the <code>tidyselect</code> package was removed, meaning that they can now also be used without the need to have this package installed and now also work in base R function calls (they rely on R 3.2 or later):</p>
<li><p>For all function arguments in the code, it is now defined what the exact type of user input should be (inspired by the <ahref="https://github.com/moodymudskipper/typed"><code>typed</code></a> package). If the user input for a certain function does not meet the requirements for a specific argument (such as the class or length), an informative error will be thrown. This makes the package more robust and the use of it more reproducible and reliable. In total, more than 420 arguments were defined.</p></li>
<li><p>Fix for <code><ahref="../reference/mo_source.html">set_mo_source()</a></code>, that previously would not remember the file location of the original file</p></li>
<li><p>Deprecated function <code><ahref="../reference/AMR-deprecated.html">p_symbol()</a></code> that not really fits the scope of this package. It will be removed in a future version. See <ahref="https://github.com/msberends/AMR/blob/v1.4.0/R/p_symbol.R">here</a> for the source code to preserve it.</p></li>
<li><p>Updated coagulase-negative staphylococci determination with Becker <em>et al.</em> 2020 (PMID 32056452), meaning that the species <em>S. argensis</em>, <em>S. caeli</em>, <em>S. debuckii</em>, <em>S. edaphicus</em> and <em>S. pseudoxylosus</em> are now all considered CoNS</p></li>
<li><p>Fix for using argument <code>reference_df</code> in <code><ahref="../reference/as.mo.html">as.mo()</a></code> and <code>mo_*()</code> functions that contain old microbial codes (from previous package versions)</p></li>
<li><p>Fixed a bug where <code><ahref="../reference/as.mo.html">mo_uncertainties()</a></code> would not return the results based on the MO matching score</p></li>
<li><p>Fixed a bug where <code><ahref="../reference/as.mo.html">as.mo()</a></code> would not return results for known laboratory codes for microorganisms</p></li>
<li><p>Fixed a bug where <code><ahref="../reference/as.ab.html">as.ab()</a></code> would sometimes fail</p></li>
<li><p>LA-MRSA and CA-MRSA are now recognised as an abbreviation for <em>Staphylococcus aureus</em>, meaning that e.g.<code><ahref="../reference/mo_property.html">mo_genus("LA-MRSA")</a></code> will return <code>"Staphylococcus"</code> and <code><ahref="../reference/mo_property.html">mo_is_gram_positive("LA-MRSA")</a></code> will return <code>TRUE</code>.</p></li>
<li><p>Fix for printing class <mo> in tibbles when all values are <code>NA</code></mo></p></li>
<li><p>Fix for <code><ahref="../reference/mo_property.html">mo_shortname()</a></code> when the input contains <code>NA</code></p></li>
<li><p>If <code><ahref="../reference/as.mo.html">as.mo()</a></code> takes more than 30 seconds, some suggestions will be done to improve speed</p></li>
<li>Internal calls to <code><ahref="https://rdrr.io/r/base/options.html">options()</a></code> were all removed in favour of a new internal environment <code>pkg_env</code>
<li>Improved internal type setting (among other things: replaced all <code><ahref="https://rdrr.io/r/base/lapply.html">sapply()</a></code> calls with <code><ahref="https://rdrr.io/r/base/lapply.html">vapply()</a></code>)</li>
<li>Added CodeFactor as a continuous code review to this package: <ahref="https://www.codefactor.io/repository/github/msberends/amr/"class="uri">https://www.codefactor.io/repository/github/msberends/amr/</a>
<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>
<p>Data set <code>intrinsic_resistant</code>. This data set contains all bug-drug combinations where the ‘bug’ is intrinsic resistant to the ‘drug’ according to the latest EUCAST insights. It contains just two columns: <code>microorganism</code> and <code>antibiotic</code>.</p>
<p>Curious about which enterococci are actually intrinsic resistant to vancomycin?</p>
<li><p>Support for skimming classes <code><rsi></code>, <code><mic></code>, <code><disk></code> and <code><mo></code> with the <code>skimr</code> package</p></li>
<li><p>Although advertised that this package should work under R 3.0.0, we still had a dependency on R 3.6.0. This is fixed, meaning that our package should now work under R 3.0.0.</p></li>
<p>Support for using <code>dplyr</code>’s <code><ahref="https://dplyr.tidyverse.org/reference/across.html">across()</a></code> to interpret MIC values or disk zone diameters, which also automatically determines the column with microorganism names or codes.</p>
<li><p>Cleaning columns in a data.frame now allows you to specify those columns with tidy selection, e.g.<code><ahref="../reference/as.rsi.html">as.rsi(df, col1:col9)</a></code></p></li>
<li><p>Big speed improvement for interpreting MIC values and disk zone diameters. When interpreting 5,000 MIC values of two antibiotics (10,000 values in total), our benchmarks showed a total run time going from 80.7-85.1 seconds to 1.8-2.0 seconds.</p></li>
<p>Added intelligent data cleaning to <code><ahref="../reference/as.disk.html">as.disk()</a></code>, so numbers can also be extracted from text and decimal numbers will always be rounded up:</p>
<li>A completely new matching score for ambiguous user input, using <code><ahref="../reference/mo_matching_score.html">mo_matching_score()</a></code>. Any user input value that could mean more than one taxonomic entry is now considered ‘uncertain’. Instead of a warning, a message will be thrown and the accompanying <code><ahref="../reference/as.mo.html">mo_uncertainties()</a></code> has been changed completely; it now prints all possible candidates with their matching score.</li>
<li>Big speed improvement for already valid microorganism ID. This also means an significant speed improvement for using <code>mo_*</code> functions like <code><ahref="../reference/mo_property.html">mo_name()</a></code> on microoganism IDs.</li>
<li>Added argument <code>ignore_pattern</code> to <code><ahref="../reference/as.mo.html">as.mo()</a></code> which can also be given to <code>mo_*</code> functions like <code><ahref="../reference/mo_property.html">mo_name()</a></code>, to exclude known non-relevant input from analysing. This can also be set with the option <code>AMR_ignore_pattern</code>.</li>
<li><p><code><ahref="../reference/translate.html">get_locale()</a></code> now uses at default <code><ahref="https://rdrr.io/r/base/Sys.getenv.html">Sys.getenv("LANG")</a></code> or, if <code>LANG</code> is not set, <code><ahref="https://rdrr.io/r/base/locales.html">Sys.getlocale()</a></code>. This can be overwritten by setting the option <code>AMR_locale</code>.</p></li>
<li><p>Function <code><ahref="../reference/mo_property.html">mo_shortname()</a></code> now returns the genus for input where the species is unknown</p></li>
<li><p>BORSA is now recognised as an abbreviation for <em>Staphylococcus aureus</em>, meaning that e.g.<code><ahref="../reference/mo_property.html">mo_genus("BORSA")</a></code> will return “Staphylococcus”</p></li>
<li><p>Added a feature from AMR 1.1.0 and earlier again, but now without other package dependencies: <code>tibble</code> printing support for classes <code><rsi></code>, <code><mic></code>, <code><disk></code>, <code><ab></code> and <code><mo></code>. When using <code>tibble</code>s containing antimicrobial columns (class <code><rsi></code>), “S” will print in green, “I” will print in yellow and “R” will print in red. Microbial IDs (class <code><mo></code>) will emphasise on the genus and species, not on the kingdom.</p></li>
<li><p>Names of antiviral agents in data set <code>antivirals</code> now have a starting capital letter, like it is the case in the <code>antibiotics</code> data set</p></li>
<li><p>Fix for combining MIC values with raw numbers, i.e.<code><ahref="https://rdrr.io/r/base/c.html">c(as.mic(2), 2)</a></code> previously failed but now returns a valid MIC class</p></li>
<li><p><code><ahref="../reference/ggplot_rsi.html">ggplot_rsi()</a></code> and <code><ahref="../reference/ggplot_rsi.html">geom_rsi()</a></code> gained arguments <code>minimum</code> and <code>language</code>, to influence the internal use of <code><ahref="../reference/proportion.html">rsi_df()</a></code></p></li>
<p>Changes in the <code>antibiotics</code> data set:</p>
<ul>
<li>Updated oral and parental DDDs from the WHOCC</li>
<li>Added abbreviation “piptazo” to ‘Piperacillin/tazobactam’ (TZP)</li>
<li>‘Penicillin G’ (for intravenous use) is now named ‘Benzylpenicillin’ (code <code>PEN</code>)</li>
<li>‘Penicillin V’ (for oral use, code <code>PNV</code>) was removed, since its actual entry ‘Phenoxymethylpenicillin’ (code <code>PHN</code>) already existed</li>
<li>The group name (<code>antibiotics$group</code>) of ‘Linezolid’ (<code>LNZ</code>), ‘Cycloserine’ (<code>CYC</code>), ‘Tedizolid’ (<code>TZD</code>) and ‘Thiacetazone’ (<code>THA</code>) is now “Oxazolidinones” instead of “Other antibacterials”</li>
<li><p>Added support for using <code><ahref="https://rdrr.io/r/base/unique.html">unique()</a></code> on classes <code><rsi></code>, <code><mic></code>, <code><disk></code>, <code><ab></code> and <code><mo></code></p></li>
<li><p>Added argument <code>excess</code> to the <code><ahref="../reference/kurtosis.html">kurtosis()</a></code> function (defaults to <code>FALSE</code>), to return the <em>excess kurtosis</em>, defined as the kurtosis minus three.</p></li>
<li>Removed functions <code>portion_R()</code>, <code>portion_S()</code> and <code>portion_I()</code> that were deprecated since version 0.9.0 (November 2019) and were replaced with <code><ahref="../reference/proportion.html">proportion_R()</a></code>, <code><ahref="../reference/proportion.html">proportion_S()</a></code> and <code><ahref="../reference/proportion.html">proportion_I()</a></code>
<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>
<p><ahref="https://tidyselect.r-lib.org/reference/language.html">Tidyverse selection helpers</a> for antibiotic classes, that help to select the columns of antibiotics that are of a specific antibiotic class, without the need to define the columns or antibiotic abbreviations. They can be used in any function that allows selection helpers, like <code><ahref="https://dplyr.tidyverse.org/reference/select.html">dplyr::select()</a></code> and <code><ahref="https://tidyr.tidyverse.org/reference/pivot_longer.html">tidyr::pivot_longer()</a></code>:</p>
<li><p>Added <code><ahref="../reference/mo_property.html">mo_domain()</a></code> as an alias to <code><ahref="../reference/mo_property.html">mo_kingdom()</a></code></p></li>
<li><p>Added function <code><ahref="../reference/filter_ab_class.html">filter_penicillins()</a></code> to filter isolates on a specific result in any column with a name in the antimicrobial ‘penicillins’ class (more specific: ATC subgroup <em>Beta-lactam antibacterials, penicillins</em>)</p></li>
<li><p>Added official antimicrobial names to all <code><ahref="../reference/filter_ab_class.html">filter_ab_class()</a></code> functions, such as <code><ahref="../reference/filter_ab_class.html">filter_aminoglycosides()</a></code></p></li>
<li><p>Added antibiotics code “FOX1” for cefoxitin screening (abbreviation “cfsc”) to the <code>antibiotics</code> data set</p></li>
<li><p>Added argument <code>conserve_capped_values</code> to <code><ahref="../reference/as.rsi.html">as.rsi()</a></code> for interpreting MIC values - it makes sure that values starting with “<” (but not “<=”) will always return “S” and values starting with “>” (but not “>=”) will always return “R”. The default behaviour of <code><ahref="../reference/as.rsi.html">as.rsi()</a></code> has not changed, so you need to specifically do <code><ahref="../reference/as.rsi.html">as.rsi(..., conserve_capped_values = TRUE)</a></code>.</p></li>
<p>Big speed improvement for using any function on microorganism codes from earlier package versions (prior to <code>AMR</code> v1.2.0), such as <code><ahref="../reference/as.mo.html">as.mo()</a></code>, <code><ahref="../reference/mo_property.html">mo_name()</a></code>, <code><ahref="../reference/first_isolate.html">first_isolate()</a></code>, <code><ahref="../reference/eucast_rules.html">eucast_rules()</a></code>, <code><ahref="../reference/mdro.html">mdro()</a></code>, etc.</p>
<p>As a consequence, very old microbial codes (from <code>AMR</code> v0.5.0 and lower) <strong>are not supported anymore</strong>. Use <code><ahref="../reference/as.mo.html">as.mo()</a></code> on your microorganism names or codes to transform them to current abbreviations used in this package.</p>
</li>
<li>
<p>Improvements for <code><ahref="../reference/proportion.html">susceptibility()</a></code> and <code><ahref="../reference/proportion.html">resistance()</a></code> and all <code>count_*()</code>, <code>proportion_*()</code> functions:</p>
<li>Using variables for column names (as well as selectors like <code><ahref="https://tidyselect.r-lib.org/reference/all_of.html">dplyr::all_of()</a></code>) now works again</li>
<li>Dramatic improvement of the algorithm behind <code><ahref="../reference/as.ab.html">as.ab()</a></code>, making many more input errors translatable, such as digitalised health care records, using too few or too many vowels or consonants and many more</li>
<li>Fixed a bug where <code><ahref="../reference/as.ab.html">as.ab()</a></code> would return an error on invalid input values</li>
<li>The <code><ahref="../reference/as.ab.html">as.ab()</a></code> function will now throw a note if more than 1 antimicrobial drug could be retrieved from a single input value.</li>
<li><p>Fixed a bug where <code><ahref="../reference/eucast_rules.html">eucast_rules()</a></code> would not work on a tibble when the <code>tibble</code> or <code>dplyr</code> package was loaded</p></li>
<li><p>Fixed a bug for CLSI 2019 guidelines (using <code><ahref="../reference/as.rsi.html">as.rsi()</a></code>), that also included results for animals. It now only contains interpretation guidelines for humans.</p></li>
<li><p>All <code>*_join_microorganisms()</code> functions and <code><ahref="../reference/bug_drug_combinations.html">bug_drug_combinations()</a></code> now return the original data class (e.g.<code>tibble</code>s and <code>data.table</code>s)</p></li>
<p>For functions <code><ahref="../reference/proportion.html">rsi_df()</a></code>, <code><ahref="../reference/proportion.html">proportion_df()</a></code> and <code><ahref="../reference/count.html">count_df()</a></code>:</p>
<ul>
<li>Fixed a bug for using grouped versions</li>
<li>Fixed a bug where not all different antimicrobial results were added as rows</li>
<li>Fixed a bug when only calculating counts (<code><ahref="../reference/count.html">count_df()</a></code>) when all antibiotics in the data set have only <code>NA</code>s</li>
<li><p>Improved auto-determination for columns of types <code><mo></code> and <code><Date></code></p></li>
<li><p>Fixed a bug in <code><ahref="../reference/bug_drug_combinations.html">bug_drug_combinations()</a></code> for when only one antibiotic was in the input data</p></li>
<li><p>Changed the summary for class <code><rsi></code>, to highlight the %SI vs.%R</p></li>
<li><p>Improved error handling, giving more useful info when functions return an error</p></li>
<li><p>Any progress bar will now only show in interactive mode (i.e.not in R Markdown)</p></li>
<li><p>Speed improvement for <code><ahref="../reference/mdro.html">mdro()</a></code> and <code><ahref="../reference/filter_ab_class.html">filter_ab_class()</a></code></p></li>
<li><p>New option <code>arrows_textangled</code> for <code><ahref="../reference/ggplot_pca.html">ggplot_pca()</a></code> to indicate whether the text at the end of the arrows should be angled (defaults to <code>TRUE</code>, as it was in previous versions)</p></li>
<li><p>Added parenteral DDD to benzylpenicillin</p></li>
<li><p>Fixed a bug where <code><ahref="../reference/as.mic.html">as.mic()</a></code> could not handle dots without a leading zero (like <code>"<=.25</code>)</p></li>
<li>Moved primary location of this project from GitLab to <ahref="https://github.com/msberends/AMR">GitHub</a>, giving us native support for automated syntax checking without being dependent on external services such as AppVeyor and Travis CI.</li>
<p>Removed code dependency on all other R packages, making this package fully independent of the development process of others. This is a major code change, but will probably not be noticeable by most users.</p>
<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>
<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><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>
<li>Updated the taxonomy of microorganisms to May 2020, using the Catalogue of Life (CoL), the Global Biodiversity Information Facility (GBIF) and the List of Prokaryotic names with Standing in Nomenclature (LPSN, hosted by DSMZ since February 2020). <strong>Note:</strong> a taxonomic update may always impact determination of first isolates (using <code><ahref="../reference/first_isolate.html">first_isolate()</a></code>), since some bacterial names might be renamed to other genera or other (sub)species. This is expected behaviour.</li>
<li>The <code><ahref="../reference/eucast_rules.html">eucast_rules()</a></code> function no longer applies “other” rules at default that are made available by this package (like setting ampicillin = R when ampicillin + enzyme inhibitor = R). The default input value for <code>rules</code> is now <code><ahref="https://rdrr.io/r/base/c.html">c("breakpoints", "expert")</a></code> instead of <code>"all"</code>, but this can be changed by the user. To return to the old behaviour, set <code><ahref="https://rdrr.io/r/base/options.html">options(AMR.eucast_rules = "all")</a></code>.</li>
<li>Fixed a bug where checking antimicrobial results in the original data were not regarded as valid R/SI values</li>
<li>All “other” rules now apply for all drug combinations in the <code>antibiotics</code> data set these two rules:
<ol>
<li>A drug <strong>with</strong> enzyme inhibitor will be set to S if the drug <strong>without</strong> enzyme inhibitor is S</li>
<li>A drug <strong>without</strong> enzyme inhibitor will be set to R if the drug <strong>with</strong> enzyme inhibitor is R</li>
</ol>
This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/avibactam, trimethoprim/sulfamethoxazole, etc.</li>
<li>Added function <code><ahref="../reference/ab_property.html">ab_url()</a></code> to return the direct URL of an antimicrobial agent from the official WHO website</li>
<li>Improvements for algorithm in <code><ahref="../reference/as.ab.html">as.ab()</a></code>, so that e.g.<code><ahref="../reference/as.ab.html">as.ab("ampi sul")</a></code> and <code><ahref="../reference/ab_property.html">ab_name("ampi sul")</a></code> work</li>
<li>Functions <code><ahref="../reference/ab_property.html">ab_atc()</a></code> and <code><ahref="../reference/ab_property.html">ab_group()</a></code> now return <code>NA</code> if no antimicrobial agent could be found</li>
<li>Small fix for some text input that could not be coerced as valid MIC values</li>
<li>Fix for interpretation of generic CLSI interpretation rules (thanks to Anthony Underwood)</li>
<li>Fix for <code><ahref="../reference/mo_source.html">set_mo_source()</a></code> to make sure that column <code>mo</code> will always be the second column</li>
<li>Removed previously deprecated function <code>p.symbol()</code> - it was replaced with <code><ahref="../reference/AMR-deprecated.html">p_symbol()</a></code>
<li>Improvements for the algorithm used by <code><ahref="../reference/as.mo.html">as.mo()</a></code> (and consequently all <code>mo_*</code> functions, that use <code><ahref="../reference/as.mo.html">as.mo()</a></code> internally):
<ul>
<li>Support for codes ending with <code>SPE</code> for species, like <code>"ESCSPE"</code> for <em>Escherichia coli</em>
</li>
<li>Support for any encoding, which means that any language-specific character with accents can be used for input</li>
<li>Support for more arbitrary IDs used in laboratory information systems</li>
<li>Small fix for preventing viruses being treated as bacteria</li>
<li>Small fix for preventing contamination and lack of growth being treated as valid microorganisms</li>
<li>Support for all abbreviations of antibiotics and antimycotics used by the Netherlands National Institute for Public Health and the Environment (Rijksinstituut voor Volksgezondheid en Milieu; RIVM)</li>
<li>Reloaded original EUCAST master tables from 2019 (2020 was already available). This seems more reliable than the data we used from WHONET.</li>
<li>Added generic CLSI rules for R/SI interpretation using <code><ahref="../reference/as.rsi.html">as.rsi()</a></code> for years 2010-2019 (thanks to Anthony Underwood)</li>
<p>Interpretation from MIC values (and disk zones) to R/SI can now be used with <code><ahref="https://dplyr.tidyverse.org/reference/mutate_all.html">mutate_at()</a></code> of the <code>dplyr</code> package:</p>
<spanclass="fu"><ahref="https://dplyr.tidyverse.org/reference/mutate_all.html">mutate_at</a></span><spanclass="op">(</span><spanclass="fu"><ahref="https://dplyr.tidyverse.org/reference/vars.html">vars</a></span><spanclass="op">(</span><spanclass="va">antibiotic1</span><spanclass="op">:</span><spanclass="va">antibiotic25</span><spanclass="op">)</span>, <spanclass="va">as.rsi</span>, mo <spanclass="op">=</span><spanclass="st">"E. coli"</span><spanclass="op">)</span>
<spanclass="fu"><ahref="https://dplyr.tidyverse.org/reference/mutate_all.html">mutate_at</a></span><spanclass="op">(</span><spanclass="fu"><ahref="https://dplyr.tidyverse.org/reference/vars.html">vars</a></span><spanclass="op">(</span><spanclass="va">antibiotic1</span><spanclass="op">:</span><spanclass="va">antibiotic25</span><spanclass="op">)</span>, <spanclass="va">as.rsi</span>, mo <spanclass="op">=</span><spanclass="va">.</span><spanclass="op">$</span><spanclass="va">mybacteria</span><spanclass="op">)</span></code></pre></div>
<li><p>Added antibiotic abbreviations for a laboratory manufacturer (GLIMS) for cefuroxime, cefotaxime, ceftazidime, cefepime, cefoxitin and trimethoprim/sulfamethoxazole</p></li>
<li><p>Added <code>uti</code> (as abbreviation of urinary tract infections) as argument to <code><ahref="../reference/as.rsi.html">as.rsi()</a></code>, so interpretation of MIC values and disk zones can be made dependent on isolates specifically from UTIs</p></li>
<li><p>Info printing in functions <code><ahref="../reference/eucast_rules.html">eucast_rules()</a></code>, <code><ahref="../reference/first_isolate.html">first_isolate()</a></code>, <code><ahref="../reference/mdro.html">mdro()</a></code> and <code><ahref="../reference/resistance_predict.html">resistance_predict()</a></code> will now at default only print when R is in an interactive mode (i.e.not in RMarkdown)</p></li>
<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>
<p>Support for LOINC codes in the <code>antibiotics</code> data set. Use <code><ahref="../reference/ab_property.html">ab_loinc()</a></code> to retrieve LOINC codes, or use a LOINC code for input in any <code>ab_*</code> function:</p>
<p>Support for SNOMED CT codes in the <code>microorganisms</code> data set. Use <code><ahref="../reference/mo_property.html">mo_snomed()</a></code> to retrieve SNOMED codes, or use a SNOMED code for input in any <code>mo_*</code> function:</p>
<li>The <code><ahref="../reference/as.mo.html">as.mo()</a></code> function previously wrote to the package folder to improve calculation speed for previously calculated results. This is no longer the case, to comply with CRAN policies. Consequently, the function <code>clear_mo_history()</code> was removed.</li>
<li>Bugfix for some WHONET microorganism codes that were not interpreted correctly when using <code><ahref="../reference/as.rsi.html">as.rsi()</a></code>
<li>Improvements for the algorithm used by <code><ahref="../reference/as.mo.html">as.mo()</a></code> (and consequently all <code>mo_*</code> functions, that use <code><ahref="../reference/as.mo.html">as.mo()</a></code> internally):
<ul>
<li>Support for missing spaces, e.g.in <code><ahref="../reference/as.mo.html">as.mo("Methicillin-resistant S.aureus")</a></code>
<li>Added a lifecycle state to every function, following <ahref="https://www.tidyverse.org/lifecycle">the lifecycle circle of the <code>tidyverse</code></a>
<li>For in <code><ahref="../reference/as.ab.html">as.ab()</a></code>: support for drugs starting with “co-” like co-amoxiclav, co-trimoxazole, co-trimazine and co-trimazole (thanks to Peter Dutey)</li>
<li>Changes to the <code>antibiotics</code> data set (thanks to Peter Dutey):
<ul>
<li>Added more synonyms to colistin, imipenem and piperacillin/tazobactam</li>
<li>Moved synonyms Rifinah and Rimactazid from rifampicin (<code>RIF</code>) to rifampicin/isoniazid (<code>RFI</code>). Please note that <ahref="https://www.whocc.no/atc_ddd_index/?code=J04AM02&showdescription=no">the combination rifampicin/isoniazid has no DDDs defined</a>, so e.g.<code><ahref="../reference/ab_property.html">ab_ddd("Rimactazid")</a></code> will now return <code>NA</code>.</li>
<li>Adopted Adeolu <em>et al.</em> (2016), <ahref="https:/pubmed.ncbi.nlm.nih.gov/27620848/">PMID 27620848</a> for the <code>microorganisms</code> data set, which means that the new order Enterobacterales now consists of a part of the existing family Enterobacteriaceae, but that this family has been split into other families as well (like <em>Morganellaceae</em> and <em>Yersiniaceae</em>). Although published in 2016, this information is not yet in the Catalogue of Life version of 2019. All MDRO determinations with <code><ahref="../reference/mdro.html">mdro()</a></code> will now use the Enterobacterales order for all guidelines before 2016 that were dependent on the Enterobacteriaceae family.
<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>
<p>Support for a new MDRO guideline: Magiorakos AP, Srinivasan A <em>et al.</em> “Multidrug-resistant, extensively drug-resistant and pandrug-resistant bacteria: an international expert proposal for interim standard definitions for acquired resistance.” Clinical Microbiology and Infection (2012).</p>
<li>The new Verbose mode (<code><ahref="../reference/mdro.html">mdro(...., verbose = TRUE)</a></code>) returns an informative data set where the reason for MDRO determination is given for every isolate, and an list of the resistant antimicrobial agents</li>
<p>Added a score (a certainty percentage) to <code><ahref="../reference/as.mo.html">mo_uncertainties()</a></code>, that is calculated using the <ahref="https://en.wikipedia.org/wiki/Levenshtein_distance">Levenshtein distance</a>:</p>
<li>Removed previously deprecated function <code>as.atc()</code> - this function was replaced by <code><ahref="../reference/ab_property.html">ab_atc()</a></code>
<li>Renamed all <code>portion_*</code> functions to <code>proportion_*</code>. All <code>portion_*</code> functions are still available as deprecated functions, and will return a warning when used.</li>
<li>When running <code><ahref="../reference/as.rsi.html">as.rsi()</a></code> over a data set, it will now print the guideline that will be used if it is not specified by the user</li>
<li>non-EUCAST rules in <code><ahref="../reference/eucast_rules.html">eucast_rules()</a></code> are now applied first and not as last anymore. This is to improve the dependency on certain antibiotics for the official EUCAST rules. Please see <code><ahref="../reference/eucast_rules.html">?eucast_rules</a></code>.</li>
<li>Fix for automatically determining columns with antibiotic results in <code><ahref="../reference/mdro.html">mdro()</a></code> and <code><ahref="../reference/eucast_rules.html">eucast_rules()</a></code>
<li>Rewrote the complete documentation to markdown format, to be able to use the very latest version of the great <ahref="https://roxygen2.r-lib.org/index.html">Roxygen2</a>, released in November 2019. This tremously improved the documentation quality, since the rewrite forced us to go over all texts again and make changes where needed.</li>
<p>Determination of first isolates now <strong>excludes</strong> all ‘unknown’ microorganisms at default, i.e.microbial code <code>"UNKNOWN"</code>. They can be included with the new argument <code>include_unknown</code>:</p>
<p>For WHONET users, this means that all records/isolates with organism code <code>"con"</code> (<em>contamination</em>) will be excluded at default, since <code>as.mo("con") = "UNKNOWN"</code>. The function always shows a note with the number of ‘unknown’ microorganisms that were included or excluded.</p>
<p>For code consistency, classes <code>ab</code> and <code>mo</code> will now be preserved in any subsetting or assignment. For the sake of data integrity, this means that invalid assignments will now result in <code>NA</code>:</p>
<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><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>
<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>
<spanclass="va">x</span><spanclass="op"><-</span><spanclass="fu"><ahref="../reference/bug_drug_combinations.html">bug_drug_combinations</a></span><spanclass="op">(</span><spanclass="va">example_isolates</span>, FUN <spanclass="op">=</span><spanclass="va">mo_gramstain</span><spanclass="op">)</span>
<p>You can format this to a printable format, ready for reporting or exporting to e.g.Excel with the base R <code><ahref="https://rdrr.io/r/base/format.html">format()</a></code> function:</p>
<p>Additional way to calculate co-resistance, i.e.when using multiple antimicrobials as input for <code>portion_*</code> functions or <code>count_*</code> functions. This can be used to determine the empiric susceptibility of a combination therapy. A new argument <code>only_all_tested</code> (<strong>which defaults to <code>FALSE</code></strong>) replaces the old <code>also_single_tested</code> and can be used to select one of the two methods to count isolates and calculate portions. The difference can be seen in this example table (which is also on the <code>portion</code> and <code>count</code> help pages), where the %SI is being determined:</p>
<p>Since this is a major change, usage of the old <code>also_single_tested</code> will throw an informative error that it has been replaced by <code>only_all_tested</code>.</p>
<p><code>tibble</code> printing support for classes <code>rsi</code>, <code>mic</code>, <code>disk</code>, <code>ab</code><code>mo</code>. When using <code>tibble</code>s containing antimicrobial columns, values <code>S</code> will print in green, values <code>I</code> will print in yellow and values <code>R</code> will print in red. Microbial IDs (class <code>mo</code>) will emphasise on the genus and species, not on the kingdom.</p>
<li>Many algorithm improvements for <code><ahref="../reference/as.mo.html">as.mo()</a></code> (of which some led to additions to the <code>microorganisms</code> data set). Many thanks to all contributors that helped improving the algorithms.
<li>Self-learning algorithm - the function now gains experience from previously determined microorganism IDs and learns from it (yielding 80-95% speed improvement for any guess after the first try)</li>
<li>Big improvement for misspelled input</li>
<li>These new trivial names known to the field are now understood: meningococcus, gonococcus, pneumococcus</li>
<li>Updated to the latest taxonomic data (updated to August 2019, from the International Journal of Systematic and Evolutionary Microbiology</li>
<li>Added support for Viridans Group Streptococci (VGS) and Milleri Group Streptococci (MGS)</li>
<li>Changed most microorganism IDs to improve readability. For example, the old code <code>B_ENTRC_FAE</code> could have been both <em>E. faecalis</em> and <em>E. faecium</em>. Its new code is <code>B_ENTRC_FCLS</code> and <em>E. faecium</em> has become <code>B_ENTRC_FACM</code>. Also, the Latin character æ (ae) is now preserved at the start of each genus and species abbreviation. For example, the old code for <em>Aerococcus urinae</em> was <code>B_ARCCC_NAE</code>. This is now <code>B_AERCC_URIN</code>. <strong>IMPORTANT:</strong> Old microorganism IDs are still supported, but support will be dropped in a future version. Use <code><ahref="../reference/as.mo.html">as.mo()</a></code> on your old codes to transform them to the new format. Using 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>) on old codes, will throw a warning.</li>
<li>More intelligent guessing for <code><ahref="../reference/as.ab.html">as.ab()</a></code>, including bidirectional language support</li>
<li>Added support for the German national guideline (3MRGN/4MRGN) in the <code><ahref="../reference/mdro.html">mdro()</a></code> function, to determine multi-drug resistant organisms</li>
<li>Removed class <code>atc</code> - using <code>as.atc()</code> is now deprecated in favour of <code><ahref="../reference/ab_property.html">ab_atc()</a></code> and this will return a character, not the <code>atc</code> class anymore</li>
<li>Fix for using <code>mo_*</code> functions where the coercion uncertainties and failures would not be available through <code><ahref="../reference/as.mo.html">mo_uncertainties()</a></code> and <code><ahref="../reference/as.mo.html">mo_failures()</a></code> anymore</li>
<li>Deprecated the <code>country</code> argument of <code><ahref="../reference/mdro.html">mdro()</a></code> in favour of the already existing <code>guideline</code> argument to support multiple guidelines within one country</li>
<li>Speed improvement for <code><ahref="../reference/guess_ab_col.html">guess_ab_col()</a></code> which is now 30 times faster for antibiotic abbreviations</li>
<li>Improved <code><ahref="../reference/filter_ab_class.html">filter_ab_class()</a></code> to be more reliable and to support 5th generation cephalosporins</li>
<li>Function <code><ahref="../reference/availability.html">availability()</a></code> now uses <code>portion_R()</code> instead of <code>portion_IR()</code>, to comply with EUCAST insights</li>
<li>Functions <code><ahref="../reference/age.html">age()</a></code> and <code><ahref="../reference/age_groups.html">age_groups()</a></code> now have a <code>na.rm</code> argument to remove empty values</li>
<li>Renamed function <code>p.symbol()</code> to <code><ahref="../reference/AMR-deprecated.html">p_symbol()</a></code> (the former is now deprecated and will be removed in a future version)</li>
<li>Using negative values for <code>x</code> in <code><ahref="../reference/age_groups.html">age_groups()</a></code> will now introduce <code>NA</code>s and not return an error anymore</li>
<li>Added Prof.Dr.Casper Albers as doctoral advisor and added Dr.Judith Fonville, Eric Hazenberg, Dr.Bart Meijer, Dr.Dennis Souverein and Annick Lenglet as contributors</li>
<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>
<li><p>Function <code><ahref="../reference/mo_property.html">mo_info()</a></code> as an analogy to <code><ahref="../reference/ab_property.html">ab_info()</a></code>. The <code><ahref="../reference/mo_property.html">mo_info()</a></code> prints a list with the full taxonomy, authors, and the URL to the online database of a microorganism</p></li>
<li><p>Function <code><ahref="../reference/mo_property.html">mo_synonyms()</a></code> to get all previously accepted taxonomic names of a microorganism</p></li>
<li>Algorithm improvements for <code><ahref="../reference/as.ab.html">as.ab()</a></code> and <code><ahref="../reference/as.mo.html">as.mo()</a></code> to understand even more severely misspelled input</li>
<li>Function <code><ahref="../reference/as.ab.html">as.ab()</a></code> now allows spaces for coercing antibiotics names</li>
<li>Prevented <code>"bacteria"</code> from getting coerced by <code><ahref="../reference/as.ab.html">as.ab()</a></code> because Bacterial is a brand name of trimethoprim (TMP)</li>
<li>Fixed a bug where setting an antibiotic would not work for <code><ahref="../reference/eucast_rules.html">eucast_rules()</a></code> and <code><ahref="../reference/mdro.html">mdro()</a></code>
<li>Removed <code>latest_annual_release</code> from the <code><ahref="../reference/catalogue_of_life_version.html">catalogue_of_life_version()</a></code> function</li>
<li>Fixed bug where not all old taxonomic names would be printed, when using a vector as input for <code><ahref="../reference/as.mo.html">as.mo()</a></code>
<li>Small improvements to <code><ahref="../reference/plot.html">plot()</a></code> and <code><ahref="https://rdrr.io/r/graphics/barplot.html">barplot()</a></code> for MIC and RSI classes</li>
<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>
<li>Added guidelines of the WHO to determine multi-drug resistance (MDR) for TB (<code><ahref="../reference/mdro.html">mdr_tb()</a></code>) and added a new vignette about MDR. Read this tutorial <ahref="https://msberends.gitlab.io/AMR/articles/MDR.html">here on our website</a>.</li>
<li>Fixed a critical bug in <code><ahref="../reference/first_isolate.html">first_isolate()</a></code> where missing species would lead to incorrect FALSEs. This bug was not present in AMR v0.5.0, but was in v0.6.0 and v0.6.1.</li>
<li>Fixed a bug in <code><ahref="../reference/eucast_rules.html">eucast_rules()</a></code> where antibiotics from WHONET software would not be recognised</li>
<li>Completely reworked the <code>antibiotics</code> data set:
<li>Column <code>ab</code> contains a human readable EARS-Net code, used by ECDC and WHO/WHONET - this is the primary identifier used in this package</li>
<li>Column <code>atc</code> contains the ATC code, used by WHO/WHOCC</li>
<li>Column <code>cid</code> contains the CID code (Compound ID), used by PubChem</li>
<li>Based on the Compound ID, almost 5,000 official brand names have been added from many different countries</li>
<li>All references to antibiotics in our package now use EARS-Net codes, like <code>AMX</code> for amoxicillin</li>
<li>Functions <code>atc_certe</code>, <code>ab_umcg</code> and <code>atc_trivial_nl</code> have been removed</li>
<li>All <code>atc_*</code> functions are superceded by <code>ab_*</code> functions</li>
<li>All output will be translated by using an included translation file which <ahref="https://github.com/msberends/AMR/blob/master/data-raw/translations.tsv">can be viewed here</a>
<li>New argument <code>colours</code> to set the bar colours</li>
<li>New arguments <code>title</code>, <code>subtitle</code>, <code>caption</code>, <code>x.title</code> and <code>y.title</code> to set titles and axis descriptions</li>
<li>Improved intelligence of looking up antibiotic columns in a data set using <code><ahref="../reference/guess_ab_col.html">guess_ab_col()</a></code>
</li>
<li>Added ~5,000 more old taxonomic names to the <code>microorganisms.old</code> data set, which leads to better results finding when using the <code><ahref="../reference/as.mo.html">as.mo()</a></code> function</li>
<li>This package now honours the new EUCAST insight (2019) that S and I are but classified as susceptible, where I is defined as ‘increased exposure’ and not ‘intermediate’ anymore. For functions like <code>portion_df()</code> and <code><ahref="../reference/count.html">count_df()</a></code> this means that their new argument <code>combine_SI</code> is TRUE at default. Our plotting function <code><ahref="../reference/ggplot_rsi.html">ggplot_rsi()</a></code> also reflects this change since it uses <code><ahref="../reference/count.html">count_df()</a></code> internally.</li>
<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>Removed all hardcoded EUCAST rules and replaced them with a new reference file which <ahref="https://github.com/msberends/AMR/blob/master/data-raw/eucast_rules.tsv">can be viewed here</a>
</li>
<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><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>
</li>
<li>Function <code><ahref="../reference/as.mo.html">as.mo()</a></code> now gently interprets any number of whitespace characters (like tabs) as one space</li>
<li>Function <code><ahref="../reference/as.mo.html">as.mo()</a></code> now returns <code>UNKNOWN</code> for <code>"con"</code> (WHONET ID of ‘contamination’) and returns <code>NA</code> for <code>"xxx"</code>(WHONET ID of ‘no growth’)</li>
<li>Small algorithm fix for <code><ahref="../reference/as.mo.html">as.mo()</a></code>
</li>
<li>Removed viruses from data set <code>microorganisms.codes</code> and cleaned it up</li>
<li>Fix for <code><ahref="../reference/mo_property.html">mo_shortname()</a></code> where species would not be determined correctly</li>
<li>Support for R 3.6.0 and later by providing support for <ahref="https://developer.r-project.org/Blog/public/2019/02/14/staged-install/index.html">staged install</a>
<p>We’ve got a new website: <ahref="https://msberends.gitlab.io/AMR/">https://msberends.gitlab.io/AMR</a> (built with the great <ahref="https://pkgdown.r-lib.org/"><code>pkgdown</code></a>)</p>
<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>
<p>Catalogue of Life as a new taxonomic source for data about microorganisms, which also contains all ITIS data we used previously. The <code>microorganisms</code> data set now contains:</p>
<li><p>All ~55,000 (sub)species from the kingdoms of Archaea, Bacteria and Protozoa</p></li>
<li><p>All ~3,000 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Onygenales, Pneumocystales, Saccharomycetales and Schizosaccharomycetales (covering at least like all species of <em>Aspergillus</em>, <em>Candida</em>, <em>Pneumocystis</em>, <em>Saccharomyces</em> and <em>Trichophyton</em>)</p></li>
<li><p>All ~2,000 (sub)species from ~100 other relevant genera, from the kingdoms of Animalia and Plantae (like <em>Strongyloides</em> and <em>Taenia</em>)</p></li>
<li><p>All ~15,000 previously accepted names of included (sub)species that have been taxonomically renamed</p></li>
<p>This data is updated annually - check the included version with the new function <code><ahref="../reference/catalogue_of_life_version.html">catalogue_of_life_version()</a></code>.</p>
</li>
<li><p>Due to this change, some <code>mo</code> codes changed (e.g.<em>Streptococcus</em> changed from <code>B_STRPTC</code> to <code>B_STRPT</code>). A translation table is used internally to support older microorganism IDs, so users will not notice this difference.</p></li>
<li><p>New function <code><ahref="../reference/mo_property.html">mo_rank()</a></code> for the taxonomic rank (genus, species, infraspecies, etc.)</p></li>
<li><p>New function <code><ahref="../reference/mo_property.html">mo_url()</a></code> to get the direct URL of a species from the Catalogue of Life</p></li>
<p>Support for data from <ahref="https://whonet.org/">WHONET</a> and <ahref="https://www.ecdc.europa.eu/en/about-us/partnerships-and-networks/disease-and-laboratory-networks/ears-net">EARS-Net</a> (European Antimicrobial Resistance Surveillance Network):</p>
<li>Exported files from WHONET can be read and used in this package. For functions like <code><ahref="../reference/first_isolate.html">first_isolate()</a></code> and <code><ahref="../reference/eucast_rules.html">eucast_rules()</a></code>, all arguments will be filled in automatically.</li>
<li>This package now knows all antibiotic abbrevations by EARS-Net (which are also being used by WHONET) - the <code>antibiotics</code> data set now contains a column <code>ears_net</code>.</li>
<li>The function <code><ahref="../reference/as.mo.html">as.mo()</a></code> now knows all WHONET species abbreviations too, because almost 2,000 microbial abbreviations were added to the <code>microorganisms.codes</code> data set.</li>
<p>The <code>antibiotics</code> data set will be searched, after which the input data will be checked for column names with a value in any abbreviations, codes or official names found in the <code>antibiotics</code> data set. For example:</p>
<p>These functions use <code>as.atc()</code> internally. The old <code>atc_property</code> has been renamed <code><ahref="../reference/atc_online_property.html">atc_online_property()</a></code>. This is done for two reasons: firstly, not all ATC codes are of antibiotics (ab) but can also be of antivirals or antifungals. Secondly, the input must have class <code>atc</code> or must be coerable to this class. Properties of these classes should start with the same class name, analogous to <code><ahref="../reference/as.mo.html">as.mo()</a></code> and e.g.<code>mo_genus</code>.</p>
<li><p>New functions <code><ahref="../reference/mo_source.html">set_mo_source()</a></code> and <code><ahref="../reference/mo_source.html">get_mo_source()</a></code> to use your own predefined MO codes as input for <code><ahref="../reference/as.mo.html">as.mo()</a></code> and consequently all <code>mo_*</code> functions</p></li>
<li><p>Support for the upcoming <ahref="https://dplyr.tidyverse.org"><code>dplyr</code></a> version 0.8.0</p></li>
<li><p>New function <code><ahref="../reference/guess_ab_col.html">guess_ab_col()</a></code> to find an antibiotic column in a table</p></li>
<li><p>New function <code><ahref="../reference/as.mo.html">mo_failures()</a></code> to review values that could not be coerced to a valid MO code, using <code><ahref="../reference/as.mo.html">as.mo()</a></code>. This latter function will now only show a maximum of 10 uncoerced values and will refer to <code><ahref="../reference/as.mo.html">mo_failures()</a></code>.</p></li>
<li><p>New function <code><ahref="../reference/as.mo.html">mo_uncertainties()</a></code> to review values that could be coerced to a valid MO code using <code><ahref="../reference/as.mo.html">as.mo()</a></code>, but with uncertainty.</p></li>
<li><p>New function <code><ahref="../reference/as.mo.html">mo_renamed()</a></code> to get a list of all returned values from <code><ahref="../reference/as.mo.html">as.mo()</a></code> that have had taxonomic renaming</p></li>
<li><p>New function <code><ahref="../reference/age.html">age()</a></code> to calculate the (patients) age in years</p></li>
<li><p>New function <code><ahref="../reference/age_groups.html">age_groups()</a></code> to split ages into custom or predefined groups (like children or elderly). This allows for easier demographic AMR data analysis per age group.</p></li>
<p>New function <code><ahref="../reference/resistance_predict.html">ggplot_rsi_predict()</a></code> as well as the base R <code><ahref="../reference/plot.html">plot()</a></code> function can now be used for resistance prediction calculated with <code><ahref="../reference/resistance_predict.html">resistance_predict()</a></code>:</p>
<p>Functions <code><ahref="../reference/first_isolate.html">filter_first_isolate()</a></code> and <code><ahref="../reference/first_isolate.html">filter_first_weighted_isolate()</a></code> to shorten and fasten filtering on data sets with antimicrobial results, e.g.:</p>
<li><p>New function <code><ahref="../reference/availability.html">availability()</a></code> to check the number of available (non-empty) results in a <code>data.frame</code></p></li>
<li><p>New vignettes about how to conduct AMR analysis, predict antimicrobial resistance, use the <em>G</em>-test and more. These are also available (and even easier readable) on our website: <ahref="https://msberends.gitlab.io/AMR"class="uri">https://msberends.gitlab.io/AMR</a>.</p></li>
<li>Updated EUCAST Clinical breakpoints to <ahref="https://www.eucast.org/clinical_breakpoints/">version 9.0 of 1 January 2019</a>, the data set <code>septic_patients</code> now reflects these changes</li>
<li>New info is returned when running this function, stating exactly what has been changed or added. Use <code><ahref="../reference/eucast_rules.html">eucast_rules(..., verbose = TRUE)</a></code> to get a data set with all changed per bug and drug combination.</li>
<li>Removed data sets <code>microorganisms.oldDT</code>, <code>microorganisms.prevDT</code>, <code>microorganisms.unprevDT</code> and <code>microorganismsDT</code> since they were no longer needed and only contained info already available in the <code>microorganisms</code> data set</li>
<li>Added 65 antibiotics to the <code>antibiotics</code> data set, from the <ahref="http://ec.europa.eu/health/documents/community-register/html/atc.htm">Pharmaceuticals Community Register</a> of the European Commission</li>
<li>Removed columns <code>atc_group1_nl</code> and <code>atc_group2_nl</code> from the <code>antibiotics</code> data set</li>
<li>Functions <code>atc_ddd()</code> and <code>atc_groups()</code> have been renamed <code><ahref="../reference/atc_online_property.html">atc_online_ddd()</a></code> and <code><ahref="../reference/atc_online_property.html">atc_online_groups()</a></code>. The old functions are deprecated and will be removed in a future version.</li>
<li>Function <code>guess_mo()</code> is now deprecated in favour of <code><ahref="../reference/as.mo.html">as.mo()</a></code> and will be removed in future versions</li>
<p>Uncertainty of the algorithm is now divided into four levels, 0 to 3, where the default <code>allow_uncertain = TRUE</code> is equal to uncertainty level 2. Run <code><ahref="../reference/as.mo.html">?as.mo</a></code> for more info about these levels.</p>
<li><p>Implemented the latest publication of Becker <em>et al.</em> (2019), for categorising coagulase-negative <em>Staphylococci</em></p></li>
<li><p>All microbial IDs that found are now saved to a local file <code>~/.Rhistory_mo</code>. Use the new function <code>clean_mo_history()</code> to delete this file, which resets the algorithms.</p></li>
<p>Incoercible results will now be considered ‘unknown’, MO code <code>UNKNOWN</code>. On foreign systems, properties of these will be translated to all languages already previously supported: German, Dutch, French, Italian, Spanish and Portuguese:</p>
<spanclass="fu"><ahref="../reference/mo_property.html">mo_genus</a></span><spanclass="op">(</span><spanclass="st">"qwerty"</span>, language <spanclass="op">=</span><spanclass="st">"es"</span><spanclass="op">)</span>
<li>Fixed a bug where distances between dates would not be calculated right - in the <code>septic_patients</code> data set this yielded a difference of 0.15% more isolates</li>
<li>Will now use a column named like “patid” for the patient ID (argument <code>col_patientid</code>), when this argument was left blank</li>
<li>Will now use a column named like “key(…)ab” or “key(…)antibiotics” for the key antibiotics (argument <code>col_keyantibiotics()</code>), when this argument was left blank</li>
<li>Removed argument <code>output_logical</code>, the function will now always return a logical value</li>
<li>Renamed argument <code>filter_specimen</code> to <code>specimen_group</code>, although using <code>filter_specimen</code> will still work</li>
<li>A note to the manual pages of the <code>portion</code> functions, that low counts can influence the outcome and that the <code>portion</code> functions may camouflage this, since they only return the portion (albeit being dependent on the <code>minimum</code> argument)</li>
<li>Summaries of class <code>mo</code> will now return the top 3 and the unique count, e.g.using <code><ahref="https://rdrr.io/r/base/summary.html">summary(mo)</a></code>
<li><p>Added header info for class <code>mo</code> to show unique count of families, genera and species</p></li>
<li><p>Now honours the <code>decimal.mark</code> setting, which just like <code>format</code> defaults to <code><ahref="https://rdrr.io/r/base/options.html">getOption("OutDec")</a></code></p></li>
<li><p>The new <code>big.mark</code> argument will at default be <code>","</code> when <code>decimal.mark = "."</code> and <code>"."</code> otherwise</p></li>
<li>Function <code><ahref="../reference/ggplot_rsi.html">scale_y_percent()</a></code> now contains the <code>limits</code> argument</li>
<li>Automatic argument filling for <code><ahref="../reference/mdro.html">mdro()</a></code>, <code><ahref="../reference/key_antibiotics.html">key_antibiotics()</a></code> and <code><ahref="../reference/eucast_rules.html">eucast_rules()</a></code>
<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>
<li>Function <code>get_locale</code> to determine language for language-dependent output for some <code>mo_*</code> functions. This is now the default value for their <code>language</code> argument, by which the system language will be used at default.</li>
<li>Data sets <code>microorganismsDT</code>, <code>microorganisms.prevDT</code>, <code>microorganisms.unprevDT</code> and <code>microorganisms.oldDT</code> to improve the speed of <code>as.mo</code>. They are for reference only, since they are primarily for internal use of <code>as.mo</code>.</li>
<li>Function <code>read.4D</code> to read from the 4D database of the MMB department of the UMCG</li>
<li>Functions <code>mo_authors</code> and <code>mo_year</code> to get specific values about the scientific reference of a taxonomic entry</li>
<li><p>Functions <code>MDRO</code>, <code>BRMO</code>, <code>MRGN</code> and <code>EUCAST_exceptional_phenotypes</code> were renamed to <code>mdro</code>, <code>brmo</code>, <code>mrgn</code> and <code>eucast_exceptional_phenotypes</code></p></li>
<li><p><code>EUCAST_rules</code> was renamed to <code>eucast_rules</code>, the old function still exists as a deprecated function</p></li>
<li>Now also applies rules from the EUCAST ‘Breakpoint tables for bacteria’, version 8.1, 2018, <ahref="https://www.eucast.org/clinical_breakpoints/"class="uri">https://www.eucast.org/clinical_breakpoints/</a> (see Source of the function)</li>
<li>New argument <code>rules</code> to specify which rules should be applied (expert rules, breakpoints, others or all)</li>
<li>New argument <code>verbose</code> which can be set to <code>TRUE</code> to get very specific messages about which columns and rows were affected</li>
<li><p>Added column <code>kingdom</code> to the microorganisms data set, and function <code>mo_kingdom</code> to look up values</p></li>
<li><p>Tremendous speed improvement for <code>as.mo</code> (and subsequently all <code>mo_*</code> functions), as empty values wil be ignored <em>a priori</em></p></li>
<li><p>Fewer than 3 characters as input for <code>as.mo</code> will return NA</p></li>
<li><p>Added argument <code>combine_IR</code> (TRUE/FALSE) to functions <code>portion_df</code> and <code>count_df</code>, to indicate that all values of I and R must be merged into one, so the output only consists of S vs.IR (susceptible vs.non-susceptible)</p></li>
<li><p>Added argument <code>also_single_tested</code> for <code>portion_*</code> and <code>count_*</code> functions to also include cases where not all antibiotics were tested but at least one of the tested antibiotics includes the target antimicribial interpretation, see <code><ahref="../reference/proportion.html">?portion</a></code></p></li>
<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>
<spanclass="fu"><ahref="https://dplyr.tidyverse.org/reference/select.html">select</a></span><spanclass="op">(</span><spanclass="op">-</span><spanclass="va">count</span>, <spanclass="op">-</span><spanclass="va">cum_count</span><spanclass="op">)</span><spanclass="co"># only get item, percent, cum_percent</span></code></pre></div>
<li><p>Improvements for MDRO algorithm (function <code>mdro</code>)</p></li>
<li><p>Data set <code>septic_patients</code> is now a <code>data.frame</code>, not a tibble anymore</p></li>
<li><p>Removed diacritics from all authors (columns <code>microorganisms$ref</code> and <code>microorganisms.old$ref</code>) to comply with CRAN policy to only allow ASCII characters</p></li>
<li><p>Fix for <code>mo_property</code> not working properly</p></li>
<li><p>Fix for <code>eucast_rules</code> where some Streptococci would become ceftazidime R in EUCAST rule 4.5</p></li>
<li><p>Fix for <code>join</code> functions</p></li>
<li><p>Speed improvement for <code>is.rsi.eligible</code>, now 15-20 times faster</p></li>
<li><p>In <code>g.test</code>, when <code><ahref="https://rdrr.io/r/base/sum.html">sum(x)</a></code> is below 1000 or any of the expected values is below 5, Fisher’s Exact Test will be suggested</p></li>
<li><p><code>ab_name</code> will try to fall back on <code>as.atc</code> when no results are found</p></li>
<li><p>Removed the addin to view data sets</p></li>
<li>New dependency on package <code>crayon</code>, to support formatted text in the console</li>
<li>Dependency <code>tidyr</code> is now mandatory (went to <code>Import</code> field) since <code>portion_df</code> and <code>count_df</code> rely on it</li>
<li><p>The data set <code>microorganisms</code> now contains <strong>all microbial taxonomic data from ITIS</strong> (kingdoms Bacteria, Fungi and Protozoa), the Integrated Taxonomy Information System, available via <ahref="https://itis.gov"class="uri">https://itis.gov</a>. The data set now contains more than 18,000 microorganisms with all known bacteria, fungi and protozoa according ITIS with genus, species, subspecies, family, order, class, phylum and subkingdom. The new data set <code>microorganisms.old</code> contains all previously known taxonomic names from those kingdoms.</p></li>
<li>
<p>New functions based on the existing function <code>mo_property</code>:</p>
<spanclass="fu"><ahref="../reference/mo_property.html">mo_gramstain</a></span><spanclass="op">(</span><spanclass="st">"E. coli"</span>, language <spanclass="op">=</span><spanclass="st">"de"</span><spanclass="op">)</span><spanclass="co"># German</span>
<spanclass="fu"><ahref="../reference/mo_property.html">mo_gramstain</a></span><spanclass="op">(</span><spanclass="st">"E. coli"</span>, language <spanclass="op">=</span><spanclass="st">"es"</span><spanclass="op">)</span><spanclass="co"># Spanish</span>
<spanclass="fu"><ahref="../reference/mo_property.html">mo_fullname</a></span><spanclass="op">(</span><spanclass="st">"S. group A"</span>, language <spanclass="op">=</span><spanclass="st">"pt"</span><spanclass="op">)</span><spanclass="co"># Portuguese</span>
<p>Functions <code>count_R</code>, <code>count_IR</code>, <code>count_I</code>, <code>count_SI</code> and <code>count_S</code> to selectively count resistant or susceptible isolates</p>
<li>Extra function <code>count_df</code> (which works like <code>portion_df</code>) to get all counts of S, I and R of a data set with antibiotic columns, with support for grouped variables</li>
<li><p>Function <code>is.rsi.eligible</code> to check for columns that have valid antimicrobial results, but do not have the <code>rsi</code> class yet. Transform the columns of your raw data with: <code>data %>% mutate_if(is.rsi.eligible, as.rsi)</code></p></li>
<p>Functions <code>as.mo</code> and <code>is.mo</code> as replacements for <code>as.bactid</code> and <code>is.bactid</code> (since the <code>microoganisms</code> data set not only contains bacteria). These last two functions are deprecated and will be removed in a future release. The <code>as.mo</code> function determines microbial IDs using intelligent rules:</p>
<spanclass="fu">microbenchmark</span><spanclass="fu">::</span><spanclass="fu"><ahref="https://rdrr.io/pkg/microbenchmark/man/microbenchmark.html">microbenchmark</a></span><spanclass="op">(</span><spanclass="fu"><ahref="../reference/as.mo.html">as.mo</a></span><spanclass="op">(</span><spanclass="va">thousands_of_E_colis</span><spanclass="op">)</span>, unit <spanclass="op">=</span><spanclass="st">"s"</span><spanclass="op">)</span>
<li><p>Added argument <code>reference_df</code> for <code>as.mo</code>, so users can supply their own microbial IDs, name or codes as a reference table</p></li>
<li><p>Functions <code>as.atc</code> and <code>is.atc</code> to transform/look up antibiotic ATC codes as defined by the WHO. The existing function <code>guess_atc</code> is now an alias of <code>as.atc</code>.</p></li>
<li><p>Function <code>ab_property</code> and its aliases: <code>ab_name</code>, <code>ab_tradenames</code>, <code>ab_certe</code>, <code>ab_umcg</code> and <code>ab_trivial_nl</code></p></li>
<li><p>Introduction to AMR as a vignette</p></li>
<li><p>Removed clipboard functions as it violated the CRAN policy</p></li>
<li><p>Added three antimicrobial agents to the <code>antibiotics</code> data set: Terbinafine (D01BA02), Rifaximin (A07AA11) and Isoconazole (D01AC05)</p></li>
<p>Support for quasiquotation in the functions series <code>count_*</code> and <code>portions_*</code>, and <code>n_rsi</code>. This allows to check for more than 2 vectors or columns.</p>
<li><p>Edited <code>ggplot_rsi</code> and <code>geom_rsi</code> so they can cope with <code>count_df</code>. The new <code>fun</code> argument has value <code>portion_df</code> at default, but can be set to <code>count_df</code>.</p></li>
<strong>BREAKING</strong>: <code>rsi_df</code> was removed in favour of new functions <code>portion_R</code>, <code>portion_IR</code>, <code>portion_I</code>, <code>portion_SI</code> and <code>portion_S</code> to selectively calculate resistance or susceptibility. These functions are 20 to 30 times faster than the old <code>rsi</code> function. The old function still works, but is deprecated.
<li>New function <code>portion_df</code> to get all portions of S, I and R of a data set with antibiotic columns, with support for grouped variables</li>
<strong>BREAKING</strong>: the methodology for determining first weighted isolates was changed. The antibiotics that are compared between isolates (call <em>key antibiotics</em>) to include more first isolates (afterwards called first <em>weighted</em> isolates) are now as follows:
<li>New functions <code>as.bactid</code> and <code>is.bactid</code> to transform/ look up microbial ID’s.</li>
<li>The existing function <code>guess_bactid</code> is now an alias of <code>as.bactid</code>
</li>
<li>New Becker classification for <em>Staphylococcus</em> to categorise them into Coagulase Negative <em>Staphylococci</em> (CoNS) and Coagulase Positve <em>Staphylococci</em> (CoPS)</li>
<li>New Lancefield classification for <em>Streptococcus</em> to categorise them into Lancefield groups</li>
<li>For convience, new descriptive statistical functions <code>kurtosis</code> and <code>skewness</code> that are lacking in base R - they are generic functions and have support for vectors, data.frames and matrices</li>
<li>Function <code>g.test</code> to perform the Χ<sup>2</sup> distributed <ahref="https://en.wikipedia.org/wiki/G-test"><em>G</em>-test</a>, which use is the same as <code>chisq.test</code>
<li>Support for Addins menu in RStudio to quickly insert <code><ahref="https://rdrr.io/r/base/match.html">%in%</a></code> or <code><ahref="../reference/like.html">%like%</a></code> (and give them keyboard shortcuts), or to view the datasets that come with this package</li>
<li>Function <code>p.symbol</code> to transform p values to their related symbols: <code>0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1</code>
</li>
<li>Functions <code>clipboard_import</code> and <code>clipboard_export</code> as helper functions to quickly copy and paste from/to software like Excel and SPSS. These functions use the <code>clipr</code> package, but are a little altered to also support headless Linux servers (so you can use it in RStudio Server)</li>
<li>Support for existing functions <code>hist</code> and <code>plot</code> to use a frequency table as input: <code><ahref="https://rdrr.io/r/graphics/hist.html">hist(freq(df$age))</a></code>
<li>Possibility to globally set the default for the amount of items to print, with <code><ahref="https://rdrr.io/r/base/options.html">options(max.print.freq = n)</a></code> where <em>n</em> is your preset value</li>
<li>Updated version of the <code>septic_patients</code> data set to better reflect the reality</li>
<li>Pretty printing for tibbles removed as it is not really the scope of this package</li>
<li>Printing of <code>mic</code> and <code>rsi</code> classes now returns all values - use <code>freq</code> to check distributions</li>
<li>Improved speed of key antibiotics comparison for determining first isolates</li>
<li>Column names for the <code>key_antibiotics</code> function are now generic: 6 for broadspectrum ABs, 6 for Gram-positive specific and 6 for Gram-negative specific ABs</li>
<li>Speed improvement for the <code>abname</code> function</li>
<li>Frequency tables are now actual <code>data.frame</code>s with altered console printing to make it look like a frequency table. Because of this, the argument <code>toConsole</code> is not longer needed.</li>
<li>Fix for <code>freq</code> where the class of an item would be lost</li>
<li>Small translational improvements to the <code>septic_patients</code> dataset and the column <code>bactid</code> now has the new class <code>"bactid"</code>
</li>
<li>Small improvements to the <code>microorganisms</code> dataset (especially for <em>Salmonella</em>) and the column <code>bactid</code> now has the new class <code>"bactid"</code>
<li>Now possible to coerce MIC values with a space between operator and value, i.e.<code><ahref="../reference/as.mic.html">as.mic("<= 0.002")</a></code> now works</li>
<li>Added <code>"groups"</code> option for <code>atc_property(..., property)</code>. It will return a vector of the ATC hierarchy as defined by the <ahref="https://www.whocc.no/atc/structure_and_principles/">WHO</a>. The new function <code>atc_groups</code> is a convenient wrapper around this.</li>
<li>Build-in host check for <code>atc_property</code> as it requires the host set by <code>url</code> to be responsive</li>
<li>Improved <code>first_isolate</code> algorithm to exclude isolates where bacteria ID or genus is unavailable</li>
<li>Fix for warning <em>hybrid evaluation forced for row_number</em> (<ahref="https://github.com/tidyverse/dplyr/commit/924b62"><code>924b62</code></a>) from the <code>dplyr</code> package v0.7.5 and above</li>
<li>Function <code>n_rsi</code> to count cases where antibiotic test results were available, to be used in conjunction with <code><ahref="https://dplyr.tidyverse.org/reference/summarise.html">dplyr::summarise</a></code>, see ?rsi</li>
<li>Function <code>guess_bactid</code> to <strong>determine the ID</strong> of a microorganism based on genus/species or known abbreviations like MRSA</li>
<li>Function <code>guess_atc</code> to <strong>determine the ATC</strong> of an antibiotic based on name, trade name, or known abbreviations</li>
<li>Function <code>freq</code> to create <strong>frequency tables</strong>, with additional info in a header</li>
<ahref="https://www.eucast.org/expert_rules_and_intrinsic_resistance/">Exceptional resistances defined by EUCAST</a> are also supported instead of countries alone</li>
<li>New algorithm to determine weighted isolates, can now be <code>"points"</code> or <code>"keyantibiotics"</code>, see <code><ahref="../reference/first_isolate.html">?first_isolate</a></code>
<li>Expanded <code>README.md</code> with more examples</li>
<li>Added <ahref="https://orcid.org">ORCID</a> of authors to DESCRIPTION file</li>
<li>Added unit testing with the <code>testthat</code> package</li>
<li>Added build tests for Linux and macOS using Travis CI (<ahref="https://travis-ci.org/msberends/AMR"class="uri">https://travis-ci.org/msberends/AMR</a>)</li>
<li>Added line coverage checking using CodeCov (<ahref="https://codecov.io/gh/msberends/AMR/tree/master/R"class="uri">https://codecov.io/gh/msberends/AMR/tree/master/R</a>)</li>
<p>Developed by <ahref='https://www.rug.nl/staff/m.s.berends/'>Matthijs S. Berends</a>, <ahref='https://www.rug.nl/staff/c.f.luz/'>Christian F. Luz</a>, <ahref='https://www.rug.nl/staff/a.w.friedrich/'>Alexander W. Friedrich</a>, <ahref='https://www.rug.nl/staff/b.sinha/'>Bhanu N. M. Sinha</a>, <ahref='https://www.rug.nl/staff/c.j.albers/'>Casper J. Albers</a>, <ahref='https://www.rug.nl/staff/c.glasner/'>Corinna Glasner</a>.</p>