(v1.8.1.9008) website update
@ -1,5 +1,5 @@
|
||||
Package: AMR
|
||||
Version: 1.8.1.9007
|
||||
Version: 1.8.1.9008
|
||||
Date: 2022-05-11
|
||||
Title: Antimicrobial Resistance Data Analysis
|
||||
Description: Functions to simplify and standardise antimicrobial resistance (AMR)
|
||||
|
2
NEWS.md
@ -1,4 +1,4 @@
|
||||
# `AMR` 1.8.1.9007
|
||||
# `AMR` 1.8.1.9008
|
||||
## <small>Last updated: 11 mei 2022</small>
|
||||
|
||||
### New
|
||||
|
@ -252,7 +252,9 @@ changed_md5 <- function(object) {
|
||||
}
|
||||
|
||||
# give official names to ABs and MOs
|
||||
rsi <- dplyr::mutate(rsi_translation, ab = ab_name(ab), mo = mo_name(mo))
|
||||
rsi <- AMR::rsi_translation %>%
|
||||
mutate(mo_name = mo_name(mo, language = NULL), .after = mo) %>%
|
||||
mutate(ab_name = ab_name(ab, language = NULL), .after = ab)
|
||||
if (changed_md5(rsi)) {
|
||||
usethis::ui_info(paste0("Saving {usethis::ui_value('rsi_translation')} to {usethis::ui_value('/data-raw/')}"))
|
||||
write_md5(rsi)
|
||||
@ -312,8 +314,8 @@ if (changed_md5(av)) {
|
||||
}
|
||||
|
||||
# give official names to ABs and MOs
|
||||
intrinsicR <- data.frame(microorganism = mo_name(intrinsic_resistant$mo),
|
||||
antibiotic = ab_name(intrinsic_resistant$ab),
|
||||
intrinsicR <- data.frame(microorganism = mo_name(intrinsic_resistant$mo, language = NULL),
|
||||
antibiotic = ab_name(intrinsic_resistant$ab, language = NULL),
|
||||
stringsAsFactors = FALSE)
|
||||
if (changed_md5(intrinsicR)) {
|
||||
usethis::ui_info(paste0("Saving {usethis::ui_value('intrinsic_resistant')} to {usethis::ui_value('/data-raw/')}"))
|
||||
|
@ -1 +1 @@
|
||||
1bec696f21d9f1c0111bb3bf1c9f839c
|
||||
56b3cea0e28d8a54e0fcbd3e50af96fc
|
||||
|
@ -1 +1 @@
|
||||
d5f44e985adf2c234066f5c9a6235255
|
||||
75a10b41a8bd4f4788520f3407431e66
|
||||
|
@ -43,7 +43,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="https://msberends.github.io/AMR/index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.1.9007</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.1.9008</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.1.9007</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.1.9008</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 72 KiB |
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 49 KiB |
@ -44,7 +44,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.1</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.1.9008</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
</a>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-question-circle"></span>
|
||||
|
||||
How to
|
||||
@ -185,7 +185,7 @@
|
||||
|
||||
|
||||
|
||||
</header><script src="EUCAST_files/accessible-code-block-0.0.1/empty-anchor.js"></script><div class="row">
|
||||
</header><div class="row">
|
||||
<div class="col-md-9 contents">
|
||||
<div class="page-header toc-ignore">
|
||||
<h1 data-toc-skip>How to apply EUCAST rules</h1>
|
||||
@ -201,18 +201,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 class="va">oops</span> <span class="op"><-</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>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 class="st">"Klebsiella"</span>,
|
||||
<span class="st">"Escherichia"</span><span class="op">)</span>,
|
||||
@ -226,7 +247,10 @@
|
||||
<span class="co"># mo ampicillin</span>
|
||||
<span class="co"># 1 Klebsiella R</span>
|
||||
<span class="co"># 2 Escherichia S</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 class="fu"><a href="../reference/mo_property.html">mo_is_intrinsic_resistant</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="st">"Klebsiella"</span>, <span class="st">"Escherichia"</span><span class="op">)</span>,
|
||||
<span class="st">"ampicillin"</span><span class="op">)</span>
|
||||
@ -235,7 +259,11 @@
|
||||
<span class="fu"><a href="../reference/mo_property.html">mo_is_intrinsic_resistant</a></span><span class="op">(</span><span class="st">"Klebsiella"</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 class="op">)</span>
|
||||
<span class="co"># [1] TRUE FALSE</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 class="va">data</span> <span class="op"><-</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>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 class="st">"Staphylococcus aureus"</span>,
|
||||
<span class="st">"Enterococcus faecalis"</span>,
|
||||
@ -402,7 +430,7 @@
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p>
|
||||
<p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
<p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.3.</p>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
|
@ -44,7 +44,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.1</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.1.9008</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
</a>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-question-circle"></span>
|
||||
|
||||
How to
|
||||
@ -185,10 +185,11 @@
|
||||
|
||||
|
||||
|
||||
</header><script src="MDR_files/accessible-code-block-0.0.1/empty-anchor.js"></script><div class="row">
|
||||
</header><div class="row">
|
||||
<div class="col-md-9 contents">
|
||||
<div class="page-header toc-ignore">
|
||||
<h1 data-toc-skip>How to determine multi-drug resistance (MDR)</h1>
|
||||
<h1 data-toc-skip>How to determine multi-drug resistance
|
||||
(MDR)</h1>
|
||||
|
||||
|
||||
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/HEAD/vignettes/MDR.Rmd" class="external-link"><code>vignettes/MDR.Rmd</code></a></small>
|
||||
@ -198,54 +199,87 @@
|
||||
|
||||
|
||||
|
||||
<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 class="va">custom</span> <span class="op"><-</span> <span class="fu"><a href="../reference/mdro.html">custom_mdro_guideline</a></span><span class="op">(</span><span class="va">CIP</span> <span class="op">==</span> <span class="st">"R"</span> <span class="op">&</span> <span class="va">age</span> <span class="op">></span> <span class="fl">60</span> <span class="op">~</span> <span class="st">"Elderly Type A"</span>,
|
||||
<span class="va">ERY</span> <span class="op">==</span> <span class="st">"R"</span> <span class="op">&</span> <span class="va">age</span> <span class="op">></span> <span class="fl">60</span> <span class="op">~</span> <span class="st">"Elderly Type B"</span><span class="op">)</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 class="va">custom</span>
|
||||
<span class="co"># A set of custom MDRO rules:</span>
|
||||
@ -255,7 +289,8 @@
|
||||
<span class="co"># </span>
|
||||
<span class="co"># Unmatched rows will return NA.</span>
|
||||
<span class="co"># Results will be of class <factor>, with ordered levels: Negative < Elderly Type A < Elderly Type B</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 class="va">x</span> <span class="op"><-</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 class="co"># Determining MDROs based on custom rules, resulting in factor levels:</span>
|
||||
@ -266,14 +301,25 @@
|
||||
<span class="co"># x</span>
|
||||
<span class="co"># Negative Elderly Type A Elderly Type B </span>
|
||||
<span class="co"># 1070 198 732</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 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: %>%</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></code></pre></div>
|
||||
@ -297,16 +343,32 @@
|
||||
<span class="co"># Table 5 - Acinetobacter spp.... OK.</span>
|
||||
<span class="co"># Warning: in `mdro()`: NA introduced for isolates where the available percentage of</span>
|
||||
<span class="co"># antimicrobial classes was below 50% (set with `pct_required_classes`)</span></code></pre></div>
|
||||
<p>Only results with ‘R’ are considered as resistance. Use <code>combine_SI = FALSE</code> to also consider ‘I’ as resistance.</p>
|
||||
<p>Determining multidrug-resistant organisms (MDRO), according to: Guideline: Multidrug-resistant, extensively drug-resistant and pandrug-resistant bacteria: an international expert proposal for interim standard definitions for acquired resistance. Author(s): Magiorakos AP, Srinivasan A, Carey RB, …, Vatopoulos A, Weber JT, Monnet DL Source: Clinical Microbiology and Infection 18:3, 2012; doi: 10.1111/j.1469-0691.2011.03570.x</p>
|
||||
<p>Only results with ‘R’ are considered as resistance. Use
|
||||
<code>combine_SI = FALSE</code> to also consider ‘I’ as resistance.</p>
|
||||
<p>Determining multidrug-resistant organisms (MDRO), according to:
|
||||
Guideline: Multidrug-resistant, extensively drug-resistant and
|
||||
pandrug-resistant bacteria: an international expert proposal for interim
|
||||
standard definitions for acquired resistance. Author(s): Magiorakos AP,
|
||||
Srinivasan A, Carey RB, …, Vatopoulos A, Weber JT, Monnet DL Source:
|
||||
Clinical Microbiology and Infection 18:3, 2012; doi:
|
||||
10.1111/j.1469-0691.2011.03570.x</p>
|
||||
<p>(16 isolates had no test results)</p>
|
||||
<p><strong>Frequency table</strong></p>
|
||||
<p>Class: factor > ordered (numeric)<br>
|
||||
Length: 2,000<br>
|
||||
Levels: 4: Negative < Multi-drug-resistant (MDR) < Extensively drug-resistant …<br>
|
||||
Levels: 4: Negative < Multi-drug-resistant (MDR) < 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>
|
||||
@ -334,7 +396,8 @@ Unique: 2</p>
|
||||
</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 class="co"># random_rsi() is a helper function to generate</span>
|
||||
<span class="co"># a random vector with values S, I and R</span>
|
||||
@ -345,7 +408,8 @@ Unique: 2</p>
|
||||
pyrazinamide <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>,
|
||||
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>,
|
||||
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 class="op">)</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 class="va">my_TB_data</span> <span class="op"><-</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>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>,
|
||||
INH <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>,
|
||||
@ -358,20 +422,21 @@ Unique: 2</p>
|
||||
<div class="sourceCode" id="cb8"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R"><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 class="co"># rifampicin isoniazid gatifloxacin ethambutol pyrazinamide moxifloxacin</span>
|
||||
<span class="co"># 1 S R S I R S</span>
|
||||
<span class="co"># 2 I I S S I I</span>
|
||||
<span class="co"># 3 I S R R R S</span>
|
||||
<span class="co"># 4 S S I S R S</span>
|
||||
<span class="co"># 5 R R S I R I</span>
|
||||
<span class="co"># 6 R S R S S I</span>
|
||||
<span class="co"># 1 R I R R I S</span>
|
||||
<span class="co"># 2 I I S S R S</span>
|
||||
<span class="co"># 3 I S R R S R</span>
|
||||
<span class="co"># 4 R I S R R I</span>
|
||||
<span class="co"># 5 R I I I R I</span>
|
||||
<span class="co"># 6 R I R S R I</span>
|
||||
<span class="co"># kanamycin</span>
|
||||
<span class="co"># 1 I</span>
|
||||
<span class="co"># 2 S</span>
|
||||
<span class="co"># 1 R</span>
|
||||
<span class="co"># 2 R</span>
|
||||
<span class="co"># 3 S</span>
|
||||
<span class="co"># 4 I</span>
|
||||
<span class="co"># 5 I</span>
|
||||
<span class="co"># 6 I</span></code></pre></div>
|
||||
<p>We can now add the interpretation of MDR-TB to our data set. You can use:</p>
|
||||
<span class="co"># 6 R</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 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></code></pre></div>
|
||||
<p>or its shortcut <code><a href="../reference/mdro.html">mdr_tb()</a></code>:</p>
|
||||
@ -397,10 +462,19 @@ Unique: 2</p>
|
||||
<p><strong>Frequency table</strong></p>
|
||||
<p>Class: factor > ordered (numeric)<br>
|
||||
Length: 5,000<br>
|
||||
Levels: 5: Negative < Mono-resistant < Poly-resistant < Multi-drug-resistant <…<br>
|
||||
Levels: 5: Negative < Mono-resistant < Poly-resistant <
|
||||
Multi-drug-resistant <…<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>
|
||||
@ -413,40 +487,40 @@ Unique: 5</p>
|
||||
<tr class="odd">
|
||||
<td align="left">1</td>
|
||||
<td align="left">Mono-resistant</td>
|
||||
<td align="right">3244</td>
|
||||
<td align="right">64.88%</td>
|
||||
<td align="right">3244</td>
|
||||
<td align="right">64.88%</td>
|
||||
<td align="right">3218</td>
|
||||
<td align="right">64.36%</td>
|
||||
<td align="right">3218</td>
|
||||
<td align="right">64.36%</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="left">2</td>
|
||||
<td align="left">Negative</td>
|
||||
<td align="right">990</td>
|
||||
<td align="right">19.80%</td>
|
||||
<td align="right">4234</td>
|
||||
<td align="right">84.68%</td>
|
||||
<td align="right">979</td>
|
||||
<td align="right">19.58%</td>
|
||||
<td align="right">4197</td>
|
||||
<td align="right">83.94%</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="left">3</td>
|
||||
<td align="left">Multi-drug-resistant</td>
|
||||
<td align="right">417</td>
|
||||
<td align="right">8.34%</td>
|
||||
<td align="right">4651</td>
|
||||
<td align="right">93.02%</td>
|
||||
<td align="right">458</td>
|
||||
<td align="right">9.16%</td>
|
||||
<td align="right">4655</td>
|
||||
<td align="right">93.10%</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="left">4</td>
|
||||
<td align="left">Poly-resistant</td>
|
||||
<td align="right">248</td>
|
||||
<td align="right">4.96%</td>
|
||||
<td align="right">4899</td>
|
||||
<td align="right">97.98%</td>
|
||||
<td align="right">237</td>
|
||||
<td align="right">4.74%</td>
|
||||
<td align="right">4892</td>
|
||||
<td align="right">97.84%</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="left">5</td>
|
||||
<td align="left">Extensively drug-resistant</td>
|
||||
<td align="right">101</td>
|
||||
<td align="right">2.02%</td>
|
||||
<td align="right">108</td>
|
||||
<td align="right">2.16%</td>
|
||||
<td align="right">5000</td>
|
||||
<td align="right">100.00%</td>
|
||||
</tr>
|
||||
@ -470,7 +544,7 @@ Unique: 5</p>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p>
|
||||
<p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
<p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.3.</p>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
|
@ -44,7 +44,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.1</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.1.9008</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
</a>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-question-circle"></span>
|
||||
|
||||
How to
|
||||
@ -185,10 +185,11 @@
|
||||
|
||||
|
||||
|
||||
</header><script src="PCA_files/accessible-code-block-0.0.1/empty-anchor.js"></script><div class="row">
|
||||
</header><div class="row">
|
||||
<div class="col-md-9 contents">
|
||||
<div class="page-header toc-ignore">
|
||||
<h1 data-toc-skip>How to conduct principal component analysis (PCA) for AMR</h1>
|
||||
<h1 data-toc-skip>How to conduct principal component analysis
|
||||
(PCA) for AMR</h1>
|
||||
|
||||
|
||||
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/HEAD/vignettes/PCA.Rmd" class="external-link"><code>vignettes/PCA.Rmd</code></a></small>
|
||||
@ -198,7 +199,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>
|
||||
@ -206,7 +208,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 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="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>
|
||||
@ -262,7 +265,8 @@
|
||||
<span class="co"># $ COL <span style="color: #949494; font-style: italic;"><rsi></span> NA, NA, R, R, R, R, R, R, R, R, R, R, NA, NA, NA, R, R…</span>
|
||||
<span class="co"># $ MUP <span style="color: #949494; font-style: italic;"><rsi></span> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…</span>
|
||||
<span class="co"># $ RIF <span style="color: #949494; font-style: italic;"><rsi></span> R, R, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, R, R, R,…</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 class="va">resistance_data</span> <span class="op"><-</span> <span class="va">example_isolates</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></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>order <span class="op">=</span> <span class="fu"><a href="../reference/mo_property.html">mo_order</a></span><span class="op">(</span><span class="va">mo</span><span class="op">)</span>, <span class="co"># group on anything, like order</span>
|
||||
@ -286,24 +290,31 @@
|
||||
<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 class="va">pca_result</span> <span class="op"><-</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 class="co"># ℹ Columns selected for PCA: "AMC", "CAZ", "CTX", "CXM", "GEN", "SXT", "TMP"</span>
|
||||
<span class="co"># and "TOB". Total observations available: 7.</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 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 class="co"># Groups (n=4, named as 'order'):</span>
|
||||
<span class="co"># [1] "Caryophanales" "Enterobacterales" "Lactobacillales" "Pseudomonadales"</span>
|
||||
<span class="co"># Importance of components:</span>
|
||||
<span class="co"># PC1 PC2 PC3 PC4 PC5 PC6 PC7</span>
|
||||
<span class="co"># Standard deviation 2.1539 1.6807 0.6138 0.33879 0.20808 0.03140 5.121e-17</span>
|
||||
<span class="co"># Standard deviation 2.1539 1.6807 0.6138 0.33879 0.20808 0.03140 5.674e-17</span>
|
||||
<span class="co"># Proportion of Variance 0.5799 0.3531 0.0471 0.01435 0.00541 0.00012 0.000e+00</span>
|
||||
<span class="co"># Cumulative Proportion 0.5799 0.9330 0.9801 0.99446 0.99988 1.00000 1.000e+00</span></code></pre></div>
|
||||
<pre><code><span class="co"># Groups (n=4, named as 'order'):</span>
|
||||
<span class="co"># [1] "Caryophanales" "Enterobacterales" "Lactobacillales" "Pseudomonadales"</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>
|
||||
@ -311,7 +322,9 @@
|
||||
<div class="sourceCode" id="cb6"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R"><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></code></pre></div>
|
||||
<p><img src="PCA_files/figure-html/unnamed-chunk-5-1.png" width="750"></p>
|
||||
<p>But we can’t 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 can’t 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 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></code></pre></div>
|
||||
<p><img src="PCA_files/figure-html/unnamed-chunk-6-1.png" width="750"></p>
|
||||
@ -340,7 +353,7 @@
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p>
|
||||
<p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
<p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.3.</p>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 91 KiB After Width: | Height: | Size: 93 KiB |
Before Width: | Height: | Size: 91 KiB After Width: | Height: | Size: 93 KiB |
@ -44,7 +44,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.1</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.1.9008</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
</a>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-question-circle"></span>
|
||||
|
||||
How to
|
||||
@ -185,13 +185,14 @@
|
||||
|
||||
|
||||
|
||||
</header><script src="SPSS_files/accessible-code-block-0.0.1/empty-anchor.js"></script><div class="row">
|
||||
</header><div class="row">
|
||||
<div class="col-md-9 contents">
|
||||
<div class="page-header toc-ignore">
|
||||
<h1 data-toc-skip>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">27 March 2022</h4>
|
||||
<h4 data-toc-skip class="date">11 mei 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="hidden name"><code>SPSS.Rmd</code></div>
|
||||
@ -203,45 +204,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">440,893 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">447,735
|
||||
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 that’s not vice versa I’m 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 that’s not vice versa I’m 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 didn’t 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 don’t 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
|
||||
didn’t 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 don’t see any reason why SPSS
|
||||
would be of any better use than R.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<p>To demonstrate the first point:</p>
|
||||
@ -285,13 +376,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 you’re 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 you’re 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><a href="https://haven.tidyverse.org/reference/as_factor.html" class="external-link">as_factor()</a></code>.</p>
|
||||
<p>If you want named variables to be imported as factors so it resembles
|
||||
SPSS more, use <code><a href="https://haven.tidyverse.org/reference/as_factor.html" class="external-link">as_factor()</a></code>.</p>
|
||||
<p>The difference is this:</p>
|
||||
<div class="sourceCode" id="cb2"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R"><span class="va">SPSS_data</span>
|
||||
@ -329,7 +430,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 class="co"># download and install the latest version:</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>
|
||||
@ -414,7 +516,7 @@
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p>
|
||||
<p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
<p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.3.</p>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
|
@ -44,7 +44,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.1</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.1.9008</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
</a>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-question-circle"></span>
|
||||
|
||||
How to
|
||||
@ -185,7 +185,7 @@
|
||||
|
||||
|
||||
|
||||
</header><script src="WHONET_files/accessible-code-block-0.0.1/empty-anchor.js"></script><div class="row">
|
||||
</header><div class="row">
|
||||
<div class="col-md-9 contents">
|
||||
<div class="page-header toc-ignore">
|
||||
<h1 data-toc-skip>How to work with WHONET data</h1>
|
||||
@ -201,26 +201,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 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 class="va">data</span> <span class="op"><-</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></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 don’t 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 don’t 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 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 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 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 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></code></pre></div>
|
||||
<p>We will have to transform some variables to simplify and automate the analysis:</p>
|
||||
<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 class="co"># transform variables</span>
|
||||
@ -230,7 +247,9 @@
|
||||
<span class="co"># transform everything from "AMP_ND10" to "CIP_EE" to the new `rsi` class</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></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://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq()</a></code>
|
||||
function can be used to create frequency tables.</p>
|
||||
<p>So let’s 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 class="co"># our newly created `mo` variable, put in the mo_name() function</span>
|
||||
@ -243,6 +262,14 @@ Unique: 37</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>
|
||||
@ -388,7 +415,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 class="va">data</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></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">%>%</a></span>
|
||||
@ -413,7 +441,7 @@ Drug group: Beta-lactams/penicillins<br>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p>
|
||||
<p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
<p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.3.</p>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
|
@ -44,7 +44,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.1.9007</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.1.9008</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -881,6 +881,173 @@ Dipivoxil, …</td>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section level2">
|
||||
<h2 id="interpretation-from-mic-values-disk-diameters-to-rsi">Interpretation from MIC values / disk diameters to R/SI<a class="anchor" aria-label="anchor" href="#interpretation-from-mic-values-disk-diameters-to-rsi"></a>
|
||||
</h2>
|
||||
<p>A data set with 20,369 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 11 mei 2022 08:14:33 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">R
|
||||
file</a> (49 kB)<br>
|
||||
</li>
|
||||
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/rsi_translation.xlsx" class="external-link">Excel
|
||||
file</a> (0.9 MB)<br>
|
||||
</li>
|
||||
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/rsi_translation.txt" class="external-link">plain
|
||||
text file</a> (2 MB)<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
|
||||
file</a> (4 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">SPSS
|
||||
file</a> (2.6 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
|
||||
file</a> (3.8 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 interpretation rules for MIC values and disk
|
||||
diffusion diameters. Included guidelines are CLSI (2011-2022) and EUCAST
|
||||
(2011-2022).</p>
|
||||
</div>
|
||||
<div class="section level3">
|
||||
<h3 id="example-content-4">Example content<a class="anchor" aria-label="anchor" href="#example-content-4"></a>
|
||||
</h3>
|
||||
<table style="width:100%;" class="table">
|
||||
<colgroup>
|
||||
<col width="8%">
|
||||
<col width="5%">
|
||||
<col width="3%">
|
||||
<col width="8%">
|
||||
<col width="14%">
|
||||
<col width="7%">
|
||||
<col width="3%">
|
||||
<col width="10%">
|
||||
<col width="8%">
|
||||
<col width="7%">
|
||||
<col width="8%">
|
||||
<col width="8%">
|
||||
<col width="4%">
|
||||
</colgroup>
|
||||
<thead><tr class="header">
|
||||
<th align="center">guideline</th>
|
||||
<th align="center">method</th>
|
||||
<th align="center">site</th>
|
||||
<th align="center">mo</th>
|
||||
<th align="center">mo_name</th>
|
||||
<th align="center">rank_index</th>
|
||||
<th align="center">ab</th>
|
||||
<th align="center">ab_name</th>
|
||||
<th align="center">ref_tbl</th>
|
||||
<th align="center">disk_dose</th>
|
||||
<th align="center">breakpoint_S</th>
|
||||
<th align="center">breakpoint_R</th>
|
||||
<th align="center">uti</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td align="center">EUCAST 2022</td>
|
||||
<td align="center">MIC</td>
|
||||
<td align="center"></td>
|
||||
<td align="center">F_ASPRG_MGTS</td>
|
||||
<td align="center">Aspergillus fumigatus</td>
|
||||
<td align="center">2</td>
|
||||
<td align="center">AMB</td>
|
||||
<td align="center">Amphotericin B</td>
|
||||
<td align="center">Aspergillus</td>
|
||||
<td align="center"></td>
|
||||
<td align="center">1</td>
|
||||
<td align="center">1</td>
|
||||
<td align="center">FALSE</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">EUCAST 2022</td>
|
||||
<td align="center">MIC</td>
|
||||
<td align="center"></td>
|
||||
<td align="center">F_ASPRG_NIGR</td>
|
||||
<td align="center">Aspergillus niger</td>
|
||||
<td align="center">2</td>
|
||||
<td align="center">AMB</td>
|
||||
<td align="center">Amphotericin B</td>
|
||||
<td align="center">Aspergillus</td>
|
||||
<td align="center"></td>
|
||||
<td align="center">1</td>
|
||||
<td align="center">1</td>
|
||||
<td align="center">FALSE</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">EUCAST 2022</td>
|
||||
<td align="center">MIC</td>
|
||||
<td align="center"></td>
|
||||
<td align="center">F_CANDD</td>
|
||||
<td align="center">Candida</td>
|
||||
<td align="center">3</td>
|
||||
<td align="center">AMB</td>
|
||||
<td align="center">Amphotericin B</td>
|
||||
<td align="center">Candida</td>
|
||||
<td align="center"></td>
|
||||
<td align="center">1</td>
|
||||
<td align="center">1</td>
|
||||
<td align="center">FALSE</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">EUCAST 2022</td>
|
||||
<td align="center">MIC</td>
|
||||
<td align="center"></td>
|
||||
<td align="center">F_CANDD_ALBC</td>
|
||||
<td align="center">Candida albicans</td>
|
||||
<td align="center">2</td>
|
||||
<td align="center">AMB</td>
|
||||
<td align="center">Amphotericin B</td>
|
||||
<td align="center">Candida</td>
|
||||
<td align="center"></td>
|
||||
<td align="center">1</td>
|
||||
<td align="center">1</td>
|
||||
<td align="center">FALSE</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">EUCAST 2022</td>
|
||||
<td align="center">MIC</td>
|
||||
<td align="center"></td>
|
||||
<td align="center">F_CANDD_DBLN</td>
|
||||
<td align="center">Candida dubliniensis</td>
|
||||
<td align="center">2</td>
|
||||
<td align="center">AMB</td>
|
||||
<td align="center">Amphotericin B</td>
|
||||
<td align="center">Candida</td>
|
||||
<td align="center"></td>
|
||||
<td align="center">1</td>
|
||||
<td align="center">1</td>
|
||||
<td align="center">FALSE</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">EUCAST 2022</td>
|
||||
<td align="center">MIC</td>
|
||||
<td align="center"></td>
|
||||
<td align="center">F_CANDD_KRUS</td>
|
||||
<td align="center">Candida krusei</td>
|
||||
<td align="center">2</td>
|
||||
<td align="center">AMB</td>
|
||||
<td align="center">Amphotericin B</td>
|
||||
<td align="center">Candida</td>
|
||||
<td align="center"></td>
|
||||
<td align="center">1</td>
|
||||
<td align="center">1</td>
|
||||
<td align="center">FALSE</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section level2">
|
||||
<h2 id="intrinsic-bacterial-resistance">Intrinsic bacterial resistance<a class="anchor" aria-label="anchor" href="#intrinsic-bacterial-resistance"></a>
|
||||
</h2>
|
||||
<p>A data set with 134,956 rows and 2 columns, containing the following
|
||||
@ -904,13 +1071,13 @@ text file</a> (5.1 MB)<br>
|
||||
file</a> (10.4 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">SPSS
|
||||
file</a> (7.5 MB)<br>
|
||||
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
|
||||
file</a> (10.2 MB)</li>
|
||||
</ul>
|
||||
<div class="section level3">
|
||||
<h3 id="source-4">Source<a class="anchor" aria-label="anchor" href="#source-4"></a>
|
||||
<h3 id="source-5">Source<a class="anchor" aria-label="anchor" href="#source-5"></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
|
||||
@ -918,7 +1085,7 @@ 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>
|
||||
<h3 id="example-content-5">Example content<a class="anchor" aria-label="anchor" href="#example-content-5"></a>
|
||||
</h3>
|
||||
<p>Example rows when filtering on <em>Enterobacter cloacae</em>:</p>
|
||||
<table class="table">
|
||||
@ -933,6 +1100,14 @@ v3.3</a> (2021).</p>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
<td align="center">Acetylspiramycin</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
<td align="center">Amoxicillin</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
<td align="center">Amoxicillin/clavulanic acid</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
@ -941,35 +1116,43 @@ v3.3</a> (2021).</p>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
<td align="center">Amoxicillin</td>
|
||||
<td align="center">Ampicillin/sulbactam</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
<td align="center">Acetylspiramycin</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
<td align="center">Avoparcin</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<tr class="even">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
<td align="center">Azithromycin</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
<td align="center">Benzylpenicillin</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
<td align="center">Cadazolid</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
<td align="center">Cephalothin</td>
|
||||
<td align="center">Cefadroxil</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
<td align="center">Cefadroxil</td>
|
||||
<td align="center">Cefazolin</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
<td align="center">Clindamycin</td>
|
||||
<td align="center">Cefoxitin</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
<td align="center">Cephalexin</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
<td align="center">Cephalothin</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
@ -977,11 +1160,11 @@ v3.3</a> (2021).</p>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
<td align="center">Cycloserine</td>
|
||||
<td align="center">Clindamycin</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
<td align="center">Cefazolin</td>
|
||||
<td align="center">Cycloserine</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
@ -1001,27 +1184,19 @@ v3.3</a> (2021).</p>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
<td align="center">Cefoxitin</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
<td align="center">Fusidic acid</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<tr class="even">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
<td align="center">Gamithromycin</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<tr class="odd">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
<td align="center">Josamycin</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
<td align="center">Kitasamycin</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
<td align="center">Cephalexin</td>
|
||||
<td align="center">Kitasamycin</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
@ -1033,31 +1208,39 @@ v3.3</a> (2021).</p>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
<td align="center">Meleumycin</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
<td align="center">Midecamycin</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
<td align="center">Miocamycin</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
<td align="center">Meleumycin</td>
|
||||
<td align="center">Nafithromycin</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
<td align="center">Midecamycin</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
<td align="center">Norvancomycin</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<tr class="even">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
<td align="center">Oleandomycin</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<tr class="odd">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
<td align="center">Oritavancin</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
<td align="center">Pirlimycin</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
<td align="center">Benzylpenicillin</td>
|
||||
<td align="center">Primycin</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
@ -1065,14 +1248,6 @@ v3.3</a> (2021).</p>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
<td align="center">Pirlimycin</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
<td align="center">Primycin</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
<td align="center">Quinupristin/dalfopristin</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
@ -1093,15 +1268,15 @@ v3.3</a> (2021).</p>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
<td align="center">Ampicillin/sulbactam</td>
|
||||
<td align="center">Solithromycin</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
<td align="center">Solithromycin</td>
|
||||
<td align="center">Spiramycin</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
<td align="center">Spiramycin</td>
|
||||
<td align="center">Tedizolid</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
@ -1109,15 +1284,7 @@ v3.3</a> (2021).</p>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
<td align="center">Thiacetazone</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
<td align="center">Tilmicosin</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
<td align="center">Tildipirosin</td>
|
||||
<td align="center">Telavancin</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
@ -1125,7 +1292,15 @@ v3.3</a> (2021).</p>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
<td align="center">Telavancin</td>
|
||||
<td align="center">Thiacetazone</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
<td align="center">Tildipirosin</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
<td align="center">Tilmicosin</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
@ -1145,167 +1320,8 @@ v3.3</a> (2021).</p>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
<td align="center">Tedizolid</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
<td align="center">Vancomycin</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">Enterobacter cloacae</td>
|
||||
<td align="center">Nafithromycin</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section level2">
|
||||
<h2 id="interpretation-from-mic-values-disk-diameters-to-rsi">Interpretation from MIC values / disk diameters to R/SI<a class="anchor" aria-label="anchor" href="#interpretation-from-mic-values-disk-diameters-to-rsi"></a>
|
||||
</h2>
|
||||
<p>A data set with 20,318 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 11 mei 2022 08:01:12 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">R
|
||||
file</a> (40 kB)<br>
|
||||
</li>
|
||||
<li>Download as <a href="https://github.com/msberends/AMR/raw/main/data-raw/../data-raw/rsi_translation.xlsx" class="external-link">Excel
|
||||
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.txt" class="external-link">plain
|
||||
text file</a> (1.7 MB)<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
|
||||
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">SPSS
|
||||
file</a> (2.2 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
|
||||
file</a> (3.4 MB)</li>
|
||||
</ul>
|
||||
<div class="section level3">
|
||||
<h3 id="source-5">Source<a class="anchor" aria-label="anchor" href="#source-5"></a>
|
||||
</h3>
|
||||
<p>This data set contains interpretation rules for MIC values and disk
|
||||
diffusion diameters. Included guidelines are CLSI (2010-2021) and EUCAST
|
||||
(2011-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="9%">
|
||||
<col width="5%">
|
||||
<col width="4%">
|
||||
<col width="16%">
|
||||
<col width="8%">
|
||||
<col width="11%">
|
||||
<col width="9%">
|
||||
<col width="8%">
|
||||
<col width="10%">
|
||||
<col width="10%">
|
||||
<col width="5%">
|
||||
</colgroup>
|
||||
<thead><tr class="header">
|
||||
<th align="center">guideline</th>
|
||||
<th align="center">method</th>
|
||||
<th align="center">site</th>
|
||||
<th align="center">mo</th>
|
||||
<th align="center">rank_index</th>
|
||||
<th align="center">ab</th>
|
||||
<th align="center">ref_tbl</th>
|
||||
<th align="center">disk_dose</th>
|
||||
<th align="center">breakpoint_S</th>
|
||||
<th align="center">breakpoint_R</th>
|
||||
<th align="center">uti</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td align="center">EUCAST 2021</td>
|
||||
<td align="center">MIC</td>
|
||||
<td align="center"></td>
|
||||
<td align="center">Aspergillus fumigatus</td>
|
||||
<td align="center">2</td>
|
||||
<td align="center">Amphotericin B</td>
|
||||
<td align="center">Aspergillus</td>
|
||||
<td align="center"></td>
|
||||
<td align="center">1</td>
|
||||
<td align="center">4</td>
|
||||
<td align="center">FALSE</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">EUCAST 2021</td>
|
||||
<td align="center">MIC</td>
|
||||
<td align="center"></td>
|
||||
<td align="center">Aspergillus niger</td>
|
||||
<td align="center">2</td>
|
||||
<td align="center">Amphotericin B</td>
|
||||
<td align="center">Aspergillus</td>
|
||||
<td align="center"></td>
|
||||
<td align="center">1</td>
|
||||
<td align="center">4</td>
|
||||
<td align="center">FALSE</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">EUCAST 2021</td>
|
||||
<td align="center">MIC</td>
|
||||
<td align="center"></td>
|
||||
<td align="center">Candida</td>
|
||||
<td align="center">3</td>
|
||||
<td align="center">Amphotericin B</td>
|
||||
<td align="center">Candida</td>
|
||||
<td align="center"></td>
|
||||
<td align="center">1</td>
|
||||
<td align="center">2</td>
|
||||
<td align="center">FALSE</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">EUCAST 2021</td>
|
||||
<td align="center">MIC</td>
|
||||
<td align="center"></td>
|
||||
<td align="center">Candida albicans</td>
|
||||
<td align="center">2</td>
|
||||
<td align="center">Amphotericin B</td>
|
||||
<td align="center">Candida</td>
|
||||
<td align="center"></td>
|
||||
<td align="center">1</td>
|
||||
<td align="center">2</td>
|
||||
<td align="center">FALSE</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">EUCAST 2021</td>
|
||||
<td align="center">MIC</td>
|
||||
<td align="center"></td>
|
||||
<td align="center">Candida krusei</td>
|
||||
<td align="center">2</td>
|
||||
<td align="center">Amphotericin B</td>
|
||||
<td align="center">Candida</td>
|
||||
<td align="center"></td>
|
||||
<td align="center">1</td>
|
||||
<td align="center">2</td>
|
||||
<td align="center">FALSE</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">EUCAST 2021</td>
|
||||
<td align="center">MIC</td>
|
||||
<td align="center"></td>
|
||||
<td align="center">Candida parapsilosis</td>
|
||||
<td align="center">2</td>
|
||||
<td align="center">Amphotericin B</td>
|
||||
<td align="center">Candida</td>
|
||||
<td align="center"></td>
|
||||
<td align="center">1</td>
|
||||
<td align="center">2</td>
|
||||
<td align="center">FALSE</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -17,7 +17,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.1</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.1.9008</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -30,7 +30,7 @@
|
||||
</a>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fa fa-question-circle"></span>
|
||||
|
||||
How to
|
||||
@ -189,7 +189,7 @@
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
|
||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.3.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
@ -17,7 +17,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.1.9007</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.1.9008</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
@ -47,7 +47,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.1.9007</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.1.9008</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.1.9007</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.1.9008</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -157,16 +157,16 @@
|
||||
</div>
|
||||
|
||||
<div class="section level2">
|
||||
<h2 class="page-header" data-toc-text="1.8.1.9007" id="amr-1819007">
|
||||
<code>AMR</code> 1.8.1.9007<a class="anchor" aria-label="anchor" href="#amr-1819007"></a></h2>
|
||||
<h2 class="page-header" data-toc-text="1.8.1.9008" id="amr-1819008">
|
||||
<code>AMR</code> 1.8.1.9008<a class="anchor" aria-label="anchor" href="#amr-1819008"></a></h2>
|
||||
<div class="section level3">
|
||||
<h3 id="last-updated-mei-1-8-1-9007"><small>Last updated: 11 mei 2022</small><a class="anchor" aria-label="anchor" href="#last-updated-mei-1-8-1-9007"></a></h3>
|
||||
<h3 id="last-updated-mei-1-8-1-9008"><small>Last updated: 11 mei 2022</small><a class="anchor" aria-label="anchor" href="#last-updated-mei-1-8-1-9008"></a></h3>
|
||||
<div class="section level4">
|
||||
<h4 id="new-1-8-1-9007">New<a class="anchor" aria-label="anchor" href="#new-1-8-1-9007"></a></h4>
|
||||
<h4 id="new-1-8-1-9008">New<a class="anchor" aria-label="anchor" href="#new-1-8-1-9008"></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>
|
||||
</ul></div>
|
||||
<div class="section level4">
|
||||
<h4 id="changed-1-8-1-9007">Changed<a class="anchor" aria-label="anchor" href="#changed-1-8-1-9007"></a></h4>
|
||||
<h4 id="changed-1-8-1-9008">Changed<a class="anchor" aria-label="anchor" href="#changed-1-8-1-9008"></a></h4>
|
||||
<ul><li>Fix for <code><a href="../reference/as.rsi.html">as.rsi()</a></code> on certain EUCAST breakpoints for MIC values</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 that’s 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>
|
||||
|
@ -17,7 +17,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.1.9007</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.1.9008</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
@ -209,6 +209,27 @@ antivirals %>%
|
||||
print_df()
|
||||
```
|
||||
|
||||
## Interpretation from MIC values / disk diameters to R/SI
|
||||
|
||||
`r structure_txt(rsi_translation)`
|
||||
|
||||
This data set is in R available as `rsi_translation`, after you load the `AMR` package.
|
||||
|
||||
`r download_txt("rsi_translation")`
|
||||
|
||||
### Source
|
||||
|
||||
This data set contains interpretation rules for MIC values and disk diffusion diameters. Included guidelines are CLSI (`r min(as.integer(gsub("[^0-9]", "", subset(rsi_translation, guideline %like% "CLSI")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(rsi_translation, guideline %like% "CLSI")$guideline)))`) and EUCAST (`r min(as.integer(gsub("[^0-9]", "", subset(rsi_translation, guideline %like% "EUCAST")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(rsi_translation, guideline %like% "EUCAST")$guideline)))`).
|
||||
|
||||
### Example content
|
||||
|
||||
```{r, echo = FALSE}
|
||||
rsi_translation %>%
|
||||
mutate(mo_name = mo_name(mo, language = NULL), .after = mo) %>%
|
||||
mutate(ab_name = ab_name(ab, language = NULL), .after = ab) %>%
|
||||
print_df()
|
||||
```
|
||||
|
||||
|
||||
## Intrinsic bacterial resistance
|
||||
|
||||
@ -231,31 +252,11 @@ intrinsic_resistant %>%
|
||||
transmute(microorganism = mo_name(mo),
|
||||
antibiotic = ab_name(ab)) %>%
|
||||
filter(microorganism == "Enterobacter cloacae") %>%
|
||||
arrange(antibiotic) %>%
|
||||
print_df(rows = Inf)
|
||||
```
|
||||
|
||||
|
||||
## Interpretation from MIC values / disk diameters to R/SI
|
||||
|
||||
`r structure_txt(rsi_translation)`
|
||||
|
||||
This data set is in R available as `rsi_translation`, after you load the `AMR` package.
|
||||
|
||||
`r download_txt("rsi_translation")`
|
||||
|
||||
### Source
|
||||
|
||||
This data set contains interpretation rules for MIC values and disk diffusion diameters. Included guidelines are CLSI (`r min(as.integer(gsub("[^0-9]", "", subset(rsi_translation, guideline %like% "CLSI")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(rsi_translation, guideline %like% "CLSI")$guideline)))`) and EUCAST (`r min(as.integer(gsub("[^0-9]", "", subset(rsi_translation, guideline %like% "EUCAST")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(rsi_translation, guideline %like% "EUCAST")$guideline)))`).
|
||||
|
||||
### Example content
|
||||
|
||||
```{r, echo = FALSE}
|
||||
rsi_translation %>%
|
||||
mutate(ab = ab_name(ab), mo = mo_name(mo)) %>%
|
||||
print_df()
|
||||
```
|
||||
|
||||
|
||||
## Dosage guidelines from EUCAST
|
||||
|
||||
`r structure_txt(dosage)`
|
||||
|