* Updated `skimr::skim()` usage for MIC values to also include 25th and 75th percentiles
* Updated `skimr::skim()` usage for MIC values to also include 25th and 75th percentiles
* Fix for plotting missing MIC/disk diffusion values
* Fix for plotting missing MIC/disk diffusion values
* Updated join functions to always use `dplyr` join functions if the `dplyr` package is installed - now also preserving grouped variables
* Updated join functions to always use `dplyr` join functions if the `dplyr` package is installed - now also preserving grouped variables
* Fix for filtering on antibiotic classes (such as `filter_cephalosporins()`), which now also supports dplyr groups
* Updates for filtering on antibiotic classes (e.g., using `filter_carbapenems()`):
* Support for dplyr groups
* Support for base R row filtering:
```r
dim(example_isolates)
#> [1] 2000 49
example_isolates[filter_carbapenems(), ]
#> ℹ Applying `filter_carbapenems()`: values in any of columns 'IPM' (imipenem)
#> or 'MEM' (meropenem) are either "R", "S" or "I"
#> [1] 962 49
```
* Antibiotic class selectors (such as `cephalosporins()`) now maintain the column order from the original data
* Antibiotic class selectors (such as `cephalosporins()`) now maintain the column order from the original data
* Fix for selecting columns using `fluoroquinolones()`
### Other
### Other
* All unit tests are now processed by the `tinytest` package, instead of the `testthat` package. The `testthat` package unfortunately requires tons of dependencies that are also heavy and only usable for recent R versions, defeating the purpose to test our package under less recent R versions. On the contrary, the `tinytest` package is very lightweight and dependency-free.
* All unit tests are now processed by the `tinytest` package, instead of the `testthat` package. The `testthat` package unfortunately requires tons of dependencies that are also heavy and only usable for recent R versions, disallowing developers to test a package under any R 3.* version. On the contrary, the `tinytest` package is very lightweight and dependency-free.
#' To define antibiotics column names, leave as it is to determine it automatically with [guess_ab_col()] or input a text (case-insensitive), or use `NULL` to skip a column (e.g. `TIC = NULL` to skip ticarcillin). Manually defined but non-existing columns will be skipped with a warning.
#' To define antibiotics column names, leave as it is to determine it automatically with [guess_ab_col()] or input a text (case-insensitive), or use `NULL` to skip a column (e.g. `TIC = NULL` to skip ticarcillin). Manually defined but non-existing columns will be skipped with a warning.
#'
#'
#' The following antibiotics are used for the functions [eucast_rules()] and [mdro()]. These are shown below in the format 'name (`antimicrobial ID`, [ATC code](https://www.whocc.no/atc/structure_and_principles/))', sorted alphabetically:
#' The following antibiotics are eligible for the functions [eucast_rules()] and [mdro()]. These are shown below in the format 'name (`antimicrobial ID`, [ATC code](https://www.whocc.no/atc/structure_and_principles/))', sorted alphabetically:
<spanclass="co">#> 'KAN' (kanamycin) and 'TOB' (tobramycin)</span>
<spanclass="co">#> (kanamycin) and 'TOB' (tobramycin)</span>
<spanclass="co">#>Selecting carbapenems: columns 'IPM' (imipenem) and 'MEM' (meropenem)</span></code></pre></div>
<spanclass="co">#>ℹ Applying `carbapenems()`: selecting columns 'IPM' (imipenem) and 'MEM' (meropenem)</span></code></pre></div>
<p>With only having defined a row filter on Gram-negative bacteria with intrinsic resistance to cefotaxime (<code><ahref="reference/mo_property.html">mo_is_gram_negative()</a></code> and <code><ahref="reference/mo_property.html">mo_is_intrinsic_resistant()</a></code>) and a column selection on two antibiotic groups (<code><ahref="reference/antibiotic_class_selectors.html">aminoglycosides()</a></code> and <code><ahref="reference/antibiotic_class_selectors.html">carbapenems()</a></code>), the reference data about <ahref="./reference/microorganisms.html">all microorganisms</a> and <ahref="./reference/antibiotics.html">all antibiotics</a> in the <code>AMR</code> package make sure you get what you meant:</p>
<p>With only having defined a row filter on Gram-negative bacteria with intrinsic resistance to cefotaxime (<code><ahref="reference/mo_property.html">mo_is_gram_negative()</a></code> and <code><ahref="reference/mo_property.html">mo_is_intrinsic_resistant()</a></code>) and a column selection on two antibiotic groups (<code><ahref="reference/antibiotic_class_selectors.html">aminoglycosides()</a></code> and <code><ahref="reference/antibiotic_class_selectors.html">carbapenems()</a></code>), the reference data about <ahref="./reference/microorganisms.html">all microorganisms</a> and <ahref="./reference/antibiotics.html">all antibiotics</a> in the <code>AMR</code> package make sure you get what you meant:</p>
<ahref="#last-updated-18-may-2021"class="anchor"></a><small>Last updated: 18 May 2021</small>
<ahref="#last-updated-18-may-2021"class="anchor"></a><small>Last updated: 18 May 2021</small>
@ -307,15 +307,33 @@
<li>Updated <code><ahref="https://docs.ropensci.org/skimr/reference/skim.html">skimr::skim()</a></code> usage for MIC values to also include 25th and 75th percentiles</li>
<li>Updated <code><ahref="https://docs.ropensci.org/skimr/reference/skim.html">skimr::skim()</a></code> usage for MIC values to also include 25th and 75th percentiles</li>
<li>Fix for plotting missing MIC/disk diffusion values</li>
<li>Fix for plotting missing MIC/disk diffusion values</li>
<li>Updated join functions to always use <code>dplyr</code> join functions if the <code>dplyr</code> package is installed - now also preserving grouped variables</li>
<li>Updated join functions to always use <code>dplyr</code> join functions if the <code>dplyr</code> package is installed - now also preserving grouped variables</li>
<li>Fix for filtering on antibiotic classes (such as <code><ahref="../reference/filter_ab_class.html">filter_cephalosporins()</a></code>), which now also supports dplyr groups</li>
<li>Updates for filtering on antibiotic classes (e.g., using <code><ahref="../reference/filter_ab_class.html">filter_carbapenems()</a></code>):
<li>Antibiotic class selectors (such as <code><ahref="../reference/antibiotic_class_selectors.html">cephalosporins()</a></code>) now maintain the column order from the original data</li>
<li>Antibiotic class selectors (such as <code><ahref="../reference/antibiotic_class_selectors.html">cephalosporins()</a></code>) now maintain the column order from the original data</li>
<li>Fix for selecting columns using <code><ahref="../reference/antibiotic_class_selectors.html">fluoroquinolones()</a></code>
</li>
</ul>
</ul>
</div>
</div>
<divid="other"class="section level3">
<divid="other"class="section level3">
<h3class="hasAnchor">
<h3class="hasAnchor">
<ahref="#other"class="anchor"></a>Other</h3>
<ahref="#other"class="anchor"></a>Other</h3>
<ul>
<ul>
<li>All unit tests are now processed by the <code>tinytest</code> package, instead of the <code>testthat</code> package. The <code>testthat</code> package unfortunately requires tons of dependencies that are also heavy and only usable for recent R versions, defeating the purpose to test our package under less recent R versions. On the contrary, the <code>tinytest</code> package is very lightweight and dependency-free.</li>
<li>All unit tests are now processed by the <code>tinytest</code> package, instead of the <code>testthat</code> package. The <code>testthat</code> package unfortunately requires tons of dependencies that are also heavy and only usable for recent R versions, disallowing developers to test a package under any R 3.* version. On the contrary, the <code>tinytest</code> package is very lightweight and dependency-free.</li>
</ul>
</ul>
</div>
</div>
</div>
</div>
@ -348,7 +366,7 @@
</li>
</li>
<li>
<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>
<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><code>ggplot()</code> generics for classes <code><mic></code> and <code><disk></code></p></li>
<li><p><code>ggplot()</code> generics for classes <code><mic></code> and <code><disk></code></p></li>
<li>
<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>
<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="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="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>
<li><p>Added Pretomanid (PMD, J04AK08) to the <code>antibiotics</code> data set</p></li>
<li><p>Added Pretomanid (PMD, J04AK08) to the <code>antibiotics</code> data set</p></li>
<li>
<li>
<p>MIC values (see <code><ahref="../reference/as.mic.html">as.mic()</a></code>) can now be used in any mathematical processing, such as usage inside functions <code><ahref="https://rdrr.io/r/base/Extremes.html">min()</a></code>, <code><ahref="https://rdrr.io/r/base/Extremes.html">max()</a></code>, <code><ahref="https://rdrr.io/r/base/range.html">range()</a></code>, and with binary operators (<code><ahref="https://rdrr.io/r/base/Arithmetic.html">+</a></code>, <code><ahref="https://rdrr.io/r/base/Arithmetic.html">-</a></code>, etc.). This allows for easy distribution analysis and fast filtering on MIC values:</p>
<p>MIC values (see <code><ahref="../reference/as.mic.html">as.mic()</a></code>) can now be used in any mathematical processing, such as usage inside functions <code><ahref="https://rdrr.io/r/base/Extremes.html">min()</a></code>, <code><ahref="https://rdrr.io/r/base/Extremes.html">max()</a></code>, <code><ahref="https://rdrr.io/r/base/range.html">range()</a></code>, and with binary operators (<code><ahref="https://rdrr.io/r/base/Arithmetic.html">+</a></code>, <code><ahref="https://rdrr.io/r/base/Arithmetic.html">-</a></code>, etc.). This allows for easy distribution analysis and fast filtering on MIC values:</p>
<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>
<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>
<spanclass="co"># to select first isolates that are Gram-negative </span>
<spanclass="co"># to select first isolates that are Gram-negative </span>
<spanclass="co"># and view results of cephalosporins and aminoglycosides:</span>
<spanclass="co"># and view results of cephalosporins and aminoglycosides:</span>
@ -532,7 +550,7 @@
</li>
</li>
<li>
<li>
<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>
<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>
<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>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>
<p>Curious about which enterococci are actually intrinsic resistant to vancomycin?</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>
<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>
<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>
<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><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>
<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>
<li>
<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>
<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>
@ -869,7 +887,7 @@ 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><p>Fixed important floating point error for some MIC comparisons in EUCAST 2020 guideline</p></li>
<li>
<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>
<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="st">"E. coli"</span><spanclass="op">)</span>
@ -897,7 +915,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<ul>
<ul>
<li>
<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 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>
@ -908,7 +926,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
</li>
</li>
<li>
<li>
<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>
<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>
@ -990,7 +1008,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<ul>
<ul>
<li>
<li>
<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>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>
@ -1019,7 +1037,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<li><p>More intelligent way of coping with some consonants like “l” and “r”</p></li>
<li><p>More intelligent way of coping with some consonants like “l” and “r”</p></li>
<li>
<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>
<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>
@ -1077,14 +1095,14 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<ul>
<ul>
<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 argument <code>include_unknown</code>:</p>
<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 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>
</li>
</li>
<li>
<li>
<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>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>
@ -1109,7 +1127,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<ul>
<ul>
<li>
<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>
<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="co">#> NOTE: Use 'format()' on this result to get a publicable/printable format.</span></code></pre></div>
<spanclass="co">#> NOTE: Use 'format()' on this result to get a publicable/printable format.</span></code></pre></div>
<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>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>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>
@ -1160,7 +1178,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
</li>
</li>
<li>
<li>
<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>
<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>
@ -1242,7 +1260,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<ul>
<ul>
<li>
<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>
<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>
<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>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>
@ -1510,7 +1528,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<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>
<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>
<li>
<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>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>
@ -1518,13 +1536,13 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
</li>
</li>
<li>
<li>
<p>Functions <code><ahref="../reference/first_isolate.html">filter_first_isolate()</a></code> and <code><ahref="../reference/AMR-deprecated.html">filter_first_weighted_isolate()</a></code> to shorten and fasten filtering on data sets with antimicrobial results, e.g.:</p>
<p>Functions <code><ahref="../reference/first_isolate.html">filter_first_isolate()</a></code> and <code><ahref="../reference/AMR-deprecated.html">filter_first_weighted_isolate()</a></code> to shorten and fasten filtering on data sets with antimicrobial results, e.g.:</p>
@ -1569,7 +1587,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
</li>
</li>
<li>
<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>
<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>
@ -1584,7 +1602,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<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>
<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>
<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>
<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>
<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>
<spanclass="co"># Warning: </span>
<spanclass="co"># Warning: </span>
@ -1634,7 +1652,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<ul>
<ul>
<li>
<li>
<p>Support for tidyverse quasiquotation! Now you can create frequency tables of function outcomes:</p>
<p>Support for tidyverse quasiquotation! Now you can create frequency tables of function outcomes:</p>
@ -1832,7 +1850,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<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>
<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>
<spanclass="co"># [1] "Streptococcus grupo A"</span></code></pre></div>
<spanclass="co"># [1] "Streptococcus grupo A"</span></code></pre></div>
<p>Furthermore, former taxonomic names will give a note about the current taxonomic name:</p>
<p>Furthermore, former taxonomic names will give a note about the current taxonomic name:</p>
<spanclass="co"># Note: 'Escherichia blattae' (Burgess et al., 1973) was renamed 'Shimwellia blattae' (Priest and Barker, 2010)</span>
<spanclass="co"># Note: 'Escherichia blattae' (Burgess et al., 1973) was renamed 'Shimwellia blattae' (Priest and Barker, 2010)</span>
@ -1847,7 +1865,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<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>
<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>
<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>
<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>
<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>
@ -1890,7 +1908,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<li><p>Added three antimicrobial agents to the <code>antibiotics</code> data set: Terbinafine (D01BA02), Rifaximin (A07AA11) and Isoconazole (D01AC05)</p></li>
<li><p>Added three antimicrobial agents to the <code>antibiotics</code> data set: Terbinafine (D01BA02), Rifaximin (A07AA11) and Isoconazole (D01AC05)</p></li>
<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>
<p>Added 163 trade names to the <code>antibiotics</code> data set, it now contains 298 different trade names in total, e.g.:</p>
@ -1907,7 +1925,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<li><p>Added arguments <code>minimum</code> and <code>as_percent</code> to <code>portion_df</code></p></li>
<li><p>Added arguments <code>minimum</code> and <code>as_percent</code> to <code>portion_df</code></p></li>
<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>
<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>
<spanclass="version label label-default"data-toggle="tooltip"data-placement="bottom"title="Latest development version">1.6.0.9044</span>
<spanclass="version label label-default"data-toggle="tooltip"data-placement="bottom"title="Latest development version">1.6.0.9047</span>
</span>
</span>
</div>
</div>
@ -416,7 +416,9 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
<divclass='dont-index'><p><code><ahref='antibiotic_class_selectors.html'>antibiotic_class_selectors()</a></code> for the <code><ahref='https://dplyr.tidyverse.org/reference/select.html'>select()</a></code> equivalent.</p></div>
<divclass='dont-index'><p><code><ahref='antibiotic_class_selectors.html'>antibiotic_class_selectors()</a></code> for the <code><ahref='https://dplyr.tidyverse.org/reference/select.html'>select()</a></code> equivalent.</p></div>
With only having defined a row filter on Gram-negative bacteria with intrinsic resistance to cefotaxime (`mo_is_gram_negative()` and `mo_is_intrinsic_resistant()`) and a column selection on two antibiotic groups (`aminoglycosides()` and `carbapenems()`), the reference data about [all microorganisms](./reference/microorganisms.html) and [all antibiotics](./reference/antibiotics.html) in the `AMR` package make sure you get what you meant:
With only having defined a row filter on Gram-negative bacteria with intrinsic resistance to cefotaxime (`mo_is_gram_negative()` and `mo_is_intrinsic_resistant()`) and a column selection on two antibiotic groups (`aminoglycosides()` and `carbapenems()`), the reference data about [all microorganisms](./reference/microorganisms.html) and [all antibiotics](./reference/antibiotics.html) in the `AMR` package make sure you get what you meant:
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.