* 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)`)
# `AMR` 1.7.0
### Breaking change
* All antibiotic class selectors (such as `carbapenems()`, `aminoglycosides()`) can now be used for filtering as well, making all their accompanying `filter_*()` functions redundant (such as `filter_carbapenems()`, `filter_aminoglycosides()`). These functions are now deprecated and will be removed in a next release.
<ahref="#last-updated-30-may-2021"class="anchor"></a><small>Last updated: 30 May 2021</small>
</h2>
<divid="changed"class="section level3">
<h3class="hasAnchor">
<ahref="#changed"class="anchor"></a>Changed</h3>
<ul>
<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>
<li>Updated the bacterial taxonomy to 3 March 2021 (using <ahref="https://lpsn.dsmz.de">LPSN</a>)
<ul>
@ -502,9 +518,9 @@
@@ -502,9 +518,9 @@
<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>
<li>
@ -619,9 +635,9 @@
@@ -619,9 +635,9 @@
<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>
<li>
@ -724,9 +740,9 @@
@@ -724,9 +740,9 @@
<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>
@ -791,7 +807,7 @@
@@ -791,7 +807,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><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>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>
@ -853,9 +869,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
@@ -853,9 +869,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<li>Plotting biplots for principal component analysis using the new <code><ahref="../reference/ggplot_pca.html">ggplot_pca()</a></code> function</li>
<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>
@ -886,9 +902,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
@@ -886,9 +902,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<li><p>Fixed important floating point error for some MIC comparisons in EUCAST 2020 guideline</p></li>
<li>
@ -1123,7 +1139,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
@@ -1123,7 +1139,7 @@ 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><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>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>Renamed data set <code>septic_patients</code> to <code>example_isolates</code></p></li>
</ul>
</div>
@ -1194,9 +1210,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
@@ -1194,9 +1210,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<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.
<ul>
@ -1306,9 +1322,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
@@ -1306,9 +1322,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<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>Column names of output <code><ahref="../reference/count.html">count_df()</a></code> and <code>portion_df()</code> are now lowercase</li>
<li>Fixed bug in translation of microorganism names</li>
@ -1354,9 +1370,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
@@ -1354,9 +1370,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<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>
@ -1390,7 +1406,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
@@ -1390,7 +1406,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>
@ -1400,12 +1416,12 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
@@ -1400,12 +1416,12 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
@ -1415,7 +1431,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
@@ -1415,7 +1431,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><ahref="https://rdrr.io/pkg/cleaner/man/freq.html">freq()</a></code> for when all values are <code>NA</code>
<li>Fix for <code>freq()</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>
@ -1440,9 +1456,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
@@ -1440,9 +1456,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<li>Fixed a critical bug when using <code><ahref="../reference/eucast_rules.html">eucast_rules()</a></code> with <code>verbose = TRUE</code>
</li>
@ -1559,9 +1575,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
@@ -1559,9 +1575,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<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>
@ -1654,7 +1670,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
@@ -1654,7 +1670,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>
@ -1664,15 +1680,15 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
@@ -1664,15 +1680,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>
@ -1717,9 +1733,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
@@ -1717,9 +1733,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<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>
@ -1754,7 +1770,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
@@ -1754,7 +1770,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>
@ -1762,14 +1778,14 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
@@ -1762,14 +1778,14 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<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>
<li><p>Check for <code><ahref="https://hms.tidyverse.org/reference/Deprecated.html">hms::is.hms</a></code></p></li>
@ -1787,7 +1803,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
@@ -1787,7 +1803,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<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>Support for named vectors of class <code>mo</code>, useful for <code><ahref="https://rdrr.io/pkg/cleaner/man/freq.html">top_freq()</a></code></p></li>
<li><p>Support for named vectors of class <code>mo</code>, useful for <code>top_freq()</code></p></li>
<li><p><code>ggplot_rsi</code> and <code>scale_y_percent</code> have <code>breaks</code> argument</p></li>
<li>
<p>AI improvements for <code>as.mo</code>:</p>
@ -1907,9 +1923,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
@@ -1907,9 +1923,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<li><p>Renamed <code>septic_patients$sex</code> to <code>septic_patients$gender</code></p></li>