(v1.7.1.9011) subsetting taxonomy fix

This commit is contained in:
dr. M.S. (Matthijs) Berends 2021-07-04 15:26:50 +02:00
parent 3bd50710e8
commit 5b5741f681
20 changed files with 94 additions and 86 deletions

View File

@ -1,5 +1,5 @@
Package: AMR
Version: 1.7.1.9010
Version: 1.7.1.9011
Date: 2021-07-04
Title: Antimicrobial Resistance Data Analysis
Authors@R: c(

View File

@ -1,4 +1,4 @@
# `AMR` 1.7.1.9010
# `AMR` 1.7.1.9011
## <small>Last updated: 4 July 2021</small>
### Changed

View File

@ -25,7 +25,7 @@
#' Determine Bug-Drug Combinations
#'
#' 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 publicable/printable format, see *Examples*.
#' 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 publishable/printable format, see *Examples*.
#' @inheritSection lifecycle Stable Lifecycle
#' @inheritParams eucast_rules
#' @param combine_IR a [logical] to indicate whether values R and I should be summed

View File

@ -48,11 +48,13 @@
#'
#' Intrinsic resistance - [mo_is_intrinsic_resistant()] - will be determined based on the [intrinsic_resistant] data set, which is based on `r format_eucast_version_nr(3.2)`. The [mo_is_intrinsic_resistant()] functions can be vectorised over arguments `x` (input for microorganisms) and over `ab` (input for antibiotics).
#'
#' The functions [mo_family()], [mo_genus()], [mo_name()], [mo_fullname()] and [mo_shortname()] are returned with an additional class `taxonomic_name`, which allows italic printing in [tibbles][tibble::tibble()].
#'
#' All output [will be translated][translate] where possible.
#'
#' The function [mo_url()] will return the direct URL to the online database entry, which also shows the scientific reference of the concerned species.
#'
#' SNOMED codes - [mo_snomed()] - are from the `r SNOMED_VERSION$current_source`. See the [microorganisms] data set for more info.
#' SNOMED codes - [mo_snomed()] - are from the `r SNOMED_VERSION$current_source`. See *Source* and the [microorganisms] data set for more info.
#' @inheritSection mo_matching_score Matching Score for Microorganisms
#' @inheritSection catalogue_of_life Catalogue of Life
#' @inheritSection as.mo Source
@ -63,9 +65,10 @@
#' - A [list] in case of [mo_taxonomy()] and [mo_info()]
#' - A named [character] in case of [mo_url()]
#' - A [numeric] in case of [mo_snomed()]
#' - A [character] with additional class `taxonomic_name` in case of [mo_family()], [mo_genus()], [mo_name()], [mo_fullname()] and [mo_shortname()]
#' - A [character] in all other cases
#' @export
#' @seealso [microorganisms]
#' @seealso Data set [microorganisms]
#' @inheritSection AMR Reference Data Publicly Available
#' @inheritSection AMR Read more on Our Website!
#' @examples
@ -783,15 +786,15 @@ print.taxonomic_name <- function(x, ...) {
as.data.frame.taxonomic_name <- function(x, ...) {
nm <- deparse1(substitute(x))
if (!"nm" %in% names(list(...))) {
as.data.frame.vector(x, ..., nm = nm)
as.data.frame(unclass(x), ..., nm = nm)
} else {
as.data.frame.vector(x, ...)
as.data.frame(unclass(x), ...)
}
}
# will be exported using s3_register() in R/zzz.R
type_sum.taxonomic_name <- function(x, ...) {
"chr"
"chr/taxon"
}
# will be exported using s3_register() in R/zzz.R

Binary file not shown.

View File

@ -81,7 +81,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="https://msberends.github.io/AMR//index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9010</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9011</span>
</span>
</div>

View File

@ -81,7 +81,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9010</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9011</span>
</span>
</div>

View File

@ -39,7 +39,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9010</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9011</span>
</span>
</div>

View File

@ -81,7 +81,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9010</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9011</span>
</span>
</div>

View File

@ -81,7 +81,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9010</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9011</span>
</span>
</div>

View File

@ -42,7 +42,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9010</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9011</span>
</span>
</div>
@ -227,38 +227,38 @@
<table class="table">
<thead><tr class="header">
<th align="left">bacteria</th>
<th align="center">AMK</th>
<th align="center">GEN</th>
<th align="center">KAN</th>
<th align="center">TOB</th>
<th align="center">AMK</th>
<th align="center">KAN</th>
<th align="center">IPM</th>
<th align="center">MEM</th>
</tr></thead>
<tbody>
<tr class="odd">
<td align="left"><em>Pseudomonas aeruginosa</em></td>
<td align="center"></td>
<td align="center">I</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center"></td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center"></td>
</tr>
<tr class="even">
<td align="left"><em>Pseudomonas aeruginosa</em></td>
<td align="center"></td>
<td align="center">I</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center"></td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center"></td>
</tr>
<tr class="odd">
<td align="left"><em>Pseudomonas aeruginosa</em></td>
<td align="center"></td>
<td align="center">I</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center"></td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center"></td>
</tr>
@ -266,8 +266,8 @@
<td align="left"><em>Pseudomonas aeruginosa</em></td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center"></td>
<td align="center">S</td>
</tr>
@ -275,8 +275,8 @@
<td align="left"><em>Pseudomonas aeruginosa</em></td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
</tr>
@ -284,8 +284,8 @@
<td align="left"><em>Pseudomonas aeruginosa</em></td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
</tr>
@ -302,8 +302,8 @@
<td align="left"><em>Pseudomonas aeruginosa</em></td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center"></td>
<td align="center">S</td>
</tr>
@ -311,8 +311,8 @@
<td align="left"><em>Pseudomonas aeruginosa</em></td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center"></td>
<td align="center">S</td>
</tr>
@ -320,8 +320,8 @@
<td align="left"><em>Pseudomonas aeruginosa</em></td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
</tr>

View File

@ -81,7 +81,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9010</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9011</span>
</span>
</div>
@ -236,9 +236,9 @@
<small>Source: <a href='https://github.com/msberends/AMR/blob/master/NEWS.md'><code>NEWS.md</code></a></small>
</div>
<div id="amr-1719010" class="section level1">
<h1 class="page-header" data-toc-text="1.7.1.9010">
<a href="#amr-1719010" class="anchor"></a><small> Unreleased </small><code>AMR</code> 1.7.1.9010</h1>
<div id="amr-1719011" class="section level1">
<h1 class="page-header" data-toc-text="1.7.1.9011">
<a href="#amr-1719011" class="anchor"></a><small> Unreleased </small><code>AMR</code> 1.7.1.9011</h1>
<div id="last-updated-4-july-2021" class="section level2">
<h2 class="hasAnchor">
<a href="#last-updated-4-july-2021" class="anchor"></a><small>Last updated: 4 July 2021</small>

View File

@ -12,7 +12,7 @@ articles:
datasets: datasets.html
resistance_predict: resistance_predict.html
welcome_to_AMR: welcome_to_AMR.html
last_built: 2021-07-04T09:59Z
last_built: 2021-07-04T13:26Z
urls:
reference: https://msberends.github.io/AMR//reference
article: https://msberends.github.io/AMR//articles

View File

@ -49,7 +49,7 @@
<script src="../extra.js"></script>
<meta property="og:title" content="Determine Bug-Drug Combinations — bug_drug_combinations" />
<meta property="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 publicable/printable format, see Examples." />
<meta property="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 publishable/printable format, see Examples." />
<meta property="og:image" content="https://msberends.github.io/AMR/logo.png" />
@ -82,7 +82,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9011</span>
</span>
</div>
@ -90,14 +90,14 @@
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fas fa-home"></span>
<span class="fa fa-home"></span>
Home
</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-question-circle"></span>
<span class="fa fa-question-circle"></span>
How to
@ -106,77 +106,77 @@
<ul class="dropdown-menu" role="menu">
<li>
<a href="../articles/AMR.html">
<span class="fas fa-directions"></span>
<span class="fa fa-directions"></span>
Conduct AMR analysis
</a>
</li>
<li>
<a href="../articles/resistance_predict.html">
<span class="fas fa-dice"></span>
<span class="fa fa-dice"></span>
Predict antimicrobial resistance
</a>
</li>
<li>
<a href="../articles/datasets.html">
<span class="fas fa-database"></span>
<span class="fa fa-database"></span>
Data sets for download / own use
</a>
</li>
<li>
<a href="../articles/PCA.html">
<span class="fas fa-compress"></span>
<span class="fa fa-compress"></span>
Conduct principal component analysis for AMR
</a>
</li>
<li>
<a href="../articles/MDR.html">
<span class="fas fa-skull-crossbones"></span>
<span class="fa fa-skull-crossbones"></span>
Determine multi-drug resistance (MDR)
</a>
</li>
<li>
<a href="../articles/WHONET.html">
<span class="fas fa-globe-americas"></span>
<span class="fa fa-globe-americas"></span>
Work with WHONET data
</a>
</li>
<li>
<a href="../articles/SPSS.html">
<span class="fas fa-file-upload"></span>
<span class="fa fa-file-upload"></span>
Import data from SPSS/SAS/Stata
</a>
</li>
<li>
<a href="../articles/EUCAST.html">
<span class="fas fa-exchange-alt"></span>
<span class="fa fa-exchange-alt"></span>
Apply EUCAST rules
</a>
</li>
<li>
<a href="../reference/mo_property.html">
<span class="fas fa-bug"></span>
<span class="fa fa-bug"></span>
Get properties of a microorganism
</a>
</li>
<li>
<a href="../reference/ab_property.html">
<span class="fas fa-capsules"></span>
<span class="fa fa-capsules"></span>
Get properties of an antibiotic
</a>
</li>
<li>
<a href="../articles/benchmarks.html">
<span class="fas fa-shipping-fast"></span>
<span class="fa fa-shipping-fast"></span>
Other: benchmarks
</a>
@ -185,14 +185,14 @@
</li>
<li>
<a href="../reference/index.html">
<span class="fas fa-book-open"></span>
<span class="fa fa-book-open"></span>
Manual
</a>
</li>
<li>
<a href="../authors.html">
<span class="fas fa-users"></span>
<span class="fa fa-users"></span>
Authors
</a>
@ -215,7 +215,7 @@
</li>
<li>
<a href="../survey.html">
<span class="fas fa-clipboard-list"></span>
<span class="fa fa-clipboard-list"></span>
Survey
</a>
@ -239,7 +239,7 @@
</div>
<div class="ref-description">
<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><a href='https://rdrr.io/r/base/format.html'>format()</a></code> on the result to prettify it to a publicable/printable format, see <em>Examples</em>.</p>
<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><a href='https://rdrr.io/r/base/format.html'>format()</a></code> on the result to prettify it to a publishable/printable format, see <em>Examples</em>.</p>
</div>
<pre class="usage"><span class='fu'>bug_drug_combinations</span><span class='op'>(</span><span class='va'>x</span>, col_mo <span class='op'>=</span> <span class='cn'>NULL</span>, FUN <span class='op'>=</span> <span class='va'>mo_shortname</span>, <span class='va'>...</span><span class='op'>)</span>

View File

@ -81,7 +81,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9010</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9011</span>
</span>
</div>

View File

@ -82,7 +82,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9011</span>
</span>
</div>
@ -90,14 +90,14 @@
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fas fa-home"></span>
<span class="fa fa-home"></span>
Home
</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fas fa-question-circle"></span>
<span class="fa fa-question-circle"></span>
How to
@ -106,77 +106,77 @@
<ul class="dropdown-menu" role="menu">
<li>
<a href="../articles/AMR.html">
<span class="fas fa-directions"></span>
<span class="fa fa-directions"></span>
Conduct AMR analysis
</a>
</li>
<li>
<a href="../articles/resistance_predict.html">
<span class="fas fa-dice"></span>
<span class="fa fa-dice"></span>
Predict antimicrobial resistance
</a>
</li>
<li>
<a href="../articles/datasets.html">
<span class="fas fa-database"></span>
<span class="fa fa-database"></span>
Data sets for download / own use
</a>
</li>
<li>
<a href="../articles/PCA.html">
<span class="fas fa-compress"></span>
<span class="fa fa-compress"></span>
Conduct principal component analysis for AMR
</a>
</li>
<li>
<a href="../articles/MDR.html">
<span class="fas fa-skull-crossbones"></span>
<span class="fa fa-skull-crossbones"></span>
Determine multi-drug resistance (MDR)
</a>
</li>
<li>
<a href="../articles/WHONET.html">
<span class="fas fa-globe-americas"></span>
<span class="fa fa-globe-americas"></span>
Work with WHONET data
</a>
</li>
<li>
<a href="../articles/SPSS.html">
<span class="fas fa-file-upload"></span>
<span class="fa fa-file-upload"></span>
Import data from SPSS/SAS/Stata
</a>
</li>
<li>
<a href="../articles/EUCAST.html">
<span class="fas fa-exchange-alt"></span>
<span class="fa fa-exchange-alt"></span>
Apply EUCAST rules
</a>
</li>
<li>
<a href="../reference/mo_property.html">
<span class="fas fa-bug"></span>
<span class="fa fa-bug"></span>
Get properties of a microorganism
</a>
</li>
<li>
<a href="../reference/ab_property.html">
<span class="fas fa-capsules"></span>
<span class="fa fa-capsules"></span>
Get properties of an antibiotic
</a>
</li>
<li>
<a href="../articles/benchmarks.html">
<span class="fas fa-shipping-fast"></span>
<span class="fa fa-shipping-fast"></span>
Other: benchmarks
</a>
@ -185,14 +185,14 @@
</li>
<li>
<a href="../reference/index.html">
<span class="fas fa-book-open"></span>
<span class="fa fa-book-open"></span>
Manual
</a>
</li>
<li>
<a href="../authors.html">
<span class="fas fa-users"></span>
<span class="fa fa-users"></span>
Authors
</a>
@ -215,7 +215,7 @@
</li>
<li>
<a href="../survey.html">
<span class="fas fa-clipboard-list"></span>
<span class="fa fa-clipboard-list"></span>
Survey
</a>
@ -335,6 +335,7 @@
<li><p>A <a href='https://rdrr.io/r/base/list.html'>list</a> in case of <code>mo_taxonomy()</code> and <code>mo_info()</code></p></li>
<li><p>A named <a href='https://rdrr.io/r/base/character.html'>character</a> in case of <code>mo_url()</code></p></li>
<li><p>A <a href='https://rdrr.io/r/base/numeric.html'>numeric</a> in case of <code>mo_snomed()</code></p></li>
<li><p>A <a href='https://rdrr.io/r/base/character.html'>character</a> with additional class <code>taxonomic_name</code> in case of <code>mo_family()</code>, <code>mo_genus()</code>, <code>mo_name()</code>, <code>mo_fullname()</code> and <code>mo_shortname()</code></p></li>
<li><p>A <a href='https://rdrr.io/r/base/character.html'>character</a> in all other cases</p></li>
</ul>
@ -351,9 +352,10 @@
<p>The Gram stain - <code>mo_gramstain()</code> - will be determined based on the taxonomic kingdom and phylum. According to Cavalier-Smith (2002, <a href='https://pubmed.ncbi.nlm.nih.gov/11837318'>PMID 11837318</a>), who defined subkingdoms Negibacteria and Posibacteria, only these phyla are Posibacteria: Actinobacteria, Chloroflexi, Firmicutes and Tenericutes. These bacteria are considered Gram-positive - all other bacteria are considered Gram-negative. Species outside the kingdom of Bacteria will return a value <code>NA</code>. Functions <code>mo_is_gram_negative()</code> and <code>mo_is_gram_positive()</code> 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>
<p>Determination of yeasts - <code>mo_is_yeast()</code> - will be based on the taxonomic kingdom and class. <em>Budding yeasts</em> are fungi of the phylum Ascomycetes, class Saccharomycetes (also called Hemiascomycetes). <em>True yeasts</em> are aggregated into the underlying order Saccharomycetales. Thus, for all microorganisms that are fungi and member of the taxonomic class Saccharomycetes, the function will return <code>TRUE</code>. It returns <code>FALSE</code> otherwise (except when the input is <code>NA</code> or the MO code is <code>UNKNOWN</code>).</p>
<p>Intrinsic resistance - <code>mo_is_intrinsic_resistant()</code> - will be determined based on the <a href='intrinsic_resistant.html'>intrinsic_resistant</a> data set, which is based on <a href='https://www.eucast.org/expert_rules_and_intrinsic_resistance/'>'EUCAST Expert Rules' and 'EUCAST Intrinsic Resistance and Unusual Phenotypes' v3.2</a> (2020). The <code>mo_is_intrinsic_resistant()</code> functions can be vectorised over arguments <code>x</code> (input for microorganisms) and over <code>ab</code> (input for antibiotics).</p>
<p>The functions <code>mo_family()</code>, <code>mo_genus()</code>, <code>mo_name()</code>, <code>mo_fullname()</code> and <code>mo_shortname()</code> are returned with an additional class <code>taxonomic_name</code>, which allows italic printing in <a href='https://tibble.tidyverse.org/reference/tibble.html'>tibbles</a>.</p>
<p>All output <a href='translate.html'>will be translated</a> where possible.</p>
<p>The function <code>mo_url()</code> will return the direct URL to the online database entry, which also shows the scientific reference of the concerned species.</p>
<p>SNOMED codes - <code>mo_snomed()</code> - are from the US Edition of SNOMED CT from 1 September 2020. See the <a href='microorganisms.html'>microorganisms</a> data set for more info.</p>
<p>SNOMED codes - <code>mo_snomed()</code> - are from the US Edition of SNOMED CT from 1 September 2020. See <em>Source</em> and the <a href='microorganisms.html'>microorganisms</a> data set for more info.</p>
<h2 class="hasAnchor" id="stable-lifecycle"><a class="anchor" href="#stable-lifecycle"></a>Stable Lifecycle</h2>
@ -411,7 +413,7 @@ This package contains the complete taxonomic tree of almost all microorganisms (
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p><a href='microorganisms.html'>microorganisms</a></p></div>
<div class='dont-index'><p>Data set <a href='microorganisms.html'>microorganisms</a></p></div>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><span class='co'># taxonomic tree -----------------------------------------------------------</span>

View File

@ -81,7 +81,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9010</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9011</span>
</span>
</div>

View File

@ -35,18 +35,18 @@ example_isolates %>%
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:
|bacteria | AMK | GEN | KAN | TOB | IPM | MEM |
|bacteria | GEN | TOB | AMK | KAN | IPM | MEM |
|:------------------------------|:---:|:---:|:---:|:---:|:---:|:---:|
|*Pseudomonas aeruginosa* | | I | R | S | S | |
|*Pseudomonas aeruginosa* | | I | R | S | S | |
|*Pseudomonas aeruginosa* | | I | R | S | S | |
|*Pseudomonas aeruginosa* | S | S | R | S | | S |
|*Pseudomonas aeruginosa* | S | S | R | S | S | S |
|*Pseudomonas aeruginosa* | S | S | R | S | S | S |
|*Pseudomonas aeruginosa* | I | S | | R | S | |
|*Pseudomonas aeruginosa* | I | S | | R | S | |
|*Pseudomonas aeruginosa* | I | S | | R | S | |
|*Pseudomonas aeruginosa* | S | S | S | R | | S |
|*Pseudomonas aeruginosa* | S | S | S | R | S | S |
|*Pseudomonas aeruginosa* | S | S | S | R | S | S |
|*Stenotrophomonas maltophilia* | R | R | R | R | R | R |
|*Pseudomonas aeruginosa* | S | S | R | S | | S |
|*Pseudomonas aeruginosa* | S | S | R | S | | S |
|*Pseudomonas aeruginosa* | S | S | R | S | S | S |
|*Pseudomonas aeruginosa* | S | S | S | R | | S |
|*Pseudomonas aeruginosa* | S | S | S | R | | S |
|*Pseudomonas aeruginosa* | S | S | S | R | S | S |
A base R equivalent would be, giving the exact same results:

View File

@ -58,7 +58,7 @@ bug_drug_combinations(x, col_mo = NULL, FUN = mo_shortname, ...)
The function \code{\link[=bug_drug_combinations]{bug_drug_combinations()}} returns a \link{data.frame} with columns "mo", "ab", "S", "I", "R" and "total".
}
\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{\link[=format]{format()}} on the result to prettify it to a publicable/printable format, see \emph{Examples}.
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{\link[=format]{format()}} on the result to prettify it to a publishable/printable format, see \emph{Examples}.
}
\details{
The function \code{\link[=format]{format()}} calculates the resistance per bug-drug combination. Use \code{combine_IR = FALSE} (default) to test R vs. S+I and \code{combine_IR = TRUE} to test R+I vs. S.

View File

@ -106,6 +106,7 @@ mo_property(x, property = "fullname", language = get_locale(), ...)
\item A \link{list} in case of \code{\link[=mo_taxonomy]{mo_taxonomy()}} and \code{\link[=mo_info]{mo_info()}}
\item A named \link{character} in case of \code{\link[=mo_url]{mo_url()}}
\item A \link{numeric} in case of \code{\link[=mo_snomed]{mo_snomed()}}
\item A \link{character} with additional class \code{taxonomic_name} in case of \code{\link[=mo_family]{mo_family()}}, \code{\link[=mo_genus]{mo_genus()}}, \code{\link[=mo_name]{mo_name()}}, \code{\link[=mo_fullname]{mo_fullname()}} and \code{\link[=mo_shortname]{mo_shortname()}}
\item A \link{character} in all other cases
}
}
@ -130,11 +131,13 @@ Determination of yeasts - \code{\link[=mo_is_yeast]{mo_is_yeast()}} - will be ba
Intrinsic resistance - \code{\link[=mo_is_intrinsic_resistant]{mo_is_intrinsic_resistant()}} - will be determined based on the \link{intrinsic_resistant} data set, which is based on \href{https://www.eucast.org/expert_rules_and_intrinsic_resistance/}{'EUCAST Expert Rules' and 'EUCAST Intrinsic Resistance and Unusual Phenotypes' v3.2} (2020). The \code{\link[=mo_is_intrinsic_resistant]{mo_is_intrinsic_resistant()}} functions can be vectorised over arguments \code{x} (input for microorganisms) and over \code{ab} (input for antibiotics).
The functions \code{\link[=mo_family]{mo_family()}}, \code{\link[=mo_genus]{mo_genus()}}, \code{\link[=mo_name]{mo_name()}}, \code{\link[=mo_fullname]{mo_fullname()}} and \code{\link[=mo_shortname]{mo_shortname()}} are returned with an additional class \code{taxonomic_name}, which allows italic printing in \link[tibble:tibble]{tibbles}.
All output \link[=translate]{will be translated} where possible.
The function \code{\link[=mo_url]{mo_url()}} will return the direct URL to the online database entry, which also shows the scientific reference of the concerned species.
SNOMED codes - \code{\link[=mo_snomed]{mo_snomed()}} - are from the US Edition of SNOMED CT from 1 September 2020. See the \link{microorganisms} data set for more info.
SNOMED codes - \code{\link[=mo_snomed]{mo_snomed()}} - are from the US Edition of SNOMED CT from 1 September 2020. See \emph{Source} and the \link{microorganisms} data set for more info.
}
\section{Stable Lifecycle}{
@ -299,5 +302,5 @@ mo_info("E. coli")
}
}
\seealso{
\link{microorganisms}
Data set \link{microorganisms}
}