* Function `freq()` has moved to a new package, [`clean`](https://github.com/msberends/clean) ([CRAN link](https://cran.r-project.org/package=clean)). Creating frequency tables is actually not the scope of this package (never was) and this function has matured a lot over the last two years. Therefore, a new package was created for data cleaning and checking and it perfectly fits the `freq()` function. The [`clean`](https://github.com/msberends/clean) package is available on CRAN and will be installed automatically when updating the `AMR` package, that now imports it. In a later stage, the `skewness()` and `kurtosis()` functions will be moved to the `clean` package too.
* Function `freq()` has moved to a new package, [`clean`](https://github.com/msberends/clean) ([CRAN link](https://cran.r-project.org/package=clean)). The `freq()` function still works, since it is re-exported from the `clean` package to this `AMR` package. Creating frequency tables is actually not the scope of this package (never was) and this function has matured a lot over the last two years. Therefore, a new package was created for data cleaning and checking and it perfectly fits the `freq()` function. The [`clean`](https://github.com/msberends/clean) package is available on CRAN and will be installed automatically when updating the `AMR` package, that now imports it. In a later stage, the `skewness()` and `kurtosis()` functions will be moved to the `clean` package too.
* Determination of first isolates now **excludes** all 'unknown' microorganisms at default, i.e. microbial code `"UNKNOWN"`. They can be included with the new parameter `include_unknown`:
```r
first_isolate(..., include_unknown = TRUE)
@ -9,6 +9,21 @@
For WHONET users, this means that all records with organism code `"con"` (*contamination*) will be excluded at default, since `as.mo("con") = "UNKNOWN"`. The function always shows a note with the number of 'unknown' microorganisms that were included or excluded.
### New
* Function `bug_drug_combinations()` to quickly get a `data.frame` with the antimicrobial resistance of any bug-drug combination in a data set:
```r
x <-bug_drug_combinations(septic_patients)
x
#> ab mo S I R total
#> 1 AMC B_ESCHR_COL 332 74 61 467
#> 2 AMC B_KLBSL_PNE 49 3 6 58
#> 3 AMC B_PROTS_MIR 28 7 1 36
#> 4 AMC B_PSDMN_AER 0 0 30 30
#> 5 AMC B_STPHY_AUR 234 0 1 235
```
You can format this to a printable format, ready for reporting or exporting to e.g. Excel with the base R `format()` function:
```r
format(x)
```
* Additional way to calculate co-resistance, i.e. when using multiple antibiotics as input for `portion_*` functions or `count_*` functions. This can be used to determine the empiric susceptibily of a combination therapy. A new parameter `only_all_tested` (**which defaults to `FALSE`**) replaces the old `also_single_tested` 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 `portion` and `count` help pages), where the %SI is being determined:
```r
@ -72,6 +87,7 @@
* Speed improvement for `guess_ab_col()` which is now 30 times faster for antibiotic abbreviations
* Improved `filter_ab_class()` to be more reliable and to support 5th generation cephalosporins
* Classes `ab` and `mo` will now be preserved in any subsetting
* Function `availability()` now uses `portion_R()` instead of `portion_IR()`, to comply with EUCAST insights
#### Other
* Added Prof Dr Casper Albers as doctoral advisor and Dr Bart Meijer, Dr Dennis Souverein and Annick Lenglet as contributors
#' Easy check for availability of columns in a data set. This makes it easy to get an idea of which antibiotic combination can be used for calculation with e.g. \code{\link{portion_IR}}.
#' Easy check for availability of columns in a data set. This makes it easy to get an idea of which antimicrobial combination can be used for calculation with e.g. \code{\link{portion_R}}.
#' @param tbl a \code{data.frame} or \code{list}
#' @param width number of characters to present the visual availability, defaults to filling the width of the console
#' @details The function returns a \code{data.frame} with columns \code{"resistant"} and \code{"visual_resistance"}. The values in that columns are calculated with \code{\link{portion_R}}.
#' @return \code{data.frame} with column names of \code{tbl} as row names
#' Determine antimicrobial resistance (AMR) of all bug-drug combinations in your data set where at least 30 (default) isolates are available per species. Use \code{format} on the result to prettify it to a printable format, see Examples.
#' @inheritParams eucast_rules
#' @inheritParams rsi_df
#' @importFrom dplyr rename
#' @importFrom tidyr spread
#' @importFrom clean freq
#' @export
#' @source \strong{M39 Analysis and Presentation of Cumulative Antimicrobial Susceptibility Test Data, 4th Edition}, 2014, \emph{Clinical and Laboratory Standards Institute (CLSI)}. \url{https://clsi.org/standards/products/microbiology/documents/m39/}.
<li>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>). Creating frequency tables is actually not the scope of this package (never was) and this function has matured a lot over the last two years. Therefore, a new package was created for data cleaning and checking and it perfectly fits the <code>freq()</code> function. The <ahref="https://github.com/msberends/clean"><code>clean</code></a> package is available on CRAN and will be installed automatically when updating the <code>AMR</code> package, that now imports it. In a later stage, the <code><ahref="../reference/skewness.html">skewness()</a></code> and <code><ahref="../reference/kurtosis.html">kurtosis()</a></code> functions will be moved to the <code>clean</code> package too.</li>
<li>Function <code><ahref="https://www.rdocumentation.org/packages/clean/topics/freq">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>). The <code><ahref="https://www.rdocumentation.org/packages/clean/topics/freq">freq()</a></code> function still works, since it is re-exported from the <code>clean</code> package to this <code>AMR</code> package. Creating frequency tables is actually not the scope of this package (never was) and this function has matured a lot over the last two years. Therefore, a new package was created for data cleaning and checking and it perfectly fits the <code><ahref="https://www.rdocumentation.org/packages/clean/topics/freq">freq()</a></code> function. The <ahref="https://github.com/msberends/clean"><code>clean</code></a> package is available on CRAN and will be installed automatically when updating the <code>AMR</code> package, that now imports it. In a later stage, the <code><ahref="../reference/skewness.html">skewness()</a></code> and <code><ahref="../reference/kurtosis.html">kurtosis()</a></code> functions will be moved to the <code>clean</code> package too.</li>
<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 parameter <code>include_unknown</code>:</p>
<p>Function <code><ahref="../reference/bug_drug_combinations.html">bug_drug_combinations()</a></code> to quickly get a <code>data.frame</code> with the antimicrobial resistance of any bug-drug combination in a data set:</p>
<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://www.rdocumentation.org/packages/base/topics/format">format()</a></code> function:</p>
<p>Additional way to calculate co-resistance, i.e.when using multiple antibiotics as input for <code>portion_*</code> functions or <code>count_*</code> functions. This can be used to determine the empiric susceptibily of a combination therapy. A new parameter <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>
</li>
</ul>
@ -291,11 +304,11 @@
<li>Improved the internal auto-guessing function for determining antibiotics in your data set (<code>AMR:::get_column_abx()</code>)</li>
<li>
<p>Added tibble printing support for classes <code>rsi</code>, <code>mic</code>, <code>disk</code>, <code>ab</code><code>mo</code>. When using tibbles containing antibiotic 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>
<divclass="sourceCode"id="cb3"><preclass="sourceCode r"><codeclass="sourceCode r"><aclass="sourceLine"id="cb3-1" data-line-number="1"><spanclass="co"># (run this on your own console, as this page does not support colour printing)</span></a>
<divclass="sourceCode"id="cb5"><preclass="sourceCode r"><codeclass="sourceCode r"><aclass="sourceLine"id="cb5-1" data-line-number="1"><spanclass="co"># (run this on your own console, as this page does not support colour printing)</span></a>
<li>Removed class <code>atc</code> - using <code><ahref="../reference/AMR-deprecated.html">as.atc()</a></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>The <code>antibiotics</code> data set is now sorted by name and all cephalosporins now have their generation between brackets</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><p>Classes <code>ab</code> and <code>mo</code> will now be preserved in any subsetting</p></li>
<li>Classes <code>ab</code> and <code>mo</code> will now be preserved in any subsetting</li>
<li><p>Function <code><ahref="../reference/availability.html">availability()</a></code> now uses <code><ahref="../reference/portion.html">portion_R()</a></code> instead of <code><ahref="../reference/portion.html">portion_IR()</a></code>, to comply with EUCAST insights</p></li>
</ul>
<divid="other"class="section level4">
<h4class="hasAnchor">
@ -339,14 +353,14 @@
<ul>
<li>
<p>Function <code><ahref="../reference/portion.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><ahref="../reference/portion.html">portion_df()</a></code> to immediately show resistance percentages and number of available isolates:</p>
<li>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</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>Added ceftazidim intrinsic resistance to <em>Streptococci</em>
</li>
<li>Changed default settings for <code><ahref="../reference/age_groups.html">age_groups()</a></code>, to let groups of fives and tens end with 100+ instead of 120+</li>
<li>Fix for <code>freq()</code> for when all values are <code>NA</code>
<li>Fix for <code><ahref="https://www.rdocumentation.org/packages/clean/topics/freq">freq()</a></code> for when all values are <code>NA</code>
</li>
<li>Fix for <code><ahref="../reference/first_isolate.html">first_isolate()</a></code> for when dates are missing</li>
<li>Improved speed of <code><ahref="../reference/guess_ab_col.html">guess_ab_col()</a></code>
@ -560,32 +574,32 @@ This data is updated annually - check the included version with the new function
</li>
<li>
<p>New filters for antimicrobial classes. Use these functions to filter isolates on results in one of more antibiotics from a specific class:</p>
<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>
<aclass="sourceLine"id="cb8-2" data-line-number="2"><spanclass="co"># Filtering on glycopeptide antibacterials: any of `vanc` or `teic` is R</span></a>
<aclass="sourceLine"id="cb8-4" data-line-number="4"><spanclass="co"># Filtering on glycopeptide antibacterials: all of `vanc` and `teic` is R</span></a></code></pre></div>
<aclass="sourceLine"id="cb10-2" data-line-number="2"><spanclass="co"># Filtering on glycopeptide antibacterials: any of `vanc` or `teic` is R</span></a>
<aclass="sourceLine"id="cb10-4" data-line-number="4"><spanclass="co"># Filtering on glycopeptide antibacterials: all of `vanc` and `teic` is R</span></a></code></pre></div>
</li>
<li>
<p>All <code>ab_*</code> functions are deprecated and replaced by <code>atc_*</code> functions:</p>
These functions use <code><ahref="../reference/AMR-deprecated.html">as.atc()</a></code> internally. The old <code>atc_property</code> has been renamed <code><ahref="../reference/atc_online.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>.</li>
<li>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</li>
<li>Support for the upcoming <ahref="https://dplyr.tidyverse.org"><code>dplyr</code></a> version 0.8.0</li>
@ -597,20 +611,20 @@ These functions use <code><a href="../reference/AMR-deprecated.html">as.atc()</a
<li>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 antimicrobial resistance analysis per age group.</li>
<li>
<p>New function <code><ahref="../reference/resistance_predict.html">ggplot_rsi_predict()</a></code> as well as the base R <code><ahref="https://www.rdocumentation.org/packages/graphics/topics/plot">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>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>
</li>
@ -639,33 +653,33 @@ These functions use <code><a href="../reference/AMR-deprecated.html">as.atc()</a
<ul>
<li>
<p>Now handles incorrect spelling, like <code>i</code> instead of <code>y</code> and <code>f</code> instead of <code>ph</code>:</p>
<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>
Using <code><ahref="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a></code> could lead to very unreliable results.</li>
<li>Implemented the latest publication of Becker <em>et al.</em> (2019), for categorising coagulase-negative <em>Staphylococci</em>
</li>
<li>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.</li>
<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>
<aclass="sourceLine"id="cb15-3" data-line-number="3"><spanclass="co"># one unique value (^= 100.0%) could not be coerced and is considered 'unknown': "qwerty". Use mo_failures() to review it.</span></a>
<aclass="sourceLine"id="cb17-3" data-line-number="3"><spanclass="co"># one unique value (^= 100.0%) could not be coerced and is considered 'unknown': "qwerty". Use mo_failures() to review it.</span></a>
<p>Support for tidyverse quasiquotation! Now you can create frequency tables of function outcomes:</p>
<divclass="sourceCode"id="cb16"><preclass="sourceCode r"><codeclass="sourceCode r"><aclass="sourceLine"id="cb16-1" data-line-number="1"><spanclass="co"># Determine genus of microorganisms (mo) in `septic_patients` data set:</span></a>
<aclass="sourceLine"id="cb16-2" data-line-number="2"><spanclass="co"># OLD WAY</span></a>
<divclass="sourceCode"id="cb18"><preclass="sourceCode r"><codeclass="sourceCode r"><aclass="sourceLine"id="cb18-1" data-line-number="1"><spanclass="co"># Determine genus of microorganisms (mo) in `septic_patients` data set:</span></a>
<aclass="sourceLine"id="cb18-2" data-line-number="2"><spanclass="co"># OLD WAY</span></a>
<li>Added parameter <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)</li>
<li>Fix for <code>portion_*(..., as_percent = TRUE)</code> when minimal number of isolates would not be met</li>
@ -810,19 +824,19 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
<li>Using <code>portion_*</code> functions now throws a warning when total available isolate is below parameter <code>minimum</code>
</li>
<li>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</li>
<aclass="sourceLine"id="cb19-3" data-line-number="3"><spanclass="st"></span><spanclass="kw"><ahref="https://dplyr.tidyverse.org/reference/select.html">select</a></span>(<spanclass="op">-</span>count, <spanclass="op">-</span>cum_count) <spanclass="co"># only get item, percent, cum_percent</span></a></code></pre></div>
<aclass="sourceLine"id="cb21-3" data-line-number="3"><spanclass="st"></span><spanclass="kw"><ahref="https://dplyr.tidyverse.org/reference/select.html">select</a></span>(<spanclass="op">-</span>count, <spanclass="op">-</span>cum_count) <spanclass="co"># only get item, percent, cum_percent</span></a></code></pre></div>
</li>
<li>Check for <code><ahref="https://www.rdocumentation.org/packages/hms/topics/Deprecated">hms::is.hms</a></code>
</li>
@ -902,18 +916,18 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
</li>
</ul>
<p>They also come with support for German, Dutch, French, Italian, Spanish and Portuguese:</p>
<li>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
<ul>
@ -924,18 +938,18 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
</li>
<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>
<aclass="sourceLine"id="cb22-5" data-line-number="5"><spanclass="kw"><ahref="../reference/as.mo.html">as.mo</a></span>(<spanclass="st">"S group A"</span>)</a>
<aclass="sourceLine"id="cb24-5" data-line-number="5"><spanclass="kw"><ahref="../reference/as.mo.html">as.mo</a></span>(<spanclass="st">"S group A"</span>)</a>
<li>Added parameter <code>reference_df</code> for <code>as.mo</code>, so users can supply their own microbial IDs, name or codes as a reference table</li>
<li>Renamed all previous references to <code>bactid</code> to <code>mo</code>, like:
@ -963,12 +977,12 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
<li>Added three antimicrobial agents to the <code>antibiotics</code> data set: Terbinafine (D01BA02), Rifaximin (A07AA11) and Isoconazole (D01AC05)</li>
<li>
<p>Added 163 trade names to the <code>antibiotics</code> data set, it now contains 298 different trade names in total, e.g.:</p>
<li>For <code>first_isolate</code>, rows will be ignored when there’s no species available</li>
<li>Function <code>ratio</code> is now deprecated and will be removed in a future release, as it is not really the scope of this package</li>
@ -979,13 +993,13 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
</li>
<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>Edited <code>ggplot_rsi</code> and <code>geom_rsi</code> so they can cope with <code>count_df</code>. The new <code>fun</code> parameter has value <code>portion_df</code> at default, but can be set to <code>count_df</code>.</li>
<li>Fix for <code>ggplot_rsi</code> when the <code>ggplot2</code> package was not loaded</li>
@ -999,12 +1013,12 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
</li>
<li>
<p>Support for types (classes) list and matrix for <code>freq</code></p>
@ -1078,13 +1092,13 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
<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>freq(table(x, y))</code>
<li>Support for <code>table</code> to use as input: <code><ahref="https://www.rdocumentation.org/packages/clean/topics/freq">freq(table(x, y))</a></code>
</li>
<li>Support for existing functions <code>hist</code> and <code>plot</code> to use a frequency table as input: <code><ahref="https://www.rdocumentation.org/packages/graphics/topics/hist">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>freq(mydata, mycolumn)</code> is the same as <code>mydata %>% freq(mycolumn)</code>
<li>Support for quasiquotation: <code><ahref="https://www.rdocumentation.org/packages/clean/topics/freq">freq(mydata, mycolumn)</a></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>
@ -1238,7 +1252,7 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
<metaproperty="og:title"content="Check availability of columns — availability"/>
<metaproperty="og:description"content="Easy check for availability of columns in a data set. This makes it easy to get an idea of which antibiotic combination can be used for calculation with e.g. portion_IR." />
<metaproperty="og:description"content="Easy check for availability of columns in a data set. This makes it easy to get an idea of which antimicrobial combination can be used for calculation with e.g. portion_R." />
<spanclass="version label label-default"data-toggle="tooltip"data-placement="bottom"title="Latest development version">0.7.1.9055</span>
<spanclass="version label label-default"data-toggle="tooltip"data-placement="bottom"title="Latest development version">0.7.1.9059</span>
</span>
</div>
@ -230,7 +230,7 @@
<divclass="ref-description">
<p>Easy check for availability of columns in a data set. This makes it easy to get an idea of which antibiotic combination can be used for calculation with e.g. <code><ahref='portion.html'>portion_IR</a></code>.</p>
<p>Easy check for availability of columns in a data set. This makes it easy to get an idea of which antimicrobial combination can be used for calculation with e.g. <code><ahref='portion.html'>portion_R</a></code>.</p>
</div>
@ -253,6 +253,10 @@
<p><code>data.frame</code> with column names of <code>tbl</code> as row names</p>
<p>The function returns a <code>data.frame</code> with columns <code>"resistant"</code> and <code>"visual_resistance"</code>. The values in that columns are calculated with <code><ahref='portion.html'>portion_R</a></code>.</p>
<h2class="hasAnchor"id="read-more-on-our-website-"><aclass="anchor"href="#read-more-on-our-website-"></a>Read more on our website!</h2>
@ -283,6 +287,8 @@
<li><ahref="#value">Value</a></li>
<li><ahref="#details">Details</a></li>
<li><ahref="#read-more-on-our-website-">Read more on our website!</a></li>
<li><ahref="#examples">Examples</a></li>
@ -293,7 +299,7 @@
<footer>
<divclass="copyright">
<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/'>Alex W. Friedrich</a>, <ahref='https://www.rug.nl/staff/b.sinha/'>Bhanu N. M. Sinha</a>, <ahref='https://www.rug.nl/staff/c.glasner/'>Corinna Glasner</a>.</p>
<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/'>Alex 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>
<metaproperty="og:description"content="Determine antimicrobial resistance (AMR) of all bug-drug combinations in your data set where at least 30 (default) isolates are available per species. Use format on the result to prettify it to a printable format, see Examples."/>
<p>Determine antimicrobial resistance (AMR) of all bug-drug combinations in your data set where at least 30 (default) isolates are available per species. Use <code>format</code> on the result to prettify it to a printable format, see Examples.</p>
<td><p>data with antibiotic columns, like e.g. <code>AMX</code> and <code>AMC</code></p></td>
</tr>
<tr>
<th>col_mo</th>
<td><p>column name of the unique IDs of the microorganisms (see <code><ahref='as.mo.html'>mo</a></code>), defaults to the first column of class <code>mo</code>. Values will be coerced using <code><ahref='as.mo.html'>as.mo</a></code>.</p></td>
</tr>
<tr>
<th>minimum</th>
<td><p>the minimum allowed number of available (tested) isolates. Any isolate count lower than <code>minimum</code> will return <code>NA</code> with a warning. The default number of <code>30</code> isolates is advised by the Clinical and Laboratory Standards Institute (CLSI) as best practice, see Source.</p></td>
<p><strong>M39 Analysis and Presentation of Cumulative Antimicrobial Susceptibility Test Data, 4th Edition</strong>, 2014, <em>Clinical and Laboratory Standards Institute (CLSI)</em>. <ahref='https://clsi.org/standards/products/microbiology/documents/m39/'>https://clsi.org/standards/products/microbiology/documents/m39/</a>.</p>
<h2class="hasAnchor"id="read-more-on-our-website-"><aclass="anchor"href="#read-more-on-our-website-"></a>Read more on our website!</h2>
<p>On our website <ahref='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <ahref='https://msberends.gitlab.io/AMR/articles/AMR.html'>a tutorial</a> about how to conduct AMR analysis, the <ahref='https://msberends.gitlab.io/AMR/reference'>complete documentation of all functions</a> (which reads a lot easier than here in R) and <ahref='https://msberends.gitlab.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
<li><ahref="#read-more-on-our-website-">Read more on our website!</a></li>
<li><ahref="#examples">Examples</a></li>
</ul>
</div>
</div>
<footer>
<divclass="copyright">
<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/'>Alex 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>
</div>
<divclass="pkgdown">
<p>Site built with <ahref="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
<spanclass="version label label-default"data-toggle="tooltip"data-placement="bottom"title="Latest development version">0.7.1.9055</span>
<spanclass="version label label-default"data-toggle="tooltip"data-placement="bottom"title="Latest development version">0.7.1.9059</span>
</span>
</div>
@ -257,7 +257,7 @@
<footer>
<divclass="copyright">
<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/'>Alex W. Friedrich</a>, <ahref='https://www.rug.nl/staff/b.sinha/'>Bhanu N. M. Sinha</a>, <ahref='https://www.rug.nl/staff/c.glasner/'>Corinna Glasner</a>.</p>
<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/'>Alex 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>
<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/'>Alex 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>
</div>
<divclass="pkgdown">
<p>Site built with <ahref="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
\code{data.frame} with column names of \code{tbl} as row names
}
\description{
Easy check for availability of columns in a data set. This makes it easy to get an idea of which antibiotic combination can be used for calculation with e.g. \code{\link{portion_IR}}.
Easy check for availability of columns in a data set. This makes it easy to get an idea of which antimicrobial combination can be used for calculation with e.g. \code{\link{portion_R}}.
}
\details{
The function returns a \code{data.frame} with columns \code{"resistant"} and \code{"visual_resistance"}. The values in that columns are calculated with \code{\link{portion_R}}.
% Please edit documentation in R/bug_drug_combinations.R
\name{bug_drug_combinations}
\alias{bug_drug_combinations}
\title{Determine bug-drug combinations}
\source{
\strong{M39 Analysis and Presentation of Cumulative Antimicrobial Susceptibility Test Data, 4th Edition}, 2014, \emph{Clinical and Laboratory Standards Institute (CLSI)}. \url{https://clsi.org/standards/products/microbiology/documents/m39/}.
\item{x}{data with antibiotic columns, like e.g. \code{AMX} and \code{AMC}}
\item{col_mo}{column name of the unique IDs of the microorganisms (see \code{\link{mo}}), defaults to the first column of class \code{mo}. Values will be coerced using \code{\link{as.mo}}.}
\item{minimum}{the minimum allowed number of available (tested) isolates. Any isolate count lower than \code{minimum} will return \code{NA} with a warning. The default number of \code{30} isolates is advised by the Clinical and Laboratory Standards Institute (CLSI) as best practice, see Source.}
}
\description{
Determine antimicrobial resistance (AMR) of all bug-drug combinations in your data set where at least 30 (default) isolates are available per species. Use \code{format} on the result to prettify it to a printable format, see Examples.
}
\section{Read more on our website!}{
On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a tutorial} about how to conduct AMR analysis, the \href{https://msberends.gitlab.io/AMR/reference}{complete documentation of all functions} (which reads a lot easier than here in R) and \href{https://msberends.gitlab.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.