* Data set `intrinsic_resistant`. 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: `microorganism` and `antibiotic`.
@ -15,18 +15,19 @@
```
### Changed
* Support for using `dplyr`'s `across()` in `as.rsi()` to interpret MIC values or disk zone diameters, that now also automatically determines the column with microorganism names or codes.
```r
# until dplyr 1.0.0
your_data %>% mutate_if(is.mic, as.rsi)
your_data %>% mutate_if(is.disk, as.rsi)
* Improvements for `as.rsi()`:
* Support for using `dplyr`'s `across()` to interpret MIC values or disk zone diameters, which also automatically determines the column with microorganism names or codes.
* 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.
* Overall speed improvement by tweaking joining functions
warning("Interpretation of ",font_bold(ab_name(ab,tolower=TRUE))," for some microorganisms is only available for (uncomplicated) urinary tract infections (UTI).\n Use parameter 'uti' to set which isolates are from urine. See ?as.rsi.",call.=FALSE)
<ahref="#last-updated-14-august-2020" class="anchor"></a><small>Last updated: 14 August 2020</small>
<ahref="#last-updated-15-august-2020" class="anchor"></a><small>Last updated: 15 August 2020</small>
</h2>
<divid="new"class="section level3">
<h3class="hasAnchor">
@ -259,8 +259,10 @@
<h3class="hasAnchor">
<ahref="#changed"class="anchor"></a>Changed</h3>
<ul>
<li>Improvements for <code><ahref="../reference/as.rsi.html">as.rsi()</a></code>:
<ul>
<li>
<p>Support for using <code>dplyr</code>’s <code><ahref="https://dplyr.tidyverse.org/reference/across.html">across()</a></code> in <code><ahref="../reference/as.rsi.html">as.rsi()</a></code> to interpret MIC values or disk zone diameters, that now also automatically determines the column with microorganism names or codes.</p>
<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>Improved overall speed by tweaking joining functions</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>
</ul>
</li>
<li>Overall speed improvement by tweaking joining functions</li>
</ul>
</div>
</div>
@ -372,7 +377,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>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.</li>
<li>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.</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>
@ -709,7 +714,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
</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>
@ -978,7 +983,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 parameter <code>exact</code> to determine ages with decimals</li>
@ -1003,7 +1008,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>
@ -1244,7 +1249,7 @@ 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>
@ -1345,21 +1350,21 @@ 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 parameter <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="kw">count</span>, <spanclass="op">-</span><spanclass="kw">cum_count</span>) <spanclass="co"># only get item, percent, cum_percent</span>
</pre></div>
</li>
@ -1378,7 +1383,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> parameter</p></li>
<li>
<p>AI improvements for <code>as.mo</code>:</p>
@ -1545,13 +1550,13 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<p>Support for types (classes) list and matrix for <code>freq</code></p>
@ -1626,13 +1631,13 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<ul>
<li>A vignette to explain its usage</li>
<li>Support for <code>rsi</code> (antimicrobial resistance) to use as input</li>
<li>Support for <code>table</code> to use as input: <code><ahref="https://rdrr.io/pkg/cleaner/man/freq.html">freq(table(x, y))</a></code>
<li>Support for <code>table</code> to use as input: <code>freq(table(x, y))</code>
</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>
<li>Support for <code>as.vector</code>, <code>as.data.frame</code>, <code>as_tibble</code> and <code>format</code>
</li>
<li>Support for quasiquotation: <code><ahref="https://rdrr.io/pkg/cleaner/man/freq.html">freq(mydata, mycolumn)</a></code> is the same as <code>mydata %>% freq(mycolumn)</code>
<li>Support for quasiquotation: <code>freq(mydata, mycolumn)</code> is the same as <code>mydata %>% freq(mycolumn)</code>
</li>
<li>Function <code>top_freq</code> function to return the top/below <em>n</em> items as vector</li>
<li>Header of frequency tables now also show Mean Absolute Deviaton (MAD) and Interquartile Range (IQR)</li>
<spanclass="version label label-default"data-toggle="tooltip"data-placement="bottom"title="Latest development version">1.3.0.9002</span>
<spanclass="version label label-default"data-toggle="tooltip"data-placement="bottom"title="Latest development version">1.3.0.9003</span>
</span>
</div>
@ -233,7 +233,7 @@ count_resistant() should be used to count resistant isolates, count_susceptible(
</div>
<divclass="ref-description">
<p>These functions can be used to count resistant/susceptible microbial isolates. All functions support quasiquotation with pipes, can be used in <code><ahref='https://dplyr.tidyverse.org/reference/summarise.html'>summarise()</a></code> from the <code>dplyr</code> package and also support grouped variables, please see <em>Examples</em>.</p>
<p>These functions can be used to count resistant/susceptible microbial isolates. All functions support quasiquotation with pipes, can be used in <code>summarise()</code> from the <code>dplyr</code> package and also support grouped variables, please see <em>Examples</em>.</p>
<p><code>count_resistant()</code> should be used to count resistant isolates, <code>count_susceptible()</code> should be used to count susceptible isolates.</p>
<spanclass="version label label-default"data-toggle="tooltip"data-placement="bottom"title="Latest development version">1.3.0.9002</span>
<spanclass="version label label-default"data-toggle="tooltip"data-placement="bottom"title="Latest development version">1.3.0.9003</span>
</span>
</div>
@ -254,9 +254,6 @@
<p>On our website <ahref='https://msberends.github.io/AMR'>https://msberends.github.io/AMR</a> you can find <ahref='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR analysis, the <ahref='https://msberends.github.io/AMR/reference'>complete documentation of all functions</a> (which reads a lot easier than here in R) and <ahref='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>. As we would like to better understand the backgrounds and needs of our users, please <ahref='https://msberends.github.io/AMR/survey.html'>participate in our survey</a>!</p>