* Function `is_new_episode()` to determine patient episodes which are not necessarily based on microorganisms. It also supports grouped variables with e.g. `mutate()`, `filter()` and `summarise()` of the `dplyr` package:
```r
library(dplyr)
example_isolates %>%
group_by(patient_id, hospital_id) %>%
filter(is_new_episode(date, episode_days = 60))
```
* Functions `mo_is_gram_negative()` and `mo_is_gram_positive()` as wrappers around `mo_gramstain()`. They always return `TRUE` or `FALSE` (except when the input is `NA` or the MO code is `UNKNOWN`), thus always return `FALSE` for species outside the taxonomic kingdom of Bacteria. They can even determine the column with microorganisms themselves when used inside `dplyr` verbs:
```r
example_isolates %>%
filter(mo_is_gram_positive())
#> NOTE: Using column `mo` as input for mo_is_gram_positive()
```
* Function `mo_is_intrinsic_resistant()` to test for intrinsic resistance, based on [EUCAST Intrinsic Resistance and Unusual Phenotypes v3.2](https://www.eucast.org/expert_rules_and_intrinsic_resistance/) from 2020. As with the new `mo_is_gram_*()` functions, if you have the `dplyr` package installed the column with microorganisms will be automatically determined when used inside `dplyr` verbs:
#> NOTE: Using column `mo` as input for mo_is_intrinsic_resistant()
```
* Functions `mo_is_gram_negative()` and `mo_is_gram_positive()` as wrappers around `mo_gramstain()`. They always return `TRUE` or `FALSE` (except when the input is `NA` or the MO code is `UNKNOWN`), thus always return `FALSE` for species outside the taxonomic kingdom of Bacteria.
* Function `mo_is_intrinsic_resistant()` to test for intrinsic resistance, based on [EUCAST Intrinsic Resistance and Unusual Phenotypes v3.2](https://www.eucast.org/expert_rules_and_intrinsic_resistance/) from 2020.
### Changed
* Reference data used for `as.rsi()` can now be set by the user, using the `reference_data` parameter. This allows for using own interpretation guidelines.
* Reference data used for `as.rsi()` can now be set by the user, using the `reference_data` parameter. This allows for using own interpretation guidelines. The user-set data must have the same structure as `rsi_translation`.
* Some functions are now context-aware when used inside `dplyr` verbs, such as `filter()`, `mutate()` and `summarise()`. This means that then the data parameter does not need to be set anymore. This is the case for the new functions `mo_is_gram_negative()`, `mo_is_gram_positive()`, `mo_is_intrinsic_resistant()` and for the existing functions `first_isolate()`, `key_antibiotics()`, `mdro()`, `brmo()`, `mrgn()`, `mdr_tb()`, `mdr_cmi2012()`, `eucast_exceptional_phenotypes()`. This was already the case for antibiotic selection functions (such as using `penicillins()` in `dplyr::select()`).
```r
# to select first isolates that are Gram-negative
# and view results of cephalosporins and aminoglycosides:
* For all function parameters in the code, it is now defined what the exact type of user input should be (inspired by the [`typed`](https://github.com/moodymudskipper/typed) package). If the user input for a certain function does not meet the requirements for a specific parameter (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 400 arguments were defined.
* Deprecated function `p_symbol()` that not really fits the scope of this package. It will be removed in a future version. See [here](https://github.com/msberends/AMR/blob/v1.4.0/R/p_symbol.R) for the source code to preserve it.
* Better determination of disk zones and MIC values when running `as.rsi()` on a data.frame
@ -33,6 +34,7 @@
* Fixed a bug where `mo_uncertainties()` would not return the results based on the MO matching score
* Fixed a bug where `as.mo()` would not return results for known laboratory codes for microorganisms
* Fixed a bug where `as.ab()` would sometimes fail
* If using `as.rsi()` on MICs or disk diffusion while there is intrinsic antimicrobial resistance, a warning will be thrown to remind about this
### Other
* All messages and warnings thrown by this package now break sentences on whole words
#' Determine first (weighted) isolates of all microorganisms of every patient per episode and (if needed) per specimen type. To determine patient episodes not necessarily based on microorganisms, use [is_new_episode()] that also supports grouping with the `dplyr` package.
#' @inheritSection lifecycle Stable lifecycle
#' @param x a [data.frame] containing isolates.
#' @param x a [data.frame] containing isolates. Can be omitted when used inside `dplyr` verbs, such as `filter()`, `mutate()` and `summarise()`.
#' @param col_date column name of the result date (or date that is was received on the lab), defaults to the first column with a date class
#' @param col_patient_id column name of the unique IDs of the patients, defaults to the first column that starts with 'patient' or 'patid' (case insensitive)
#' @param col_mo column name of the IDs of the microorganisms (see [as.mo()]), defaults to the first column of class [`mo`]. Values will be coerced using [as.mo()].
@ -45,7 +45,10 @@
#' @param info print progress
#' @param include_unknown logical to determine whether 'unknown' microorganisms should be included too, i.e. microbial code `"UNKNOWN"`, which defaults to `FALSE`. For WHONET users, this means that all records with organism code `"con"` (*contamination*) will be excluded at default. Isolates with a microbial ID of `NA` will always be excluded as first isolate.
#' @param ... parameters passed on to [first_isolate()] when using [filter_first_isolate()], or parameters passed on to [key_antibiotics()] when using [filter_first_weighted_isolate()]
#' @details The [first_isolate()] function is a wrapper around the [is_new_episode()] function, but more efficient for data sets containing microorganism codes or names.
#' @details
#' These functions are context-aware when used inside `dplyr` verbs, such as `filter()`, `mutate()` and `summarise()`. This means that then the `x` parameter can be omitted, please see *Examples*.
#'
#' The [first_isolate()] function is a wrapper around the [is_new_episode()] function, but more efficient for data sets containing microorganism codes or names.
#'
#' All isolates with a microbial ID of `NA` will be excluded as first isolate.
#'
@ -61,7 +64,7 @@
#' ```
#' x[first_isolate(x, ...), ]
#'
#' x %>% filter(first_isolate(x, ...))
#' x %>% filter(first_isolate(...))
#' ```
#'
#' The function [filter_first_weighted_isolate()] is essentially equal to:
@ -109,6 +112,8 @@
#'
#' # short-hand versions:
#' example_isolates %>%
#' filter(first_isolate())
#' example_isolates %>%
#' filter_first_isolate()
#'
#' example_isolates %>%
@ -150,6 +155,9 @@ first_isolate <- function(x,
info=interactive(),
include_unknown=FALSE,
...){
if (missing(x)){
x<-get_current_data(arg_name="x",call=-2)
}
meet_criteria(x,allow_class="data.frame")# also checks dimensions to be >0
#' These function can be used to determine first isolates (see [first_isolate()]). Using key antibiotics to determine first isolates is more reliable than without key antibiotics. These selected isolates will then be called first *weighted* isolates.
#' These function can be used to determine first isolates (see [first_isolate()]). Using key antibiotics to determine first isolates is more reliable than without key antibiotics. These selected isolates can then be called first *weighted* isolates.
#' @inheritSection lifecycle Stable lifecycle
#' @param x a data.frame with antibiotics columns, like `AMX` or `amox`
#' @param x a [data.frame] with antibiotics columns, like `AMX` or `amox`. Can be omitted when used inside `dplyr` verbs, such as `filter()`, `mutate()` and `summarise()`.
#' @param y,z character vectors to compare
#' @inheritParams first_isolate
#' @param universal_1,universal_2,universal_3,universal_4,universal_5,universal_6 column names of **broad-spectrum** antibiotics, case-insensitive. See details for which antibiotics will be used at default (which are guessed with [guess_ab_col()]).
@ -35,7 +35,10 @@
#' @param GramNeg_1,GramNeg_2,GramNeg_3,GramNeg_4,GramNeg_5,GramNeg_6 column names of antibiotics for **Gram-negatives**, case-insensitive. See details for which antibiotics will be used at default (which are guessed with [guess_ab_col()]).
#' @param warnings give a warning about missing antibiotic columns (they will be ignored)
#' @param ... other parameters passed on to functions
#' @details The function [key_antibiotics()] returns a character vector with 12 antibiotic results for every isolate. These isolates can then be compared using [key_antibiotics_equal()], to check if two isolates have generally the same antibiogram. Missing and invalid values are replaced with a dot (`"."`) by [key_antibiotics()] and ignored by [key_antibiotics_equal()].
#' @details
#' The [key_antibiotics()] function is context-aware when used inside `dplyr` verbs, such as `filter()`, `mutate()` and `summarise()`. This means that then the `x` parameter can be omitted, please see *Examples*.
#'
#' The function [key_antibiotics()] returns a character vector with 12 antibiotic results for every isolate. These isolates can then be compared using [key_antibiotics_equal()], to check if two isolates have generally the same antibiogram. Missing and invalid values are replaced with a dot (`"."`) by [key_antibiotics()] and ignored by [key_antibiotics_equal()].
#'
#' The [first_isolate()] function only uses this function on the same microbial species from the same patient. Using this, e.g. an MRSA will be included after a susceptible *S. aureus* (MSSA) is found within the same patient episode. Without key antibiotic comparison it would not. See [first_isolate()] for more info.
#'
@ -77,30 +80,30 @@
#' # `example_isolates` is a dataset available in the AMR package.
#' # See ?example_isolates.
#'
#' # output of the `key_antibiotics` function could be like this:
#' # output of the `key_antibiotics()` function could be like this:
#' strainA <- "SSSRR.S.R..S"
#' strainB <- "SSSIRSSSRSSS"
#'
#' # can those strings can be compared with:
#' # those strings can be compared with:
#' key_antibiotics_equal(strainA, strainB)
#' # TRUE, because I is ignored (as well as missing values)
#' Determine which isolates are multidrug-resistant organisms (MDRO) according to international and national guidelines.
#' @inheritSection lifecycle Stable lifecycle
#' @param x a [data.frame] with antibiotics columns, like `AMX` or `amox`. Can be omitted when used inside `dplyr` verbs, such as `filter()`, `mutate()` and `summarise()`.
#' @param guideline a specific guideline to follow. When left empty, the publication by Magiorakos *et al.* (2012, Clinical Microbiology and Infection) will be followed, please see *Details*.
#' @inheritParams eucast_rules
#' @param pct_required_classes minimal required percentage of antimicrobial classes that must be available per isolate, rounded down. For example, with the default guideline, 17 antimicrobial classes must be available for *S. aureus*. Setting this `pct_required_classes` argument to `0.5` (default) means that for every *S. aureus* isolate at least 8 different classes must be available. Any lower number of available classes will return `NA` for that isolate.
@ -34,23 +35,36 @@
#' @param verbose a logical to turn Verbose mode on and off (default is off). In Verbose mode, the function does not return the MDRO results, but instead returns a data set in logbook form with extensive info about which isolates would be MDRO-positive, or why they are not.
#' @inheritSection eucast_rules Antibiotics
#' @details
#' These functions are context-aware when used inside `dplyr` verbs, such as `filter()`, `mutate()` and `summarise()`. This means that then the `x` parameter can be omitted, please see *Examples*.
#'
#' For the `pct_required_classes` argument, values above 1 will be divided by 100. This is to support both fractions (`0.75` or `3/4`) and percentages (`75`).
#'
#' Currently supported guidelines are (case-insensitive):
#'
#' - `guideline = "CMI2012"`\cr
#' * `guideline = "CMI2012"` (default)
#'
#' Magiorakos AP, Srinivasan A *et al.* "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) ([link](https://www.clinicalmicrobiologyandinfection.com/article/S1198-743X(14)61632-3/fulltext))
#' The European international guideline - EUCAST Expert Rules Version 3.2 "Intrinsic Resistance and Unusual Phenotypes" ([link](https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Expert_Rules/2020/Intrinsic_Resistance_and_Unusual_Phenotypes_Tables_v3.2_20200225.pdf))
#' - `guideline = "EUCAST3.1"`\cr
#'
#' * `guideline = "EUCAST3.1"`
#'
#' The European international guideline - EUCAST Expert Rules Version 3.1 "Intrinsic Resistance and Exceptional Phenotypes Tables" ([link](https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Expert_Rules/Expert_rules_intrinsic_exceptional_V3.1.pdf))
#' - `guideline = "TB"`\cr
#'
#' * `guideline = "TB"`
#'
#' The international guideline for multi-drug resistant tuberculosis - World Health Organization "Companion handbook to the WHO guidelines for the programmatic management of drug-resistant tuberculosis" ([link](https://www.who.int/tb/publications/pmdt_companionhandbook/en/))
#' - `guideline = "MRGN"`\cr
#'
#' * `guideline = "MRGN"`
#'
#' The German national guideline - Mueller et al. (2015) Antimicrobial Resistance and Infection Control 4:7. DOI: 10.1186/s13756-015-0047-6
#' - `guideline = "BRMO"`\cr
#' The Dutch national guideline - Rijksinstituut voor Volksgezondheid en Milieu "WIP-richtlijn BRMO (Bijzonder Resistente Micro-Organismen) (ZKH)" ([link](https://www.rivm.nl/wip-richtlijn-brmo-bijzonder-resistente-micro-organismen-zkh))
#'
#' * `guideline = "BRMO"`
#'
#' The Dutch national guideline - Rijksinstituut voor Volksgezondheid en Milieu "WIP-richtlijn BRMO (Bijzonder Resistente Micro-Organismen) (ZKH)" ([link](https://www.rivm.nl/wip-richtlijn-brmo-bijzonder-resistente-micro-organismen-zkh))
#'
#' Please suggest your own (country-specific) guidelines by letting us know: <https://github.com/msberends/AMR/issues/new>.
#'
#' **Note:** Every test that involves the Enterobacteriaceae family, will internally be performed using its newly named *order* Enterobacterales, since the Enterobacteriaceae family has been taxonomically reclassified by Adeolu *et al.* in 2016. Before that, Enterobacteriaceae was the only family under the Enterobacteriales (with an i) order. All species under the old Enterobacteriaceae family are still under the new Enterobacterales (without an i) order, but divided into multiple families. The way tests are performed now by this [mdro()] function makes sure that results from before 2016 and after 2016 are identical.
@ -79,10 +93,12 @@
#' mdro() %>%
#' table()
#'
#' # no need to define `x` when used inside dplyr verbs:
warning_("Interpretation of ",font_bold(ab_name(ab,tolower=TRUE))," for some microorganisms is only available for (uncomplicated) urinary tract infections (UTI). Use parameter 'uti' to set which isolates are from urine. See ?as.rsi.",call=FALSE)
if (isTRUE(add_intrinsic_resistance)&is_intrinsic_r){
if (!guideline_coerced%like%"EUCAST"){
warning_("Using 'add_intrinsic_resistance' is only useful when using EUCAST guidelines, since the rules for intrinsic resistance are based on EUCAST.",call=FALSE)
warning_("Found intrinsic resistance in some bug/drug combinations, although it was not applied.\nUse `as.rsi(..., add_intrinsic_resistance = TRUE)` to apply it.",call=FALSE)
<p>EUCAST rules can not only be used for correction, they can also be used for filling in known resistance and susceptibility based on results of other antimicrobials drugs. This process is called <em>interpretive reading</em> and is part of the<code><ahref="../reference/eucast_rules.html">eucast_rules()</a></code> function as well:</p>
<p>A more convenient function is<code><ahref="../reference/mo_property.html">mo_is_intrinsic_resistant()</a></code> that uses the same guideline, but allows to check for one or more specific microorganisms or antibiotics:</p>
<p>EUCAST rules can not only be used for correction, they can also be used for filling in known resistance and susceptibility based on results of other antimicrobials drugs. This process is called <em>interpretive reading</em>, is basically a form of imputation, and is part of the <code><ahref="../reference/eucast_rules.html">eucast_rules()</a></code> function as well:</p>
<spanclass="version label label-default"data-toggle="tooltip"data-placement="bottom"title="Latest development version">1.4.0.9000</span>
<spanclass="version label label-default"data-toggle="tooltip"data-placement="bottom"title="Latest development version">1.4.0.9032</span>
</span>
</div>
@ -217,7 +217,11 @@
<p>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) (<ahref="https://www.clinicalmicrobiologyandinfection.com/article/S1198-743X(14)61632-3/fulltext">link</a>)</p>
<p>The European international guideline - EUCAST Expert Rules Version 3.2 โIntrinsic Resistance and Unusual Phenotypesโ (<ahref="https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Expert_Rules/2020/Intrinsic_Resistance_and_Unusual_Phenotypes_Tables_v3.2_20200225.pdf">link</a>)</p>
</li>
<li>
<p><code>guideline = "EUCAST3.1"</code></p>
<p>The European international guideline - EUCAST Expert Rules Version 3.1 โIntrinsic Resistance and Exceptional Phenotypes Tablesโ (<ahref="https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Expert_Rules/Expert_rules_intrinsic_exceptional_V3.1.pdf">link</a>)</p>
</li>
<li>
@ -226,13 +230,14 @@
</li>
<li>
<p><code>guideline = "MRGN"</code></p>
<p>The German national guideline - Mueller et al.ย (2015) Antimicrobial Resistance and Infection Control 4:7. (<ahref="https://doi.org/10.1186/s13756-015-0047-6">link</a>)</p>
<p>The German national guideline - Mueller et al.ย (2015) Antimicrobial Resistance and Infection Control 4:7. DOI: 10.1186/s13756-015-0047-6</p>
</li>
<li>
<p><code>guideline = "BRMO"</code></p>
<p>The Dutch national guideline - Rijksinstituut voor Volksgezondheid en Milieu โWIP-richtlijn BRMO (Bijzonder Resistente Micro-Organismen) [ZKH]โ (<ahref="https://www.rivm.nl/Documenten_en_publicaties/Professioneel_Praktisch/Richtlijnen/Infectieziekten/WIP_Richtlijnen/WIP_Richtlijnen/Ziekenhuizen/WIP_richtlijn_BRMO_Bijzonder_Resistente_Micro_Organismen_ZKH">link</a>)</p>
<p>The Dutch national guideline - Rijksinstituut voor Volksgezondheid en Milieu โWIP-richtlijn BRMO (Bijzonder Resistente Micro-Organismen) (ZKH)โ (<ahref="https://www.rivm.nl/wip-richtlijn-brmo-bijzonder-resistente-micro-organismen-zkh">link</a>)</p>
</li>
</ul>
<p>Please suggest your own (country-specific) guidelines by letting us know: <ahref="https://github.com/msberends/AMR/issues/new"class="uri">https://github.com/msberends/AMR/issues/new</a>.</p>
<spanclass="fu"><ahref="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span><spanclass="op">(</span><spanclass="op">)</span><spanclass="co"># show frequency table of the result</span>
<spanclass="co"># Warning in mdro(.): NA introduced for isolates where the available percentage of</span>
<spanclass="co"># antimicrobial classes was below 50% (set with `pct_required_classes`)</span></pre></div>
<spanclass="co"># Warning in warning_("NA introduced for isolates where the available percentage of antimicrobial classes was below ", : NA introduced for isolates where the available percentage of antimicrobial</span>
<spanclass="co"># classes was below 50% (set with `pct_required_classes`)</span></pre></div>
<ahref="#last-updated-3-december-2020" class="anchor"></a><small>Last updated: 3 December 2020</small>
<ahref="#last-updated-7-december-2020" class="anchor"></a><small>Last updated: 7 December 2020</small>
</h2>
<divid="new"class="section level3">
<h3class="hasAnchor">
@ -251,42 +251,42 @@
<li>
<p>Function <code><ahref="../reference/is_new_episode.html">is_new_episode()</a></code> to determine patient episodes which are not necessarily based on microorganisms. It also supports grouped variables with e.g.ย <code><ahref="https://dplyr.tidyverse.org/reference/mutate.html">mutate()</a></code>, <code><ahref="https://dplyr.tidyverse.org/reference/filter.html">filter()</a></code> and <code><ahref="https://dplyr.tidyverse.org/reference/summarise.html">summarise()</a></code> of the <code>dplyr</code> package:</p>
<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. They can even determine the column with microorganisms themselves when used inside <code>dplyr</code> verbs:</p>
<spanclass="co">#> NOTE: Using column `mo` as input for mo_is_gram_positive()</span></pre></div>
</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. As with the new <code>mo_is_gram_*()</code> functions, if you have the <code>dplyr</code> package installed the column with microorganisms will be automatically determined when used inside <code>dplyr</code> verbs:</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>
</ul>
</div>
<divid="changed"class="section level3">
<h3class="hasAnchor">
<ahref="#changed"class="anchor"></a>Changed</h3>
<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> parameter. This allows for using own interpretation guidelines.</li>
<li>For all function parameters 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 parameter (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 400 arguments were defined.</li>
<li>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.</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>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</li>
<li>Fix for using parameter <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)</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><p>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> parameter. This allows for using own interpretation guidelines. The user-set data must have the same structure as <code>rsi_translation</code>.</p></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>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</li>
<li>Fixed a bug where <code><ahref="../reference/as.mo.html">as.mo()</a></code> would not return results for known laboratory codes for microorganisms</li>
<li>Fixed a bug where <code><ahref="../reference/as.ab.html">as.ab()</a></code> would sometimes fail</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 parameter does not need to be set anymore. This is the case for the new functions <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> and for the existing functions <code><ahref="../reference/first_isolate.html">first_isolate()</a></code>, <code><ahref="../reference/key_antibiotics.html">key_antibiotics()</a></code>, <code><ahref="../reference/mdro.html">mdro()</a></code>, <code><ahref="../reference/mdro.html">brmo()</a></code>, <code><ahref="../reference/mdro.html">mrgn()</a></code>, <code><ahref="../reference/mdro.html">mdr_tb()</a></code>, <code><ahref="../reference/mdro.html">mdr_cmi2012()</a></code>, <code><ahref="../reference/mdro.html">eucast_exceptional_phenotypes()</a></code>. This was already the case for antibiotic selection functions (such as using <code><ahref="../reference/antibiotic_class_selectors.html">penicillins()</a></code> in <code><ahref="https://dplyr.tidyverse.org/reference/select.html">dplyr::select()</a></code>).</p>