1
0
mirror of https://github.com/msberends/AMR.git synced 2024-12-25 19:26:13 +01:00

Built site for AMR: 1.8.2.9034@6ad7857

This commit is contained in:
github-actions 2022-10-29 12:24:08 +00:00
parent 8438e68df5
commit 9a91fdfb99
98 changed files with 1739 additions and 1009 deletions

View File

@ -36,7 +36,7 @@
<a class="navbar-brand me-2" href="https://msberends.github.io/AMR/index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 49 KiB

View File

@ -38,7 +38,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -171,18 +171,39 @@
<div class="section level2">
<h2 id="introduction">Introduction<a class="anchor" aria-label="anchor" href="#introduction"></a>
</h2>
<p>What are EUCAST rules? The European Committee on Antimicrobial Susceptibility Testing (EUCAST) states <a href="https://www.eucast.org/expert_rules_and_intrinsic_resistance/" class="external-link">on their website</a>:</p>
<p>What are EUCAST rules? The European Committee on Antimicrobial
Susceptibility Testing (EUCAST) states <a href="https://www.eucast.org/expert_rules_and_intrinsic_resistance/" class="external-link">on
their website</a>:</p>
<blockquote>
<p><em>EUCAST expert rules are a tabulated collection of expert knowledge on intrinsic resistances, exceptional resistance phenotypes and interpretive rules that may be applied to antimicrobial susceptibility testing in order to reduce errors and make appropriate recommendations for reporting particular resistances.</em></p>
<p><em>EUCAST expert rules are a tabulated collection of expert
knowledge on intrinsic resistances, exceptional resistance phenotypes
and interpretive rules that may be applied to antimicrobial
susceptibility testing in order to reduce errors and make appropriate
recommendations for reporting particular resistances.</em></p>
</blockquote>
<p>In Europe, a lot of medical microbiological laboratories already apply these rules (<a href="https://www.eurosurveillance.org/content/10.2807/1560-7917.ES2015.20.2.21008" class="external-link">Brown <em>et al.</em>, 2015</a>). Our package features their latest insights on intrinsic resistance and unusual phenotypes (v3.3, 2021).</p>
<p>Moreover, the <code><a href="../reference/eucast_rules.html">eucast_rules()</a></code> function we use for this purpose can also apply additional rules, like forcing <help title="ATC: J01CA01">ampicillin</help> = R in isolates when <help title="ATC: J01CR02">amoxicillin/clavulanic acid</help> = R.</p>
<p>In Europe, a lot of medical microbiological laboratories already
apply these rules (<a href="https://www.eurosurveillance.org/content/10.2807/1560-7917.ES2015.20.2.21008" class="external-link">Brown
<em>et al.</em>, 2015</a>). Our package features their latest insights
on intrinsic resistance and unusual phenotypes (v3.3, 2021).</p>
<p>Moreover, the <code><a href="../reference/eucast_rules.html">eucast_rules()</a></code> function we use for this
purpose can also apply additional rules, like forcing
<help title="ATC: J01CA01">ampicillin</help> = R in isolates when
<help title="ATC: J01CR02">amoxicillin/clavulanic acid</help> = R.</p>
</div>
<div class="section level2">
<h2 id="examples">Examples<a class="anchor" aria-label="anchor" href="#examples"></a>
</h2>
<p>These rules can be used to discard impossible bug-drug combinations in your data. For example, <em>Klebsiella</em> produces beta-lactamase that prevents ampicillin (or amoxicillin) from working against it. In other words, practically every strain of <em>Klebsiella</em> is resistant to ampicillin.</p>
<p>Sometimes, laboratory data can still contain such strains with ampicillin being susceptible to ampicillin. This could be because an antibiogram is available before an identification is available, and the antibiogram is then not re-interpreted based on the identification (namely, <em>Klebsiella</em>). EUCAST expert rules solve this, that can be applied using <code><a href="../reference/eucast_rules.html">eucast_rules()</a></code>:</p>
<p>These rules can be used to discard impossible bug-drug combinations
in your data. For example, <em>Klebsiella</em> produces beta-lactamase
that prevents ampicillin (or amoxicillin) from working against it. In
other words, practically every strain of <em>Klebsiella</em> is
resistant to ampicillin.</p>
<p>Sometimes, laboratory data can still contain such strains with
ampicillin being susceptible to ampicillin. This could be because an
antibiogram is available before an identification is available, and the
antibiogram is then not re-interpreted based on the identification
(namely, <em>Klebsiella</em>). EUCAST expert rules solve this, that can
be applied using <code><a href="../reference/eucast_rules.html">eucast_rules()</a></code>:</p>
<div class="sourceCode" id="cb1"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="va">oops</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/data.frame.html" class="external-link">data.frame</a></span><span class="op">(</span></span>
<span> mo <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span></span>
@ -200,7 +221,10 @@
<span><span class="co"># mo ampicillin</span></span>
<span><span class="co"># 1 Klebsiella R</span></span>
<span><span class="co"># 2 Escherichia S</span></span></code></pre></div>
<p>A more convenient function is <code><a href="../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>A more convenient function is
<code><a href="../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>
<div class="sourceCode" id="cb2"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="../reference/mo_property.html">mo_is_intrinsic_resistant</a></span><span class="op">(</span></span>
<span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"Klebsiella"</span>, <span class="st">"Escherichia"</span><span class="op">)</span>,</span>
@ -213,7 +237,11 @@
<span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"ampicillin"</span>, <span class="st">"kanamycin"</span><span class="op">)</span></span>
<span><span class="op">)</span></span>
<span><span class="co"># [1] TRUE FALSE</span></span></code></pre></div>
<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><a href="../reference/eucast_rules.html">eucast_rules()</a></code> function as well:</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><a href="../reference/eucast_rules.html">eucast_rules()</a></code> function as well:</p>
<div class="sourceCode" id="cb3"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="va">data</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/data.frame.html" class="external-link">data.frame</a></span><span class="op">(</span></span>
<span> mo <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span></span>

View File

@ -38,7 +38,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -168,56 +168,89 @@
<p>With the function <code><a href="../reference/mdro.html">mdro()</a></code>, you can determine which micro-organisms are multi-drug resistant organisms (MDRO).</p>
<p>With the function <code><a href="../reference/mdro.html">mdro()</a></code>, you can determine which
micro-organisms are multi-drug resistant organisms (MDRO).</p>
<div class="section level3">
<h3 id="type-of-input">Type of input<a class="anchor" aria-label="anchor" href="#type-of-input"></a>
</h3>
<p>The <code><a href="../reference/mdro.html">mdro()</a></code> function takes a data set as input, such as a regular <code>data.frame</code>. It tries to automatically determine the right columns for info about your isolates, such as the name of the species and all columns with results of antimicrobial agents. See the help page for more info about how to set the right settings for your data with the command <code><a href="../reference/mdro.html">?mdro</a></code>.</p>
<p>For WHONET data (and most other data), all settings are automatically set correctly.</p>
<p>The <code><a href="../reference/mdro.html">mdro()</a></code> function takes a data set as input, such as a
regular <code>data.frame</code>. It tries to automatically determine the
right columns for info about your isolates, such as the name of the
species and all columns with results of antimicrobial agents. See the
help page for more info about how to set the right settings for your
data with the command <code><a href="../reference/mdro.html">?mdro</a></code>.</p>
<p>For WHONET data (and most other data), all settings are automatically
set correctly.</p>
</div>
<div class="section level3">
<h3 id="guidelines">Guidelines<a class="anchor" aria-label="anchor" href="#guidelines"></a>
</h3>
<p>The <code><a href="../reference/mdro.html">mdro()</a></code> function support multiple guidelines. You can select a guideline with the <code>guideline</code> parameter. Currently supported guidelines are (case-insensitive):</p>
<p>The <code><a href="../reference/mdro.html">mdro()</a></code> function support multiple guidelines. You can
select a guideline with the <code>guideline</code> parameter. Currently
supported guidelines are (case-insensitive):</p>
<ul>
<li>
<p><code>guideline = "CMI2012"</code> (default)</p>
<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) (<a href="https://www.clinicalmicrobiologyandinfection.com/article/S1198-743X(14)61632-3/fulltext" class="external-link">link</a>)</p>
<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) (<a href="https://www.clinicalmicrobiologyandinfection.com/article/S1198-743X(14)61632-3/fulltext" class="external-link">link</a>)</p>
</li>
<li>
<p><code>guideline = "EUCAST3.2"</code> (or simply <code>guideline = "EUCAST"</code>)</p>
<p>The European international guideline - EUCAST Expert Rules Version 3.2 “Intrinsic Resistance and Unusual Phenotypes” (<a href="https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Expert_Rules/2020/Intrinsic_Resistance_and_Unusual_Phenotypes_Tables_v3.2_20200225.pdf" class="external-link">link</a>)</p>
<p><code>guideline = "EUCAST3.2"</code> (or simply
<code>guideline = "EUCAST"</code>)</p>
<p>The European international guideline - EUCAST Expert Rules Version
3.2 “Intrinsic Resistance and Unusual Phenotypes” (<a href="https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Expert_Rules/2020/Intrinsic_Resistance_and_Unusual_Phenotypes_Tables_v3.2_20200225.pdf" class="external-link">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” (<a href="https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Expert_Rules/Expert_rules_intrinsic_exceptional_V3.1.pdf" class="external-link">link</a>)</p>
<p>The European international guideline - EUCAST Expert Rules Version
3.1 “Intrinsic Resistance and Exceptional Phenotypes Tables” (<a href="https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Expert_Rules/Expert_rules_intrinsic_exceptional_V3.1.pdf" class="external-link">link</a>)</p>
</li>
<li>
<p><code>guideline = "TB"</code></p>
<p>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” (<a href="https://www.who.int/tb/publications/pmdt_companionhandbook/en/" class="external-link">link</a>)</p>
<p>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” (<a href="https://www.who.int/tb/publications/pmdt_companionhandbook/en/" class="external-link">link</a>)</p>
</li>
<li>
<p><code>guideline = "MRGN"</code></p>
<p>The German national guideline - Mueller <em>et al.</em> (2015) Antimicrobial Resistance and Infection Control 4:7. DOI: 10.1186/s13756-015-0047-6</p>
<p>The German national guideline - Mueller <em>et al.</em> (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)” (<a href="https://www.rivm.nl/wip-richtlijn-brmo-bijzonder-resistente-micro-organismen-zkh" class="external-link">link</a>)</p>
<p>The Dutch national guideline - Rijksinstituut voor Volksgezondheid en
Milieu “WIP-richtlijn BRMO (Bijzonder Resistente Micro-Organismen)
(ZKH)” (<a href="https://www.rivm.nl/wip-richtlijn-brmo-bijzonder-resistente-micro-organismen-zkh" class="external-link">link</a>)</p>
</li>
</ul>
<p>Please suggest your own (country-specific) guidelines by letting us know: <a href="https://github.com/msberends/AMR/issues/new" class="external-link uri">https://github.com/msberends/AMR/issues/new</a>.</p>
<p>Please suggest your own (country-specific) guidelines by letting us
know: <a href="https://github.com/msberends/AMR/issues/new" class="external-link uri">https://github.com/msberends/AMR/issues/new</a>.</p>
<div class="section level4">
<h4 id="custom-guidelines">Custom Guidelines<a class="anchor" aria-label="anchor" href="#custom-guidelines"></a>
</h4>
<p>You can also use your own custom guideline. Custom guidelines can be set with the <code><a href="../reference/mdro.html">custom_mdro_guideline()</a></code> function. This is of great importance if you have custom rules to determine MDROs in your hospital, e.g., rules that are dependent on ward, state of contact isolation or other variables in your data.</p>
<p>If you are familiar with <code><a href="https://dplyr.tidyverse.org/reference/case_when.html" class="external-link">case_when()</a></code> of the <code>dplyr</code> package, you will recognise the input method to set your own rules. Rules must be set using what R considers to be the formula notation:</p>
<p>You can also use your own custom guideline. Custom guidelines can be
set with the <code><a href="../reference/mdro.html">custom_mdro_guideline()</a></code> function. This is of
great importance if you have custom rules to determine MDROs in your
hospital, e.g., rules that are dependent on ward, state of contact
isolation or other variables in your data.</p>
<p>If you are familiar with <code><a href="https://dplyr.tidyverse.org/reference/case_when.html" class="external-link">case_when()</a></code> of the
<code>dplyr</code> package, you will recognise the input method to set
your own rules. Rules must be set using what R considers to be the
formula notation:</p>
<div class="sourceCode" id="cb1"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="va">custom</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/mdro.html">custom_mdro_guideline</a></span><span class="op">(</span></span>
<span> <span class="va">CIP</span> <span class="op">==</span> <span class="st">"R"</span> <span class="op">&amp;</span> <span class="va">age</span> <span class="op">&gt;</span> <span class="fl">60</span> <span class="op">~</span> <span class="st">"Elderly Type A"</span>,</span>
<span> <span class="va">ERY</span> <span class="op">==</span> <span class="st">"R"</span> <span class="op">&amp;</span> <span class="va">age</span> <span class="op">&gt;</span> <span class="fl">60</span> <span class="op">~</span> <span class="st">"Elderly Type B"</span></span>
<span><span class="op">)</span></span></code></pre></div>
<p>If a row/an isolate matches the first rule, the value after the first <code>~</code> (in this case <em>Elderly Type A</em>) will be set as MDRO value. Otherwise, the second rule will be tried and so on. The maximum number of rules is unlimited.</p>
<p>You can print the rules set in the console for an overview. Colours will help reading it if your console supports colours.</p>
<p>If a row/an isolate matches the first rule, the value after the first
<code>~</code> (in this case <em>Elderly Type A</em>) will be set as
MDRO value. Otherwise, the second rule will be tried and so on. The
maximum number of rules is unlimited.</p>
<p>You can print the rules set in the console for an overview. Colours
will help reading it if your console supports colours.</p>
<div class="sourceCode" id="cb2"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="va">custom</span></span>
<span><span class="co"># A set of custom MDRO rules:</span></span>
@ -227,38 +260,59 @@
<span><span class="co"># </span></span>
<span><span class="co"># Unmatched rows will return NA.</span></span>
<span><span class="co"># Results will be of class 'factor', with ordered levels: Negative &lt; Elderly Type A &lt; Elderly Type B</span></span></code></pre></div>
<p>The outcome of the function can be used for the <code>guideline</code> argument in the <code><a href="../reference/mdro.html">mdro()</a></code> function:</p>
<p>The outcome of the function can be used for the
<code>guideline</code> argument in the <code><a href="../reference/mdro.html">mdro()</a></code> function:</p>
<div class="sourceCode" id="cb3"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="va">x</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/mdro.html">mdro</a></span><span class="op">(</span><span class="va">example_isolates</span>, guideline <span class="op">=</span> <span class="va">custom</span><span class="op">)</span></span>
<span><span class="fu"><a href="https://rdrr.io/r/base/table.html" class="external-link">table</a></span><span class="op">(</span><span class="va">x</span><span class="op">)</span></span>
<span><span class="co"># x</span></span>
<span><span class="co"># Negative Elderly Type A Elderly Type B </span></span>
<span><span class="co"># 1070 198 732</span></span></code></pre></div>
<p>The rules set (the <code>custom</code> object in this case) could be exported to a shared file location using <code><a href="https://rdrr.io/r/base/readRDS.html" class="external-link">saveRDS()</a></code> if you collaborate with multiple users. The custom rules set could then be imported using <code><a href="https://rdrr.io/r/base/readRDS.html" class="external-link">readRDS()</a></code>.</p>
<p>The rules set (the <code>custom</code> object in this case) could be
exported to a shared file location using <code><a href="https://rdrr.io/r/base/readRDS.html" class="external-link">saveRDS()</a></code> if you
collaborate with multiple users. The custom rules set could then be
imported using <code><a href="https://rdrr.io/r/base/readRDS.html" class="external-link">readRDS()</a></code>.</p>
</div>
</div>
<div class="section level3">
<h3 id="examples">Examples<a class="anchor" aria-label="anchor" href="#examples"></a>
</h3>
<p>The <code><a href="../reference/mdro.html">mdro()</a></code> function always returns an ordered <code>factor</code> for predefined guidelines. For example, the output of the default guideline by Magiorakos <em>et al.</em> returns a <code>factor</code> with levels Negative, MDR, XDR or PDR in that order.</p>
<p>The next example uses the <code>example_isolates</code> data set. This is a data set included with this package and contains full antibiograms of 2,000 microbial isolates. It reflects reality and can be used to practise AMR data analysis. If we test the MDR/XDR/PDR guideline on this data set, we get:</p>
<p>The <code><a href="../reference/mdro.html">mdro()</a></code> function always returns an ordered
<code>factor</code> for predefined guidelines. For example, the output
of the default guideline by Magiorakos <em>et al.</em> returns a
<code>factor</code> with levels Negative, MDR, XDR or PDR in
that order.</p>
<p>The next example uses the <code>example_isolates</code> data set.
This is a data set included with this package and contains full
antibiograms of 2,000 microbial isolates. It reflects reality and can be
used to practise AMR data analysis. If we test the MDR/XDR/PDR guideline
on this data set, we get:</p>
<div class="sourceCode" id="cb4"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://dplyr.tidyverse.org" class="external-link">dplyr</a></span><span class="op">)</span> <span class="co"># to support pipes: %&gt;%</span></span>
<span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://github.com/msberends/cleaner" class="external-link">cleaner</a></span><span class="op">)</span> <span class="co"># to create frequency tables</span></span></code></pre></div>
<span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://msberends.github.io/cleaner/" class="external-link">cleaner</a></span><span class="op">)</span> <span class="co"># to create frequency tables</span></span></code></pre></div>
<div class="sourceCode" id="cb5"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="va">example_isolates</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span>
<span> <span class="fu"><a href="../reference/mdro.html">mdro</a></span><span class="op">(</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span>
<span> <span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq</a></span><span class="op">(</span><span class="op">)</span> <span class="co"># show frequency table of the result</span></span>
<span> <span class="fu"><a href="https://msberends.github.io/cleaner/reference/freq.html" class="external-link">freq</a></span><span class="op">(</span><span class="op">)</span> <span class="co"># show frequency table of the result</span></span>
<span><span class="co"># Warning: in `mdro()`: NA introduced for isolates where the available percentage of</span></span>
<span><span class="co"># antimicrobial classes was below 50% (set with `pct_required_classes`)</span></span></code></pre></div>
<p>(16 isolates had no test results)</p>
<p><strong>Frequency table</strong></p>
<p>Class: factor &gt; ordered (numeric)<br>
Length: 2,000<br>
Levels: 4: Negative &lt; Multi-drug-resistant (MDR) &lt; Extensively drug-resistant …<br>
Levels: 4: Negative &lt; Multi-drug-resistant (MDR) &lt; Extensively
drug-resistant …<br>
Available: 1,729 (86.45%, NA: 271 = 13.55%)<br>
Unique: 2</p>
<table class="table">
<table style="width:100%;" class="table">
<colgroup>
<col width="4%">
<col width="38%">
<col width="9%">
<col width="12%">
<col width="16%">
<col width="19%">
</colgroup>
<thead><tr class="header">
<th align="left"></th>
<th align="left">Item</th>
@ -272,21 +326,22 @@ Unique: 2</p>
<td align="left">1</td>
<td align="left">Negative</td>
<td align="right">1601</td>
<td align="right">92.60%</td>
<td align="right">92.6%</td>
<td align="right">1601</td>
<td align="right">92.60%</td>
<td align="right">92.6%</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="left">Multi-drug-resistant (MDR)</td>
<td align="right">128</td>
<td align="right">7.40%</td>
<td align="right">7.4%</td>
<td align="right">1729</td>
<td align="right">100.00%</td>
<td align="right">100.0%</td>
</tr>
</tbody>
</table>
<p>For another example, I will create a data set to determine multi-drug resistant TB:</p>
<p>For another example, I will create a data set to determine multi-drug
resistant TB:</p>
<div class="sourceCode" id="cb6"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="co"># random_rsi() is a helper function to generate</span></span>
<span><span class="co"># a random vector with values S, I and R</span></span>
@ -299,7 +354,8 @@ Unique: 2</p>
<span> moxifloxacin <span class="op">=</span> <span class="fu"><a href="../reference/random.html">random_rsi</a></span><span class="op">(</span><span class="fl">5000</span><span class="op">)</span>,</span>
<span> kanamycin <span class="op">=</span> <span class="fu"><a href="../reference/random.html">random_rsi</a></span><span class="op">(</span><span class="fl">5000</span><span class="op">)</span></span>
<span><span class="op">)</span></span></code></pre></div>
<p>Because all column names are automatically verified for valid drug names or codes, this would have worked exactly the same way:</p>
<p>Because all column names are automatically verified for valid drug
names or codes, this would have worked exactly the same way:</p>
<div class="sourceCode" id="cb7"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="va">my_TB_data</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/data.frame.html" class="external-link">data.frame</a></span><span class="op">(</span></span>
<span> RIF <span class="op">=</span> <span class="fu"><a href="../reference/random.html">random_rsi</a></span><span class="op">(</span><span class="fl">5000</span><span class="op">)</span>,</span>
@ -314,20 +370,21 @@ Unique: 2</p>
<div class="sourceCode" id="cb8"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/r/utils/head.html" class="external-link">head</a></span><span class="op">(</span><span class="va">my_TB_data</span><span class="op">)</span></span>
<span><span class="co"># rifampicin isoniazid gatifloxacin ethambutol pyrazinamide moxifloxacin</span></span>
<span><span class="co"># 1 I S S R S R</span></span>
<span><span class="co"># 2 I R R R S S</span></span>
<span><span class="co"># 3 I I S S R R</span></span>
<span><span class="co"># 4 R R I I R I</span></span>
<span><span class="co"># 5 R I R S S R</span></span>
<span><span class="co"># 6 I I I S I I</span></span>
<span><span class="co"># 1 R S I R S S</span></span>
<span><span class="co"># 2 R S I I R I</span></span>
<span><span class="co"># 3 R S S R S R</span></span>
<span><span class="co"># 4 R S R S R I</span></span>
<span><span class="co"># 5 R I S R I I</span></span>
<span><span class="co"># 6 S S R S I I</span></span>
<span><span class="co"># kanamycin</span></span>
<span><span class="co"># 1 S</span></span>
<span><span class="co"># 1 I</span></span>
<span><span class="co"># 2 I</span></span>
<span><span class="co"># 3 I</span></span>
<span><span class="co"># 4 S</span></span>
<span><span class="co"># 5 I</span></span>
<span><span class="co"># 6 S</span></span></code></pre></div>
<p>We can now add the interpretation of MDR-TB to our data set. You can use:</p>
<span><span class="co"># 4 R</span></span>
<span><span class="co"># 5 R</span></span>
<span><span class="co"># 6 R</span></span></code></pre></div>
<p>We can now add the interpretation of MDR-TB to our data set. You can
use:</p>
<div class="sourceCode" id="cb9"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="../reference/mdro.html">mdro</a></span><span class="op">(</span><span class="va">my_TB_data</span>, guideline <span class="op">=</span> <span class="st">"TB"</span><span class="op">)</span></span></code></pre></div>
<p>or its shortcut <code><a href="../reference/mdro.html">mdr_tb()</a></code>:</p>
@ -337,14 +394,23 @@ Unique: 2</p>
<span><span class="co"># Mycobacterium tuberculosis.</span></span></code></pre></div>
<p>Create a frequency table of the results:</p>
<div class="sourceCode" id="cb11"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq</a></span><span class="op">(</span><span class="va">my_TB_data</span><span class="op">$</span><span class="va">mdr</span><span class="op">)</span></span></code></pre></div>
<code class="sourceCode R"><span><span class="fu"><a href="https://msberends.github.io/cleaner/reference/freq.html" class="external-link">freq</a></span><span class="op">(</span><span class="va">my_TB_data</span><span class="op">$</span><span class="va">mdr</span><span class="op">)</span></span></code></pre></div>
<p><strong>Frequency table</strong></p>
<p>Class: factor &gt; ordered (numeric)<br>
Length: 5,000<br>
Levels: 5: Negative &lt; Mono-resistant &lt; Poly-resistant &lt; Multi-drug-resistant &lt;<br>
Available: 5,000 (100.0%, NA: 0 = 0.0%)<br>
Levels: 5: Negative &lt; Mono-resistant &lt; Poly-resistant &lt;
Multi-drug-resistant &lt;<br>
Available: 5,000 (100%, NA: 0 = 0%)<br>
Unique: 5</p>
<table class="table">
<table style="width:100%;" class="table">
<colgroup>
<col width="4%">
<col width="38%">
<col width="9%">
<col width="12%">
<col width="16%">
<col width="19%">
</colgroup>
<thead><tr class="header">
<th align="left"></th>
<th align="left">Item</th>
@ -357,40 +423,40 @@ Unique: 5</p>
<tr class="odd">
<td align="left">1</td>
<td align="left">Mono-resistant</td>
<td align="right">3193</td>
<td align="right">63.86%</td>
<td align="right">3193</td>
<td align="right">63.86%</td>
<td align="right">3211</td>
<td align="right">64.22%</td>
<td align="right">3211</td>
<td align="right">64.22%</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="left">Negative</td>
<td align="right">988</td>
<td align="right">19.76%</td>
<td align="right">4181</td>
<td align="right">83.62%</td>
<td align="right">1025</td>
<td align="right">20.50%</td>
<td align="right">4236</td>
<td align="right">84.72%</td>
</tr>
<tr class="odd">
<td align="left">3</td>
<td align="left">Multi-drug-resistant</td>
<td align="right">429</td>
<td align="right">8.58%</td>
<td align="right">4610</td>
<td align="right">92.20%</td>
<td align="right">425</td>
<td align="right">8.50%</td>
<td align="right">4661</td>
<td align="right">93.22%</td>
</tr>
<tr class="even">
<td align="left">4</td>
<td align="left">Poly-resistant</td>
<td align="right">282</td>
<td align="right">5.64%</td>
<td align="right">4892</td>
<td align="right">97.84%</td>
<td align="right">233</td>
<td align="right">4.66%</td>
<td align="right">4894</td>
<td align="right">97.88%</td>
</tr>
<tr class="odd">
<td align="left">5</td>
<td align="left">Extensively drug-resistant</td>
<td align="right">108</td>
<td align="right">2.16%</td>
<td align="right">106</td>
<td align="right">2.12%</td>
<td align="right">5000</td>
<td align="right">100.00%</td>
</tr>

View File

@ -38,7 +38,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -168,7 +168,8 @@
<p><strong>NOTE: This page will be updated soon, as the pca() function is currently being developed.</strong></p>
<p><strong>NOTE: This page will be updated soon, as the pca() function
is currently being developed.</strong></p>
<div class="section level2">
<h2 id="introduction">Introduction<a class="anchor" aria-label="anchor" href="#introduction"></a>
</h2>
@ -176,7 +177,8 @@
<div class="section level2">
<h2 id="transforming">Transforming<a class="anchor" aria-label="anchor" href="#transforming"></a>
</h2>
<p>For PCA, we need to transform our AMR data first. This is what the <code>example_isolates</code> data set in this package looks like:</p>
<p>For PCA, we need to transform our AMR data first. This is what the
<code>example_isolates</code> data set in this package looks like:</p>
<div class="sourceCode" id="cb1"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://msberends.github.io/AMR/">AMR</a></span><span class="op">)</span></span>
<span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://dplyr.tidyverse.org" class="external-link">dplyr</a></span><span class="op">)</span></span>
@ -229,7 +231,8 @@
<span><span class="co"># $ COL <span style="color: #949494; font-style: italic;">&lt;rsi&gt;</span> NA, NA, R, R, R, R, R, R, R, R, R, R, NA, NA, NA, R, R, R, R, …</span></span>
<span><span class="co"># $ MUP <span style="color: #949494; font-style: italic;">&lt;rsi&gt;</span> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…</span></span>
<span><span class="co"># $ RIF <span style="color: #949494; font-style: italic;">&lt;rsi&gt;</span> R, R, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, R, R, R, R, R, N…</span></span></code></pre></div>
<p>Now to transform this to a data set with only resistance percentages per taxonomic order and genus:</p>
<p>Now to transform this to a data set with only resistance percentages
per taxonomic order and genus:</p>
<div class="sourceCode" id="cb2"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="va">resistance_data</span> <span class="op">&lt;-</span> <span class="va">example_isolates</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span>
<span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/group_by.html" class="external-link">group_by</a></span><span class="op">(</span></span>
@ -257,12 +260,15 @@
<div class="section level2">
<h2 id="perform-principal-component-analysis">Perform principal component analysis<a class="anchor" aria-label="anchor" href="#perform-principal-component-analysis"></a>
</h2>
<p>The new <code><a href="../reference/pca.html">pca()</a></code> function will automatically filter on rows that contain numeric values in all selected variables, so we now only need to do:</p>
<p>The new <code><a href="../reference/pca.html">pca()</a></code> function will automatically filter on rows
that contain numeric values in all selected variables, so we now only
need to do:</p>
<div class="sourceCode" id="cb3"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="va">pca_result</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/pca.html">pca</a></span><span class="op">(</span><span class="va">resistance_data</span><span class="op">)</span></span>
<span><span class="co"># Columns selected for PCA: "AMC", "CAZ", "CTX", "CXM", "GEN", "SXT", "TMP"</span></span>
<span><span class="co"># and "TOB". Total observations available: 7.</span></span></code></pre></div>
<p>The result can be reviewed with the good old <code><a href="https://rdrr.io/r/base/summary.html" class="external-link">summary()</a></code> function:</p>
<p>The result can be reviewed with the good old <code><a href="https://rdrr.io/r/base/summary.html" class="external-link">summary()</a></code>
function:</p>
<div class="sourceCode" id="cb4"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/r/base/summary.html" class="external-link">summary</a></span><span class="op">(</span><span class="va">pca_result</span><span class="op">)</span></span>
<span><span class="co"># Groups (n=4, named as 'order'):</span></span>
@ -274,7 +280,11 @@
<span><span class="co"># Cumulative Proportion 0.5799 0.9330 0.9801 0.99446 0.99988 1.00000 1.000e+00</span></span></code></pre></div>
<pre><code><span><span class="co"># Groups (n=4, named as 'order'):</span></span>
<span><span class="co"># [1] "Caryophanales" "Enterobacterales" "Lactobacillales" "Pseudomonadales"</span></span></code></pre>
<p>Good news. The first two components explain a total of 93.3% of the variance (see the PC1 and PC2 values of the <em>Proportion of Variance</em>. We can create a so-called biplot with the base R <code><a href="https://rdrr.io/r/stats/biplot.html" class="external-link">biplot()</a></code> function, to see which antimicrobial resistance per drug explain the difference per microorganism.</p>
<p>Good news. The first two components explain a total of 93.3% of the
variance (see the PC1 and PC2 values of the <em>Proportion of
Variance</em>. We can create a so-called biplot with the base R
<code><a href="https://rdrr.io/r/stats/biplot.html" class="external-link">biplot()</a></code> function, to see which antimicrobial resistance
per drug explain the difference per microorganism.</p>
</div>
<div class="section level2">
<h2 id="plotting-the-results">Plotting the results<a class="anchor" aria-label="anchor" href="#plotting-the-results"></a>
@ -282,7 +292,9 @@
<div class="sourceCode" id="cb6"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/r/stats/biplot.html" class="external-link">biplot</a></span><span class="op">(</span><span class="va">pca_result</span><span class="op">)</span></span></code></pre></div>
<p><img src="PCA_files/figure-html/unnamed-chunk-5-1.png" width="750"></p>
<p>But we cant see the explanation of the points. Perhaps this works better with our new <code><a href="../reference/ggplot_pca.html">ggplot_pca()</a></code> function, that automatically adds the right labels and even groups:</p>
<p>But we cant see the explanation of the points. Perhaps this works
better with our new <code><a href="../reference/ggplot_pca.html">ggplot_pca()</a></code> function, that
automatically adds the right labels and even groups:</p>
<div class="sourceCode" id="cb7"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="../reference/ggplot_pca.html">ggplot_pca</a></span><span class="op">(</span><span class="va">pca_result</span><span class="op">)</span></span></code></pre></div>
<p><img src="PCA_files/figure-html/unnamed-chunk-6-1.png" width="750"></p>

View File

@ -38,7 +38,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -160,9 +160,10 @@
<div class="row">
<main id="main" class="col-md-9"><div class="page-header">
<img src="../logo.svg" class="logo" alt=""><h1>How to import data from SPSS / SAS / Stata</h1>
<h4 data-toc-skip class="author">Dr. Matthijs Berends</h4>
<h4 data-toc-skip class="author">Dr. Matthijs
Berends</h4>
<h4 data-toc-skip class="date">22 October 2022</h4>
<h4 data-toc-skip class="date">29 October 2022</h4>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/HEAD/vignettes/SPSS.Rmd" class="external-link"><code>vignettes/SPSS.Rmd</code></a></small>
<div class="d-none name"><code>SPSS.Rmd</code></div>
@ -173,45 +174,135 @@
<div class="section level2">
<h2 id="spss-sas-stata">SPSS / SAS / Stata<a class="anchor" aria-label="anchor" href="#spss-sas-stata"></a>
</h2>
<p>SPSS (Statistical Package for the Social Sciences) is probably the most well-known software package for statistical analysis. SPSS is easier to learn than R, because in SPSS you only have to click a menu to run parts of your analysis. Because of its user-friendliness, it is taught at universities and particularly useful for students who are new to statistics. From my experience, I would guess that pretty much all (bio)medical students know it at the time they graduate. SAS and Stata are comparable statistical packages popular in big industries.</p>
<p>SPSS (Statistical Package for the Social Sciences) is probably the
most well-known software package for statistical analysis. SPSS is
easier to learn than R, because in SPSS you only have to click a menu to
run parts of your analysis. Because of its user-friendliness, it is
taught at universities and particularly useful for students who are new
to statistics. From my experience, I would guess that pretty much all
(bio)medical students know it at the time they graduate. SAS and Stata
are comparable statistical packages popular in big industries.</p>
</div>
<div class="section level2">
<h2 id="compared-to-r">Compared to R<a class="anchor" aria-label="anchor" href="#compared-to-r"></a>
</h2>
<p>As said, SPSS is easier to learn than R. But SPSS, SAS and Stata come with major downsides when comparing it with R:</p>
<p>As said, SPSS is easier to learn than R. But SPSS, SAS and Stata come
with major downsides when comparing it with R:</p>
<ul>
<li>
<p><strong>R is highly modular.</strong></p>
<p>The <a href="https://cran.r-project.org/" class="external-link">official R network (CRAN)</a> features more than 16,000 packages at the time of writing, our <code>AMR</code> package being one of them. All these packages were peer-reviewed before publication. Aside from this official channel, there are also developers who choose not to submit to CRAN, but rather keep it on their own public repository, like GitHub. So there may even be a lot more than 14,000 packages out there.</p>
<p>Bottom line is, you can really extend it yourself or ask somebody to do this for you. Take for example our <code>AMR</code> package. Among other things, it adds reliable reference data to R to help you with the data cleaning and analysis. SPSS, SAS and Stata will never know what a valid MIC value is or what the Gram stain of <em>E. coli</em> is. Or that all species of <em>Klebiella</em> are resistant to amoxicillin and that Floxapen<sup>®</sup> is a trade name of flucloxacillin. These facts and properties are often needed to clean existing data, which would be very inconvenient in a software package without reliable reference data. See below for a demonstration.</p>
<p>The <a href="https://cran.r-project.org/" class="external-link">official R network
(CRAN)</a> features more than 16,000 packages at the time of writing,
our <code>AMR</code> package being one of them. All these packages were
peer-reviewed before publication. Aside from this official channel,
there are also developers who choose not to submit to CRAN, but rather
keep it on their own public repository, like GitHub. So there may even
be a lot more than 14,000 packages out there.</p>
<p>Bottom line is, you can really extend it yourself or ask somebody to
do this for you. Take for example our <code>AMR</code> package. Among
other things, it adds reliable reference data to R to help you with the
data cleaning and analysis. SPSS, SAS and Stata will never know what a
valid MIC value is or what the Gram stain of <em>E. coli</em> is. Or
that all species of <em>Klebiella</em> are resistant to amoxicillin and
that Floxapen<sup>®</sup> is a trade name of flucloxacillin. These facts
and properties are often needed to clean existing data, which would be
very inconvenient in a software package without reliable reference data.
See below for a demonstration.</p>
</li>
<li>
<p><strong>R is extremely flexible.</strong></p>
<p>Because you write the syntax yourself, you can do anything you want. The flexibility in transforming, arranging, grouping and summarising data, or drawing plots, is endless - with SPSS, SAS or Stata you are bound to their algorithms and format styles. They may be a bit flexible, but you can probably never create that very specific publication-ready plot without using other (paid) software. If you sometimes write syntaxes in SPSS to run a complete analysis or to automate some of your work, you could do this a lot less time in R. You will notice that writing syntaxes in R is a lot more nifty and clever than in SPSS. Still, as working with any statistical package, you will have to have knowledge about what you are doing (statistically) and what you are willing to accomplish.</p>
<p>Because you write the syntax yourself, you can do anything you want.
The flexibility in transforming, arranging, grouping and summarising
data, or drawing plots, is endless - with SPSS, SAS or Stata you are
bound to their algorithms and format styles. They may be a bit flexible,
but you can probably never create that very specific publication-ready
plot without using other (paid) software. If you sometimes write
syntaxes in SPSS to run a complete analysis or to automate some of
your work, you could do this a lot less time in R. You will notice that
writing syntaxes in R is a lot more nifty and clever than in SPSS.
Still, as working with any statistical package, you will have to have
knowledge about what you are doing (statistically) and what you are
willing to accomplish.</p>
</li>
<li>
<p><strong>R can be easily automated.</strong></p>
<p>Over the last years, <a href="https://rmarkdown.rstudio.com/" class="external-link">R Markdown</a> has really made an interesting development. With R Markdown, you can very easily produce reports, whether the format has to be Word, PowerPoint, a website, a PDF document or just the raw data to Excel. It even allows the use of a reference file containing the layout style (e.g. fonts and colours) of your organisation. I use this a lot to generate weekly and monthly reports automatically. Just write the code once and enjoy the automatically updated reports at any interval you like.</p>
<p>For an even more professional environment, you could create <a href="https://shiny.rstudio.com/" class="external-link">Shiny apps</a>: live manipulation of data using a custom made website. The webdesign knowledge needed (JavaScript, CSS, HTML) is almost <em>zero</em>.</p>
<p>Over the last years, <a href="https://rmarkdown.rstudio.com/" class="external-link">R
Markdown</a> has really made an interesting development. With R
Markdown, you can very easily produce reports, whether the format has to
be Word, PowerPoint, a website, a PDF document or just the raw data to
Excel. It even allows the use of a reference file containing the layout
style (e.g. fonts and colours) of your organisation. I use this a lot to
generate weekly and monthly reports automatically. Just write the code
once and enjoy the automatically updated reports at any interval you
like.</p>
<p>For an even more professional environment, you could create <a href="https://shiny.rstudio.com/" class="external-link">Shiny apps</a>: live manipulation of
data using a custom made website. The webdesign knowledge needed
(JavaScript, CSS, HTML) is almost <em>zero</em>.</p>
</li>
<li>
<p><strong>R has a huge community.</strong></p>
<p>Many R users just ask questions on websites like <a href="https://stackoverflow.com" class="external-link">StackOverflow.com</a>, the largest online community for programmers. At the time of writing, <a href="https://stackoverflow.com/questions/tagged/r?sort=votes" class="external-link">466,988 R-related questions</a> have already been asked on this platform (that covers questions and answers for any programming language). In my own experience, most questions are answered within a couple of minutes.</p>
<p>Many R users just ask questions on websites like <a href="https://stackoverflow.com" class="external-link">StackOverflow.com</a>, the largest
online community for programmers. At the time of writing, <a href="https://stackoverflow.com/questions/tagged/r?sort=votes" class="external-link">467,961
R-related questions</a> have already been asked on this platform (that
covers questions and answers for any programming language). In my own
experience, most questions are answered within a couple of
minutes.</p>
</li>
<li>
<p><strong>R understands any data type, including SPSS/SAS/Stata.</strong></p>
<p>And thats not vice versa Im afraid. You can import data from any source into R. For example from SPSS, SAS and Stata (<a href="https://haven.tidyverse.org/" class="external-link">link</a>), from Minitab, Epi Info and EpiData (<a href="https://cran.r-project.org/package=foreign" class="external-link">link</a>), from Excel (<a href="https://readxl.tidyverse.org/" class="external-link">link</a>), from flat files like CSV, TXT or TSV (<a href="https://readr.tidyverse.org/" class="external-link">link</a>), or directly from databases and datawarehouses from anywhere on the world (<a href="https://dbplyr.tidyverse.org/" class="external-link">link</a>). You can even scrape websites to download tables that are live on the internet (<a href="https://github.com/hadley/rvest" class="external-link">link</a>) or get the results of an API call and transform it into data in only one command (<a href="https://github.com/Rdatatable/data.table/wiki/Convenience-features-of-fread" class="external-link">link</a>).</p>
<p>And the best part - you can export from R to most data formats as well. So you can import an SPSS file, do your analysis neatly in R and export the resulting tables to Excel files for sharing.</p>
<p><strong>R understands any data type, including
SPSS/SAS/Stata.</strong></p>
<p>And thats not vice versa Im afraid. You can import data from any
source into R. For example from SPSS, SAS and Stata (<a href="https://haven.tidyverse.org/" class="external-link">link</a>), from Minitab, Epi Info
and EpiData (<a href="https://cran.r-project.org/package=foreign" class="external-link">link</a>), from Excel
(<a href="https://readxl.tidyverse.org/" class="external-link">link</a>), from flat files like
CSV, TXT or TSV (<a href="https://readr.tidyverse.org/" class="external-link">link</a>), or
directly from databases and datawarehouses from anywhere on the world
(<a href="https://dbplyr.tidyverse.org/" class="external-link">link</a>). You can even scrape
websites to download tables that are live on the internet (<a href="https://github.com/hadley/rvest" class="external-link">link</a>) or get the results of
an API call and transform it into data in only one command (<a href="https://github.com/Rdatatable/data.table/wiki/Convenience-features-of-fread" class="external-link">link</a>).</p>
<p>And the best part - you can export from R to most data formats as
well. So you can import an SPSS file, do your analysis neatly in R and
export the resulting tables to Excel files for sharing.</p>
</li>
<li>
<p><strong>R is completely free and open-source.</strong></p>
<p>No strings attached. It was created and is being maintained by volunteers who believe that (data) science should be open and publicly available to everybody. SPSS, SAS and Stata are quite expensive. IBM SPSS Staticstics only comes with subscriptions nowadays, varying <a href="https://www.ibm.com/products/spss-statistics/pricing" class="external-link">between USD 1,300 and USD 8,500</a> per user <em>per year</em>. SAS Analytics Pro costs <a href="https://www.sas.com/store/products-solutions/sas-analytics-pro/prodPERSANL.html" class="external-link">around USD 10,000</a> per computer. Stata also has a business model with subscription fees, varying <a href="https://www.stata.com/order/new/bus/single-user-licenses/dl/" class="external-link">between USD 600 and USD 2,800</a> per computer per year, but lower prices come with a limitation of the number of variables you can work with. And still they do not offer the above benefits of R.</p>
<p>If you are working at a midsized or small company, you can save it tens of thousands of dollars by using R instead of e.g. SPSS - gaining even more functions and flexibility. And all R enthousiasts can do as much PR as they want (like I do here), because nobody is officially associated with or affiliated by R. It is really free.</p>
<p>No strings attached. It was created and is being maintained by
volunteers who believe that (data) science should be open and publicly
available to everybody. SPSS, SAS and Stata are quite expensive. IBM
SPSS Staticstics only comes with subscriptions nowadays, varying <a href="https://www.ibm.com/products/spss-statistics/pricing" class="external-link">between USD
1,300 and USD 8,500</a> per user <em>per year</em>. SAS Analytics Pro
costs <a href="https://www.sas.com/store/products-solutions/sas-analytics-pro/prodPERSANL.html" class="external-link">around
USD 10,000</a> per computer. Stata also has a business model with
subscription fees, varying <a href="https://www.stata.com/order/new/bus/single-user-licenses/dl/" class="external-link">between
USD 600 and USD 2,800</a> per computer per year, but lower prices come
with a limitation of the number of variables you can work with. And
still they do not offer the above benefits of R.</p>
<p>If you are working at a midsized or small company, you can save it
tens of thousands of dollars by using R instead of e.g. SPSS - gaining
even more functions and flexibility. And all R enthousiasts can do as
much PR as they want (like I do here), because nobody is officially
associated with or affiliated by R. It is really free.</p>
</li>
<li>
<p><strong>R is (nowadays) the preferred analysis software in academic papers.</strong></p>
<p>At present, R is among the world most powerful statistical languages, and it is generally very popular in science (Bollmann <em>et al.</em>, 2017). For all the above reasons, the number of references to R as an analysis method in academic papers <a href="https://r4stats.com/2014/08/20/r-passes-spss-in-scholarly-use-stata-growing-rapidly/" class="external-link">is rising continuously</a> and has even surpassed SPSS for academic use (Muenchen, 2014).</p>
<p>I believe that the thing with SPSS is, that it has always had a great user interface which is very easy to learn and use. Back when they developed it, they had very little competition, let alone from R. R didnt even had a professional user interface until the last decade (called RStudio, see below). How people used R between the nineties and 2010 is almost completely incomparable to how R is being used now. The language itself <a href="https://www.tidyverse.org/packages/" class="external-link">has been restyled completely</a> by volunteers who are dedicated professionals in the field of data science. SPSS was great when there was nothing else that could compete. But now in 2022, I dont see any reason why SPSS would be of any better use than R.</p>
<p><strong>R is (nowadays) the preferred analysis software in
academic papers.</strong></p>
<p>At present, R is among the world most powerful statistical languages,
and it is generally very popular in science (Bollmann <em>et al.</em>,
2017). For all the above reasons, the number of references to R as an
analysis method in academic papers <a href="https://r4stats.com/2014/08/20/r-passes-spss-in-scholarly-use-stata-growing-rapidly/" class="external-link">is
rising continuously</a> and has even surpassed SPSS for academic use
(Muenchen, 2014).</p>
<p>I believe that the thing with SPSS is, that it has always had a great
user interface which is very easy to learn and use. Back when they
developed it, they had very little competition, let alone from R. R
didnt even had a professional user interface until the last decade
(called RStudio, see below). How people used R between the nineties and
2010 is almost completely incomparable to how R is being used now. The
language itself <a href="https://www.tidyverse.org/packages/" class="external-link">has been
restyled completely</a> by volunteers who are dedicated professionals in
the field of data science. SPSS was great when there was nothing else
that could compete. But now in 2022, I dont see any reason why SPSS
would be of any better use than R.</p>
</li>
</ul>
<p>To demonstrate the first point:</p>
@ -257,13 +348,23 @@
<div class="section level3">
<h3 id="rstudio">RStudio<a class="anchor" aria-label="anchor" href="#rstudio"></a>
</h3>
<p>To work with R, probably the best option is to use <a href="https://www.rstudio.com/products/rstudio/" class="external-link">RStudio</a>. It is an open-source and free desktop environment which not only allows you to run R code, but also supports project management, version management, package management and convenient import menus to work with other data sources. You can also install <a href="https://www.rstudio.com/products/rstudio/" class="external-link">RStudio Server</a> on a private or corporate server, which brings nothing less than the complete RStudio software to you as a website (at home or at work).</p>
<p>To import a data file, just click <em>Import Dataset</em> in the Environment tab:</p>
<p>To work with R, probably the best option is to use <a href="https://www.rstudio.com/products/rstudio/" class="external-link">RStudio</a>. It is an
open-source and free desktop environment which not only allows you to
run R code, but also supports project management, version management,
package management and convenient import menus to work with other data
sources. You can also install <a href="https://www.rstudio.com/products/rstudio/" class="external-link">RStudio Server</a> on a
private or corporate server, which brings nothing less than the complete
RStudio software to you as a website (at home or at work).</p>
<p>To import a data file, just click <em>Import Dataset</em> in the
Environment tab:</p>
<p><img src="https://github.com/msberends/AMR/raw/main/docs/import1.png"></p>
<p>If additional packages are needed, RStudio will ask you if they should be installed on beforehand.</p>
<p>In the the window that opens, you can define all options (parameters) that should be used for import and youre ready to go:</p>
<p>If additional packages are needed, RStudio will ask you if they
should be installed on beforehand.</p>
<p>In the the window that opens, you can define all options (parameters)
that should be used for import and youre ready to go:</p>
<p><img src="https://github.com/msberends/AMR/raw/main/docs/import2.png"></p>
<p>If you want named variables to be imported as factors so it resembles SPSS more, use <code>as_factor()</code>.</p>
<p>If you want named variables to be imported as factors so it resembles
SPSS more, use <code>as_factor()</code>.</p>
<p>The difference is this:</p>
<div class="sourceCode" id="cb2"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="va">SPSS_data</span></span>
@ -301,7 +402,8 @@
<div class="section level3">
<h3 id="base-r">Base R<a class="anchor" aria-label="anchor" href="#base-r"></a>
</h3>
<p>To import data from SPSS, SAS or Stata, you can use the <a href="https://haven.tidyverse.org/" class="external-link">great <code>haven</code> package</a> yourself:</p>
<p>To import data from SPSS, SAS or Stata, you can use the <a href="https://haven.tidyverse.org/" class="external-link">great <code>haven</code> package</a>
yourself:</p>
<div class="sourceCode" id="cb3"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="co"># download and install the latest version:</span></span>
<span><span class="fu"><a href="https://rdrr.io/r/utils/install.packages.html" class="external-link">install.packages</a></span><span class="op">(</span><span class="st">"haven"</span><span class="op">)</span></span>

View File

@ -38,7 +38,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -171,26 +171,43 @@
<div class="section level3">
<h3 id="import-of-data">Import of data<a class="anchor" aria-label="anchor" href="#import-of-data"></a>
</h3>
<p>This tutorial assumes you already imported the WHONET data with e.g. the <a href="https://readxl.tidyverse.org/" class="external-link"><code>readxl</code> package</a>. In RStudio, this can be done using the menu button Import Dataset in the tab Environment. Choose the option From Excel and select your exported file. Make sure date fields are imported correctly.</p>
<p>This tutorial assumes you already imported the WHONET data with
e.g. the <a href="https://readxl.tidyverse.org/" class="external-link"><code>readxl</code>
package</a>. In RStudio, this can be done using the menu button Import
Dataset in the tab Environment. Choose the option From Excel and
select your exported file. Make sure date fields are imported
correctly.</p>
<p>An example syntax could look like this:</p>
<div class="sourceCode" id="cb1"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://readxl.tidyverse.org" class="external-link">readxl</a></span><span class="op">)</span></span>
<span><span class="va">data</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://readxl.tidyverse.org/reference/read_excel.html" class="external-link">read_excel</a></span><span class="op">(</span>path <span class="op">=</span> <span class="st">"path/to/your/file.xlsx"</span><span class="op">)</span></span></code></pre></div>
<p>This package comes with an <a href="https://msberends.github.io/AMR/reference/WHONET.html">example data set <code>WHONET</code></a>. We will use it for this analysis.</p>
<p>This package comes with an <a href="https://msberends.github.io/AMR/reference/WHONET.html">example
data set <code>WHONET</code></a>. We will use it for this analysis.</p>
</div>
<div class="section level3">
<h3 id="preparation">Preparation<a class="anchor" aria-label="anchor" href="#preparation"></a>
</h3>
<p>First, load the relevant packages if you did not yet did this. I use the tidyverse for all of my analyses. All of them. If you dont know it yet, I suggest you read about it on their website: <a href="https://www.tidyverse.org/" class="external-link uri">https://www.tidyverse.org/</a>.</p>
<p>First, load the relevant packages if you did not yet did this. I use
the tidyverse for all of my analyses. All of them. If you dont know it
yet, I suggest you read about it on their website: <a href="https://www.tidyverse.org/" class="external-link uri">https://www.tidyverse.org/</a>.</p>
<div class="sourceCode" id="cb2"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://dplyr.tidyverse.org" class="external-link">dplyr</a></span><span class="op">)</span> <span class="co"># part of tidyverse</span></span>
<span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://ggplot2.tidyverse.org" class="external-link">ggplot2</a></span><span class="op">)</span> <span class="co"># part of tidyverse</span></span>
<span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://msberends.github.io/AMR/">AMR</a></span><span class="op">)</span> <span class="co"># this package</span></span>
<span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://github.com/msberends/cleaner" class="external-link">cleaner</a></span><span class="op">)</span> <span class="co"># to create frequency tables</span></span></code></pre></div>
<p>We will have to transform some variables to simplify and automate the analysis:</p>
<span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://msberends.github.io/cleaner/" class="external-link">cleaner</a></span><span class="op">)</span> <span class="co"># to create frequency tables</span></span></code></pre></div>
<p>We will have to transform some variables to simplify and automate the
analysis:</p>
<ul>
<li>Microorganisms should be transformed to our own microorganism codes (called an <code>mo</code>) using <a href="https://msberends.github.io/AMR/reference/catalogue_of_life">our Catalogue of Life reference data set</a>, which contains all ~70,000 microorganisms from the taxonomic kingdoms Bacteria, Fungi and Protozoa. We do the tranformation with <code><a href="../reference/as.mo.html">as.mo()</a></code>. This function also recognises almost all WHONET abbreviations of microorganisms.</li>
<li>Antimicrobial results or interpretations have to be clean and valid. In other words, they should only contain values <code>"S"</code>, <code>"I"</code> or <code>"R"</code>. That is exactly where the <code><a href="../reference/as.rsi.html">as.rsi()</a></code> function is for.</li>
<li>Microorganisms should be transformed to our own microorganism codes
(called an <code>mo</code>) using <a href="https://msberends.github.io/AMR/reference/catalogue_of_life">our
Catalogue of Life reference data set</a>, which contains all ~70,000
microorganisms from the taxonomic kingdoms Bacteria, Fungi and Protozoa.
We do the tranformation with <code><a href="../reference/as.mo.html">as.mo()</a></code>. This function also
recognises almost all WHONET abbreviations of microorganisms.</li>
<li>Antimicrobial results or interpretations have to be clean and valid.
In other words, they should only contain values <code>"S"</code>,
<code>"I"</code> or <code>"R"</code>. That is exactly where the
<code><a href="../reference/as.rsi.html">as.rsi()</a></code> function is for.</li>
</ul>
<div class="sourceCode" id="cb3"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="co"># transform variables</span></span>
@ -200,19 +217,29 @@
<span> <span class="co"># transform everything from "AMP_ND10" to "CIP_EE" to the new `rsi` class</span></span>
<span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate_all.html" class="external-link">mutate_at</a></span><span class="op">(</span><span class="fu"><a href="https://dplyr.tidyverse.org/reference/vars.html" class="external-link">vars</a></span><span class="op">(</span><span class="va">AMP_ND10</span><span class="op">:</span><span class="va">CIP_EE</span><span class="op">)</span>, <span class="va">as.rsi</span><span class="op">)</span></span></code></pre></div>
<p>No errors or warnings, so all values are transformed succesfully.</p>
<p>We also created a package dedicated to data cleaning and checking, called the <code>cleaner</code> package. Its <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq()</a></code> function can be used to create frequency tables.</p>
<p>We also created a package dedicated to data cleaning and checking,
called the <code>cleaner</code> package. Its <code><a href="https://msberends.github.io/cleaner/reference/freq.html" class="external-link">freq()</a></code>
function can be used to create frequency tables.</p>
<p>So lets check our data, with a couple of frequency tables:</p>
<div class="sourceCode" id="cb4"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="co"># our newly created `mo` variable, put in the mo_name() function</span></span>
<span><span class="va">data</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span> <span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq</a></span><span class="op">(</span><span class="fu"><a href="../reference/mo_property.html">mo_name</a></span><span class="op">(</span><span class="va">mo</span><span class="op">)</span>, nmax <span class="op">=</span> <span class="fl">10</span><span class="op">)</span></span></code></pre></div>
<span><span class="va">data</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span> <span class="fu"><a href="https://msberends.github.io/cleaner/reference/freq.html" class="external-link">freq</a></span><span class="op">(</span><span class="fu"><a href="../reference/mo_property.html">mo_name</a></span><span class="op">(</span><span class="va">mo</span><span class="op">)</span>, nmax <span class="op">=</span> <span class="fl">10</span><span class="op">)</span></span></code></pre></div>
<p><strong>Frequency table</strong></p>
<p>Class: character<br>
Length: 500<br>
Available: 500 (100.0%, NA: 0 = 0.0%)<br>
Available: 500 (100%, NA: 0 = 0%)<br>
Unique: 38</p>
<p>Shortest: 11<br>
Longest: 40</p>
<table class="table">
<colgroup>
<col width="4%">
<col width="47%">
<col width="7%">
<col width="10%">
<col width="13%">
<col width="15%">
</colgroup>
<thead><tr class="header">
<th align="left"></th>
<th align="left">Item</th>
@ -304,11 +331,11 @@ Longest: 40</p>
</tr>
</tbody>
</table>
<p>(omitted 28 entries, n = 57 [11.40%])</p>
<p>(omitted 28 entries, n = 57 [11.4%])</p>
<div class="sourceCode" id="cb5"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="co"># our transformed antibiotic columns</span></span>
<span><span class="co"># amoxicillin/clavulanic acid (J01CR02) as an example</span></span>
<span><span class="va">data</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span> <span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq</a></span><span class="op">(</span><span class="va">AMC_ND2</span><span class="op">)</span></span></code></pre></div>
<span><span class="va">data</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span> <span class="fu"><a href="https://msberends.github.io/cleaner/reference/freq.html" class="external-link">freq</a></span><span class="op">(</span><span class="va">AMC_ND2</span><span class="op">)</span></span></code></pre></div>
<p><strong>Frequency table</strong></p>
<p>Class: factor &gt; ordered &gt; rsi (numeric)<br>
Length: 500<br>
@ -358,7 +385,8 @@ Drug group: Beta-lactams/penicillins<br>
<div class="section level3">
<h3 id="a-first-glimpse-at-results">A first glimpse at results<a class="anchor" aria-label="anchor" href="#a-first-glimpse-at-results"></a>
</h3>
<p>An easy <code>ggplot</code> will already give a lot of information, using the included <code><a href="../reference/ggplot_rsi.html">ggplot_rsi()</a></code> function:</p>
<p>An easy <code>ggplot</code> will already give a lot of information,
using the included <code><a href="../reference/ggplot_rsi.html">ggplot_rsi()</a></code> function:</p>
<div class="sourceCode" id="cb6"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="va">data</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span>
<span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/group_by.html" class="external-link">group_by</a></span><span class="op">(</span><span class="va">Country</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span>

View File

@ -38,7 +38,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -161,7 +161,7 @@
<main id="main" class="col-md-9"><div class="page-header">
<img src="../logo.svg" class="logo" alt=""><h1>Data sets for download / own use</h1>
<h4 data-toc-skip class="date">22 October 2022</h4>
<h4 data-toc-skip class="date">29 October 2022</h4>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/HEAD/vignettes/datasets.Rmd" class="external-link"><code>vignettes/datasets.Rmd</code></a></small>
<div class="d-none name"><code>datasets.Rmd</code></div>
@ -169,42 +169,76 @@
<p>All reference data (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this <code>AMR</code> package are reliable, up-to-date and freely available. We continually export our data sets to formats for use in R, MS Excel, Apache Feather, Apache Parquet, SPSS, SAS, and Stata. We also provide tab-separated text files that are machine-readable and suitable for input in any software program, such as laboratory information systems.</p>
<p>On this page, we explain how to download them and how the structure of the data sets look like.</p>
<p>All reference data (about microorganisms, antibiotics, R/SI
interpretation, EUCAST rules, etc.) in this <code>AMR</code> package are
reliable, up-to-date and freely available. We continually export our
data sets to formats for use in R, MS Excel, Apache Feather, Apache
Parquet, SPSS, SAS, and Stata. We also provide tab-separated text files
that are machine-readable and suitable for input in any software
program, such as laboratory information systems.</p>
<p>On this page, we explain how to download them and how the structure
of the data sets look like.</p>
<div class="section level2">
<h2 id="microorganisms-full-microbial-taxonomy">
<code>microorganisms</code>: Full Microbial Taxonomy<a class="anchor" aria-label="anchor" href="#microorganisms-full-microbial-taxonomy"></a>
</h2>
<p>A data set with 48,788 rows and 22 columns, containing the following column names:<br><em>mo</em>, <em>fullname</em>, <em>status</em>, <em>kingdom</em>, <em>phylum</em>, <em>class</em>, <em>order</em>, <em>family</em>, <em>genus</em>, <em>species</em>, <em>subspecies</em>, <em>rank</em>, <em>ref</em>, <em>source</em>, <em>lpsn</em>, <em>lpsn_parent</em>, <em>lpsn_renamed_to</em>, <em>gbif</em>, <em>gbif_parent</em>, <em>gbif_renamed_to</em>, <em>prevalence</em> and <em>snomed</em>.</p>
<p>This data set is in R available as <code>microorganisms</code>, after you load the <code>AMR</code> package.</p>
<p>It was last updated on 22 October 2022 20:03:38 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/microorganisms.html">here</a>.</p>
<p>A data set with 48,883 rows and 22 columns, containing the following
column names:<br><em>mo</em>, <em>fullname</em>, <em>status</em>, <em>kingdom</em>,
<em>phylum</em>, <em>class</em>, <em>order</em>, <em>family</em>,
<em>genus</em>, <em>species</em>, <em>subspecies</em>, <em>rank</em>,
<em>ref</em>, <em>source</em>, <em>lpsn</em>, <em>lpsn_parent</em>,
<em>lpsn_renamed_to</em>, <em>gbif</em>, <em>gbif_parent</em>,
<em>gbif_renamed_to</em>, <em>prevalence</em> and <em>snomed</em>.</p>
<p>This data set is in R available as <code>microorganisms</code>, after
you load the <code>AMR</code> package.</p>
<p>It was last updated on 29 October 2022 12:16:58 UTC. Find more info
about the structure of this data set <a href="https://msberends.github.io/AMR/reference/microorganisms.html">here</a>.</p>
<p><strong>Direct download links:</strong></p>
<ul>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/microorganisms.rds" class="external-link">original R Data Structure (RDS) file</a> (1.1 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/microorganisms.rds" class="external-link">original
R Data Structure (RDS) file</a> (1.1 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/microorganisms.txt" class="external-link">tab-separated text file</a> (0.4 kB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/microorganisms.txt" class="external-link">tab-separated
text file</a> (0.4 kB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/microorganisms.xlsx" class="external-link">Microsoft Excel workbook</a> (4.8 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/microorganisms.xlsx" class="external-link">Microsoft
Excel workbook</a> (4.8 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/microorganisms.feather" class="external-link">Apache Feather file</a> (5.1 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/microorganisms.feather" class="external-link">Apache
Feather file</a> (5.1 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/microorganisms.parquet" class="external-link">Apache Parquet file</a> (2.5 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/microorganisms.parquet" class="external-link">Apache
Parquet file</a> (2.5 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/microorganisms.sas" class="external-link">SAS data file</a> (47.7 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/microorganisms.sas" class="external-link">SAS
data file</a> (47.8 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/microorganisms.sav" class="external-link">IBM SPSS Statistics data file</a> (15.8 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/microorganisms.sav" class="external-link">IBM
SPSS Statistics data file</a> (15.8 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/microorganisms.dta" class="external-link">Stata DTA file</a> (44.4 MB)</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/microorganisms.dta" class="external-link">Stata
DTA file</a> (43.8 MB)</li>
</ul>
<p><strong>NOTE: The exported files for Excel, SAS, SPSS and Stata contain only the first 50 SNOMED codes per record, as their file size would otherwise exceed 100 MB; the file size limit of GitHub.</strong> Advice? Use R instead.</p>
<p><strong>NOTE: The exported files for Excel, SAS, SPSS and Stata
contain only the first 50 SNOMED codes per record, as their file size
would otherwise exceed 100 MB; the file size limit of GitHub.</strong>
Advice? Use R instead.</p>
<div class="section level3">
<h3 id="source">Source<a class="anchor" aria-label="anchor" href="#source"></a>
</h3>
<p>This data set contains the full microbial taxonomy of five kingdoms from the List of Prokaryotic names with Standing in Nomenclature (LPSN) and the Global Biodiversity Information Facility (GBIF):</p>
<p>This data set contains the full microbial taxonomy of five kingdoms
from the List of Prokaryotic names with Standing in Nomenclature (LPSN)
and the Global Biodiversity Information Facility (GBIF):</p>
<ul>
<li>Parte, AC <em>et al.</em> (2020). <strong>List of Prokaryotic names with Standing in Nomenclature (LPSN) moves to the DSMZ.</strong> International Journal of Systematic and Evolutionary Microbiology, 70, 5607-5612; . Accessed from <a href="https://lpsn.dsmz.de" class="external-link uri">https://lpsn.dsmz.de</a> on 12 September, 2022.</li>
<li>GBIF Secretariat (November 26, 2021). GBIF Backbone Taxonomy. Checklist dataset . Accessed from <a href="https://www.gbif.org" class="external-link uri">https://www.gbif.org</a> on 12 September, 2022.</li>
<li>Public Health Information Network Vocabulary Access and Distribution System (PHIN VADS). US Edition of SNOMED CT from 1 September 2020. Value Set Name Microoganism, OID 2.16.840.1.114222.4.11.1009 (v12). URL: <a href="https://phinvads.cdc.gov" class="external-link uri">https://phinvads.cdc.gov</a>
<li>Parte, AC <em>et al.</em> (2020). <strong>List of Prokaryotic names
with Standing in Nomenclature (LPSN) moves to the DSMZ.</strong>
International Journal of Systematic and Evolutionary Microbiology, 70,
5607-5612; . Accessed from <a href="https://lpsn.dsmz.de" class="external-link uri">https://lpsn.dsmz.de</a> on 12 September, 2022.</li>
<li>GBIF Secretariat (November 26, 2021). GBIF Backbone Taxonomy.
Checklist dataset . Accessed from <a href="https://www.gbif.org" class="external-link uri">https://www.gbif.org</a> on 12 September, 2022.</li>
<li>Public Health Information Network Vocabulary Access and Distribution
System (PHIN VADS). US Edition of SNOMED CT from 1 September 2020. Value
Set Name Microoganism, OID 2.16.840.1.114222.4.11.1009 (v12). URL: <a href="https://phinvads.cdc.gov" class="external-link uri">https://phinvads.cdc.gov</a>
</li>
</ul>
</div>
@ -220,11 +254,11 @@
<tbody>
<tr class="odd">
<td align="center">(unknown kingdom)</td>
<td align="center">3</td>
<td align="center">5</td>
</tr>
<tr class="even">
<td align="center">Animalia</td>
<td align="center">1,523</td>
<td align="center">1,524</td>
</tr>
<tr class="odd">
<td align="center">Archaea</td>
@ -232,15 +266,15 @@
</tr>
<tr class="even">
<td align="center">Bacteria</td>
<td align="center">33,714</td>
<td align="center">33,716</td>
</tr>
<tr class="odd">
<td align="center">Fungi</td>
<td align="center">7,365</td>
<td align="center">7,450</td>
</tr>
<tr class="even">
<td align="center">Protozoa</td>
<td align="center">4,946</td>
<td align="center">4,951</td>
</tr>
</tbody>
</table>
@ -447,35 +481,56 @@
<h2 id="antibiotics-antibiotic-agents">
<code>antibiotics</code>: Antibiotic Agents<a class="anchor" aria-label="anchor" href="#antibiotics-antibiotic-agents"></a>
</h2>
<p>A data set with 464 rows and 14 columns, containing the following column names:<br><em>ab</em>, <em>cid</em>, <em>name</em>, <em>group</em>, <em>atc</em>, <em>atc_group1</em>, <em>atc_group2</em>, <em>abbreviations</em>, <em>synonyms</em>, <em>oral_ddd</em>, <em>oral_units</em>, <em>iv_ddd</em>, <em>iv_units</em> and <em>loinc</em>.</p>
<p>This data set is in R available as <code>antibiotics</code>, after you load the <code>AMR</code> package.</p>
<p>It was last updated on 22 October 2022 20:03:38 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/antibiotics.html">here</a>.</p>
<p>A data set with 464 rows and 14 columns, containing the following
column names:<br><em>ab</em>, <em>cid</em>, <em>name</em>, <em>group</em>, <em>atc</em>,
<em>atc_group1</em>, <em>atc_group2</em>, <em>abbreviations</em>,
<em>synonyms</em>, <em>oral_ddd</em>, <em>oral_units</em>,
<em>iv_ddd</em>, <em>iv_units</em> and <em>loinc</em>.</p>
<p>This data set is in R available as <code>antibiotics</code>, after
you load the <code>AMR</code> package.</p>
<p>It was last updated on 29 October 2022 12:16:58 UTC. Find more info
about the structure of this data set <a href="https://msberends.github.io/AMR/reference/antibiotics.html">here</a>.</p>
<p><strong>Direct download links:</strong></p>
<ul>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/antibiotics.rds" class="external-link">original R Data Structure (RDS) file</a> (36 kB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/antibiotics.rds" class="external-link">original
R Data Structure (RDS) file</a> (36 kB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/antibiotics.txt" class="external-link">tab-separated text file</a> (0.2 kB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/antibiotics.txt" class="external-link">tab-separated
text file</a> (0.2 kB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/antibiotics.xlsx" class="external-link">Microsoft Excel workbook</a> (66 kB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/antibiotics.xlsx" class="external-link">Microsoft
Excel workbook</a> (66 kB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/antibiotics.feather" class="external-link">Apache Feather file</a> (97 kB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/antibiotics.feather" class="external-link">Apache
Feather file</a> (97 kB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/antibiotics.parquet" class="external-link">Apache Parquet file</a> (74 kB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/antibiotics.parquet" class="external-link">Apache
Parquet file</a> (74 kB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/antibiotics.sas" class="external-link">SAS data file</a> (1.8 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/antibiotics.sas" class="external-link">SAS
data file</a> (1.8 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/antibiotics.sav" class="external-link">IBM SPSS Statistics data file</a> (0.3 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/antibiotics.sav" class="external-link">IBM
SPSS Statistics data file</a> (0.3 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/antibiotics.dta" class="external-link">Stata DTA file</a> (0.3 MB)</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/antibiotics.dta" class="external-link">Stata
DTA file</a> (0.3 MB)</li>
</ul>
<div class="section level3">
<h3 id="source-1">Source<a class="anchor" aria-label="anchor" href="#source-1"></a>
</h3>
<p>This data set contains all EARS-Net and ATC codes gathered from WHO and WHONET, and all compound IDs from PubChem. It also contains all brand names (synonyms) as found on PubChem and Defined Daily Doses (DDDs) for oral and parenteral administration.</p>
<p>This data set contains all EARS-Net and ATC codes gathered from WHO
and WHONET, and all compound IDs from PubChem. It also contains all
brand names (synonyms) as found on PubChem and Defined Daily Doses
(DDDs) for oral and parenteral administration.</p>
<ul>
<li>
<a href="https://www.whocc.no/atc_ddd_index/" class="external-link">ATC/DDD index from WHO Collaborating Centre for Drug Statistics Methodology</a> (note: this may not be used for commercial purposes, but is freely available from the WHO CC website for personal use)</li>
<li><a href="https://pubchem.ncbi.nlm.nih.gov" class="external-link">PubChem by the US National Library of Medicine</a></li>
<a href="https://www.whocc.no/atc_ddd_index/" class="external-link">ATC/DDD index from WHO
Collaborating Centre for Drug Statistics Methodology</a> (note: this may
not be used for commercial purposes, but is freely available from the
WHO CC website for personal use)</li>
<li><a href="https://pubchem.ncbi.nlm.nih.gov" class="external-link">PubChem by the US
National Library of Medicine</a></li>
<li><a href="https://whonet.org" class="external-link">WHONET software 2019</a></li>
</ul>
</div>
@ -555,7 +610,8 @@
<td align="center">Beta-lactams/penicillins</td>
<td align="center">J01CR02</td>
<td align="center">Beta-lactam antibacterials, penicillins</td>
<td align="center">Combinations of penicillins, incl. beta-lactamase inhibitors</td>
<td align="center">Combinations of penicillins, incl. beta-lactamase
inhibitors</td>
<td align="center">a/c, amcl, aml, …</td>
<td align="center">amocla, amoclan, amoclav, …</td>
<td align="center">1.5</td>
@ -620,35 +676,55 @@
<h2 id="antivirals-antiviral-agents">
<code>antivirals</code>: Antiviral Agents<a class="anchor" aria-label="anchor" href="#antivirals-antiviral-agents"></a>
</h2>
<p>A data set with 102 rows and 9 columns, containing the following column names:<br><em>atc</em>, <em>cid</em>, <em>name</em>, <em>atc_group</em>, <em>synonyms</em>, <em>oral_ddd</em>, <em>oral_units</em>, <em>iv_ddd</em> and <em>iv_units</em>.</p>
<p>This data set is in R available as <code>antivirals</code>, after you load the <code>AMR</code> package.</p>
<p>It was last updated on 22 October 2022 20:03:38 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/antibiotics.html">here</a>.</p>
<p>A data set with 102 rows and 9 columns, containing the following
column names:<br><em>atc</em>, <em>cid</em>, <em>name</em>, <em>atc_group</em>,
<em>synonyms</em>, <em>oral_ddd</em>, <em>oral_units</em>,
<em>iv_ddd</em> and <em>iv_units</em>.</p>
<p>This data set is in R available as <code>antivirals</code>, after you
load the <code>AMR</code> package.</p>
<p>It was last updated on 29 October 2022 12:16:58 UTC. Find more info
about the structure of this data set <a href="https://msberends.github.io/AMR/reference/antibiotics.html">here</a>.</p>
<p><strong>Direct download links:</strong></p>
<ul>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/antivirals.rds" class="external-link">original R Data Structure (RDS) file</a> (4 kB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/antivirals.rds" class="external-link">original
R Data Structure (RDS) file</a> (4 kB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/antivirals.txt" class="external-link">tab-separated text file</a> (16 kB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/antivirals.txt" class="external-link">tab-separated
text file</a> (16 kB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/antivirals.xlsx" class="external-link">Microsoft Excel workbook</a> (14 kB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/antivirals.xlsx" class="external-link">Microsoft
Excel workbook</a> (14 kB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/antivirals.feather" class="external-link">Apache Feather file</a> (12 kB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/antivirals.feather" class="external-link">Apache
Feather file</a> (12 kB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/antivirals.parquet" class="external-link">Apache Parquet file</a> (10 kB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/antivirals.parquet" class="external-link">Apache
Parquet file</a> (10 kB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/antivirals.sas" class="external-link">SAS data file</a> (80 kB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/antivirals.sas" class="external-link">SAS
data file</a> (80 kB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/antivirals.sav" class="external-link">IBM SPSS Statistics data file</a> (27 kB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/antivirals.sav" class="external-link">IBM
SPSS Statistics data file</a> (27 kB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/antivirals.dta" class="external-link">Stata DTA file</a> (67 kB)</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/antivirals.dta" class="external-link">Stata
DTA file</a> (67 kB)</li>
</ul>
<div class="section level3">
<h3 id="source-2">Source<a class="anchor" aria-label="anchor" href="#source-2"></a>
</h3>
<p>This data set contains all ATC codes gathered from WHO and all compound IDs from PubChem. It also contains all brand names (synonyms) as found on PubChem and Defined Daily Doses (DDDs) for oral and parenteral administration.</p>
<p>This data set contains all ATC codes gathered from WHO and all
compound IDs from PubChem. It also contains all brand names (synonyms)
as found on PubChem and Defined Daily Doses (DDDs) for oral and
parenteral administration.</p>
<ul>
<li>
<a href="https://www.whocc.no/atc_ddd_index/" class="external-link">ATC/DDD index from WHO Collaborating Centre for Drug Statistics Methodology</a> (note: this may not be used for commercial purposes, but is freely available from the WHO CC website for personal use)</li>
<li><a href="https://pubchem.ncbi.nlm.nih.gov" class="external-link">PubChem by the US National Library of Medicine</a></li>
<a href="https://www.whocc.no/atc_ddd_index/" class="external-link">ATC/DDD index from WHO
Collaborating Centre for Drug Statistics Methodology</a> (note: this may
not be used for commercial purposes, but is freely available from the
WHO CC website for personal use)</li>
<li><a href="https://pubchem.ncbi.nlm.nih.gov" class="external-link">PubChem by the US
National Library of Medicine</a></li>
</ul>
</div>
<div class="section level3">
@ -682,7 +758,8 @@
<td align="center">J05AF06</td>
<td align="center">441300</td>
<td align="center">Abacavir</td>
<td align="center">Nucleoside and nucleotide reverse transcriptase inhibitors</td>
<td align="center">Nucleoside and nucleotide reverse transcriptase
inhibitors</td>
<td align="center">Abacavir, Abacavir sulfate, Ziagen</td>
<td align="center">0.6</td>
<td align="center">g</td>
@ -693,7 +770,8 @@
<td align="center">J05AB01</td>
<td align="center">135398513</td>
<td align="center">Aciclovir</td>
<td align="center">Nucleosides and nucleotides excl. reverse transcriptase inhibitors</td>
<td align="center">Nucleosides and nucleotides excl. reverse
transcriptase inhibitors</td>
<td align="center">Acicloftal, Aciclovier, Aciclovir, …</td>
<td align="center">4.0</td>
<td align="center">g</td>
@ -704,8 +782,10 @@
<td align="center">J05AF08</td>
<td align="center">60871</td>
<td align="center">Adefovir dipivoxil</td>
<td align="center">Nucleoside and nucleotide reverse transcriptase inhibitors</td>
<td align="center">Adefovir di ester, Adefovir dipivoxil, Adefovir Dipivoxil, …</td>
<td align="center">Nucleoside and nucleotide reverse transcriptase
inhibitors</td>
<td align="center">Adefovir di ester, Adefovir dipivoxil, Adefovir
Dipivoxil, …</td>
<td align="center">10.0</td>
<td align="center">mg</td>
<td align="center"></td>
@ -750,33 +830,49 @@
</div>
<div class="section level2">
<h2 id="rsi_translation-interpretation-from-mic-values-disk-diameters-to-rsi">
<code>rsi_translation</code>: Interpretation from MIC values / disk diameters to R/SI<a class="anchor" aria-label="anchor" href="#rsi_translation-interpretation-from-mic-values-disk-diameters-to-rsi"></a>
<code>rsi_translation</code>: Interpretation from MIC values / disk
diameters to R/SI<a class="anchor" aria-label="anchor" href="#rsi_translation-interpretation-from-mic-values-disk-diameters-to-rsi"></a>
</h2>
<p>A data set with 18,308 rows and 11 columns, containing the following column names:<br><em>guideline</em>, <em>method</em>, <em>site</em>, <em>mo</em>, <em>rank_index</em>, <em>ab</em>, <em>ref_tbl</em>, <em>disk_dose</em>, <em>breakpoint_S</em>, <em>breakpoint_R</em> and <em>uti</em>.</p>
<p>This data set is in R available as <code>rsi_translation</code>, after you load the <code>AMR</code> package.</p>
<p>It was last updated on 22 October 2022 20:03:38 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/rsi_translation.html">here</a>.</p>
<p>A data set with 18,308 rows and 11 columns, containing the following
column names:<br><em>guideline</em>, <em>method</em>, <em>site</em>, <em>mo</em>,
<em>rank_index</em>, <em>ab</em>, <em>ref_tbl</em>, <em>disk_dose</em>,
<em>breakpoint_S</em>, <em>breakpoint_R</em> and <em>uti</em>.</p>
<p>This data set is in R available as <code>rsi_translation</code>,
after you load the <code>AMR</code> package.</p>
<p>It was last updated on 29 October 2022 12:16:58 UTC. Find more info
about the structure of this data set <a href="https://msberends.github.io/AMR/reference/rsi_translation.html">here</a>.</p>
<p><strong>Direct download links:</strong></p>
<ul>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/rsi_translation.rds" class="external-link">original R Data Structure (RDS) file</a> (42 kB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/rsi_translation.rds" class="external-link">original
R Data Structure (RDS) file</a> (42 kB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/rsi_translation.txt" class="external-link">tab-separated text file</a> (1.9 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/rsi_translation.txt" class="external-link">tab-separated
text file</a> (1.9 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/rsi_translation.xlsx" class="external-link">Microsoft Excel workbook</a> (0.8 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/rsi_translation.xlsx" class="external-link">Microsoft
Excel workbook</a> (0.8 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/rsi_translation.feather" class="external-link">Apache Feather file</a> (0.7 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/rsi_translation.feather" class="external-link">Apache
Feather file</a> (0.7 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/rsi_translation.parquet" class="external-link">Apache Parquet file</a> (87 kB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/rsi_translation.parquet" class="external-link">Apache
Parquet file</a> (87 kB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/rsi_translation.sas" class="external-link">SAS data file</a> (3.6 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/rsi_translation.sas" class="external-link">SAS
data file</a> (3.6 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/rsi_translation.sav" class="external-link">IBM SPSS Statistics data file</a> (2.3 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/rsi_translation.sav" class="external-link">IBM
SPSS Statistics data file</a> (2.3 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/rsi_translation.dta" class="external-link">Stata DTA file</a> (3.4 MB)</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/rsi_translation.dta" class="external-link">Stata
DTA file</a> (3.4 MB)</li>
</ul>
<div class="section level3">
<h3 id="source-3">Source<a class="anchor" aria-label="anchor" href="#source-3"></a>
</h3>
<p>This data set contains interpretation rules for MIC values and disk diffusion diameters. Included guidelines are CLSI (2013-2022) and EUCAST (2013-2022).</p>
<p>This data set contains interpretation rules for MIC values and disk
diffusion diameters. Included guidelines are CLSI (2013-2022) and EUCAST
(2013-2022).</p>
</div>
<div class="section level3">
<h3 id="example-content-3">Example content<a class="anchor" aria-label="anchor" href="#example-content-3"></a>
@ -909,33 +1005,48 @@
</div>
<div class="section level2">
<h2 id="intrinsic_resistant-intrinsic-bacterial-resistance">
<code>intrinsic_resistant</code>: Intrinsic Bacterial Resistance<a class="anchor" aria-label="anchor" href="#intrinsic_resistant-intrinsic-bacterial-resistance"></a>
<code>intrinsic_resistant</code>: Intrinsic Bacterial
Resistance<a class="anchor" aria-label="anchor" href="#intrinsic_resistant-intrinsic-bacterial-resistance"></a>
</h2>
<p>A data set with 134,659 rows and 2 columns, containing the following column names:<br><em>mo</em> and <em>ab</em>.</p>
<p>This data set is in R available as <code>intrinsic_resistant</code>, after you load the <code>AMR</code> package.</p>
<p>It was last updated on 22 October 2022 20:03:38 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/intrinsic_resistant.html">here</a>.</p>
<p>A data set with 134,659 rows and 2 columns, containing the following
column names:<br><em>mo</em> and <em>ab</em>.</p>
<p>This data set is in R available as <code>intrinsic_resistant</code>,
after you load the <code>AMR</code> package.</p>
<p>It was last updated on 29 October 2022 12:16:58 UTC. Find more info
about the structure of this data set <a href="https://msberends.github.io/AMR/reference/intrinsic_resistant.html">here</a>.</p>
<p><strong>Direct download links:</strong></p>
<ul>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/intrinsic_resistant.rds" class="external-link">original R Data Structure (RDS) file</a> (78 kB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/intrinsic_resistant.rds" class="external-link">original
R Data Structure (RDS) file</a> (78 kB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/intrinsic_resistant.txt" class="external-link">tab-separated text file</a> (5.1 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/intrinsic_resistant.txt" class="external-link">tab-separated
text file</a> (5.1 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/intrinsic_resistant.xlsx" class="external-link">Microsoft Excel workbook</a> (1.3 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/intrinsic_resistant.xlsx" class="external-link">Microsoft
Excel workbook</a> (1.3 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/intrinsic_resistant.feather" class="external-link">Apache Feather file</a> (1.2 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/intrinsic_resistant.feather" class="external-link">Apache
Feather file</a> (1.2 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/intrinsic_resistant.parquet" class="external-link">Apache Parquet file</a> (0.2 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/intrinsic_resistant.parquet" class="external-link">Apache
Parquet file</a> (0.2 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/intrinsic_resistant.sas" class="external-link">SAS data file</a> (9.8 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/intrinsic_resistant.sas" class="external-link">SAS
data file</a> (9.8 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/intrinsic_resistant.sav" class="external-link">IBM SPSS Statistics data file</a> (7.4 MB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/intrinsic_resistant.sav" class="external-link">IBM
SPSS Statistics data file</a> (7.4 MB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/intrinsic_resistant.dta" class="external-link">Stata DTA file</a> (9.6 MB)</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/intrinsic_resistant.dta" class="external-link">Stata
DTA file</a> (9.6 MB)</li>
</ul>
<div class="section level3">
<h3 id="source-4">Source<a class="anchor" aria-label="anchor" href="#source-4"></a>
</h3>
<p>This data set contains all defined intrinsic resistance by EUCAST of all bug-drug combinations, and is based on <a href="https://www.eucast.org/expert_rules_and_expected_phenotypes/" class="external-link">EUCAST Expert Rules and EUCAST Intrinsic Resistance and Unusual Phenotypes v3.3</a> (2021).</p>
<p>This data set contains all defined intrinsic resistance by EUCAST of
all bug-drug combinations, and is based on <a href="https://www.eucast.org/expert_rules_and_expected_phenotypes/" class="external-link">EUCAST
Expert Rules and EUCAST Intrinsic Resistance and Unusual Phenotypes
v3.3</a> (2021).</p>
</div>
<div class="section level3">
<h3 id="example-content-4">Example content<a class="anchor" aria-label="anchor" href="#example-content-4"></a>
@ -1183,37 +1294,63 @@
<h2 id="dosage-dosage-guidelines-from-eucast">
<code>dosage</code>: Dosage Guidelines from EUCAST<a class="anchor" aria-label="anchor" href="#dosage-dosage-guidelines-from-eucast"></a>
</h2>
<p>A data set with 169 rows and 9 columns, containing the following column names:<br><em>ab</em>, <em>name</em>, <em>type</em>, <em>dose</em>, <em>dose_times</em>, <em>administration</em>, <em>notes</em>, <em>original_txt</em> and <em>eucast_version</em>.</p>
<p>This data set is in R available as <code>dosage</code>, after you load the <code>AMR</code> package.</p>
<p>It was last updated on 22 October 2022 20:03:38 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/dosage.html">here</a>.</p>
<p>A data set with 169 rows and 9 columns, containing the following
column names:<br><em>ab</em>, <em>name</em>, <em>type</em>, <em>dose</em>,
<em>dose_times</em>, <em>administration</em>, <em>notes</em>,
<em>original_txt</em> and <em>eucast_version</em>.</p>
<p>This data set is in R available as <code>dosage</code>, after you
load the <code>AMR</code> package.</p>
<p>It was last updated on 29 October 2022 12:16:58 UTC. Find more info
about the structure of this data set <a href="https://msberends.github.io/AMR/reference/dosage.html">here</a>.</p>
<p><strong>Direct download links:</strong></p>
<ul>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/dosage.rds" class="external-link">original R Data Structure (RDS) file</a> (3 kB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/dosage.rds" class="external-link">original
R Data Structure (RDS) file</a> (3 kB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/dosage.txt" class="external-link">tab-separated text file</a> (15 kB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/dosage.txt" class="external-link">tab-separated
text file</a> (15 kB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/dosage.xlsx" class="external-link">Microsoft Excel workbook</a> (14 kB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/dosage.xlsx" class="external-link">Microsoft
Excel workbook</a> (14 kB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/dosage.feather" class="external-link">Apache Feather file</a> (11 kB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/dosage.feather" class="external-link">Apache
Feather file</a> (11 kB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/dosage.parquet" class="external-link">Apache Parquet file</a> (7 kB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/dosage.parquet" class="external-link">Apache
Parquet file</a> (7 kB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/dosage.sas" class="external-link">SAS data file</a> (52 kB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/dosage.sas" class="external-link">SAS
data file</a> (52 kB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/dosage.sav" class="external-link">IBM SPSS Statistics data file</a> (23 kB)<br>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/dosage.sav" class="external-link">IBM
SPSS Statistics data file</a> (23 kB)<br>
</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/dosage.dta" class="external-link">Stata DTA file</a> (44 kB)</li>
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/dosage.dta" class="external-link">Stata
DTA file</a> (44 kB)</li>
</ul>
<div class="section level3">
<h3 id="source-5">Source<a class="anchor" aria-label="anchor" href="#source-5"></a>
</h3>
<p>EUCAST breakpoints used in this package are based on the dosages in this data set.</p>
<p>Currently included dosages in the data set are meant for: <a href="https://www.eucast.org/clinical_breakpoints/" class="external-link">EUCAST Clinical Breakpoint Tables v11.0</a> (2021).</p>
<p>EUCAST breakpoints used in this package are based on the dosages in
this data set.</p>
<p>Currently included dosages in the data set are meant for: <a href="https://www.eucast.org/clinical_breakpoints/" class="external-link">EUCAST Clinical
Breakpoint Tables v11.0</a> (2021).</p>
</div>
<div class="section level3">
<h3 id="example-content-5">Example content<a class="anchor" aria-label="anchor" href="#example-content-5"></a>
</h3>
<table class="table">
<colgroup>
<col width="4%">
<col width="10%">
<col width="15%">
<col width="10%">
<col width="9%">
<col width="13%">
<col width="5%">
<col width="16%">
<col width="13%">
</colgroup>
<thead><tr class="header">
<th align="center">ab</th>
<th align="center">name</th>
@ -1300,13 +1437,26 @@
<h2 id="example_isolates-example-data-for-practice">
<code>example_isolates</code>: Example Data for Practice<a class="anchor" aria-label="anchor" href="#example_isolates-example-data-for-practice"></a>
</h2>
<p>A data set with 2,000 rows and 46 columns, containing the following column names:<br><em>date</em>, <em>patient</em>, <em>age</em>, <em>gender</em>, <em>ward</em>, <em>mo</em>, <em>PEN</em>, <em>OXA</em>, <em>FLC</em>, <em>AMX</em>, <em>AMC</em>, <em>AMP</em>, <em>TZP</em>, <em>CZO</em>, <em>FEP</em>, <em>CXM</em>, <em>FOX</em>, <em>CTX</em>, <em>CAZ</em>, <em>CRO</em>, <em>GEN</em>, <em>TOB</em>, <em>AMK</em>, <em>KAN</em>, <em>TMP</em>, <em>SXT</em>, <em>NIT</em>, <em>FOS</em>, <em>LNZ</em>, <em>CIP</em>, <em>MFX</em>, <em>VAN</em>, <em>TEC</em>, <em>TCY</em>, <em>TGC</em>, <em>DOX</em>, <em>ERY</em>, <em>CLI</em>, <em>AZM</em>, <em>IPM</em>, <em>MEM</em>, <em>MTR</em>, <em>CHL</em>, <em>COL</em>, <em>MUP</em> and <em>RIF</em>.</p>
<p>This data set is in R available as <code>example_isolates</code>, after you load the <code>AMR</code> package.</p>
<p>It was last updated on 22 October 2022 20:03:38 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/example_isolates.html">here</a>.</p>
<p>A data set with 2,000 rows and 46 columns, containing the following
column names:<br><em>date</em>, <em>patient</em>, <em>age</em>, <em>gender</em>,
<em>ward</em>, <em>mo</em>, <em>PEN</em>, <em>OXA</em>, <em>FLC</em>,
<em>AMX</em>, <em>AMC</em>, <em>AMP</em>, <em>TZP</em>, <em>CZO</em>,
<em>FEP</em>, <em>CXM</em>, <em>FOX</em>, <em>CTX</em>, <em>CAZ</em>,
<em>CRO</em>, <em>GEN</em>, <em>TOB</em>, <em>AMK</em>, <em>KAN</em>,
<em>TMP</em>, <em>SXT</em>, <em>NIT</em>, <em>FOS</em>, <em>LNZ</em>,
<em>CIP</em>, <em>MFX</em>, <em>VAN</em>, <em>TEC</em>, <em>TCY</em>,
<em>TGC</em>, <em>DOX</em>, <em>ERY</em>, <em>CLI</em>, <em>AZM</em>,
<em>IPM</em>, <em>MEM</em>, <em>MTR</em>, <em>CHL</em>, <em>COL</em>,
<em>MUP</em> and <em>RIF</em>.</p>
<p>This data set is in R available as <code>example_isolates</code>,
after you load the <code>AMR</code> package.</p>
<p>It was last updated on 29 October 2022 12:16:58 UTC. Find more info
about the structure of this data set <a href="https://msberends.github.io/AMR/reference/example_isolates.html">here</a>.</p>
<div class="section level3">
<h3 id="source-6">Source<a class="anchor" aria-label="anchor" href="#source-6"></a>
</h3>
<p>This data set contains randomised fictitious data, but reflects reality and can be used to practise AMR data analysis.</p>
<p>This data set contains randomised fictitious data, but reflects
reality and can be used to practise AMR data analysis.</p>
</div>
<div class="section level3">
<h3 id="example-content-6">Example content<a class="anchor" aria-label="anchor" href="#example-content-6"></a>
@ -1703,20 +1853,38 @@
</div>
<div class="section level2">
<h2 id="example_isolates_unclean-example-data-for-practice">
<code>example_isolates_unclean</code>: Example Data for Practice<a class="anchor" aria-label="anchor" href="#example_isolates_unclean-example-data-for-practice"></a>
<code>example_isolates_unclean</code>: Example Data for
Practice<a class="anchor" aria-label="anchor" href="#example_isolates_unclean-example-data-for-practice"></a>
</h2>
<p>A data set with 3,000 rows and 8 columns, containing the following column names:<br><em>patient_id</em>, <em>hospital</em>, <em>date</em>, <em>bacteria</em>, <em>AMX</em>, <em>AMC</em>, <em>CIP</em> and <em>GEN</em>.</p>
<p>This data set is in R available as <code>example_isolates_unclean</code>, after you load the <code>AMR</code> package.</p>
<p>It was last updated on 22 October 2022 20:03:38 UTC. Find more info about the structure of this data set <a href="https://msberends.github.io/AMR/reference/example_isolates_unclean.html">here</a>.</p>
<p>A data set with 3,000 rows and 8 columns, containing the following
column names:<br><em>patient_id</em>, <em>hospital</em>, <em>date</em>,
<em>bacteria</em>, <em>AMX</em>, <em>AMC</em>, <em>CIP</em> and
<em>GEN</em>.</p>
<p>This data set is in R available as
<code>example_isolates_unclean</code>, after you load the
<code>AMR</code> package.</p>
<p>It was last updated on 29 October 2022 12:16:58 UTC. Find more info
about the structure of this data set <a href="https://msberends.github.io/AMR/reference/example_isolates_unclean.html">here</a>.</p>
<div class="section level3">
<h3 id="source-7">Source<a class="anchor" aria-label="anchor" href="#source-7"></a>
</h3>
<p>This data set contains randomised fictitious data, but reflects reality and can be used to practise AMR data analysis.</p>
<p>This data set contains randomised fictitious data, but reflects
reality and can be used to practise AMR data analysis.</p>
</div>
<div class="section level3">
<h3 id="example-content-7">Example content<a class="anchor" aria-label="anchor" href="#example-content-7"></a>
</h3>
<table class="table">
<table style="width:100%;" class="table">
<colgroup>
<col width="17%">
<col width="14%">
<col width="17%">
<col width="21%">
<col width="7%">
<col width="7%">
<col width="7%">
<col width="7%">
</colgroup>
<thead><tr class="header">
<th align="center">patient_id</th>
<th align="center">hospital</th>

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@ -38,7 +38,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -171,8 +171,13 @@
<div class="section level2">
<h2 id="needed-r-packages">Needed R packages<a class="anchor" aria-label="anchor" href="#needed-r-packages"></a>
</h2>
<p>As with many uses in R, we need some additional packages for AMR data analysis. Our package works closely together with the <a href="https://www.tidyverse.org" class="external-link">tidyverse packages</a> <a href="https://dplyr.tidyverse.org/" class="external-link"><code>dplyr</code></a> and <a href="https://ggplot2.tidyverse.org" class="external-link"><code>ggplot2</code></a>. The tidyverse tremendously improves the way we conduct data science - it allows for a very natural way of writing syntaxes and creating beautiful plots in R.</p>
<p>Our <code>AMR</code> package depends on these packages and even extends their use and functions.</p>
<p>As with many uses in R, we need some additional packages for AMR data
analysis. Our package works closely together with the <a href="https://www.tidyverse.org" class="external-link">tidyverse packages</a> <a href="https://dplyr.tidyverse.org/" class="external-link"><code>dplyr</code></a> and <a href="https://ggplot2.tidyverse.org" class="external-link"><code>ggplot2</code></a>. The
tidyverse tremendously improves the way we conduct data science - it
allows for a very natural way of writing syntaxes and creating beautiful
plots in R.</p>
<p>Our <code>AMR</code> package depends on these packages and even
extends their use and functions.</p>
<div class="sourceCode" id="cb1"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://dplyr.tidyverse.org" class="external-link">dplyr</a></span><span class="op">)</span></span>
<span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://ggplot2.tidyverse.org" class="external-link">ggplot2</a></span><span class="op">)</span></span>
@ -184,7 +189,11 @@
<div class="section level2">
<h2 id="prediction-analysis">Prediction analysis<a class="anchor" aria-label="anchor" href="#prediction-analysis"></a>
</h2>
<p>Our package contains a function <code><a href="../reference/resistance_predict.html">resistance_predict()</a></code>, which takes the same input as functions for <a href="./AMR.html">other AMR data analysis</a>. Based on a date column, it calculates cases per year and uses a regression model to predict antimicrobial resistance.</p>
<p>Our package contains a function <code><a href="../reference/resistance_predict.html">resistance_predict()</a></code>,
which takes the same input as functions for <a href="./AMR.html">other
AMR data analysis</a>. Based on a date column, it calculates cases per
year and uses a regression model to predict antimicrobial
resistance.</p>
<p>It is basically as easy as:</p>
<div class="sourceCode" id="cb2"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="co"># resistance prediction of piperacillin/tazobactam (TZP):</span></span>
@ -203,9 +212,15 @@
<span> col_ab <span class="op">=</span> <span class="st">"TZP"</span>,</span>
<span> model <span class="op">=</span> <span class="st">"binomial"</span></span>
<span> <span class="op">)</span></span></code></pre></div>
<p>The function will look for a date column itself if <code>col_date</code> is not set.</p>
<p>When running any of these commands, a summary of the regression model will be printed unless using <code>resistance_predict(..., info = FALSE)</code>.</p>
<p>This text is only a printed summary - the actual result (output) of the function is a <code>data.frame</code> containing for each year: the number of observations, the actual observed resistance, the estimated resistance and the standard error below and above the estimation:</p>
<p>The function will look for a date column itself if
<code>col_date</code> is not set.</p>
<p>When running any of these commands, a summary of the regression model
will be printed unless using
<code>resistance_predict(..., info = FALSE)</code>.</p>
<p>This text is only a printed summary - the actual result (output) of
the function is a <code>data.frame</code> containing for each year: the
number of observations, the actual observed resistance, the estimated
resistance and the standard error below and above the estimation:</p>
<div class="sourceCode" id="cb3"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="va">predict_TZP</span></span>
<span><span class="co"># <span style="color: #949494;"># A tibble: 31 × 7</span></span></span>
@ -222,12 +237,18 @@
<span><span class="co"># <span style="color: #BCBCBC;"> 9</span> <span style="text-decoration: underline;">2</span>010 0.056<span style="text-decoration: underline;">6</span> <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span> 53 0.056<span style="text-decoration: underline;">6</span> 0.116 </span></span>
<span><span class="co"># <span style="color: #BCBCBC;">10</span> <span style="text-decoration: underline;">2</span>011 0.183 <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span> 93 0.183 0.127 </span></span>
<span><span class="co"># <span style="color: #949494;"># … with 21 more rows</span></span></span></code></pre></div>
<p>The function <code>plot</code> is available in base R, and can be extended by other packages to depend the output based on the type of input. We extended its function to cope with resistance predictions:</p>
<p>The function <code>plot</code> is available in base R, and can be
extended by other packages to depend the output based on the type of
input. We extended its function to cope with resistance predictions:</p>
<div class="sourceCode" id="cb4"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="../reference/plot.html">plot</a></span><span class="op">(</span><span class="va">predict_TZP</span><span class="op">)</span></span></code></pre></div>
<p><img src="resistance_predict_files/figure-html/unnamed-chunk-4-1.png" width="720"></p>
<p>This is the fastest way to plot the result. It automatically adds the right axes, error bars, titles, number of available observations and type of model.</p>
<p>We also support the <code>ggplot2</code> package with our custom function <code><a href="../reference/resistance_predict.html">ggplot_rsi_predict()</a></code> to create more appealing plots:</p>
<p>This is the fastest way to plot the result. It automatically adds the
right axes, error bars, titles, number of available observations and
type of model.</p>
<p>We also support the <code>ggplot2</code> package with our custom
function <code><a href="../reference/resistance_predict.html">ggplot_rsi_predict()</a></code> to create more appealing
plots:</p>
<div class="sourceCode" id="cb5"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="../reference/resistance_predict.html">ggplot_rsi_predict</a></span><span class="op">(</span><span class="va">predict_TZP</span><span class="op">)</span></span></code></pre></div>
<p><img src="resistance_predict_files/figure-html/unnamed-chunk-5-1.png" width="720"></p>
@ -239,7 +260,9 @@
<div class="section level3">
<h3 id="choosing-the-right-model">Choosing the right model<a class="anchor" aria-label="anchor" href="#choosing-the-right-model"></a>
</h3>
<p>Resistance is not easily predicted; if we look at vancomycin resistance in Gram-positive bacteria, the spread (i.e. standard error) is enormous:</p>
<p>Resistance is not easily predicted; if we look at vancomycin
resistance in Gram-positive bacteria, the spread (i.e. standard error)
is enormous:</p>
<div class="sourceCode" id="cb7"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="va">example_isolates</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span>
<span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/filter.html" class="external-link">filter</a></span><span class="op">(</span><span class="fu"><a href="../reference/mo_property.html">mo_gramstain</a></span><span class="op">(</span><span class="va">mo</span>, language <span class="op">=</span> <span class="cn">NULL</span><span class="op">)</span> <span class="op">==</span> <span class="st">"Gram-positive"</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span>
@ -247,8 +270,13 @@
<span> <span class="fu"><a href="../reference/resistance_predict.html">ggplot_rsi_predict</a></span><span class="op">(</span><span class="op">)</span></span>
<span><span class="co"># Using column 'date' as input for `col_date`.</span></span></code></pre></div>
<p><img src="resistance_predict_files/figure-html/unnamed-chunk-6-1.png" width="720"></p>
<p>Vancomycin resistance could be 100% in ten years, but might remain very low.</p>
<p>You can define the model with the <code>model</code> parameter. The model chosen above is a generalised linear regression model using a binomial distribution, assuming that a period of zero resistance was followed by a period of increasing resistance leading slowly to more and more resistance.</p>
<p>Vancomycin resistance could be 100% in ten years, but might remain
very low.</p>
<p>You can define the model with the <code>model</code> parameter. The
model chosen above is a generalised linear regression model using a
binomial distribution, assuming that a period of zero resistance was
followed by a period of increasing resistance leading slowly to more and
more resistance.</p>
<p>Valid values are:</p>
<table class="table">
<colgroup>
@ -264,7 +292,8 @@
<tbody>
<tr class="odd">
<td>
<code>"binomial"</code> or <code>"binom"</code> or <code>"logit"</code>
<code>"binomial"</code> or <code>"binom"</code> or
<code>"logit"</code>
</td>
<td><code>glm(..., family = binomial)</code></td>
<td>Generalised linear model with binomial distribution</td>
@ -285,7 +314,8 @@
</tr>
</tbody>
</table>
<p>For the vancomycin resistance in Gram-positive bacteria, a linear model might be more appropriate:</p>
<p>For the vancomycin resistance in Gram-positive bacteria, a linear
model might be more appropriate:</p>
<div class="sourceCode" id="cb8"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="va">example_isolates</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span>
<span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/filter.html" class="external-link">filter</a></span><span class="op">(</span><span class="fu"><a href="../reference/mo_property.html">mo_gramstain</a></span><span class="op">(</span><span class="va">mo</span>, language <span class="op">=</span> <span class="cn">NULL</span><span class="op">)</span> <span class="op">==</span> <span class="st">"Gram-positive"</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span>
@ -293,7 +323,8 @@
<span> <span class="fu"><a href="../reference/resistance_predict.html">ggplot_rsi_predict</a></span><span class="op">(</span><span class="op">)</span></span>
<span><span class="co"># Using column 'date' as input for `col_date`.</span></span></code></pre></div>
<p><img src="resistance_predict_files/figure-html/unnamed-chunk-7-1.png" width="720"></p>
<p>The model itself is also available from the object, as an <code>attribute</code>:</p>
<p>The model itself is also available from the object, as an
<code>attribute</code>:</p>
<div class="sourceCode" id="cb9"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="va">model</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/attributes.html" class="external-link">attributes</a></span><span class="op">(</span><span class="va">predict_TZP</span><span class="op">)</span><span class="op">$</span><span class="va">model</span></span>
<span></span>

View File

@ -38,7 +38,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -168,36 +168,98 @@
<p>Note: to keep the package size as small as possible, we only included this vignette on CRAN. You can read more vignettes on our website about how to conduct AMR data analysis, determine MDROs, find explanation of EUCAST rules, and much more: <a href="https://msberends.github.io/AMR/articles/" class="uri">https://msberends.github.io/AMR/articles/</a>.</p>
<p>Note: to keep the package size as small as possible, we only included
this vignette on CRAN. You can read more vignettes on our website about
how to conduct AMR data analysis, determine MDROs, find explanation of
EUCAST rules, and much more: <a href="https://msberends.github.io/AMR/articles/" class="uri">https://msberends.github.io/AMR/articles/</a>.</p>
<hr>
<p>The <code>AMR</code> package is a <a href="https://msberends.github.io/AMR/#copyright">free and open-source</a> R package with <a href="https://en.wikipedia.org/wiki/Dependency_hell" class="external-link">zero dependencies</a> to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial data and properties, by using evidence-based methods. <strong>Our aim is to provide a standard</strong> for clean and reproducible AMR data analysis, that can therefore empower epidemiological analyses to continuously enable surveillance and treatment evaluation in any setting.</p>
<p>This work was published in the Journal of Statistical Software (Volume 104(3); <a href="https://doi.org/10.18637/jss.v104.i03" class="external-link">DOI 10.18637/jss.v104.i03</a>) and formed the basis of two PhD theses (<a href="https://doi.org/10.33612/diss.177417131" class="external-link">DOI 10.33612/diss.177417131</a> and <a href="https://doi.org/10.33612/diss.192486375" class="external-link">DOI 10.33612/diss.192486375</a>).</p>
<p>After installing this package, R knows ~49,000 distinct microbial species and all ~570 antibiotic, antimycotic and antiviral drugs by name and code (including ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid R/SI and MIC values. The integral breakpoint guidelines from CLSI and EUCAST are included from the last 10 years. It supports and can read any data format, including WHONET data.</p>
<p>The <code>AMR</code> package is available in English, Chinese, Danish, Dutch, French, German, Greek, Italian, Japanese, Polish, Portuguese, Russian, Spanish, Swedish, Turkish and Ukrainian. Antimicrobial drug (group) names and colloquial microorganism names are provided in these languages.</p>
<p>This package is fully independent of any other R package and works on Windows, macOS and Linux with all versions of R since R-3.0 (April 2013). <strong>It was designed to work in any setting, including those with very limited resources</strong>. Since its first public release in early 2018, this package has been downloaded from more than 175 countries.</p>
<p>The <code>AMR</code> package is a <a href="https://msberends.github.io/AMR/#copyright">free and
open-source</a> R package with <a href="https://en.wikipedia.org/wiki/Dependency_hell" class="external-link">zero
dependencies</a> to simplify the analysis and prediction of
Antimicrobial Resistance (AMR) and to work with microbial and
antimicrobial data and properties, by using evidence-based methods.
<strong>Our aim is to provide a standard</strong> for clean and
reproducible AMR data analysis, that can therefore empower
epidemiological analyses to continuously enable surveillance and
treatment evaluation in any setting.</p>
<p>This work was published in the Journal of Statistical Software
(Volume 104(3); <a href="https://doi.org/10.18637/jss.v104.i03" class="external-link">DOI
10.18637/jss.v104.i03</a>) and formed the basis of two PhD theses (<a href="https://doi.org/10.33612/diss.177417131" class="external-link">DOI
10.33612/diss.177417131</a> and <a href="https://doi.org/10.33612/diss.192486375" class="external-link">DOI
10.33612/diss.192486375</a>).</p>
<p>After installing this package, R knows ~49,000 distinct microbial
species and all ~570 antibiotic, antimycotic and antiviral drugs by name
and code (including ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED
CT), and knows all about valid R/SI and MIC values. The integral
breakpoint guidelines from CLSI and EUCAST are included from the last 10
years. It supports and can read any data format, including WHONET
data.</p>
<p>The <code>AMR</code> package is available in English, Chinese,
Danish, Dutch, French, German, Greek, Italian, Japanese, Polish,
Portuguese, Russian, Spanish, Swedish, Turkish and Ukrainian.
Antimicrobial drug (group) names and colloquial microorganism names are
provided in these languages.</p>
<p>This package is fully independent of any other R package and works on
Windows, macOS and Linux with all versions of R since R-3.0 (April
2013). <strong>It was designed to work in any setting, including those
with very limited resources</strong>. Since its first public release in
early 2018, this package has been downloaded from more than 175
countries.</p>
<p>This package can be used for:</p>
<ul>
<li>Reference for the taxonomy of microorganisms, since the package contains all microbial (sub)species from the List of Prokaryotic names with Standing in Nomenclature (LPSN) and the Global Biodiversity Information Facility (GBIF)</li>
<li>Interpreting raw MIC and disk diffusion values, based on the latest CLSI or EUCAST guidelines</li>
<li>Retrieving antimicrobial drug names, doses and forms of administration from clinical health care records</li>
<li>Reference for the taxonomy of microorganisms, since the package
contains all microbial (sub)species from the List of Prokaryotic names
with Standing in Nomenclature (LPSN) and the Global Biodiversity
Information Facility (GBIF)</li>
<li>Interpreting raw MIC and disk diffusion values, based on the latest
CLSI or EUCAST guidelines</li>
<li>Retrieving antimicrobial drug names, doses and forms of
administration from clinical health care records</li>
<li>Determining first isolates to be used for AMR data analysis</li>
<li>Calculating antimicrobial resistance</li>
<li>Determining multi-drug resistance (MDR) / multi-drug resistant organisms (MDRO)</li>
<li>Calculating (empirical) susceptibility of both mono therapy and combination therapies</li>
<li>Predicting future antimicrobial resistance using regression models</li>
<li>Getting properties for any microorganism (like Gram stain, species, genus or family)</li>
<li>Getting properties for any antibiotic (like name, code of EARS-Net/ATC/LOINC/PubChem, defined daily dose or trade name)</li>
<li>Determining multi-drug resistance (MDR) / multi-drug resistant
organisms (MDRO)</li>
<li>Calculating (empirical) susceptibility of both mono therapy and
combination therapies</li>
<li>Predicting future antimicrobial resistance using regression
models</li>
<li>Getting properties for any microorganism (like Gram stain, species,
genus or family)</li>
<li>Getting properties for any antibiotic (like name, code of
EARS-Net/ATC/LOINC/PubChem, defined daily dose or trade name)</li>
<li>Plotting antimicrobial resistance</li>
<li>Applying EUCAST expert rules</li>
<li>Getting SNOMED codes of a microorganism, or getting properties of a microorganism based on a SNOMED code</li>
<li>Getting LOINC codes of an antibiotic, or getting properties of an antibiotic based on a LOINC code</li>
<li>Machine reading the EUCAST and CLSI guidelines from 2011-2020 to translate MIC values and disk diffusion diameters to R/SI</li>
<li>Getting SNOMED codes of a microorganism, or getting properties of a
microorganism based on a SNOMED code</li>
<li>Getting LOINC codes of an antibiotic, or getting properties of an
antibiotic based on a LOINC code</li>
<li>Machine reading the EUCAST and CLSI guidelines from 2011-2020 to
translate MIC values and disk diffusion diameters to R/SI</li>
<li>Principal component analysis for AMR</li>
</ul>
<p>All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this <code>AMR</code> package are publicly and freely available. We continually export our data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also supply flat files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please find <a href="https://msberends.github.io/AMR/articles/datasets.html">all download links on our website</a>, which is automatically updated with every code change.</p>
<p>This R package was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the <a href="https://www.rug.nl" class="external-link">University of Groningen</a>, in collaboration with non-profit organisations <a href="https://www.certe.nl" class="external-link">Certe Medical Diagnostics and Advice Foundation</a> and <a href="https://www.umcg.nl" class="external-link">University Medical Center Groningen</a>, and is being <a href="./news">actively and durably maintained</a> by two public healthcare organisations in the Netherlands.</p>
<p>All reference data sets (about microorganisms, antibiotics, R/SI
interpretation, EUCAST rules, etc.) in this <code>AMR</code> package are
publicly and freely available. We continually export our data sets to
formats for use in R, SPSS, SAS, Stata and Excel. We also supply flat
files that are machine-readable and suitable for input in any software
program, such as laboratory information systems. Please find <a href="https://msberends.github.io/AMR/articles/datasets.html">all
download links on our website</a>, which is automatically updated with
every code change.</p>
<p>This R package was created for both routine data analysis and
academic research at the Faculty of Medical Sciences of the <a href="https://www.rug.nl" class="external-link">University of Groningen</a>, in collaboration
with non-profit organisations <a href="https://www.certe.nl" class="external-link">Certe
Medical Diagnostics and Advice Foundation</a> and <a href="https://www.umcg.nl" class="external-link">University Medical Center Groningen</a>, and
is being <a href="./news">actively and durably maintained</a> by two
public healthcare organisations in the Netherlands.</p>
<hr>
<p><small> This AMR package for R is free, open-source software and licensed under the <a href="https://msberends.github.io/AMR/LICENSE-text.html">GNU General Public License v2.0 (GPL-2)</a>. These requirements are consequently legally binding: modifications must be released under the same license when distributing the package, changes made to the code must be documented, source code must be made available when the package is distributed, and a copy of the license and copyright notice must be included with the package. </small></p>
<p><small> This AMR package for R is free, open-source software and
licensed under the <a href="https://msberends.github.io/AMR/LICENSE-text.html">GNU General
Public License v2.0 (GPL-2)</a>. These requirements are consequently
legally binding: modifications must be released under the same license
when distributing the package, changes made to the code must be
documented, source code must be made available when the package is
distributed, and a copy of the license and copyright notice must be
included with the package. </small></p>
</main>
</div>

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@ -42,7 +42,7 @@
<a class="navbar-brand me-2" href="index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -363,6 +363,14 @@
<code class="sourceCode R"><span><span class="co"># transform the antibiotic columns to names:</span></span>
<span><span class="va">out</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span> <span class="fu"><a href="reference/ab_property.html">set_ab_names</a></span><span class="op">(</span><span class="op">)</span></span></code></pre></div>
<table class="table">
<colgroup>
<col width="17%">
<col width="17%">
<col width="17%">
<col width="14%">
<col width="16%">
<col width="16%">
</colgroup>
<thead><tr class="header">
<th align="left">ward</th>
<th align="right">gentamicin</th>
@ -402,6 +410,14 @@
<code class="sourceCode R"><span><span class="co"># transform the antibiotic column to ATC codes:</span></span>
<span><span class="va">out</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span> <span class="fu"><a href="reference/ab_property.html">set_ab_names</a></span><span class="op">(</span>property <span class="op">=</span> <span class="st">"atc"</span><span class="op">)</span></span></code></pre></div>
<table class="table">
<colgroup>
<col width="17%">
<col width="17%">
<col width="17%">
<col width="14%">
<col width="16%">
<col width="16%">
</colgroup>
<thead><tr class="header">
<th align="left">ward</th>
<th align="right">J01GB03</th>
@ -507,7 +523,9 @@
<h3 id="partners">Partners<a class="anchor" aria-label="anchor" href="#partners"></a>
</h3>
<p>The development of this package is part of, related to, or made possible by:</p>
<div align="center"><p><a href="https://www.rug.nl" title="University of Groningen" class="external-link"><img src="./logo_rug.svg" style="max-width: 200px;"></a> <a href="https://www.umcg.nl" title="University Medical Center Groningen" class="external-link"><img src="./logo_umcg.png" style="max-width: 200px;"></a> <a href="https://www.certe.nl" title="Certe Medical Diagnostics and Advice Foundation" class="external-link"><img src="./logo_certe.png" style="max-width: 200px;"></a> <a href="https://www.deutschland-nederland.eu" title="EurHealth-1-Health" class="external-link"><img src="./logo_eh1h.png" style="max-width: 200px;"></a> <a href="https://www.deutschland-nederland.eu" title="INTERREG" class="external-link"><img src="./logo_interreg.png" style="max-width: 200px;"></a></p></div>
<div align="center">
<p><a href="https://www.rug.nl" title="University of Groningen" class="external-link"><img src="./logo_rug.svg" style="max-width: 200px;"></a> <a href="https://www.umcg.nl" title="University Medical Center Groningen" class="external-link"><img src="./logo_umcg.png" style="max-width: 200px;"></a> <a href="https://www.certe.nl" title="Certe Medical Diagnostics and Advice Foundation" class="external-link"><img src="./logo_certe.png" style="max-width: 200px;"></a> <a href="https://www.deutschland-nederland.eu" title="EurHealth-1-Health" class="external-link"><img src="./logo_eh1h.png" style="max-width: 200px;"></a> <a href="https://www.deutschland-nederland.eu" title="INTERREG" class="external-link"><img src="./logo_interreg.png" style="max-width: 200px;"></a></p>
</div>
</div>
<div class="section level3">
<h3 id="copyright">Copyright<a class="anchor" aria-label="anchor" href="#copyright"></a>

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -127,11 +127,12 @@
</div>
<div class="section level2">
<h2 class="pkg-version" data-toc-text="1.8.2.9033" id="amr-1829033">AMR 1.8.2.9033<a class="anchor" aria-label="anchor" href="#amr-1829033"></a></h2>
<h2 class="pkg-version" data-toc-text="1.8.2.9034" id="amr-1829034">AMR 1.8.2.9034<a class="anchor" aria-label="anchor" href="#amr-1829034"></a></h2>
<p>This version will eventually become v2.0! Were happy to reach a new major milestone soon!</p>
<div class="section level4">
<h4 id="breaking-1-8-2-9033">Breaking<a class="anchor" aria-label="anchor" href="#breaking-1-8-2-9033"></a></h4>
<ul><li>Removed all species of the taxonomic kingdom Chromista from the package. This was done for multiple reasons:<ul><li>CRAN allows packages to be around 5 MB maximum, some packages are exempted but this package is not one of them</li>
<h4 id="breaking-1-8-2-9034">Breaking<a class="anchor" aria-label="anchor" href="#breaking-1-8-2-9034"></a></h4>
<ul><li>Removed all species of the taxonomic kingdom Chromista from the package. This was done for multiple reasons:
<ul><li>CRAN allows packages to be around 5 MB maximum, some packages are exempted but this package is not one of them</li>
<li>Chromista are not relevant when it comes to antimicrobial resistance, thus lacking the primary scope of this package</li>
<li>Chromista are almost never clinically relevant, thus lacking the secondary scope of this package</li>
</ul></li>
@ -142,9 +143,10 @@
<li>Removal of interpretation guidelines older than 10 years, the oldest now included guidelines of EUCAST and CLSI are from 2013</li>
</ul></div>
<div class="section level4">
<h4 id="new-1-8-2-9033">New<a class="anchor" aria-label="anchor" href="#new-1-8-2-9033"></a></h4>
<h4 id="new-1-8-2-9034">New<a class="anchor" aria-label="anchor" href="#new-1-8-2-9034"></a></h4>
<ul><li>EUCAST 2022 and CLSI 2022 guidelines have been added for <code><a href="../reference/as.rsi.html">as.rsi()</a></code>. EUCAST 2022 is now the new default guideline for all MIC and disks diffusion interpretations.</li>
<li>All new algorithm for <code><a href="../reference/as.mo.html">as.mo()</a></code> (and thus all <code>mo_*()</code> functions) while still following our original set-up as described in our paper (DOI 10.18637/jss.v104.i03).<ul><li>A new argument <code>keep_synonyms</code> allows to <em>not</em> correct for updated taxonomy, in favour of the now deleted argument <code>allow_uncertain</code>
<li>All new algorithm for <code><a href="../reference/as.mo.html">as.mo()</a></code> (and thus all <code>mo_*()</code> functions) while still following our original set-up as described in our paper (DOI 10.18637/jss.v104.i03).
<ul><li>A new argument <code>keep_synonyms</code> allows to <em>not</em> correct for updated taxonomy, in favour of the now deleted argument <code>allow_uncertain</code>
</li>
<li>It has increased tremendously in speed and returns generally more consequent results</li>
<li>Sequential coercion is now extremely fast as results are stored to the package environment, although coercion of unknown values must be run once per session. Previous results can be reset/removed with the new <code><a href="../reference/as.mo.html">mo_reset_session()</a></code> function.</li>
@ -165,9 +167,10 @@
<li>Support for antimicrobial interpretation of anaerobic bacteria, by adding a placeholder code <code>B_ANAER</code> to the <code>microorganisms</code> data set and add the breakpoints of anaerobics to the <code>rsi_interpretation</code> data set, which is used by <code><a href="../reference/as.rsi.html">as.rsi()</a></code> when interpreting MIC and disk diffusion values</li>
</ul></div>
<div class="section level4">
<h4 id="changed-1-8-2-9033">Changed<a class="anchor" aria-label="anchor" href="#changed-1-8-2-9033"></a></h4>
<h4 id="changed-1-8-2-9034">Changed<a class="anchor" aria-label="anchor" href="#changed-1-8-2-9034"></a></h4>
<ul><li>Fix for using <code><a href="../reference/as.rsi.html">as.rsi()</a></code> on certain EUCAST breakpoints for MIC values</li>
<li>Fix for using <code><a href="../reference/as.rsi.html">as.rsi()</a></code> on <code>NA</code> values (e.g. <code>as.rsi(as.disk(NA), ...)</code>)</li>
<li>Fix for using <code><a href="../reference/as.rsi.html">as.rsi()</a></code> on drug-drug combinations with multiple breakpoints for different body sites</li>
<li>Removed <code><a href="https://rdrr.io/r/base/integer.html" class="external-link">as.integer()</a></code> for MIC values, since MIC are not integer values and running <code><a href="https://rdrr.io/r/base/table.html" class="external-link">table()</a></code> on MIC values consequently failed for not being able to retrieve the level position (as thats how normally <code><a href="https://rdrr.io/r/base/integer.html" class="external-link">as.integer()</a></code> on <code>factor</code>s work)</li>
<li>
<code><a href="https://rdrr.io/r/base/droplevels.html" class="external-link">droplevels()</a></code> on MIC will now return a common <code>factor</code> at default and will lose the <code>&lt;mic&gt;</code> class. Use <code>droplevels(..., as.mic = TRUE)</code> to keep the <code>&lt;mic&gt;</code> class.</li>
@ -191,9 +194,10 @@
<li>Updated support for all WHONET 2022 microorganism codes</li>
<li>Antimicrobial interpretation SDD (susceptible dose-dependent, coined by CLSI) will be interpreted as I to comply with EUCASTs I in <code><a href="../reference/as.rsi.html">as.rsi()</a></code>
</li>
<li>Fix for <code><a href="../reference/mo_property.html">mo_shortname()</a></code> in case of higher taxonomic ranks (order, class, phylum)</li>
</ul></div>
<div class="section level4">
<h4 id="other-1-8-2-9033">Other<a class="anchor" aria-label="anchor" href="#other-1-8-2-9033"></a></h4>
<h4 id="other-1-8-2-9034">Other<a class="anchor" aria-label="anchor" href="#other-1-8-2-9034"></a></h4>
<ul><li>New website to make use of the new Bootstrap 5 and pkgdown 2.0. The website now contains results for all examples and will be automatically regenerated with every change to our repository, using GitHub Actions</li>
<li>Added Peter Dutey-Magni, Dmytro Mykhailenko, Anton Mymrikov, and Jonas Salm as contributors, to thank them for their valuable input</li>
<li>All R and Rmd files in this project are now styled using the <code>styler</code> package</li>
@ -258,7 +262,8 @@
<div class="section level4">
<h4 id="changed-1-8-0">Changed<a class="anchor" aria-label="anchor" href="#changed-1-8-0"></a></h4>
<ul><li>Updated the bacterial taxonomy to 5 October 2021 (according to <a href="https://lpsn.dsmz.de" class="external-link">LPSN</a>), including all 11 new staphylococcal species named since 1 January last year</li>
<li>The <code>antibiotics</code> data set now contains <strong>all ATC codes</strong> that are available through the <a href="https://www.whocc.no" class="external-link">WHOCC website</a>, regardless of drugs being present in more than one ATC group. This means that:<ul><li>Some drugs now contain multiple ATC codes (e.g., metronidazole contains 5)</li>
<li>The <code>antibiotics</code> data set now contains <strong>all ATC codes</strong> that are available through the <a href="https://www.whocc.no" class="external-link">WHOCC website</a>, regardless of drugs being present in more than one ATC group. This means that:
<ul><li>Some drugs now contain multiple ATC codes (e.g., metronidazole contains 5)</li>
<li>
<code>antibiotics$atc</code> is now a <code>list</code> containing <code>character</code> vectors, and this <code>atc</code> column was moved to the 5th position of the <code>antibiotics</code> data set</li>
<li>
@ -267,7 +272,8 @@
<code><a href="../reference/ab_property.html">ab_info()</a></code> has a slightly different output</li>
<li>Some DDDs (daily defined doses) were added or updated according to newly included ATC codes</li>
</ul></li>
<li>Antibiotic selectors<ul><li><p>They now also work in R-3.0 and R-3.1, supporting every version of R since 2013 like the rest of the package</p></li>
<li>Antibiotic selectors
<ul><li><p>They now also work in R-3.0 and R-3.1, supporting every version of R since 2013 like the rest of the package</p></li>
<li><p>Added more selectors for antibiotic classes: <code><a href="../reference/antibiotic_class_selectors.html">aminopenicillins()</a></code>, <code><a href="../reference/antibiotic_class_selectors.html">antifungals()</a></code>, <code><a href="../reference/antibiotic_class_selectors.html">antimycobacterials()</a></code>, <code><a href="../reference/antibiotic_class_selectors.html">lincosamides()</a></code>, <code><a href="../reference/antibiotic_class_selectors.html">lipoglycopeptides()</a></code>, <code><a href="../reference/antibiotic_class_selectors.html">polymyxins()</a></code>, <code><a href="../reference/antibiotic_class_selectors.html">quinolones()</a></code>, <code><a href="../reference/antibiotic_class_selectors.html">streptogramins()</a></code>, <code><a href="../reference/antibiotic_class_selectors.html">trimethoprims()</a></code> and <code><a href="../reference/antibiotic_class_selectors.html">ureidopenicillins()</a></code></p></li>
<li>
<p>Added specific selectors for certain types for treatment: <code><a href="../reference/antibiotic_class_selectors.html">administrable_per_os()</a></code> and <code><a href="../reference/antibiotic_class_selectors.html">administrable_iv()</a></code>, which are based on available Defined Daily Doses (DDDs), as defined by the WHOCC. These are ideal for e.g. analysing pathogens in primary care where IV treatment is not an option. They can be combined with other AB selectors, e.g. to select penicillins that are only administrable per os (i.e., orally):</p>
@ -327,7 +333,8 @@
</ul></div>
<div class="section level4">
<h4 id="other-1-8-0">Other<a class="anchor" aria-label="anchor" href="#other-1-8-0"></a></h4>
<ul><li>This package is now being maintained by two epidemiologists and a data scientist from two different non-profit healthcare organisations.</li></ul></div>
<ul><li>This package is now being maintained by two epidemiologists and a data scientist from two different non-profit healthcare organisations.</li>
</ul></div>
</div>
<div class="section level2">
<h2 class="pkg-version" data-toc-text="1.7.1" id="amr-171">AMR 1.7.1<a class="anchor" aria-label="anchor" href="#amr-171"></a></h2><p class="text-muted">CRAN release: 2021-06-03</p>
@ -351,14 +358,16 @@
<span><span class="va">example_isolates</span><span class="op">[</span><span class="fu"><a href="../reference/antibiotic_class_selectors.html">carbapenems</a></span><span class="op">(</span><span class="op">)</span> <span class="op">==</span> <span class="st">"R"</span>, <span class="op">]</span></span>
<span><span class="va">example_isolates</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/filter.html" class="external-link">filter</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/all.html" class="external-link">all</a></span><span class="op">(</span><span class="fu"><a href="../reference/antibiotic_class_selectors.html">carbapenems</a></span><span class="op">(</span><span class="op">)</span> <span class="op">==</span> <span class="st">"R"</span><span class="op">)</span><span class="op">)</span> <span class="co"># dplyr</span></span>
<span><span class="va">example_isolates</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/filter.html" class="external-link">filter</a></span><span class="op">(</span><span class="fu"><a href="../reference/antibiotic_class_selectors.html">carbapenems</a></span><span class="op">(</span><span class="op">)</span> <span class="op">==</span> <span class="st">"R"</span><span class="op">)</span></span></code></pre></div>
</li></ul></div>
</li>
</ul></div>
<div class="section level4">
<h4 id="new-1-7-1">New<a class="anchor" aria-label="anchor" href="#new-1-7-1"></a></h4>
<ul><li>Support for CLSI 2020 guideline for interpreting MICs and disk diffusion values (using <code><a href="../reference/as.rsi.html">as.rsi()</a></code>)</li>
<li>Function <code><a href="../reference/custom_eucast_rules.html">custom_eucast_rules()</a></code> that brings support for custom AMR rules in <code><a href="../reference/eucast_rules.html">eucast_rules()</a></code>
</li>
<li>Function <code><a href="../reference/italicise_taxonomy.html">italicise_taxonomy()</a></code> to make taxonomic names within a string italic, with support for markdown and ANSI</li>
<li>Support for all four methods to determine first isolates as summarised by Hindler <em>et al.</em> (doi: <a href="https://doi.org/10.1086/511864" class="external-link">10.1086/511864</a>): isolate-based, patient-based, episode-based and phenotype-based. The last method is now the default.<ul><li>The <code><a href="../reference/first_isolate.html">first_isolate()</a></code> function gained the argument <code>method</code> that has to be “phenotype-based”, “episode-based”, “patient-based”, or “isolate-based”. The old behaviour is equal to “episode-based”. The new default is “phenotype-based” if antimicrobial test results are available, and “episode-based” otherwise. This new default will yield slightly more isolates for selection (which is a good thing).</li>
<li>Support for all four methods to determine first isolates as summarised by Hindler <em>et al.</em> (doi: <a href="https://doi.org/10.1086/511864" class="external-link">10.1086/511864</a>): isolate-based, patient-based, episode-based and phenotype-based. The last method is now the default.
<ul><li>The <code><a href="../reference/first_isolate.html">first_isolate()</a></code> function gained the argument <code>method</code> that has to be “phenotype-based”, “episode-based”, “patient-based”, or “isolate-based”. The old behaviour is equal to “episode-based”. The new default is “phenotype-based” if antimicrobial test results are available, and “episode-based” otherwise. This new default will yield slightly more isolates for selection (which is a good thing).</li>
<li>Since fungal isolates can also be selected, the functions <code>key_antibiotics()</code> and <code>key_antibiotics_equal()</code> are now deprecated in favour of the <code><a href="../reference/key_antimicrobials.html">key_antimicrobials()</a></code> and <code><a href="../reference/key_antimicrobials.html">antimicrobials_equal()</a></code> functions. Also, the new <code><a href="../reference/key_antimicrobials.html">all_antimicrobials()</a></code> function works like the old <code>key_antibiotics()</code> function, but includes any column with antimicrobial test results. Using <code><a href="../reference/key_antimicrobials.html">key_antimicrobials()</a></code> still only selects six preferred antibiotics for Gram-negatives, six for Gram-positives, and six universal antibiotics. It has a new <code>antifungal</code> argument to set antifungal agents (antimycotics).</li>
<li>Using <code>type == "points"</code> in the <code><a href="../reference/first_isolate.html">first_isolate()</a></code> function for phenotype-based selection will now consider all antimicrobial drugs in the data set, using the new <code><a href="../reference/key_antimicrobials.html">all_antimicrobials()</a></code>
</li>
@ -375,7 +384,8 @@
<h4 id="changed-1-7-1">Changed<a class="anchor" aria-label="anchor" href="#changed-1-7-1"></a></h4>
<ul><li>
<code><a href="../reference/bug_drug_combinations.html">bug_drug_combinations()</a></code> now supports grouping using the <code>dplyr</code> package</li>
<li>Custom MDRO guidelines (<code><a href="../reference/mdro.html">mdro()</a></code>, <code><a href="../reference/mdro.html">custom_mdro_guideline()</a></code>):<ul><li>Custom MDRO guidelines can now be combined with other custom MDRO guidelines using <code><a href="https://rdrr.io/r/base/c.html" class="external-link">c()</a></code>
<li>Custom MDRO guidelines (<code><a href="../reference/mdro.html">mdro()</a></code>, <code><a href="../reference/mdro.html">custom_mdro_guideline()</a></code>):
<ul><li>Custom MDRO guidelines can now be combined with other custom MDRO guidelines using <code><a href="https://rdrr.io/r/base/c.html" class="external-link">c()</a></code>
</li>
<li>Fix for applying the rules; in previous versions, rows were interpreted according to the last matched rule. Now, rows are interpreted according to the first matched rule</li>
</ul></li>
@ -383,7 +393,8 @@
<li>The <code>example_isolates</code> data set now contains some (fictitious) zero-year old patients</li>
<li>Fix for minor translation errors</li>
<li>Printing of microbial codes in a <code>data.frame</code> or <code>tibble</code> now gives a warning if the data contains old microbial codes (from a previous AMR package version)</li>
<li>Extended the <code><a href="../reference/like.html">like()</a></code> functions:<ul><li><p>Now checks if <code>pattern</code> is a <em>valid</em> regular expression</p></li>
<li>Extended the <code><a href="../reference/like.html">like()</a></code> functions:
<ul><li><p>Now checks if <code>pattern</code> is a <em>valid</em> regular expression</p></li>
<li>
<p>Added <code>%unlike%</code> and <code>%unlike_case%</code> (as negations of the existing <code>%like%</code> and <code>%like_case%</code>). This greatly improves readability:</p>
<div class="sourceCode" id="cb6"><pre class="downlit sourceCode r">
@ -491,11 +502,13 @@
</ul></div>
<div class="section level4">
<h4 id="changed-1-6-0">Changed<a class="anchor" aria-label="anchor" href="#changed-1-6-0"></a></h4>
<ul><li>Updated the bacterial taxonomy to 3 March 2021 (using <a href="https://lpsn.dsmz.de" class="external-link">LPSN</a>)<ul><li>Added 3,372 new species and 1,523 existing species became synomyms</li>
<ul><li>Updated the bacterial taxonomy to 3 March 2021 (using <a href="https://lpsn.dsmz.de" class="external-link">LPSN</a>)
<ul><li>Added 3,372 new species and 1,523 existing species became synomyms</li>
<li>The URL of a bacterial species (<code><a href="../reference/mo_property.html">mo_url()</a></code>) will now lead to <a href="https://lpsn.dsmz.de" class="external-link uri">https://lpsn.dsmz.de</a>
</li>
</ul></li>
<li>Big update for plotting classes <code>rsi</code>, <code>&lt;mic&gt;</code>, and <code>&lt;disk&gt;</code>:<ul><li>Plotting of MIC and disk diffusion values now support interpretation colouring if you supply the microorganism and antimicrobial agent</li>
<li>Big update for plotting classes <code>rsi</code>, <code>&lt;mic&gt;</code>, and <code>&lt;disk&gt;</code>:
<ul><li>Plotting of MIC and disk diffusion values now support interpretation colouring if you supply the microorganism and antimicrobial agent</li>
<li>All colours were updated to colour-blind friendly versions for values R, S and I for all plot methods (also applies to tibble printing)</li>
<li>Interpretation of MIC and disk diffusion values to R/SI will now be translated if the system language is German, Dutch or Spanish (see <code>translate</code>)</li>
<li>Plotting is now possible with base R using <code><a href="../reference/plot.html">plot()</a></code> and with ggplot2 using <code><a href="https://ggplot2.tidyverse.org/reference/ggplot.html" class="external-link">ggplot()</a></code> on any vector of MIC and disk diffusion values</li>
@ -782,7 +795,8 @@
</ul></div>
<div class="section level4">
<h4 id="other-1-3-0">Other<a class="anchor" aria-label="anchor" href="#other-1-3-0"></a></h4>
<ul><li>Moved primary location of this project from GitLab to <a href="https://github.com/msberends/AMR" class="external-link">GitHub</a>, giving us native support for automated syntax checking without being dependent on external services such as AppVeyor and Travis CI.</li></ul></div>
<ul><li>Moved primary location of this project from GitLab to <a href="https://github.com/msberends/AMR" class="external-link">GitHub</a>, giving us native support for automated syntax checking without being dependent on external services such as AppVeyor and Travis CI.</li>
</ul></div>
</div>
<div class="section level2">
<h2 class="pkg-version" data-toc-text="1.2.0" id="amr-120">AMR 1.2.0<a class="anchor" aria-label="anchor" href="#amr-120"></a></h2><p class="text-muted">CRAN release: 2020-05-28</p>
@ -792,21 +806,26 @@
<p>Removed code dependency on all other R packages, making this package fully independent of the development process of others. This is a major code change, but will probably not be noticeable by most users.</p>
<p>Making this package independent of especially the tidyverse (e.g. packages <code>dplyr</code> and <code>tidyr</code>) tremendously increases sustainability on the long term, since tidyverse functions change quite often. Good for users, but hard for package maintainers. Most of our functions are replaced with versions that only rely on base R, which keeps this package fully functional for many years to come, without requiring a lot of maintenance to keep up with other packages anymore. Another upside it that this package can now be used with all versions of R since R-3.0.0 (April 2013). Our package is being used in settings where the resources are very limited. Fewer dependencies on newer software is helpful for such settings.</p>
<p>Negative effects of this change are:</p>
<ul><li>Function <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq()</a></code> that was borrowed from the <code>cleaner</code> package was removed. Use <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">cleaner::freq()</a></code>, or run <code><a href="https://github.com/msberends/cleaner" class="external-link">library("cleaner")</a></code> before you use <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq()</a></code>.</li>
<ul><li>Function <code><a href="https://msberends.github.io/cleaner/reference/freq.html" class="external-link">freq()</a></code> that was borrowed from the <code>cleaner</code> package was removed. Use <code><a href="https://msberends.github.io/cleaner/reference/freq.html" class="external-link">cleaner::freq()</a></code>, or run <code><a href="https://msberends.github.io/cleaner/" class="external-link">library("cleaner")</a></code> before you use <code><a href="https://msberends.github.io/cleaner/reference/freq.html" class="external-link">freq()</a></code>.</li>
<li><del>Printing values of class <code>mo</code> or <code>rsi</code> in a tibble will no longer be in colour and printing <code>rsi</code> in a tibble will show the class <code>&lt;ord&gt;</code>, not <code>&lt;rsi&gt;</code> anymore. This is purely a visual effect.</del></li>
<li><del>All functions from the <code>mo_*</code> family (like <code><a href="../reference/mo_property.html">mo_name()</a></code> and <code><a href="../reference/mo_property.html">mo_gramstain()</a></code>) are noticeably slower when running on hundreds of thousands of rows.</del></li>
<li>For developers: classes <code>mo</code> and <code>ab</code> now both also inherit class <code>character</code>, to support any data transformation. This change invalidates code that checks for class length == 1.</li>
</ul></li></ul></div>
</ul></li>
</ul></div>
<div class="section level4">
<h4 id="changed-1-2-0">Changed<a class="anchor" aria-label="anchor" href="#changed-1-2-0"></a></h4>
<ul><li>Taxonomy:<ul><li>Updated the taxonomy of microorganisms to May 2020, using the Catalogue of Life (CoL), the Global Biodiversity Information Facility (GBIF) and the List of Prokaryotic names with Standing in Nomenclature (LPSN, hosted by DSMZ since February 2020). <strong>Note:</strong> a taxonomic update may always impact determination of first isolates (using <code><a href="../reference/first_isolate.html">first_isolate()</a></code>), since some bacterial names might be renamed to other genera or other (sub)species. This is expected behaviour.</li>
<ul><li>Taxonomy:
<ul><li>Updated the taxonomy of microorganisms to May 2020, using the Catalogue of Life (CoL), the Global Biodiversity Information Facility (GBIF) and the List of Prokaryotic names with Standing in Nomenclature (LPSN, hosted by DSMZ since February 2020). <strong>Note:</strong> a taxonomic update may always impact determination of first isolates (using <code><a href="../reference/first_isolate.html">first_isolate()</a></code>), since some bacterial names might be renamed to other genera or other (sub)species. This is expected behaviour.</li>
<li>Removed the Catalogue of Life IDs (like 776351), since they now work with a species ID (hexadecimal string)</li>
</ul></li>
<li>EUCAST rules:<ul><li>The <code><a href="../reference/eucast_rules.html">eucast_rules()</a></code> function no longer applies “other” rules at default that are made available by this package (like setting ampicillin = R when ampicillin + enzyme inhibitor = R). The default input value for <code>rules</code> is now <code>c("breakpoints", "expert")</code> instead of <code>"all"</code>, but this can be changed by the user. To return to the old behaviour, set <code>options(AMR.eucast_rules = "all")</code>.</li>
<li>EUCAST rules:
<ul><li>The <code><a href="../reference/eucast_rules.html">eucast_rules()</a></code> function no longer applies “other” rules at default that are made available by this package (like setting ampicillin = R when ampicillin + enzyme inhibitor = R). The default input value for <code>rules</code> is now <code>c("breakpoints", "expert")</code> instead of <code>"all"</code>, but this can be changed by the user. To return to the old behaviour, set <code>options(AMR.eucast_rules = "all")</code>.</li>
<li>Fixed a bug where checking antimicrobial results in the original data were not regarded as valid R/SI values</li>
<li>All “other” rules now apply for all drug combinations in the <code>antibiotics</code> data set these two rules:<ol style="list-style-type: decimal"><li>A drug <strong>with</strong> enzyme inhibitor will be set to S if the drug <strong>without</strong> enzyme inhibitor is S</li>
<li>All “other” rules now apply for all drug combinations in the <code>antibiotics</code> data set these two rules:
<ol style="list-style-type: decimal"><li>A drug <strong>with</strong> enzyme inhibitor will be set to S if the drug <strong>without</strong> enzyme inhibitor is S</li>
<li>A drug <strong>without</strong> enzyme inhibitor will be set to R if the drug <strong>with</strong> enzyme inhibitor is R</li>
</ol>This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/avibactam, trimethoprim/sulfamethoxazole, etc.</li>
</ol>
This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/avibactam, trimethoprim/sulfamethoxazole, etc.</li>
<li>Added official drug names to verbose output of <code><a href="../reference/eucast_rules.html">eucast_rules()</a></code>
</li>
</ul></li>
@ -834,7 +853,8 @@
</ul></div>
<div class="section level4">
<h4 id="changed-1-1-0">Changed<a class="anchor" aria-label="anchor" href="#changed-1-1-0"></a></h4>
<ul><li>Improvements for the algorithm used by <code><a href="../reference/as.mo.html">as.mo()</a></code> (and consequently all <code>mo_*</code> functions, that use <code><a href="../reference/as.mo.html">as.mo()</a></code> internally):<ul><li>Support for codes ending with <code>SPE</code> for species, like <code>"ESCSPE"</code> for <em>Escherichia coli</em>
<ul><li>Improvements for the algorithm used by <code><a href="../reference/as.mo.html">as.mo()</a></code> (and consequently all <code>mo_*</code> functions, that use <code><a href="../reference/as.mo.html">as.mo()</a></code> internally):
<ul><li>Support for codes ending with <code>SPE</code> for species, like <code>"ESCSPE"</code> for <em>Escherichia coli</em>
</li>
<li>Support for any encoding, which means that any language-specific character with accents can be used for input</li>
<li>Support for more arbitrary IDs used in laboratory information systems</li>
@ -880,7 +900,8 @@
<h4 id="new-1-0-0">New<a class="anchor" aria-label="anchor" href="#new-1-0-0"></a></h4>
<ul><li>Support for the newest <a href="https://www.eucast.org/clinical_breakpoints/" class="external-link">EUCAST Clinical Breakpoint Tables v.10.0</a>, valid from 1 January 2020. This affects translation of MIC and disk zones using <code><a href="../reference/as.rsi.html">as.rsi()</a></code> and inferred resistance and susceptibility using <code><a href="../reference/eucast_rules.html">eucast_rules()</a></code>.</li>
<li>The repository of this package now contains a clean version of the EUCAST and CLSI guidelines from 2011-2020 to translate MIC and disk diffusion values to R/SI: <a href="https://github.com/msberends/AMR/blob/main/data-raw/rsi_translation.txt" class="external-link uri">https://github.com/msberends/AMR/blob/main/data-raw/rsi_translation.txt</a>. This <strong>allows for machine reading these guidelines</strong>, which is almost impossible with the Excel and PDF files distributed by EUCAST and CLSI. This file used to process the EUCAST Clinical Breakpoints Excel file <a href="https://github.com/msberends/AMR/blob/main/data-raw/read_EUCAST.R" class="external-link">can be found here</a>.</li>
<li>Support for LOINC and SNOMED codes<ul><li>
<li>Support for LOINC and SNOMED codes
<ul><li>
<p>Support for LOINC codes in the <code>antibiotics</code> data set. Use <code><a href="../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>
<div class="sourceCode" id="cb19"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span></span>
@ -909,7 +930,8 @@
<ul><li>The <code><a href="../reference/as.mo.html">as.mo()</a></code> function previously wrote to the package folder to improve calculation speed for previously calculated results. This is no longer the case, to comply with CRAN policies. Consequently, the function <code>clear_mo_history()</code> was removed.</li>
<li>Bugfix for some WHONET microorganism codes that were not interpreted correctly when using <code><a href="../reference/as.rsi.html">as.rsi()</a></code>
</li>
<li>Improvements for the algorithm used by <code><a href="../reference/as.mo.html">as.mo()</a></code> (and consequently all <code>mo_*</code> functions, that use <code><a href="../reference/as.mo.html">as.mo()</a></code> internally):<ul><li>Support for missing spaces, e.g. in <code>as.mo("Methicillin-resistant S.aureus")</code>
<li>Improvements for the algorithm used by <code><a href="../reference/as.mo.html">as.mo()</a></code> (and consequently all <code>mo_*</code> functions, that use <code><a href="../reference/as.mo.html">as.mo()</a></code> internally):
<ul><li>Support for missing spaces, e.g. in <code>as.mo("Methicillin-resistant S.aureus")</code>
</li>
<li>Better support for determination of <em>Salmonella</em> biovars</li>
<li>Speed improvements, especially for the <em>G. species</em> format (G for genus), like <em>E. coli</em> and <em>K pneumoniae</em>
@ -920,7 +942,8 @@
<li>Added a lifecycle state to every function, following the lifecycle circle of the <code>tidyverse</code>
</li>
<li>For in <code><a href="../reference/as.ab.html">as.ab()</a></code>: support for drugs starting with “co-” like co-amoxiclav, co-trimoxazole, co-trimazine and co-trimazole (thanks to Peter Dutey)</li>
<li>Changes to the <code>antibiotics</code> data set (thanks to Peter Dutey):<ul><li>Added more synonyms to colistin, imipenem and piperacillin/tazobactam</li>
<li>Changes to the <code>antibiotics</code> data set (thanks to Peter Dutey):
<ul><li>Added more synonyms to colistin, imipenem and piperacillin/tazobactam</li>
<li>Moved synonyms Rifinah and Rimactazid from rifampicin (<code>RIF</code>) to rifampicin/isoniazid (<code>RFI</code>). Please note that <a href="https://www.whocc.no/atc_ddd_index/?code=J04AM02&amp;showdescription=no" class="external-link">the combination rifampicin/isoniazid has no DDDs defined</a>, so e.g. <code>ab_ddd("Rimactazid")</code> will now return <code>NA</code>.</li>
<li>Moved synonyms Bactrimel and Cotrimazole from sulfamethoxazole (<code>SMX</code>) to trimethoprim/sulfamethoxazole (<code>SXT</code>)</li>
</ul></li>
@ -936,7 +959,8 @@
<h2 class="pkg-version" data-toc-text="0.9.0" id="amr-090">AMR 0.9.0<a class="anchor" aria-label="anchor" href="#amr-090"></a></h2><p class="text-muted">CRAN release: 2019-11-29</p>
<div class="section level4">
<h4 id="breaking-0-9-0">Breaking<a class="anchor" aria-label="anchor" href="#breaking-0-9-0"></a></h4>
<ul><li>Adopted Adeolu <em>et al.</em> (2016), <a href="https:/pubmed.ncbi.nlm.nih.gov/27620848/">PMID 27620848</a> for the <code>microorganisms</code> data set, which means that the new order Enterobacterales now consists of a part of the existing family Enterobacteriaceae, but that this family has been split into other families as well (like <em>Morganellaceae</em> and <em>Yersiniaceae</em>). Although published in 2016, this information is not yet in the Catalogue of Life version of 2019. All MDRO determinations with <code><a href="../reference/mdro.html">mdro()</a></code> will now use the Enterobacterales order for all guidelines before 2016 that were dependent on the Enterobacteriaceae family.<ul><li>
<ul><li>Adopted Adeolu <em>et al.</em> (2016), <a href="https:/pubmed.ncbi.nlm.nih.gov/27620848/">PMID 27620848</a> for the <code>microorganisms</code> data set, which means that the new order Enterobacterales now consists of a part of the existing family Enterobacteriaceae, but that this family has been split into other families as well (like <em>Morganellaceae</em> and <em>Yersiniaceae</em>). Although published in 2016, this information is not yet in the Catalogue of Life version of 2019. All MDRO determinations with <code><a href="../reference/mdro.html">mdro()</a></code> will now use the Enterobacterales order for all guidelines before 2016 that were dependent on the Enterobacteriaceae family.
<ul><li>
<p>If you were dependent on the old Enterobacteriaceae family e.g. by using in your code:</p>
<div class="sourceCode" id="cb21"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span></span>
@ -945,7 +969,9 @@
<div class="sourceCode" id="cb22"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span></span>
<span><span class="kw">if</span> <span class="op">(</span><span class="fu"><a href="../reference/mo_property.html">mo_order</a></span><span class="op">(</span><span class="va">somebugs</span><span class="op">)</span> <span class="op">==</span> <span class="st">"Enterobacterales"</span><span class="op">)</span> <span class="va">...</span></span></code></pre></div>
</li></ul></li></ul></div>
</li>
</ul></li>
</ul></div>
<div class="section level4">
<h4 id="new-0-9-0">New<a class="anchor" aria-label="anchor" href="#new-0-9-0"></a></h4>
<ul><li>
@ -968,7 +994,8 @@
</ul></div>
<div class="section level4">
<h4 id="changes-0-9-0">Changes<a class="anchor" aria-label="anchor" href="#changes-0-9-0"></a></h4>
<ul><li>Improvements to algorithm in <code><a href="../reference/as.mo.html">as.mo()</a></code>:<ul><li><p>Now allows “ou” where “au” should have been used and vice versa</p></li>
<ul><li>Improvements to algorithm in <code><a href="../reference/as.mo.html">as.mo()</a></code>:
<ul><li><p>Now allows “ou” where “au” should have been used and vice versa</p></li>
<li><p>More intelligent way of coping with some consonants like “l” and “r”</p></li>
<li>
<p>Added a score (a certainty percentage) to <code><a href="../reference/as.mo.html">mo_uncertainties()</a></code>, that is calculated using the <a href="https://en.wikipedia.org/wiki/Levenshtein_distance" class="external-link">Levenshtein distance</a>:</p>
@ -990,7 +1017,8 @@
</li>
<li>Renamed all <code>portion_*</code> functions to <code>proportion_*</code>. All <code>portion_*</code> functions are still available as deprecated functions, and will return a warning when used.</li>
<li>When running <code><a href="../reference/as.rsi.html">as.rsi()</a></code> over a data set, it will now print the guideline that will be used if it is not specified by the user</li>
<li>Improvements for <code><a href="../reference/eucast_rules.html">eucast_rules()</a></code>:<ul><li>Fix where <em>Stenotrophomonas maltophilia</em> would always become ceftazidime R (following EUCAST v3.1)</li>
<li>Improvements for <code><a href="../reference/eucast_rules.html">eucast_rules()</a></code>:
<ul><li>Fix where <em>Stenotrophomonas maltophilia</em> would always become ceftazidime R (following EUCAST v3.1)</li>
<li>Fix where <em>Leuconostoc</em> and <em>Pediococcus</em> would not always become glycopeptides R</li>
<li>non-EUCAST rules in <code><a href="../reference/eucast_rules.html">eucast_rules()</a></code> are now applied first and not as last anymore. This is to improve the dependency on certain antibiotics for the official EUCAST rules. Please see <code><a href="../reference/eucast_rules.html">?eucast_rules</a></code>.</li>
</ul></li>
@ -1041,7 +1069,7 @@
<span><span class="co">#&gt; invalid microorganism code, NA generated</span></span></code></pre></div>
<p>This is important, because a value like <code>"testvalue"</code> could never be understood by e.g. <code><a href="../reference/mo_property.html">mo_name()</a></code>, although the class would suggest a valid microbial code.</p>
</li>
<li><p>Function <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq()</a></code> has moved to a new package, <a href="https://github.com/msberends/clean" class="external-link"><code>clean</code></a> (<a href="https://cran.r-project.org/package=clean" class="external-link">CRAN link</a>), since creating frequency tables actually does not fit the scope of this package. The <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq()</a></code> function still works, since it is re-exported from the <code>clean</code> package (which will be installed automatically upon updating this <code>AMR</code> package).</p></li>
<li><p>Function <code><a href="https://msberends.github.io/cleaner/reference/freq.html" class="external-link">freq()</a></code> has moved to a new package, <a href="https://github.com/msberends/clean" class="external-link"><code>clean</code></a> (<a href="https://cran.r-project.org/package=clean" class="external-link">CRAN link</a>), since creating frequency tables actually does not fit the scope of this package. The <code><a href="https://msberends.github.io/cleaner/reference/freq.html" class="external-link">freq()</a></code> function still works, since it is re-exported from the <code>clean</code> package (which will be installed automatically upon updating this <code>AMR</code> package).</p></li>
<li><p>Renamed data set <code>septic_patients</code> to <code>example_isolates</code></p></li>
</ul></div>
<div class="section level4">
@ -1110,7 +1138,8 @@
</ul></div>
<div class="section level4">
<h4 id="changed-0-8-0">Changed<a class="anchor" aria-label="anchor" href="#changed-0-8-0"></a></h4>
<ul><li>Many algorithm improvements for <code><a href="../reference/as.mo.html">as.mo()</a></code> (of which some led to additions to the <code>microorganisms</code> data set). Many thanks to all contributors that helped improving the algorithms.<ul><li>Self-learning algorithm - the function now gains experience from previously determined microorganism IDs and learns from it (yielding 80-95% speed improvement for any guess after the first try)</li>
<ul><li>Many algorithm improvements for <code><a href="../reference/as.mo.html">as.mo()</a></code> (of which some led to additions to the <code>microorganisms</code> data set). Many thanks to all contributors that helped improving the algorithms.
<ul><li>Self-learning algorithm - the function now gains experience from previously determined microorganism IDs and learns from it (yielding 80-95% speed improvement for any guess after the first try)</li>
<li>Big improvement for misspelled input</li>
<li>These new trivial names known to the field are now understood: meningococcus, gonococcus, pneumococcus</li>
<li>Updated to the latest taxonomic data (updated to August 2019, from the International Journal of Systematic and Evolutionary Microbiology</li>
@ -1123,7 +1152,8 @@
</ul></li>
<li>More intelligent guessing for <code><a href="../reference/as.ab.html">as.ab()</a></code>, including bidirectional language support</li>
<li>Added support for the German national guideline (3MRGN/4MRGN) in the <code><a href="../reference/mdro.html">mdro()</a></code> function, to determine multi-drug resistant organisms</li>
<li>Function <code><a href="../reference/eucast_rules.html">eucast_rules()</a></code>:<ul><li>Fixed a bug for <em>Yersinia pseudotuberculosis</em>
<li>Function <code><a href="../reference/eucast_rules.html">eucast_rules()</a></code>:
<ul><li>Fixed a bug for <em>Yersinia pseudotuberculosis</em>
</li>
<li>Added more informative errors and warnings</li>
<li>Printed info now distinguishes between added and changes values</li>
@ -1228,7 +1258,8 @@
</ul></div>
<div class="section level5">
<h5 id="other-0-7-1">Other<a class="anchor" aria-label="anchor" href="#other-0-7-1"></a></h5>
<ul><li>Fixed a note thrown by CRAN tests</li></ul></div>
<ul><li>Fixed a note thrown by CRAN tests</li>
</ul></div>
</div>
<div class="section level2">
<h2 class="pkg-version" data-toc-text="0.7.0" id="amr-070">AMR 0.7.0<a class="anchor" aria-label="anchor" href="#amr-070"></a></h2><p class="text-muted">CRAN release: 2019-06-03</p>
@ -1243,7 +1274,9 @@
<h5 id="changed-0-7-0">Changed<a class="anchor" aria-label="anchor" href="#changed-0-7-0"></a></h5>
<ul><li>Fixed a critical bug in <code><a href="../reference/first_isolate.html">first_isolate()</a></code> where missing species would lead to incorrect FALSEs. This bug was not present in AMR v0.5.0, but was in v0.6.0 and v0.6.1.</li>
<li>Fixed a bug in <code><a href="../reference/eucast_rules.html">eucast_rules()</a></code> where antibiotics from WHONET software would not be recognised</li>
<li>Completely reworked the <code>antibiotics</code> data set:<ul><li>All entries now have 3 different identifiers:<ul><li>Column <code>ab</code> contains a human readable EARS-Net code, used by ECDC and WHO/WHONET - this is the primary identifier used in this package</li>
<li>Completely reworked the <code>antibiotics</code> data set:
<ul><li>All entries now have 3 different identifiers:
<ul><li>Column <code>ab</code> contains a human readable EARS-Net code, used by ECDC and WHO/WHONET - this is the primary identifier used in this package</li>
<li>Column <code>atc</code> contains the ATC code, used by WHO/WHOCC</li>
<li>Column <code>cid</code> contains the CID code (Compound ID), used by PubChem</li>
</ul></li>
@ -1254,7 +1287,8 @@
<li>All output will be translated by using an included translation file which <a href="https://github.com/msberends/AMR/blob/main/data-raw/translations.tsv" class="external-link">can be viewed here</a>
</li>
</ul></li>
<li>Improvements to plotting AMR results with <code><a href="../reference/ggplot_rsi.html">ggplot_rsi()</a></code>:<ul><li>New argument <code>colours</code> to set the bar colours</li>
<li>Improvements to plotting AMR results with <code><a href="../reference/ggplot_rsi.html">ggplot_rsi()</a></code>:
<ul><li>New argument <code>colours</code> to set the bar colours</li>
<li>New arguments <code>title</code>, <code>subtitle</code>, <code>caption</code>, <code>x.title</code> and <code>y.title</code> to set titles and axis descriptions</li>
</ul></li>
<li>Improved intelligence of looking up antibiotic columns in a data set using <code><a href="../reference/guess_ab_col.html">guess_ab_col()</a></code>
@ -1264,7 +1298,8 @@
<li>The <code><a href="../reference/age.html">age()</a></code> function gained a new argument <code>exact</code> to determine ages with decimals</li>
<li>Removed deprecated functions <code>guess_mo()</code>, <code>guess_atc()</code>, <code>EUCAST_rules()</code>, <code>interpretive_reading()</code>, <code><a href="../reference/as.rsi.html">rsi()</a></code>
</li>
<li>Frequency tables (<code><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq()</a></code>):<ul><li><p>speed improvement for microbial IDs</p></li>
<li>Frequency tables (<code><a href="https://msberends.github.io/cleaner/reference/freq.html" class="external-link">freq()</a></code>):
<ul><li><p>speed improvement for microbial IDs</p></li>
<li><p>fixed factor level names for R Markdown</p></li>
<li><p>when all values are unique it now shows a message instead of a warning</p></li>
<li>
@ -1272,12 +1307,12 @@
<div class="sourceCode" id="cb33"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span></span>
<span><span class="va">septic_patients</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span> </span>
<span> <span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq</a></span><span class="op">(</span><span class="va">age</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span> </span>
<span> <span class="fu"><a href="https://msberends.github.io/cleaner/reference/freq.html" class="external-link">freq</a></span><span class="op">(</span><span class="va">age</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span> </span>
<span> <span class="fu"><a href="https://rdrr.io/r/graphics/boxplot.html" class="external-link">boxplot</a></span><span class="op">(</span><span class="op">)</span></span>
<span><span class="co"># grouped boxplots:</span></span>
<span><span class="va">septic_patients</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span> </span>
<span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/group_by.html" class="external-link">group_by</a></span><span class="op">(</span><span class="va">ward</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span> </span>
<span> <span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq</a></span><span class="op">(</span><span class="va">age</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span>
<span> <span class="fu"><a href="https://msberends.github.io/cleaner/reference/freq.html" class="external-link">freq</a></span><span class="op">(</span><span class="va">age</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span>
<span> <span class="fu"><a href="https://rdrr.io/r/graphics/boxplot.html" class="external-link">boxplot</a></span><span class="op">(</span><span class="op">)</span></span></code></pre></div>
</li>
</ul></li>
@ -1286,7 +1321,7 @@
<li>Added ceftazidim intrinsic resistance to <em>Streptococci</em>
</li>
<li>Changed default settings for <code><a href="../reference/age_groups.html">age_groups()</a></code>, to let groups of fives and tens end with 100+ instead of 120+</li>
<li>Fix for <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq()</a></code> for when all values are <code>NA</code>
<li>Fix for <code><a href="https://msberends.github.io/cleaner/reference/freq.html" class="external-link">freq()</a></code> for when all values are <code>NA</code>
</li>
<li>Fix for <code><a href="../reference/first_isolate.html">first_isolate()</a></code> for when dates are missing</li>
<li>Improved speed of <code><a href="../reference/guess_ab_col.html">guess_ab_col()</a></code>
@ -1301,7 +1336,8 @@
<div class="section level5">
<h5 id="other-0-7-0">Other<a class="anchor" aria-label="anchor" href="#other-0-7-0"></a></h5>
<ul><li>Support for R 3.6.0 and later by providing support for <a href="https://developer.r-project.org/Blog/public/2019/02/14/staged-install/index.html" class="external-link">staged install</a>
</li></ul></div>
</li>
</ul></div>
</div>
<div class="section level2">
<h2 class="pkg-version" data-toc-text="0.6.1" id="amr-061">AMR 0.6.1<a class="anchor" aria-label="anchor" href="#amr-061"></a></h2><p class="text-muted">CRAN release: 2019-03-29</p>
@ -1413,7 +1449,8 @@
</ul></div>
<div class="section level5">
<h5 id="changed-0-6-0">Changed<a class="anchor" aria-label="anchor" href="#changed-0-6-0"></a></h5>
<ul><li>Function <code><a href="../reference/eucast_rules.html">eucast_rules()</a></code>:<ul><li>Updated EUCAST Clinical breakpoints to <a href="https://www.eucast.org/clinical_breakpoints/" class="external-link">version 9.0 of 1 January 2019</a>, the data set <code>septic_patients</code> now reflects these changes</li>
<ul><li>Function <code><a href="../reference/eucast_rules.html">eucast_rules()</a></code>:
<ul><li>Updated EUCAST Clinical breakpoints to <a href="https://www.eucast.org/clinical_breakpoints/" class="external-link">version 9.0 of 1 January 2019</a>, the data set <code>septic_patients</code> now reflects these changes</li>
<li>Fixed a critical bug where some rules that depend on previous applied rules would not be applied adequately</li>
<li>Emphasised in manual that penicillin is meant as benzylpenicillin (ATC <a href="https://www.whocc.no/atc_ddd_index/?code=J01CE01" class="external-link">J01CE01</a>)</li>
<li>New info is returned when running this function, stating exactly what has been changed or added. Use <code>eucast_rules(..., verbose = TRUE)</code> to get a data set with all changed per bug and drug combination.</li>
@ -1424,7 +1461,8 @@
<li>Functions <code>atc_ddd()</code> and <code>atc_groups()</code> have been renamed <code><a href="../reference/atc_online.html">atc_online_ddd()</a></code> and <code><a href="../reference/atc_online.html">atc_online_groups()</a></code>. The old functions are deprecated and will be removed in a future version.</li>
<li>Function <code>guess_mo()</code> is now deprecated in favour of <code><a href="../reference/as.mo.html">as.mo()</a></code> and will be removed in future versions</li>
<li>Function <code>guess_atc()</code> is now deprecated in favour of <code>as.atc()</code> and will be removed in future versions</li>
<li>Improvements for <code><a href="../reference/as.mo.html">as.mo()</a></code>:<ul><li>
<li>Improvements for <code><a href="../reference/as.mo.html">as.mo()</a></code>:
<ul><li>
<p>Now handles incorrect spelling, like <code>i</code> instead of <code>y</code> and <code>f</code> instead of <code>ph</code>:</p>
<div class="sourceCode" id="cb40"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span></span>
@ -1463,7 +1501,8 @@
<li><p>Support for formatted console text</p></li>
<li><p>Console will return the percentage of uncoercable input</p></li>
</ul></li>
<li>Function <code><a href="../reference/first_isolate.html">first_isolate()</a></code>:<ul><li>Fixed a bug where distances between dates would not be calculated right - in the <code>septic_patients</code> data set this yielded a difference of 0.15% more isolates</li>
<li>Function <code><a href="../reference/first_isolate.html">first_isolate()</a></code>:
<ul><li>Fixed a bug where distances between dates would not be calculated right - in the <code>septic_patients</code> data set this yielded a difference of 0.15% more isolates</li>
<li>Will now use a column named like “patid” for the patient ID (argument <code>col_patientid</code>), when this argument was left blank</li>
<li>Will now use a column named like “key(…)ab” or “key(…)antibiotics” for the key antibiotics (argument <code>col_keyantibiotics()</code>), when this argument was left blank</li>
<li>Removed argument <code>output_logical</code>, the function will now always return a logical value</li>
@ -1480,11 +1519,13 @@
</li>
<li>Small text updates to summaries of class <code>rsi</code> and <code>mic</code>
</li>
<li>Function <code><a href="../reference/as.rsi.html">as.rsi()</a></code>:<ul><li>Now gives a warning when inputting MIC values</li>
<li>Function <code><a href="../reference/as.rsi.html">as.rsi()</a></code>:
<ul><li>Now gives a warning when inputting MIC values</li>
<li>Now accepts high and low resistance: <code>"HIGH S"</code> will return <code>S</code>
</li>
</ul></li>
<li>Frequency tables (<code><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq()</a></code> function):<ul><li>
<li>Frequency tables (<code><a href="https://msberends.github.io/cleaner/reference/freq.html" class="external-link">freq()</a></code> function):
<ul><li>
<p>Support for tidyverse quasiquotation! Now you can create frequency tables of function outcomes:</p>
<div class="sourceCode" id="cb42"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span></span>
@ -1492,15 +1533,15 @@
<span><span class="co"># OLD WAY</span></span>
<span><span class="va">septic_patients</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span>
<span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate.html" class="external-link">mutate</a></span><span class="op">(</span>genus <span class="op">=</span> <span class="fu"><a href="../reference/mo_property.html">mo_genus</a></span><span class="op">(</span><span class="va">mo</span><span class="op">)</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span>
<span> <span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq</a></span><span class="op">(</span><span class="va">genus</span><span class="op">)</span></span>
<span> <span class="fu"><a href="https://msberends.github.io/cleaner/reference/freq.html" class="external-link">freq</a></span><span class="op">(</span><span class="va">genus</span><span class="op">)</span></span>
<span><span class="co"># NEW WAY</span></span>
<span><span class="va">septic_patients</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span> </span>
<span> <span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq</a></span><span class="op">(</span><span class="fu"><a href="../reference/mo_property.html">mo_genus</a></span><span class="op">(</span><span class="va">mo</span><span class="op">)</span><span class="op">)</span></span>
<span> <span class="fu"><a href="https://msberends.github.io/cleaner/reference/freq.html" class="external-link">freq</a></span><span class="op">(</span><span class="fu"><a href="../reference/mo_property.html">mo_genus</a></span><span class="op">(</span><span class="va">mo</span><span class="op">)</span><span class="op">)</span></span>
<span></span>
<span><span class="co"># Even supports grouping variables:</span></span>
<span><span class="va">septic_patients</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span>
<span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/group_by.html" class="external-link">group_by</a></span><span class="op">(</span><span class="va">gender</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span> </span>
<span> <span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq</a></span><span class="op">(</span><span class="fu"><a href="../reference/mo_property.html">mo_genus</a></span><span class="op">(</span><span class="va">mo</span><span class="op">)</span><span class="op">)</span></span></code></pre></div>
<span> <span class="fu"><a href="https://msberends.github.io/cleaner/reference/freq.html" class="external-link">freq</a></span><span class="op">(</span><span class="fu"><a href="../reference/mo_property.html">mo_genus</a></span><span class="op">(</span><span class="va">mo</span><span class="op">)</span><span class="op">)</span></span></code></pre></div>
</li>
<li><p>Header info is now available as a list, with the <code>header</code> function</p></li>
<li><p>The argument <code>header</code> is now set to <code>TRUE</code> at default, even for markdown</p></li>
@ -1521,7 +1562,8 @@
</ul></div>
<div class="section level5">
<h5 id="other-0-6-0">Other<a class="anchor" aria-label="anchor" href="#other-0-6-0"></a></h5>
<ul><li>Updated licence text to emphasise GPL 2.0 and that this is an R package.</li></ul></div>
<ul><li>Updated licence text to emphasise GPL 2.0 and that this is an R package.</li>
</ul></div>
</div>
<div class="section level2">
<h2 class="pkg-version" data-toc-text="0.5.0" id="amr-050">AMR 0.5.0<a class="anchor" aria-label="anchor" href="#amr-050"></a></h2><p class="text-muted">CRAN release: 2018-11-30</p>
@ -1568,21 +1610,21 @@
<li><p>Using <code>portion_*</code> functions now throws a warning when total available isolate is below argument <code>minimum</code></p></li>
<li><p>Functions <code>as.mo</code>, <code>as.rsi</code>, <code>as.mic</code>, <code>as.atc</code> and <code>freq</code> will not set package name as attribute anymore</p></li>
<li>
<p>Frequency tables - <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq()</a></code>:</p>
<p>Frequency tables - <code><a href="https://msberends.github.io/cleaner/reference/freq.html" class="external-link">freq()</a></code>:</p>
<ul><li>
<p>Support for grouping variables, test with:</p>
<div class="sourceCode" id="cb44"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span></span>
<span><span class="va">septic_patients</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span> </span>
<span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/group_by.html" class="external-link">group_by</a></span><span class="op">(</span><span class="va">ward</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span> </span>
<span> <span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq</a></span><span class="op">(</span><span class="va">gender</span><span class="op">)</span></span></code></pre></div>
<span> <span class="fu"><a href="https://msberends.github.io/cleaner/reference/freq.html" class="external-link">freq</a></span><span class="op">(</span><span class="va">gender</span><span class="op">)</span></span></code></pre></div>
</li>
<li>
<p>Support for (un)selecting columns:</p>
<div class="sourceCode" id="cb45"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span></span>
<span><span class="va">septic_patients</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span> </span>
<span> <span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq</a></span><span class="op">(</span><span class="va">ward</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span> </span>
<span> <span class="fu"><a href="https://msberends.github.io/cleaner/reference/freq.html" class="external-link">freq</a></span><span class="op">(</span><span class="va">ward</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span> </span>
<span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/select.html" class="external-link">select</a></span><span class="op">(</span><span class="op">-</span><span class="va">count</span>, <span class="op">-</span><span class="va">cum_count</span><span class="op">)</span> <span class="co"># only get item, percent, cum_percent</span></span></code></pre></div>
</li>
<li><p>Check for <code><a href="https://hms.tidyverse.org/reference/Deprecated.html" class="external-link">hms::is.hms</a></code></p></li>
@ -1599,7 +1641,7 @@
<li><p>Removed diacritics from all authors (columns <code>microorganisms$ref</code> and <code>microorganisms.old$ref</code>) to comply with CRAN policy to only allow ASCII characters</p></li>
<li><p>Fix for <code>mo_property</code> not working properly</p></li>
<li><p>Fix for <code>eucast_rules</code> where some Streptococci would become ceftazidime R in EUCAST rule 4.5</p></li>
<li><p>Support for named vectors of class <code>mo</code>, useful for <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">top_freq()</a></code></p></li>
<li><p>Support for named vectors of class <code>mo</code>, useful for <code><a href="https://msberends.github.io/cleaner/reference/freq.html" class="external-link">top_freq()</a></code></p></li>
<li><p><code>ggplot_rsi</code> and <code>scale_y_percent</code> have <code>breaks</code> argument</p></li>
<li>
<p>AI improvements for <code>as.mo</code>:</p>
@ -1665,7 +1707,8 @@
</li>
<li>
<p>Functions <code>count_R</code>, <code>count_IR</code>, <code>count_I</code>, <code>count_SI</code> and <code>count_S</code> to selectively count resistant or susceptible isolates</p>
<ul><li>Extra function <code>count_df</code> (which works like <code>portion_df</code>) to get all counts of S, I and R of a data set with antibiotic columns, with support for grouped variables</li></ul></li>
<ul><li>Extra function <code>count_df</code> (which works like <code>portion_df</code>) to get all counts of S, I and R of a data set with antibiotic columns, with support for grouped variables</li>
</ul></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 %&gt;% mutate_if(is.rsi.eligible, as.rsi)</code></p></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>
@ -1747,39 +1790,46 @@
<div class="sourceCode" id="cb52"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span></span>
<span><span class="va">my_matrix</span> <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/with.html" class="external-link">with</a></span><span class="op">(</span><span class="va">septic_patients</span>, <span class="fu"><a href="https://rdrr.io/r/base/matrix.html" class="external-link">matrix</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="va">age</span>, <span class="va">gender</span><span class="op">)</span>, ncol <span class="op">=</span> <span class="fl">2</span><span class="op">)</span><span class="op">)</span></span>
<span><span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq</a></span><span class="op">(</span><span class="va">my_matrix</span><span class="op">)</span></span></code></pre></div>
<span><span class="fu"><a href="https://msberends.github.io/cleaner/reference/freq.html" class="external-link">freq</a></span><span class="op">(</span><span class="va">my_matrix</span><span class="op">)</span></span></code></pre></div>
<p>For lists, subsetting is possible:</p>
<div class="sourceCode" id="cb53"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span></span>
<span><span class="va">my_list</span> <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>age <span class="op">=</span> <span class="va">septic_patients</span><span class="op">$</span><span class="va">age</span>, gender <span class="op">=</span> <span class="va">septic_patients</span><span class="op">$</span><span class="va">gender</span><span class="op">)</span></span>
<span><span class="va">my_list</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span> <span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq</a></span><span class="op">(</span><span class="va">age</span><span class="op">)</span></span>
<span><span class="va">my_list</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span> <span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq</a></span><span class="op">(</span><span class="va">gender</span><span class="op">)</span></span></code></pre></div>
<span><span class="va">my_list</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span> <span class="fu"><a href="https://msberends.github.io/cleaner/reference/freq.html" class="external-link">freq</a></span><span class="op">(</span><span class="va">age</span><span class="op">)</span></span>
<span><span class="va">my_list</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span> <span class="fu"><a href="https://msberends.github.io/cleaner/reference/freq.html" class="external-link">freq</a></span><span class="op">(</span><span class="va">gender</span><span class="op">)</span></span></code></pre></div>
</li>
</ul></div>
<div class="section level5">
<h5 id="other-0-4-0">Other<a class="anchor" aria-label="anchor" href="#other-0-4-0"></a></h5>
<ul><li>More unit tests to ensure better integrity of functions</li></ul></div>
<ul><li>More unit tests to ensure better integrity of functions</li>
</ul></div>
</div>
<div class="section level2">
<h2 class="pkg-version" data-toc-text="0.3.0" id="amr-030">AMR 0.3.0<a class="anchor" aria-label="anchor" href="#amr-030"></a></h2><p class="text-muted">CRAN release: 2018-08-14</p>
<div class="section level5">
<h5 id="new-0-3-0">New<a class="anchor" aria-label="anchor" href="#new-0-3-0"></a></h5>
<ul><li>
<strong>BREAKING</strong>: <code>rsi_df</code> was removed in favour of new functions <code>portion_R</code>, <code>portion_IR</code>, <code>portion_I</code>, <code>portion_SI</code> and <code>portion_S</code> to selectively calculate resistance or susceptibility. These functions are 20 to 30 times faster than the old <code>rsi</code> function. The old function still works, but is deprecated.<ul><li>New function <code>portion_df</code> to get all portions of S, I and R of a data set with antibiotic columns, with support for grouped variables</li></ul></li>
<strong>BREAKING</strong>: <code>rsi_df</code> was removed in favour of new functions <code>portion_R</code>, <code>portion_IR</code>, <code>portion_I</code>, <code>portion_SI</code> and <code>portion_S</code> to selectively calculate resistance or susceptibility. These functions are 20 to 30 times faster than the old <code>rsi</code> function. The old function still works, but is deprecated.
<ul><li>New function <code>portion_df</code> to get all portions of S, I and R of a data set with antibiotic columns, with support for grouped variables</li>
</ul></li>
<li>
<strong>BREAKING</strong>: the methodology for determining first weighted isolates was changed. The antibiotics that are compared between isolates (call <em>key antibiotics</em>) to include more first isolates (afterwards called first <em>weighted</em> isolates) are now as follows:<ul><li>Universal: amoxicillin, amoxicillin/clavlanic acid, cefuroxime, piperacillin/tazobactam, ciprofloxacin, trimethoprim/sulfamethoxazole</li>
<strong>BREAKING</strong>: the methodology for determining first weighted isolates was changed. The antibiotics that are compared between isolates (call <em>key antibiotics</em>) to include more first isolates (afterwards called first <em>weighted</em> isolates) are now as follows:
<ul><li>Universal: amoxicillin, amoxicillin/clavlanic acid, cefuroxime, piperacillin/tazobactam, ciprofloxacin, trimethoprim/sulfamethoxazole</li>
<li>Gram-positive: vancomycin, teicoplanin, tetracycline, erythromycin, oxacillin, rifampicin</li>
<li>Gram-negative: gentamicin, tobramycin, colistin, cefotaxime, ceftazidime, meropenem</li>
</ul></li>
<li>Support for <code>ggplot2</code><ul><li>New functions <code>geom_rsi</code>, <code>facet_rsi</code>, <code>scale_y_percent</code>, <code>scale_rsi_colours</code> and <code>theme_rsi</code>
<li>Support for <code>ggplot2</code>
<ul><li>New functions <code>geom_rsi</code>, <code>facet_rsi</code>, <code>scale_y_percent</code>, <code>scale_rsi_colours</code> and <code>theme_rsi</code>
</li>
<li>New wrapper function <code>ggplot_rsi</code> to apply all above functions on a data set:<ul><li>
<li>New wrapper function <code>ggplot_rsi</code> to apply all above functions on a data set:
<ul><li>
<code>septic_patients %&gt;% select(tobr, gent) %&gt;% ggplot_rsi</code> will show portions of S, I and R immediately in a pretty plot</li>
<li>Support for grouped variables, see <code><a href="../reference/ggplot_rsi.html">?ggplot_rsi</a></code>
</li>
</ul></li>
</ul></li>
<li>Determining bacterial ID:<ul><li>New functions <code>as.bactid</code> and <code>is.bactid</code> to transform/ look up microbial IDs.</li>
<li>Determining bacterial ID:
<ul><li>New functions <code>as.bactid</code> and <code>is.bactid</code> to transform/ look up microbial IDs.</li>
<li>The existing function <code>guess_bactid</code> is now an alias of <code>as.bactid</code>
</li>
<li>New Becker classification for <em>Staphylococcus</em> to categorise them into Coagulase Negative <em>Staphylococci</em> (CoNS) and Coagulase Positve <em>Staphylococci</em> (CoPS)</li>
@ -1789,12 +1839,15 @@
<li>Function <code>g.test</code> to perform the X<sup>2</sup> distributed <a href="https://en.wikipedia.org/wiki/G-test" class="external-link"><em>G</em>-test</a>, which use is the same as <code>chisq.test</code>
</li>
<li>
<del>Function <code>ratio</code> to transform a vector of values to a preset ratio</del><ul><li><del>For example: <code>ratio(c(10, 500, 10), ratio = "1:2:1")</code> would return <code>130, 260, 130</code></del></li></ul></li>
<del>Function <code>ratio</code> to transform a vector of values to a preset ratio</del>
<ul><li><del>For example: <code>ratio(c(10, 500, 10), ratio = "1:2:1")</code> would return <code>130, 260, 130</code></del></li>
</ul></li>
<li>Support for Addins menu in RStudio to quickly insert <code>%in%</code> or <code>%like%</code> (and give them keyboard shortcuts), or to view the datasets that come with this package</li>
<li>Function <code>p.symbol</code> to transform p values to their related symbols: <code>0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1</code>
</li>
<li>Functions <code>clipboard_import</code> and <code>clipboard_export</code> as helper functions to quickly copy and paste from/to software like Excel and SPSS. These functions use the <code>clipr</code> package, but are a little altered to also support headless Linux servers (so you can use it in RStudio Server)</li>
<li>New for frequency tables (function <code>freq</code>):<ul><li>A vignette to explain its usage</li>
<li>New for frequency tables (function <code>freq</code>):
<ul><li>A vignette to explain its usage</li>
<li>Support for <code>rsi</code> (antimicrobial resistance) to use as input</li>
<li>Support for <code>table</code> to use as input: <code>freq(table(x, y))</code>
</li>
@ -1827,7 +1880,8 @@
</li>
<li>Small improvements to the <code>microorganisms</code> dataset (especially for <em>Salmonella</em>) and the column <code>bactid</code> now has the new class <code>"bactid"</code>
</li>
<li>Combined MIC/RSI values will now be coerced by the <code>rsi</code> and <code>mic</code> functions:<ul><li>
<li>Combined MIC/RSI values will now be coerced by the <code>rsi</code> and <code>mic</code> functions:
<ul><li>
<code>as.rsi("&lt;=0.002; S")</code> will return <code>S</code>
</li>
<li>
@ -1840,12 +1894,15 @@
<li>Build-in host check for <code>atc_property</code> as it requires the host set by <code>url</code> to be responsive</li>
<li>Improved <code>first_isolate</code> algorithm to exclude isolates where bacteria ID or genus is unavailable</li>
<li>Fix for warning <em>hybrid evaluation forced for row_number</em> (<a href="https://github.com/tidyverse/dplyr/commit/924b62" class="external-link"><code>924b62</code></a>) from the <code>dplyr</code> package v0.7.5 and above</li>
<li>Support for empty values and for 1 or 2 columns as input for <code>guess_bactid</code> (now called <code>as.bactid</code>)<ul><li>So <code>yourdata %&gt;% select(genus, species) %&gt;% as.bactid()</code> now also works</li></ul></li>
<li>Support for empty values and for 1 or 2 columns as input for <code>guess_bactid</code> (now called <code>as.bactid</code>)
<ul><li>So <code>yourdata %&gt;% select(genus, species) %&gt;% as.bactid()</code> now also works</li>
</ul></li>
<li>Other small fixes</li>
</ul></div>
<div class="section level5">
<h5 id="other-0-3-0">Other<a class="anchor" aria-label="anchor" href="#other-0-3-0"></a></h5>
<ul><li>Added integration tests (check if everything works as expected) for all releases of R 3.1 and higher<ul><li>Linux and macOS: <a href="https://travis-ci.org/msberends/AMR" class="external-link uri">https://travis-ci.org/msberends/AMR</a>
<ul><li>Added integration tests (check if everything works as expected) for all releases of R 3.1 and higher
<ul><li>Linux and macOS: <a href="https://travis-ci.org/msberends/AMR" class="external-link uri">https://travis-ci.org/msberends/AMR</a>
</li>
<li>Windows: <a href="https://ci.appveyor.com/project/msberends/amr" class="external-link uri">https://ci.appveyor.com/project/msberends/amr</a>
</li>
@ -1863,7 +1920,8 @@
<li>Function <code>guess_bactid</code> to <strong>determine the ID</strong> of a microorganism based on genus/species or known abbreviations like MRSA</li>
<li>Function <code>guess_atc</code> to <strong>determine the ATC</strong> of an antibiotic based on name, trade name, or known abbreviations</li>
<li>Function <code>freq</code> to create <strong>frequency tables</strong>, with additional info in a header</li>
<li>Function <code>MDRO</code> to <strong>determine Multi Drug Resistant Organisms (MDRO)</strong> with support for country-specific guidelines.<ul><li>Exceptional resistances defined by EUCAST are also supported instead of countries alone</li>
<li>Function <code>MDRO</code> to <strong>determine Multi Drug Resistant Organisms (MDRO)</strong> with support for country-specific guidelines.
<ul><li>Exceptional resistances defined by EUCAST are also supported instead of countries alone</li>
<li>Functions <code>BRMO</code> and <code>MRGN</code> are wrappers for Dutch and German guidelines, respectively</li>
</ul></li>
<li>New algorithm to determine weighted isolates, can now be <code>"points"</code> or <code>"keyantibiotics"</code>, see <code><a href="../reference/first_isolate.html">?first_isolate</a></code>
@ -1907,7 +1965,8 @@
</ul></div>
<div class="section level2">
<h2 class="pkg-version" data-toc-text="0.1.0" id="amr-010">AMR 0.1.0<a class="anchor" aria-label="anchor" href="#amr-010"></a></h2><p class="text-muted">CRAN release: 2018-02-22</p>
<ul><li>First submission to CRAN.</li></ul></div>
<ul><li>First submission to CRAN.</li>
</ul></div>
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
</nav></aside></div>

View File

@ -1,4 +1,4 @@
pandoc: 2.14.2
pandoc: 2.19.2
pkgdown: 2.0.6
pkgdown_sha: ~
articles:
@ -11,7 +11,7 @@ articles:
datasets: datasets.html
resistance_predict: resistance_predict.html
welcome_to_AMR: welcome_to_AMR.html
last_built: 2022-10-22T20:06Z
last_built: 2022-10-29T12:20Z
urls:
reference: https://msberends.github.io/AMR/reference
article: https://msberends.github.io/AMR/articles

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@ -62,7 +62,7 @@ Principal component analysis for AMR
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -190,16 +190,16 @@
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="va">df</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> birth_date age age_exact age_at_y2k</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 1932-08-03 90 90.21918 67</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 1984-07-10 38 38.28493 15</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 1986-05-06 36 36.46301 13</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 1964-10-20 58 58.00548 35</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 1967-07-23 55 55.24932 32</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 1962-05-31 60 60.39452 37</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 1947-07-30 75 75.23014 52</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 1973-03-03 49 49.63836 26</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 1932-04-29 90 90.48219 67</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 1988-09-07 34 34.12329 11</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 1976-12-09 45 45.88767 23</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 1945-05-08 77 77.47671 54</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 1997-03-20 25 25.61096 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 1981-06-08 41 41.39178 18</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 1998-05-27 24 24.42466 1</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 1993-10-10 29 29.05205 6</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 1960-09-07 62 62.14247 39</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 1948-03-19 74 74.61370 51</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 1952-10-19 70 70.02740 47</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 1959-07-17 63 63.28493 40</span>
</code></pre></div>
</div>
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -165,6 +165,7 @@
<div class="section level2">
<h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2>
<p>Interpret disk values as RSI values with <code><a href="as.rsi.html">as.rsi()</a></code>. It supports guidelines from EUCAST and CLSI.</p>
<p>Disk diffusion growth zone sizes must be between 6 and 50 millimetres. Values higher than 50 but lower than 100 will be maximised to 50. All others input values outside the 6-50 range will return <code>NA</code>.</p>
<p><code>NA_disk_</code> is a missing value of the new <code>disk</code> class.</p>
</div>
<div class="section level2">

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -240,7 +240,8 @@
<span class="r-in"><span><span class="op">)</span></span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting MIC values of 'AMX' (amoxicillin) according to EUCAST</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> 2022...</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>in `as.rsi()`: assuming site 'Meningitis' for Streptococcus pneumoniae</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>in `as.rsi()`: breakpoints available for S. pneumoniae / amoxicillin -</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> assuming body site 'Meningitis'</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> WARNING.</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'rsi'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] R</span>
@ -252,10 +253,14 @@
<span class="r-in"><span><span class="op">)</span></span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting MIC values of 'AMX' (amoxicillin) according to EUCAST</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> 2022...</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>in `as.rsi()`: assuming site 'Meningitis' for Streptococcus pneumoniae</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>in `as.rsi()`: assuming site 'Meningitis' for Streptococcus pneumoniae</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>in `as.rsi()`: assuming site 'Meningitis' for Streptococcus pneumoniae</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>in `as.rsi()`: assuming site 'Meningitis' for Streptococcus pneumoniae</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>in `as.rsi()`: breakpoints available for S. pneumoniae / amoxicillin -</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> assuming body site 'Meningitis'</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>in `as.rsi()`: breakpoints available for S. pneumoniae / amoxicillin -</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> assuming body site 'Meningitis'</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>in `as.rsi()`: breakpoints available for S. pneumoniae / amoxicillin -</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> assuming body site 'Meningitis'</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>in `as.rsi()`: breakpoints available for S. pneumoniae / amoxicillin -</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> assuming body site 'Meningitis'</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> WARNING.</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'rsi'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] S R R R</span>

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -147,7 +147,7 @@
<span> mo <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> ab <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/deparse.html" class="external-link">deparse</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/substitute.html" class="external-link">substitute</a></span><span class="op">(</span><span class="va">x</span><span class="op">)</span><span class="op">)</span>,</span>
<span> guideline <span class="op">=</span> <span class="st">"EUCAST"</span>,</span>
<span> uti <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> uti <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> conserve_capped_values <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> add_intrinsic_resistance <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> reference_data <span class="op">=</span> <span class="fu">AMR</span><span class="fu">::</span><span class="va"><a href="rsi_translation.html">rsi_translation</a></span>,</span>
@ -160,7 +160,7 @@
<span> mo <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> ab <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/deparse.html" class="external-link">deparse</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/substitute.html" class="external-link">substitute</a></span><span class="op">(</span><span class="va">x</span><span class="op">)</span><span class="op">)</span>,</span>
<span> guideline <span class="op">=</span> <span class="st">"EUCAST"</span>,</span>
<span> uti <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> uti <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> add_intrinsic_resistance <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> reference_data <span class="op">=</span> <span class="fu">AMR</span><span class="fu">::</span><span class="va"><a href="rsi_translation.html">rsi_translation</a></span>,</span>
<span> <span class="va">...</span></span>
@ -476,31 +476,24 @@ A microorganism is categorised as <em>Susceptible, Increased exposure</em> when
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting disk diffusion zones of column 'GEN' (gentamicin) according</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> to EUCAST 2022...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting disk diffusion zones of column 'TOB' (tobramycin) according</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> to EUCAST 2022...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Assigning class 'rsi' to already clean column 'ERY' (erythromycin)...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> microorganism AMP CIP GEN TOB ERY</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 Escherichia coli S I S S R</span>
<span class="r-err co"><span class="r-pr">#&gt;</span> <span class="error">Error in if (nrow(records_same_mo) &gt; 1 &amp;&amp; length(unique(records_same_mo$site)) &gt; 1 &amp;&amp; uti[i] == FALSE &amp;&amp; all(c(TRUE, FALSE) %in% records_same_mo$uti, na.rm = TRUE) &amp;&amp; message_not_thrown_before("as.rsi", "siteUTI", records_same_mo$mo[1], records_same_mo$ab[1])) { warning_("in `as.rsi()`: breakpoints for UTI ", font_underline("and"), " non-UTI available for ", font_italic(suppressMessages(suppressWarnings(mo_shortname(records_same_mo$mo[1], language = NULL, keep_synonyms = FALSE)))), paste0(" / "), suppressMessages(suppressWarnings(ab_name(records_same_mo$ab[1], language = NULL, tolower = TRUE))), paste0(" - assuming non-UTI. Use argument `uti` to set which isolates are from urine. See ?as.rsi. '"), call = FALSE) get_record &lt;- get_record %pm&gt;% pm_filter(uti == FALSE) rise_warning &lt;- TRUE} else if (nrow(records_same_mo) &gt; 1 &amp;&amp; length(unique(records_same_mo$site)) &gt; 1 &amp;&amp; all(records_same_mo$uti == FALSE, na.rm = TRUE) &amp;&amp; message_not_thrown_before("as.rsi", "site", records_same_mo$mo[1], records_same_mo$ab[1])) { site &lt;- get_record[1L, "site", drop = FALSE] if (is.na(site)) { site &lt;- paste0("an unspecified body site") } else { site &lt;- paste0("body site '", get_record[1L, "site", drop = FALSE], "'") } warning_("in `as.rsi()`: breakpoints available for ", font_italic(suppressMessages(suppressWarnings(mo_shortname(records_same_mo$mo[1], language = NULL, keep_synonyms = FALSE)))), paste0(" / "), suppressMessages(suppressWarnings(ab_name(records_same_mo$ab[1], language = NULL, tolower = TRUE))), paste0(" - assuming ", site), call = FALSE) rise_warning &lt;- TRUE}:</span> missing value where TRUE/FALSE needed</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># return a 'logbook' about the results:</span></span></span>
<span class="r-in"><span><span class="fu">rsi_interpretation_history</span><span class="op">(</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 50 × 13</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 48 × 13</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> datetime index ab_input ab_consid…¹ mo_in…² mo_conside…³ guide…⁴</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dttm&gt;</span> <span style="color: #949494; font-style: italic;">&lt;int&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;ab&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;mo&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> 2022-10-22 <span style="color: #949494;">20:06:45</span> 1 ampicillin AMP Strep … B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> 2022-10-22 <span style="color: #949494;">20:06:46</span> 1 AMP AMP Escher… B_ESCHR_COLI EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> 2022-10-22 <span style="color: #949494;">20:06:46</span> 1 CIP CIP Escher… B_ESCHR_COLI EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> 2022-10-22 <span style="color: #949494;">20:06:46</span> 1 GEN GEN Escher… B_ESCHR_COLI EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 2022-10-22 <span style="color: #949494;">20:06:46</span> 1 TOB TOB Escher… B_ESCHR_COLI EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> 2022-10-22 <span style="color: #949494;">20:06:47</span> 1 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> 2022-10-22 <span style="color: #949494;">20:06:47</span> 1 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 2022-10-22 <span style="color: #949494;">20:06:47</span> 2 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 2022-10-22 <span style="color: #949494;">20:06:47</span> 3 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> 2022-10-22 <span style="color: #949494;">20:06:47</span> 4 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># … with 40 more rows, 6 more variables: ref_table &lt;chr&gt;, method &lt;chr&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> 2022-10-29 <span style="color: #949494;">12:20:46</span> 1 ampicillin AMP Strep … B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> 2022-10-29 <span style="color: #949494;">12:20:46</span> 1 AMP AMP Escher… B_ESCHR_COLI EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> 2022-10-29 <span style="color: #949494;">12:20:46</span> 1 CIP CIP Escher… B_ESCHR_COLI EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> 2022-10-29 <span style="color: #949494;">12:20:47</span> 1 GEN GEN Escher… B_ESCHR_COLI EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 2022-10-29 <span style="color: #949494;">12:20:47</span> 1 TOB TOB Escher… B_ESCHR_COLI EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> 2022-10-29 <span style="color: #949494;">12:20:48</span> 1 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> 2022-10-29 <span style="color: #949494;">12:20:48</span> 1 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 2022-10-29 <span style="color: #949494;">12:20:48</span> 2 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 2022-10-29 <span style="color: #949494;">12:20:48</span> 3 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> 2022-10-29 <span style="color: #949494;">12:20:48</span> 4 AMX AMX B_STRP… B_STRPT_PNMN EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># … with 38 more rows, 6 more variables: ref_table &lt;chr&gt;, method &lt;chr&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># breakpoint_S &lt;dbl&gt;, breakpoint_R &lt;dbl&gt;, input &lt;dbl&gt;, interpretation &lt;rsi&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># and abbreviated variable names ¹ab_considered, ²mo_input, ³mo_considered,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># ⁴guideline</span></span>
@ -514,7 +507,8 @@ A microorganism is categorised as <em>Susceptible, Increased exposure</em> when
<span class="r-in"><span><span class="op">)</span></span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting MIC values of 'AMP' (ampicillin) according to EUCAST</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> 2022...</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>in `as.rsi()`: assuming site 'Non-meningitis' for Streptococcus pneumoniae</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>in `as.rsi()`: breakpoints available for S. pneumoniae / ampicillin -</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> assuming body site 'Non-meningitis'</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> WARNING.</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'rsi'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] R</span>
@ -575,79 +569,9 @@ A microorganism is categorised as <em>Susceptible, Increased exposure</em> when
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting disk diffusion zones of 'GEN' (gentamicin) based on column</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> 'microorganism' according to EUCAST 2022...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting disk diffusion zones of 'TOB' (tobramycin) based on column</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> 'microorganism' according to EUCAST 2022...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting MIC values of 'AMP' (ampicillin) based on column</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> 'microorganism' according to EUCAST 2022...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting MIC values of 'CIP' (ciprofloxacin) based on column</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> 'microorganism' according to EUCAST 2022...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting MIC values of 'AMP' (ampicillin) based on column</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> 'microorganism' according to EUCAST 2022...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting MIC values of 'CIP' (ciprofloxacin) based on column</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> 'microorganism' according to EUCAST 2022...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting disk diffusion zones of 'GEN' (gentamicin) based on column</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> 'microorganism' according to EUCAST 2022...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting disk diffusion zones of 'TOB' (tobramycin) based on column</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> 'microorganism' according to EUCAST 2022...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting MIC values of 'AMP' (ampicillin) based on column</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> 'microorganism' according to EUCAST 2022...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting MIC values of 'CIP' (ciprofloxacin) based on column</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> 'microorganism' according to EUCAST 2022...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting disk diffusion zones of 'GEN' (gentamicin) based on column</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> 'microorganism' according to EUCAST 2022...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting disk diffusion zones of 'TOB' (tobramycin) based on column</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> 'microorganism' according to EUCAST 2022...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting MIC values of 'AMP' (ampicillin) according to EUCAST</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> 2022...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting MIC values of 'CIP' (ciprofloxacin) according to EUCAST</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> 2022...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting disk diffusion zones of 'GEN' (gentamicin) according to</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> EUCAST 2022...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting disk diffusion zones of 'TOB' (tobramycin) according to</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> EUCAST 2022...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> Using column 'mo' as input for `col_mo`.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting MIC values of column 'NIT' (nitrofurantoin) according to</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> EUCAST 2022...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> Assuming value "urine" in column 'specimen' reflects a urinary tract</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> infection.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> Use `as.rsi(uti = FALSE)` to prevent this.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> Using column 'mo' as input for `col_mo`.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting MIC values of column 'NIT' (nitrofurantoin) according to</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> EUCAST 2022...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting MIC values of 'AMP' (ampicillin) according to EUCAST</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> 2022...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting MIC values of 'CIP' (ciprofloxacin) according to EUCAST</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> 2022...</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OK.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting disk diffusion zones of 'GEN' (gentamicin) according to</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> EUCAST 2022...</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>in `as.rsi()`: assuming site 'UTI' for Enterobacterales</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> WARNING.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> =&gt; Interpreting disk diffusion zones of 'TOB' (tobramycin) according to</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> EUCAST 2022...</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>in `as.rsi()`: assuming site 'UTI' for Enterobacterales</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> WARNING.</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> microorganism AMP CIP GEN TOB ERY</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 Escherichia coli S I S S R</span>
<span class="r-err co"><span class="r-pr">#&gt;</span> <span class="error">Error in mutate(.tbl, !!!funs):</span> Problem while computing `GEN = (function (x, ...) ...`.</span>
<span class="r-err co"><span class="r-pr">#&gt;</span> <span style="font-weight: bold;">Caused by error in `if (...) NULL`:</span></span>
<span class="r-err co"><span class="r-pr">#&gt;</span> <span style="color: #BBBB00;">!</span> missing value where TRUE/FALSE needed</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># For CLEANING existing R/SI values ------------------------------------</span></span></span>
<span class="r-in"><span></span></span>

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@ -12,7 +12,7 @@ count_resistant() should be used to count resistant isolates, count_susceptible(
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@ -12,7 +12,7 @@ To improve the interpretation of the antibiogram before EUCAST rules are applied
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@ -12,7 +12,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -177,40 +177,43 @@
<span class="r-in"><span><span class="va">df</span> <span class="op">&lt;-</span> <span class="va">example_isolates</span><span class="op">[</span><span class="fu"><a href="https://rdrr.io/r/base/sample.html" class="external-link">sample</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/seq.html" class="external-link">seq_len</a></span><span class="op">(</span><span class="fl">2000</span><span class="op">)</span>, size <span class="op">=</span> <span class="fl">200</span><span class="op">)</span>, <span class="op">]</span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="fu">get_episode</span><span class="op">(</span><span class="va">df</span><span class="op">$</span><span class="va">date</span>, episode_days <span class="op">=</span> <span class="fl">60</span><span class="op">)</span> <span class="co"># indices</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 7 17 26 38 59 54 8 42 21 1 24 24 23 46 60 43 14 14 62 29 3 3 58 64 7</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [26] 31 27 9 50 56 32 9 57 26 47 45 37 14 11 27 45 16 17 49 1 61 18 33 25 19</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [51] 56 34 1 12 63 31 37 20 7 48 1 20 50 15 55 9 52 53 32 31 30 61 53 10 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [76] 38 58 28 9 40 25 17 63 19 7 4 64 7 29 40 35 15 11 60 17 44 12 8 8 49</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [101] 31 57 55 35 9 19 61 53 23 21 59 31 19 30 54 34 48 28 15 57 49 50 47 11 20</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [126] 11 47 41 62 14 5 64 24 41 17 53 58 11 21 1 49 53 58 26 6 9 23 33 22 11</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [151] 63 24 5 5 32 50 17 27 41 4 7 26 18 28 57 43 32 16 57 7 26 36 48 35 51</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [176] 2 15 46 59 28 63 5 61 1 42 38 57 27 47 48 13 12 61 40 57 55 39 61 54 38</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 19 20 54 49 35 60 26 3 18 4 43 56 55 48 60 58 47 55 59 3 6 32 27 25 56</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [26] 10 24 9 5 60 57 62 15 1 52 7 23 5 2 46 9 14 46 56 18 38 34 20 44 41</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [51] 21 45 1 16 28 52 2 12 31 48 7 30 3 62 54 44 36 47 14 54 4 29 13 54 11</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [76] 53 8 3 54 14 48 37 57 16 21 36 6 23 61 45 9 46 38 26 42 27 1 44 9 21</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [101] 10 2 31 54 7 20 61 40 57 35 62 4 1 46 5 8 49 14 37 38 44 52 18 39 54</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [126] 22 25 20 59 57 6 54 44 3 7 50 26 17 38 26 33 33 52 53 7 54 54 48 59 17</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [151] 45 30 43 42 19 41 5 17 15 32 7 20 62 45 14 6 13 10 1 59 28 18 14 34 60</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [176] 54 6 13 23 55 11 19 34 26 51 15 11 22 54 10 22 28 8 26 38 39 28 37 63 56</span>
<span class="r-in"><span><span class="fu">is_new_episode</span><span class="op">(</span><span class="va">df</span><span class="op">$</span><span class="va">date</span>, episode_days <span class="op">=</span> <span class="fl">60</span><span class="op">)</span> <span class="co"># TRUE/FALSE</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE TRUE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [13] FALSE TRUE TRUE FALSE FALSE FALSE TRUE FALSE TRUE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [25] FALSE FALSE FALSE FALSE TRUE TRUE FALSE TRUE TRUE TRUE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [37] TRUE FALSE FALSE TRUE TRUE FALSE FALSE TRUE FALSE FALSE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [49] TRUE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [61] FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE TRUE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [73] FALSE TRUE FALSE TRUE FALSE TRUE FALSE FALSE FALSE FALSE TRUE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [85] FALSE TRUE FALSE FALSE TRUE TRUE TRUE FALSE FALSE FALSE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [97] TRUE FALSE TRUE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [109] FALSE FALSE TRUE TRUE FALSE FALSE TRUE FALSE FALSE FALSE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [121] FALSE FALSE FALSE TRUE FALSE FALSE TRUE FALSE FALSE TRUE TRUE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [133] FALSE TRUE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [145] TRUE FALSE TRUE TRUE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [157] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE TRUE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [169] FALSE FALSE FALSE TRUE TRUE FALSE TRUE TRUE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [181] FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [193] FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE TRUE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [13] TRUE FALSE FALSE TRUE TRUE FALSE FALSE FALSE FALSE FALSE TRUE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [25] TRUE TRUE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [37] FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [49] FALSE FALSE FALSE TRUE FALSE TRUE FALSE FALSE FALSE TRUE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [61] FALSE FALSE FALSE TRUE FALSE TRUE FALSE FALSE FALSE FALSE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [73] TRUE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE TRUE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [85] TRUE TRUE FALSE FALSE TRUE FALSE TRUE FALSE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [97] FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [109] FALSE TRUE FALSE FALSE FALSE TRUE FALSE FALSE TRUE TRUE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [121] FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [133] FALSE TRUE TRUE TRUE FALSE FALSE FALSE FALSE TRUE FALSE TRUE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [145] FALSE FALSE FALSE FALSE FALSE TRUE FALSE TRUE TRUE TRUE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [157] TRUE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [169] TRUE TRUE FALSE TRUE FALSE FALSE TRUE TRUE FALSE FALSE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [181] FALSE TRUE TRUE FALSE TRUE TRUE TRUE TRUE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [193] FALSE FALSE TRUE FALSE TRUE FALSE TRUE FALSE</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># filter on results from the third 60-day episode only, using base R</span></span></span>
<span class="r-in"><span><span class="va">df</span><span class="op">[</span><span class="fu"><a href="https://rdrr.io/r/base/which.html" class="external-link">which</a></span><span class="op">(</span><span class="fu">get_episode</span><span class="op">(</span><span class="va">df</span><span class="op">$</span><span class="va">date</span>, <span class="fl">60</span><span class="op">)</span> <span class="op">==</span> <span class="fl">3</span><span class="op">)</span>, <span class="op">]</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 2 × 46</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 5 × 46</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> date patient age gender ward mo PEN OXA FLC AMX </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;date&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dbl&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;mo&gt;</span> <span style="color: #949494; font-style: italic;">&lt;rsi&gt;</span> <span style="color: #949494; font-style: italic;">&lt;rsi&gt;</span> <span style="color: #949494; font-style: italic;">&lt;rsi&gt;</span> <span style="color: #949494; font-style: italic;">&lt;rsi&gt;</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> 2002-06-23 798871 82 M Clinical B_ENTRC_FCLS NA NA NA NA </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> 2002-06-23 798871 82 M Clinical B_ENTRC_FCLS NA NA NA NA </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> 2002-11-18 956065 89 F Clinical B_ESCHR_COLI R NA NA NA </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> 2002-11-28 705451 56 M Clinical B_STPHY_CONS R NA S NA </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">3</span> 2002-11-27 496896 47 F ICU B_STPHY_CONS R NA R R </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">4</span> 2002-10-20 F35553 51 M ICU B_STPHY_AURS S NA S NA </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">5</span> 2002-10-11 871360 78 M Clinical B_STPHY_EPDR R NA S NA </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># … with 36 more variables: AMC &lt;rsi&gt;, AMP &lt;rsi&gt;, TZP &lt;rsi&gt;, CZO &lt;rsi&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># FEP &lt;rsi&gt;, CXM &lt;rsi&gt;, FOX &lt;rsi&gt;, CTX &lt;rsi&gt;, CAZ &lt;rsi&gt;, CRO &lt;rsi&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># GEN &lt;rsi&gt;, TOB &lt;rsi&gt;, AMK &lt;rsi&gt;, KAN &lt;rsi&gt;, TMP &lt;rsi&gt;, SXT &lt;rsi&gt;,</span></span>
@ -246,16 +249,16 @@
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Groups: condition [3]</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> patient date condition new_episode</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;date&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;lgl&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> F35553 2003-09-05 A FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> 3CF3C4 2006-06-26 B FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> D43890 2008-11-28 A FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> F86227 2011-11-10 A FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 604099 2016-11-09 B FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> D28985 2015-12-21 A FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> F76709 2003-11-24 A FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 616685 2012-12-27 B FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 0E2483 2007-06-21 B FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> 495616 2002-01-17 B TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> E59875 2006-03-25 C FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> C34072 2006-07-05 C TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> 0DBF93 2015-10-12 A FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> 2F9056 2014-05-06 A TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 953526 2010-04-23 B FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> 976997 2017-03-02 C FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> 080086 2007-10-26 B FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 956065 2002-11-18 B FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 612575 2006-01-31 B FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> 285137 2002-12-13 C FALSE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># … with 190 more rows</span></span>
<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">require</a></span><span class="op">(</span><span class="st"><a href="https://dplyr.tidyverse.org" class="external-link">"dplyr"</a></span><span class="op">)</span><span class="op">)</span> <span class="op">{</span></span></span>
<span class="r-in"><span> <span class="va">df</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span></span>
@ -267,19 +270,19 @@
<span class="r-in"><span> <span class="op">)</span></span></span>
<span class="r-in"><span><span class="op">}</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 200 × 5</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Groups: ward, patient [182]</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> ward date patient new_index new_logical</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;date&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dbl&gt;</span> <span style="color: #949494; font-style: italic;">&lt;lgl&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> ICU 2003-09-05 F35553 2 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> Clinical 2006-06-26 3CF3C4 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> Outpatient 2008-11-28 D43890 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> Clinical 2011-11-10 F86227 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> Clinical 2016-11-09 604099 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> Outpatient 2015-12-21 D28985 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> Outpatient 2003-11-24 F76709 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> Clinical 2012-12-27 616685 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> ICU 2007-06-21 0E2483 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> Clinical 2002-01-17 495616 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Groups: ward, patient [178]</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> ward date patient new_index new_logical</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;date&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dbl&gt;</span> <span style="color: #949494; font-style: italic;">&lt;lgl&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> ICU 2006-03-25 E59875 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> Clinical 2006-07-05 C34072 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> Clinical 2015-10-12 0DBF93 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> ICU 2014-05-06 2F9056 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> ICU 2010-04-23 953526 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> Clinical 2017-03-02 976997 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> Clinical 2007-10-26 080086 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> Clinical 2002-11-18 956065 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> Clinical 2006-01-31 612575 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> ICU 2002-12-13 285137 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># … with 190 more rows</span></span>
<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">require</a></span><span class="op">(</span><span class="st"><a href="https://dplyr.tidyverse.org" class="external-link">"dplyr"</a></span><span class="op">)</span><span class="op">)</span> <span class="op">{</span></span></span>
<span class="r-in"><span> <span class="va">df</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span></span>
@ -294,9 +297,9 @@
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 3 × 5</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> ward n_patients n_episodes_365 n_episodes_60 n_episodes_30</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;int&gt;</span> <span style="color: #949494; font-style: italic;">&lt;int&gt;</span> <span style="color: #949494; font-style: italic;">&lt;int&gt;</span> <span style="color: #949494; font-style: italic;">&lt;int&gt;</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> Clinical 117 15 54 78</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> ICU 59 14 35 44</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">3</span> Outpatient 6 5 5 6</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> Clinical 115 13 49 69</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> ICU 55 12 34 39</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">3</span> Outpatient 8 7 8 8</span>
<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">require</a></span><span class="op">(</span><span class="st"><a href="https://dplyr.tidyverse.org" class="external-link">"dplyr"</a></span><span class="op">)</span><span class="op">)</span> <span class="op">{</span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span> <span class="co"># grouping on patients and microorganisms leads to the same</span></span></span>
@ -326,19 +329,19 @@
<span class="r-in"><span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/select.html" class="external-link">select</a></span><span class="op">(</span><span class="fu"><a href="https://dplyr.tidyverse.org/reference/group_data.html" class="external-link">group_vars</a></span><span class="op">(</span><span class="va">.</span><span class="op">)</span>, <span class="va">flag_episode</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="op">}</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 200 × 4</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Groups: patient, mo, ward [189]</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> patient mo ward flag_episode</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;mo&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;lgl&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> F35553 B_ENTRC ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> 3CF3C4 B_STPHY_CONS Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> D43890 UNKNOWN Outpatient TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> F86227 B_STPHY_CONS Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 604099 B_STPHY_EPDR Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> D28985 B_ESCHR_COLI Outpatient TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> F76709 B_ESCHR_COLI Outpatient TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 616685 B_STPHY_EPDR Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 0E2483 B_ESCHR_COLI ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> 495616 B_STPHY_EPDR Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Groups: patient, mo, ward [190]</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> patient mo ward flag_episode</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;mo&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;lgl&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> E59875 B_STPHY_EPDR ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> C34072 B_STPHY_CONS Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> 0DBF93 B_STPHY_AURS Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> 2F9056 B_HAFNI_ALVE ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 953526 B_STPHY_CONS ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> 976997 B_STRPT_PYGN Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> 080086 B_STRPT_GRPB Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 956065 B_ESCHR_COLI Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 612575 B_ENTRBC_CLOC Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> 285137 B_ESCHR_COLI ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># … with 190 more rows</span></span>
<span class="r-in"><span><span class="co"># }</span></span></span>
</code></pre></div>

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -324,7 +324,7 @@
<code><a href="microorganisms.html">microorganisms</a></code>
</dt>
<dd>Data Set with 48,788 Microorganisms</dd>
<dd>Data Set with 48,883 Microorganisms</dd>
</dl><dl><dt>
<code><a href="microorganisms.codes.html">microorganisms.codes</a></code>

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -182,22 +182,22 @@
<h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="fu">left_join_microorganisms</span><span class="op">(</span><span class="fu"><a href="as.mo.html">as.mo</a></span><span class="op">(</span><span class="st">"K. pneumoniae"</span><span class="op">)</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 1 × 22</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> mo fulln…¹ status kingdom phylum class order family genus species subsp…²</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> B_KLBS… Klebsi… accep… Bacter… Pseud… Gamm… Ente… Enter… Kleb… pneumo… <span style="color: #949494;">""</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># … with 11 more variables: rank &lt;chr&gt;, ref &lt;chr&gt;, source &lt;chr&gt;, lpsn &lt;chr&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># lpsn_parent &lt;chr&gt;, lpsn_renamed_to &lt;chr&gt;, gbif &lt;chr&gt;, gbif_parent &lt;chr&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># gbif_renamed_to &lt;chr&gt;, prevalence &lt;dbl&gt;, snomed &lt;list&gt;, and abbreviated</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># variable names ¹fullname, ²subspecies</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> mo fullname status kingdom phylum class order family genus species</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;mo&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> B_KLBSL_PNMN Klebsiell… accep… Bacter… Pseud… Gamm… Ente… Enter… Kleb… pneumo…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># … with 12 more variables: subspecies &lt;chr&gt;, rank &lt;chr&gt;, ref &lt;chr&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># source &lt;chr&gt;, lpsn &lt;chr&gt;, lpsn_parent &lt;chr&gt;, lpsn_renamed_to &lt;chr&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># gbif &lt;chr&gt;, gbif_parent &lt;chr&gt;, gbif_renamed_to &lt;chr&gt;, prevalence &lt;dbl&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># snomed &lt;list&gt;</span></span>
<span class="r-in"><span><span class="fu">left_join_microorganisms</span><span class="op">(</span><span class="st">"B_KLBSL_PNMN"</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 1 × 22</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> mo fulln…¹ status kingdom phylum class order family genus species subsp…²</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> B_KLBS… Klebsi… accep… Bacter… Pseud… Gamm… Ente… Enter… Kleb… pneumo… <span style="color: #949494;">""</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># … with 11 more variables: rank &lt;chr&gt;, ref &lt;chr&gt;, source &lt;chr&gt;, lpsn &lt;chr&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># lpsn_parent &lt;chr&gt;, lpsn_renamed_to &lt;chr&gt;, gbif &lt;chr&gt;, gbif_parent &lt;chr&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># gbif_renamed_to &lt;chr&gt;, prevalence &lt;dbl&gt;, snomed &lt;list&gt;, and abbreviated</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># variable names ¹fullname, ²subspecies</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> mo fullname status kingdom phylum class order family genus species</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;mo&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> B_KLBSL_PNMN Klebsiell… accep… Bacter… Pseud… Gamm… Ente… Enter… Kleb… pneumo…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># … with 12 more variables: subspecies &lt;chr&gt;, rank &lt;chr&gt;, ref &lt;chr&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># source &lt;chr&gt;, lpsn &lt;chr&gt;, lpsn_parent &lt;chr&gt;, lpsn_renamed_to &lt;chr&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># gbif &lt;chr&gt;, gbif_parent &lt;chr&gt;, gbif_renamed_to &lt;chr&gt;, prevalence &lt;dbl&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># snomed &lt;list&gt;</span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="va">df</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/data.frame.html" class="external-link">data.frame</a></span><span class="op">(</span></span></span>
<span class="r-in"><span> date <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/seq.html" class="external-link">seq</a></span><span class="op">(</span></span></span>

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -167,9 +167,9 @@
<div class="section level2">
<h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="fu">kurtosis</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/stats/Normal.html" class="external-link">rnorm</a></span><span class="op">(</span><span class="fl">10000</span><span class="op">)</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 2.961036</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 3.043313</span>
<span class="r-in"><span><span class="fu">kurtosis</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/stats/Normal.html" class="external-link">rnorm</a></span><span class="op">(</span><span class="fl">10000</span><span class="op">)</span>, excess <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] -0.06968893</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] -0.00211217</span>
</code></pre></div>
</div>
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -195,10 +195,11 @@
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="va">x</span> <span class="op">&lt;-</span> <span class="fu"><a href="random.html">random_mic</a></span><span class="op">(</span><span class="fl">10</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="va">x</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'mic'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 4 0.0625 8 64 2 0.25 2 0.002 4 128 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 128 0.002 0.125 0.01 128 0.25 0.005 0.25 &lt;=0.001</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [10] 0.5 </span>
<span class="r-in"><span><span class="fu">mean_amr_distance</span><span class="op">(</span><span class="va">x</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 0.27543358 -0.99915301 0.48786468 1.12515798 0.06300248 -0.57429082</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] 0.06300248 -2.05404003 0.27543358 1.33758907</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 1.61986500 -1.04034961 -0.04633226 -0.65347059 1.61986500 0.12028746</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] -0.82009031 0.12028746 -1.20696934 0.28690719</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="va">y</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/data.frame.html" class="external-link">data.frame</a></span><span class="op">(</span></span></span>
<span class="r-in"><span> id <span class="op">=</span> <span class="va">LETTERS</span><span class="op">[</span><span class="fl">1</span><span class="op">:</span><span class="fl">10</span><span class="op">]</span>,</span></span>
@ -208,38 +209,38 @@
<span class="r-in"><span> tobr <span class="op">=</span> <span class="fu"><a href="random.html">random_mic</a></span><span class="op">(</span><span class="fl">10</span>, ab <span class="op">=</span> <span class="st">"tobr"</span>, mo <span class="op">=</span> <span class="st">"Escherichia coli"</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="va">y</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> id amox cipr gent tobr</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 A &lt;=2 0.25 4 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 B 4 1 0.25 &lt;=1</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 C &gt;=16 0.125 4 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 D &lt;=2 0.5 1 &gt;=4</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 E 4 &lt;=0.025 0.25 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 F &gt;=16 &lt;=0.025 4 &lt;=1</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 G &gt;=16 0.125 0.25 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 H 4 4 0.25 &gt;=4</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 I &gt;=16 &lt;=0.025 2 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 J &gt;=16 1 4 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> id amox cipr gent tobr</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 A 8 0.125 0.5 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 B 32 0.25 2 4</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 C 16 0.5 0.5 8</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 D 32 1 &gt;=4 4</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 E 8 0.25 2 8</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 F 64 0.0625 1 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 G &lt;=4 0.125 1 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 H 16 0.125 &gt;=4 4</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 I 16 0.5 0.5 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 J 8 &gt;=4 0.25 &lt;=1</span>
<span class="r-in"><span><span class="fu">mean_amr_distance</span><span class="op">(</span><span class="va">y</span><span class="op">)</span></span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> Calculating mean AMR distance based on columns "amox", "cipr", "gent",</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> "id" and "tobr"</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>NAs introduced by coercion</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] -0.06445907 -0.57768610 0.40775164 0.14648310 -0.72133558 -0.19353229</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] -0.11527439 0.36722427 0.05071121 0.70011720</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] -0.72781282 0.45495874 0.28152212 0.92036634 0.29609879 -0.06040618</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] -0.75419100 0.28709631 -0.23602705 -0.46160524</span>
<span class="r-in"><span><span class="va">y</span><span class="op">$</span><span class="va">amr_distance</span> <span class="op">&lt;-</span> <span class="fu">mean_amr_distance</span><span class="op">(</span><span class="va">y</span>, <span class="fu">where</span><span class="op">(</span><span class="va">is.mic</span><span class="op">)</span><span class="op">)</span></span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> Calculating mean AMR distance based on columns "amox", "cipr", "gent" and</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> "tobr"</span>
<span class="r-in"><span><span class="va">y</span><span class="op">[</span><span class="fu"><a href="https://rdrr.io/r/base/order.html" class="external-link">order</a></span><span class="op">(</span><span class="va">y</span><span class="op">$</span><span class="va">amr_distance</span><span class="op">)</span>, <span class="op">]</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> id amox cipr gent tobr amr_distance</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 E 4 &lt;=0.025 0.25 2 -0.72133558</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 B 4 1 0.25 &lt;=1 -0.57768610</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 F &gt;=16 &lt;=0.025 4 &lt;=1 -0.19353229</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 G &gt;=16 0.125 0.25 2 -0.11527439</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 A &lt;=2 0.25 4 2 -0.06445907</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 I &gt;=16 &lt;=0.025 2 2 0.05071121</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 D &lt;=2 0.5 1 &gt;=4 0.14648310</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 H 4 4 0.25 &gt;=4 0.36722427</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 C &gt;=16 0.125 4 2 0.40775164</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 J &gt;=16 1 4 2 0.70011720</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> id amox cipr gent tobr amr_distance</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 G &lt;=4 0.125 1 2 -0.75419100</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 A 8 0.125 0.5 2 -0.72781282</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 J 8 &gt;=4 0.25 &lt;=1 -0.46160524</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 I 16 0.5 0.5 2 -0.23602705</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 F 64 0.0625 1 2 -0.06040618</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 C 16 0.5 0.5 8 0.28152212</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 H 16 0.125 &gt;=4 4 0.28709631</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 E 8 0.25 2 8 0.29609879</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 B 32 0.25 2 4 0.45495874</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 D 32 1 &gt;=4 4 0.92036634</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">require</a></span><span class="op">(</span><span class="st"><a href="https://dplyr.tidyverse.org" class="external-link">"dplyr"</a></span><span class="op">)</span><span class="op">)</span> <span class="op">{</span></span></span>
<span class="r-in"><span> <span class="va">y</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span></span>
@ -251,17 +252,17 @@
<span class="r-in"><span><span class="op">}</span></span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> Calculating mean AMR distance based on columns "amox", "cipr", "gent" and</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> "tobr"</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> id amox cipr gent tobr amr_distance check_id_C</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 C &gt;=16 0.125 4 2 0.40775164 0.00000000</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 H 4 4 0.25 &gt;=4 0.36722427 0.04052737</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 D &lt;=2 0.5 1 &gt;=4 0.14648310 0.26126854</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 J &gt;=16 1 4 2 0.70011720 0.29236555</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 I &gt;=16 &lt;=0.025 2 2 0.05071121 0.35704044</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 A &lt;=2 0.25 4 2 -0.06445907 0.47221071</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 G &gt;=16 0.125 0.25 2 -0.11527439 0.52302603</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 F &gt;=16 &lt;=0.025 4 &lt;=1 -0.19353229 0.60128393</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 B 4 1 0.25 &lt;=1 -0.57768610 0.98543774</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 E 4 &lt;=0.025 0.25 2 -0.72133558 1.12908723</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> id amox cipr gent tobr amr_distance check_id_C</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 C 16 0.5 0.5 8 0.28152212 0.000000000</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 H 16 0.125 &gt;=4 4 0.28709631 0.005574198</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 E 8 0.25 2 8 0.29609879 0.014576672</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 B 32 0.25 2 4 0.45495874 0.173436622</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 F 64 0.0625 1 2 -0.06040618 0.341928295</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 I 16 0.5 0.5 2 -0.23602705 0.517549170</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 D 32 1 &gt;=4 4 0.92036634 0.638844222</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 J 8 &gt;=4 0.25 &lt;=1 -0.46160524 0.743127361</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 A 8 0.125 0.5 2 -0.72781282 1.009334941</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 G &lt;=4 0.125 1 2 -0.75419100 1.035713113</span>
<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">require</a></span><span class="op">(</span><span class="st"><a href="https://dplyr.tidyverse.org" class="external-link">"dplyr"</a></span><span class="op">)</span><span class="op">)</span> <span class="op">{</span></span></span>
<span class="r-in"><span> <span class="co"># support for groups</span></span></span>
<span class="r-in"><span> <span class="va">example_isolates</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span></span>

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="A data set containing the full microbial taxonomy (last updated: 12 September, 2022) of five kingdoms from the List of Prokaryotic names with Standing in Nomenclature (LPSN) and the Global Biodiversity Information Facility (GBIF). This data set is the backbone of this AMR package. MO codes can be looked up using as.mo()."><title>Data Set with 48,788 Microorganisms — microorganisms • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.1.3/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.1.3/bootstrap.bundle.min.js"></script><link href="../deps/Fira_Code-0.4.2/font.css" rel="stylesheet"><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.rawgit.com/afeld/bootstrap-toc/v1.0.1/dist/bootstrap-toc.min.js"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Data Set with 48,788 Microorganisms — microorganisms"><meta property="og:description" content="A data set containing the full microbial taxonomy (last updated: 12 September, 2022) of five kingdoms from the List of Prokaryotic names with Standing in Nomenclature (LPSN) and the Global Biodiversity Information Facility (GBIF). This data set is the backbone of this AMR package. MO codes can be looked up using as.mo()."><meta property="og:image" content="https://msberends.github.io/AMR/logo.svg"><meta name="twitter:card" content="summary_large_image"><meta name="twitter:creator" content="@msberends"><meta name="twitter:site" content="@msberends"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="A data set containing the full microbial taxonomy (last updated: 12 September, 2022) of five kingdoms from the List of Prokaryotic names with Standing in Nomenclature (LPSN) and the Global Biodiversity Information Facility (GBIF). This data set is the backbone of this AMR package. MO codes can be looked up using as.mo()."><title>Data Set with 48,883 Microorganisms — microorganisms • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.1.3/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.1.3/bootstrap.bundle.min.js"></script><link href="../deps/Fira_Code-0.4.2/font.css" rel="stylesheet"><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.rawgit.com/afeld/bootstrap-toc/v1.0.1/dist/bootstrap-toc.min.js"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Data Set with 48,883 Microorganisms — microorganisms"><meta property="og:description" content="A data set containing the full microbial taxonomy (last updated: 12 September, 2022) of five kingdoms from the List of Prokaryotic names with Standing in Nomenclature (LPSN) and the Global Biodiversity Information Facility (GBIF). This data set is the backbone of this AMR package. MO codes can be looked up using as.mo()."><meta property="og:image" content="https://msberends.github.io/AMR/logo.svg"><meta name="twitter:card" content="summary_large_image"><meta name="twitter:creator" content="@msberends"><meta name="twitter:site" content="@msberends"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]--></head><body>
@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -122,7 +122,7 @@
</nav><div class="container template-reference-topic">
<div class="row">
<main id="main" class="col-md-9"><div class="page-header">
<img src="../logo.svg" class="logo" alt=""><h1>Data Set with 48,788 Microorganisms</h1>
<img src="../logo.svg" class="logo" alt=""><h1>Data Set with 48,883 Microorganisms</h1>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/HEAD/R/data.R" class="external-link"><code>R/data.R</code></a></small>
<div class="d-none name"><code>microorganisms.Rd</code></div>
</div>
@ -138,7 +138,7 @@
<div class="section level2">
<h2 id="format">Format<a class="anchor" aria-label="anchor" href="#format"></a></h2>
<p>A <a href="https://tibble.tidyverse.org/reference/tibble.html" class="external-link">tibble</a> with 48,788 observations and 22 variables:</p><ul><li><p><code>mo</code><br> ID of microorganism as used by this package</p></li>
<p>A <a href="https://tibble.tidyverse.org/reference/tibble.html" class="external-link">tibble</a> with 48,883 observations and 22 variables:</p><ul><li><p><code>mo</code><br> ID of microorganism as used by this package</p></li>
<li><p><code>fullname</code><br> Full name, like <code>"Escherichia coli"</code>. For the taxonomic ranks genus, species and subspecies, this is the 'pasted' text of genus, species, and subspecies. For all taxonomic ranks higher than genus, this is the name of the taxon.</p></li>
<li><p><code>status</code> <br> Status of the taxon, either "accepted" or "synonym"</p></li>
<li><p><code>kingdom</code>, <code>phylum</code>, <code>class</code>, <code>order</code>, <code>family</code>, <code>genus</code>, <code>species</code>, <code>subspecies</code><br> Taxonomic rank of the microorganism</p></li>
@ -176,7 +176,7 @@
<p>Included taxonomic data are:</p><ul><li><p>All ~34,000 (sub)species from the kingdoms of Archaea and Bacteria</p></li>
<li><p>~7,400 (sub)species from the kingdom of Fungi. The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package. Only relevant fungi are covered (such as all species of <em>Aspergillus</em>, <em>Candida</em>, <em>Cryptococcus</em>, <em>Histoplasma</em>, <em>Pneumocystis</em>, <em>Saccharomyces</em> and <em>Trichophyton</em>).</p></li>
<li><p>~4,900 (sub)species from the kingdom of Protozoa</p></li>
<li><p>~5,000 (sub)species from the kingdom of Protozoa</p></li>
<li><p>~1,500 (sub)species from ~50 other relevant genera from the kingdom of Animalia (such as <em>Strongyloides</em> and <em>Taenia</em>)</p></li>
<li><p>All ~9,400 previously accepted names of all included (sub)species (these were taxonomically renamed)</p></li>
<li><p>The complete taxonomic tree of all included (sub)species: from kingdom to subspecies</p></li>
@ -190,7 +190,7 @@
<li><p>2 entries of <em>Staphylococcus</em> (coagulase-negative (CoNS) and coagulase-positive (CoPS))</p></li>
<li><p>1 entry of <em>Blastocystis</em> (<em>B. hominis</em>), although it officially does not exist (Noel <em>et al.</em> 2005, PMID 15634993)</p></li>
<li><p>1 entry of <em>Moraxella</em> (<em>M. catarrhalis</em>), which was formally named <em>Branhamella catarrhalis</em> (Catlin, 1970) though this change was never accepted within the field of clinical microbiology</p></li>
<li><p>5 other 'undefined' entries (unknown, unknown Gram negatives, unknown Gram positives, unknown yeast and unknown fungus)</p></li>
<li><p>6 other 'undefined' entries (unknown, unknown Gram negatives, unknown Gram positives, unknown yeast, unknown fungus, and unknown anaerobic bacteria)</p></li>
</ul><p>The syntax used to transform the original data to a cleansed <span style="R">R</span> format, can be found here: <a href="https://github.com/msberends/AMR/blob/main/data-raw/reproduction_of_microorganisms.R" class="external-link">https://github.com/msberends/AMR/blob/main/data-raw/reproduction_of_microorganisms.R</a>.</p>
</div>
@ -217,23 +217,23 @@
<div class="section level2">
<h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="va">microorganisms</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 48,788 × 22</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> mo fulln…¹ status kingdom phylum class order family genus species subsp…²</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> B_ANA… (unkno… accep… Bacter… (unkn… (unk… <span style="color: #949494;">"</span>(un… <span style="color: #949494;">"</span>(unk… <span style="color: #949494;">"</span>(un… <span style="color: #949494;">"</span>(unkn… <span style="color: #949494;">"</span>(unkn…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> F_FUN… (unkno… accep… Fungi (unkn… (unk… <span style="color: #949494;">"</span>(un… <span style="color: #949494;">"</span>(unk… <span style="color: #949494;">"</span>(un… <span style="color: #949494;">"</span>(unkn… <span style="color: #949494;">"</span>(unkn…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> B_GRA… (unkno… accep… Bacter… (unkn… (unk… <span style="color: #949494;">"</span>(un… <span style="color: #949494;">"</span>(unk… <span style="color: #949494;">"</span>(un… <span style="color: #949494;">"</span>(unkn… <span style="color: #949494;">"</span>(unkn…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> B_GRA… (unkno… accep… Bacter… (unkn… (unk… <span style="color: #949494;">"</span>(un… <span style="color: #949494;">"</span>(unk… <span style="color: #949494;">"</span>(un… <span style="color: #949494;">"</span>(unkn… <span style="color: #949494;">"</span>(unkn…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> UNKNO… (unkno… accep… (unkno… (unkn… (unk… <span style="color: #949494;">"</span>(un… <span style="color: #949494;">"</span>(unk… <span style="color: #949494;">"</span>(un… <span style="color: #949494;">"</span>(unkn… <span style="color: #949494;">"</span>(unkn…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> F_YEA… (unkno… accep… Fungi (unkn… (unk… <span style="color: #949494;">"</span>(un… <span style="color: #949494;">"</span>(unk… <span style="color: #949494;">"</span>(un… <span style="color: #949494;">"</span>(unkn… <span style="color: #949494;">"</span>(unkn…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> B_[CL… Abditi… accep… Bacter… Armat… Abdi… <span style="color: #949494;">""</span> <span style="color: #949494;">""</span> <span style="color: #949494;">""</span> <span style="color: #949494;">""</span> <span style="color: #949494;">""</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> B_[FA… Abditi… accep… Bacter… Abdit… Abdi… <span style="color: #949494;">"</span>Abd… <span style="color: #949494;">"</span>Abdi… <span style="color: #949494;">""</span> <span style="color: #949494;">""</span> <span style="color: #949494;">""</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> B_[OR… Abditi… accep… Bacter… Abdit… Abdi… <span style="color: #949494;">"</span>Abd… <span style="color: #949494;">""</span> <span style="color: #949494;">""</span> <span style="color: #949494;">""</span> <span style="color: #949494;">""</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> B_[CL… Abditi… accep… Bacter… Abdit… Abdi… <span style="color: #949494;">""</span> <span style="color: #949494;">""</span> <span style="color: #949494;">""</span> <span style="color: #949494;">""</span> <span style="color: #949494;">""</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># … with 48,778 more rows, 11 more variables: rank &lt;chr&gt;, ref &lt;chr&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># source &lt;chr&gt;, lpsn &lt;chr&gt;, lpsn_parent &lt;chr&gt;, lpsn_renamed_to &lt;chr&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># gbif &lt;chr&gt;, gbif_parent &lt;chr&gt;, gbif_renamed_to &lt;chr&gt;, prevalence &lt;dbl&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># snomed &lt;list&gt;, and abbreviated variable names ¹fullname, ²subspecies</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 48,883 × 22</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> mo fullname status kingdom phylum class order family genus</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;mo&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> B_ANAER (unknown ana… accep… Bacter… (unkn… (unk… <span style="color: #949494;">"</span>(un… <span style="color: #949494;">"</span>(unk… <span style="color: #949494;">"</span>(un…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> F_FUNGUS (unknown fun… accep… Fungi (unkn… (unk… <span style="color: #949494;">"</span>(un… <span style="color: #949494;">"</span>(unk… <span style="color: #949494;">"</span>(un…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> B_GRAMN (unknown Gra… accep… Bacter… (unkn… (unk… <span style="color: #949494;">"</span>(un… <span style="color: #949494;">"</span>(unk… <span style="color: #949494;">"</span>(un…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> B_GRAMP (unknown Gra… accep… Bacter… (unkn… (unk… <span style="color: #949494;">"</span>(un… <span style="color: #949494;">"</span>(unk… <span style="color: #949494;">"</span>(un…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> UNKNOWN (unknown nam… accep… (unkno… (unkn… (unk… <span style="color: #949494;">"</span>(un… <span style="color: #949494;">"</span>(unk… <span style="color: #949494;">"</span>(un…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> F_YEAST (unknown yea… accep… Fungi (unkn… (unk… <span style="color: #949494;">"</span>(un… <span style="color: #949494;">"</span>(unk… <span style="color: #949494;">"</span>(un…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> B_[CLS]_ABDTBCTR Abditibacter… accep… Bacter… Armat… Abdi… <span style="color: #949494;">""</span> <span style="color: #949494;">""</span> <span style="color: #949494;">""</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> B_[FAM]_ABDTBCTR Abditibacter… accep… Bacter… Abdit… Abdi… <span style="color: #949494;">"</span>Abd… <span style="color: #949494;">"</span>Abdi… <span style="color: #949494;">""</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> B_[ORD]_ABDTBCTR Abditibacter… accep… Bacter… Abdit… Abdi… <span style="color: #949494;">"</span>Abd… <span style="color: #949494;">""</span> <span style="color: #949494;">""</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> B_[CLS]_ADTBCTRA Abditibacter… accep… Bacter… Abdit… Abdi… <span style="color: #949494;">""</span> <span style="color: #949494;">""</span> <span style="color: #949494;">""</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># … with 48,873 more rows, and 13 more variables: species &lt;chr&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># subspecies &lt;chr&gt;, rank &lt;chr&gt;, ref &lt;chr&gt;, source &lt;chr&gt;, lpsn &lt;chr&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># lpsn_parent &lt;chr&gt;, lpsn_renamed_to &lt;chr&gt;, gbif &lt;chr&gt;, gbif_parent &lt;chr&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># gbif_renamed_to &lt;chr&gt;, prevalence &lt;dbl&gt;, snomed &lt;list&gt;</span></span>
</code></pre></div>
</div>
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@ -12,7 +12,7 @@ This is the fastest way to have your organisation (or analysis) specific codes p
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@ -12,7 +12,7 @@ resistance() should be used to calculate resistance, susceptibility() should be
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -178,42 +178,43 @@
<h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="fu">random_mic</span><span class="op">(</span><span class="fl">25</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'mic'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 0.125 0.001 1 16 0.025 0.002 0.125 2 128 0.01 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [11] 256 64 256 0.005 2 32 0.0625 8 0.025 0.25 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [21] 0.005 0.01 0.002 128 0.001 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 64 0.125 4 0.25 64 128 0.125 128 256 0.001 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [11] 0.5 1 0.5 0.25 0.001 256 128 0.0625 0.0625 0.01 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [21] 0.001 0.125 0.002 0.005 0.001 </span>
<span class="r-in"><span><span class="fu">random_disk</span><span class="op">(</span><span class="fl">25</span><span class="op">)</span></span></span>
<span class="r-err co"><span class="r-pr">#&gt;</span> <span class="error">Error in seq.default(from = as.integer(min(df$breakpoint_R)/1.25), to = as.integer(max(df$breakpoint_S) * 1.25), by = 1):</span> 'from' must be a finite number</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'disk'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 43 40 47 19 6 8 26 46 43 13 48 14 24 43 45 29 42 46 6 19 19 47 28 17 41</span>
<span class="r-in"><span><span class="fu">random_rsi</span><span class="op">(</span><span class="fl">25</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'rsi'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] I I R S S S S R I S S I I I S S I I R R R R S I I</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] I I S S R R R I I R I R S S R R S S I R R S I R I</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># \donttest{</span></span></span>
<span class="r-in"><span><span class="co"># make the random generation more realistic by setting a bug and/or drug:</span></span></span>
<span class="r-in"><span><span class="fu">random_mic</span><span class="op">(</span><span class="fl">25</span>, <span class="st">"Klebsiella pneumoniae"</span><span class="op">)</span> <span class="co"># range 0.0625-64</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'mic'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 0.0625 32 2 &gt;=128 0.25 0.25 0.125 64 4 4 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [11] 0.01 0.5 1 &gt;=128 0.25 8 8 64 32 0.25 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [21] 0.002 0.01 0.005 0.005 0.005 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 8 4 0.002 0.01 0.005 0.0625 0.005 8 &gt;=64 0.5 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [11] 0.0625 &gt;=64 0.001 0.01 0.25 0.0625 0.125 0.125 1 32 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [21] 0.002 0.025 0.002 8 0.025 </span>
<span class="r-in"><span><span class="fu">random_mic</span><span class="op">(</span><span class="fl">25</span>, <span class="st">"Klebsiella pneumoniae"</span>, <span class="st">"meropenem"</span><span class="op">)</span> <span class="co"># range 0.0625-16</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'mic'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 4 &gt;=32 4 0.5 4 4 &lt;=0.25 &lt;=0.25 &gt;=32 &gt;=32 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [11] 1 16 &gt;=32 &gt;=32 1 1 0.5 &gt;=32 16 4 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [21] &lt;=0.25 2 2 2 2 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 64 64 16 8 2 32 16 2 64 4 8 64 8 64 64 8 4 4 4 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [20] 4 64 0.5 16 0.5 2 </span>
<span class="r-in"><span><span class="fu">random_mic</span><span class="op">(</span><span class="fl">25</span>, <span class="st">"Streptococcus pneumoniae"</span>, <span class="st">"meropenem"</span><span class="op">)</span> <span class="co"># range 0.0625-4</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'mic'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 0.5 0.0625 4 4 0.125 &lt;=0.025 0.125 2 4 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [10] 0.0625 &lt;=0.025 0.0625 2 2 8 0.0625 1 &lt;=0.025</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [19] &lt;=0.025 0.25 4 &lt;=0.025 &lt;=0.025 0.25 0.5 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] &lt;=0.0625 0.125 1 &lt;=0.0625 &lt;=0.0625 &lt;=0.0625 2 0.125 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [9] &lt;=0.0625 4 &lt;=0.0625 0.25 &gt;=8 1 0.125 4 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [17] 2 0.125 &lt;=0.0625 4 0.25 0.5 2 2 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [25] &gt;=8 </span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="fu">random_disk</span><span class="op">(</span><span class="fl">25</span>, <span class="st">"Klebsiella pneumoniae"</span><span class="op">)</span> <span class="co"># range 8-50</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'disk'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 18 30 42 26 20 26 42 10 19 34 48 49 34 49 27 29 44 32 9 17 32 13 25 40 18</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 19 40 40 47 26 36 39 28 33 48 12 45 31 40 42 39 45 37 42 12 45 46 32 10 24</span>
<span class="r-in"><span><span class="fu">random_disk</span><span class="op">(</span><span class="fl">25</span>, <span class="st">"Klebsiella pneumoniae"</span>, <span class="st">"ampicillin"</span><span class="op">)</span> <span class="co"># range 11-17</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'disk'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 14 13 17 17 14 15 13 16 13 15 11 13 15 13 16 15 12 15 17 14 16 13 13 12 15</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 15 14 17 11 16 14 12 12 16 13 11 15 15 12 13 17 17 13 15 16 11 15 16 12 12</span>
<span class="r-in"><span><span class="fu">random_disk</span><span class="op">(</span><span class="fl">25</span>, <span class="st">"Streptococcus pneumoniae"</span>, <span class="st">"ampicillin"</span><span class="op">)</span> <span class="co"># range 12-27</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'disk'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 26 17 19 16 25 23 19 26 16 15 22 16 22 24 20 26 26 23 22 26 15 25 17 19 15</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 18 17 18 16 21 21 23 17 17 26 15 19 18 23 23 18 22 24 21 25 26 15 26 19 24</span>
<span class="r-in"><span><span class="co"># }</span></span></span>
</code></pre></div>
</div>

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@ -12,7 +12,7 @@ When negative ('left-skewed'): the left tail is longer; the mass of the distribu
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -166,7 +166,7 @@ When negative ('left-skewed'): the left tail is longer; the mass of the distribu
<div class="section level2">
<h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="fu">skewness</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/stats/Uniform.html" class="external-link">runif</a></span><span class="op">(</span><span class="fl">1000</span><span class="op">)</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] -0.01498404</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 0.0595199</span>
</code></pre></div>
</div>
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9033</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.8.2.9034</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

File diff suppressed because one or more lines are too long