(v0.7.1.90012) mo_shortname fix
@ -1,6 +1,6 @@
|
|||||||
Package: AMR
|
Package: AMR
|
||||||
Version: 0.7.1.9010
|
Version: 0.7.1.9012
|
||||||
Date: 2019-07-09
|
Date: 2019-07-10
|
||||||
Title: Antimicrobial Resistance Analysis
|
Title: Antimicrobial Resistance Analysis
|
||||||
Authors@R: c(
|
Authors@R: c(
|
||||||
person(
|
person(
|
||||||
|
2
NEWS.md
@ -1,4 +1,4 @@
|
|||||||
# AMR 0.7.1.9010
|
# AMR 0.7.1.9012
|
||||||
|
|
||||||
### New
|
### New
|
||||||
* Additional way to calculate co-resistance, i.e. when using multiple antibiotics as input for `portion_*` functions or `count_*` functions. This can be used to determine the empiric susceptibily of a combination therapy. A new parameter `only_all_tested` (**which defaults to `FALSE`**) replaces the old `also_single_tested` and can be used to select one of the two methods to count isolates and calculate portions. The difference can be seen in this example table (which is also on the `portion` and `count` help pages), where the %SI is being determined:
|
* Additional way to calculate co-resistance, i.e. when using multiple antibiotics as input for `portion_*` functions or `count_*` functions. This can be used to determine the empiric susceptibily of a combination therapy. A new parameter `only_all_tested` (**which defaults to `FALSE`**) replaces the old `also_single_tested` and can be used to select one of the two methods to count isolates and calculate portions. The difference can be seen in this example table (which is also on the `portion` and `count` help pages), where the %SI is being determined:
|
||||||
|
@ -151,9 +151,14 @@ mo_shortname <- function(x, language = get_locale(), ...) {
|
|||||||
x.mo <- AMR::as.mo(x, ...)
|
x.mo <- AMR::as.mo(x, ...)
|
||||||
metadata <- get_mo_failures_uncertainties_renamed()
|
metadata <- get_mo_failures_uncertainties_renamed()
|
||||||
|
|
||||||
|
replace_empty <- function(x) {
|
||||||
|
x[x == ""] <- "spp."
|
||||||
|
x
|
||||||
|
}
|
||||||
|
|
||||||
# get first char of genus and complete species in English
|
# get first char of genus and complete species in English
|
||||||
shortnames <- paste0(substr(mo_genus(x.mo, language = NULL), 1, 1), ". ", mo_species(x.mo, language = NULL))
|
shortnames <- paste0(substr(mo_genus(x.mo, language = NULL), 1, 1), ". ", replace_empty(mo_species(x.mo, language = NULL)))
|
||||||
|
|
||||||
# exceptions for Staphylococci
|
# exceptions for Staphylococci
|
||||||
shortnames[shortnames == "S. coagulase-negative" ] <- "CoNS"
|
shortnames[shortnames == "S. coagulase-negative" ] <- "CoNS"
|
||||||
shortnames[shortnames == "S. coagulase-positive" ] <- "CoPS"
|
shortnames[shortnames == "S. coagulase-positive" ] <- "CoPS"
|
||||||
|
BIN
R/sysdata.rda
@ -78,7 +78,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="index.html">AMR (for R)</a>
|
<a class="navbar-link" href="index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9010</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 64 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 51 KiB |
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 102 KiB |
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 77 KiB |
@ -40,7 +40,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9005</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -192,7 +192,7 @@
|
|||||||
<h1>How to apply EUCAST rules</h1>
|
<h1>How to apply EUCAST rules</h1>
|
||||||
<h4 class="author">Matthijs S. Berends</h4>
|
<h4 class="author">Matthijs S. Berends</h4>
|
||||||
|
|
||||||
<h4 class="date">01 July 2019</h4>
|
<h4 class="date">10 July 2019</h4>
|
||||||
|
|
||||||
|
|
||||||
<div class="hidden name"><code>EUCAST.Rmd</code></div>
|
<div class="hidden name"><code>EUCAST.Rmd</code></div>
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9005</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -192,7 +192,7 @@
|
|||||||
<h1>How to determine multi-drug resistance (MDR)</h1>
|
<h1>How to determine multi-drug resistance (MDR)</h1>
|
||||||
<h4 class="author">Matthijs S. Berends</h4>
|
<h4 class="author">Matthijs S. Berends</h4>
|
||||||
|
|
||||||
<h4 class="date">01 July 2019</h4>
|
<h4 class="date">10 July 2019</h4>
|
||||||
|
|
||||||
|
|
||||||
<div class="hidden name"><code>MDR.Rmd</code></div>
|
<div class="hidden name"><code>MDR.Rmd</code></div>
|
||||||
@ -208,57 +208,57 @@
|
|||||||
<li>“WIP-Richtlijn Bijzonder Resistente Micro-organismen (BRMO)”, by RIVM (Rijksinstituut voor de Volksgezondheid, the Netherlands National Institute for Public Health and the Environment)</li>
|
<li>“WIP-Richtlijn Bijzonder Resistente Micro-organismen (BRMO)”, by RIVM (Rijksinstituut voor de Volksgezondheid, the Netherlands National Institute for Public Health and the Environment)</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>As an example, I will make a data set to determine multi-drug resistant TB:</p>
|
<p>As an example, I will make a data set to determine multi-drug resistant TB:</p>
|
||||||
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" title="1"><span class="co"># a helper function to get a random vector with values S, I and R</span></a>
|
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" data-line-number="1"><span class="co"># a helper function to get a random vector with values S, I and R</span></a>
|
||||||
<a class="sourceLine" id="cb1-2" title="2"><span class="co"># with the probabilities 50%-10%-40%</span></a>
|
<a class="sourceLine" id="cb1-2" data-line-number="2"><span class="co"># with the probabilities 50%-10%-40%</span></a>
|
||||||
<a class="sourceLine" id="cb1-3" title="3">sample_rsi <-<span class="st"> </span><span class="cf">function</span>() {</a>
|
<a class="sourceLine" id="cb1-3" data-line-number="3">sample_rsi <-<span class="st"> </span><span class="cf">function</span>() {</a>
|
||||||
<a class="sourceLine" id="cb1-4" title="4"> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/sample">sample</a></span>(<span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="st">"S"</span>, <span class="st">"I"</span>, <span class="st">"R"</span>),</a>
|
<a class="sourceLine" id="cb1-4" data-line-number="4"> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/sample">sample</a></span>(<span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="st">"S"</span>, <span class="st">"I"</span>, <span class="st">"R"</span>),</a>
|
||||||
<a class="sourceLine" id="cb1-5" title="5"> <span class="dt">size =</span> <span class="dv">5000</span>,</a>
|
<a class="sourceLine" id="cb1-5" data-line-number="5"> <span class="dt">size =</span> <span class="dv">5000</span>,</a>
|
||||||
<a class="sourceLine" id="cb1-6" title="6"> <span class="dt">prob =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="fl">0.5</span>, <span class="fl">0.1</span>, <span class="fl">0.4</span>),</a>
|
<a class="sourceLine" id="cb1-6" data-line-number="6"> <span class="dt">prob =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="fl">0.5</span>, <span class="fl">0.1</span>, <span class="fl">0.4</span>),</a>
|
||||||
<a class="sourceLine" id="cb1-7" title="7"> <span class="dt">replace =</span> <span class="ot">TRUE</span>)</a>
|
<a class="sourceLine" id="cb1-7" data-line-number="7"> <span class="dt">replace =</span> <span class="ot">TRUE</span>)</a>
|
||||||
<a class="sourceLine" id="cb1-8" title="8">}</a>
|
<a class="sourceLine" id="cb1-8" data-line-number="8">}</a>
|
||||||
<a class="sourceLine" id="cb1-9" title="9"></a>
|
<a class="sourceLine" id="cb1-9" data-line-number="9"></a>
|
||||||
<a class="sourceLine" id="cb1-10" title="10">my_TB_data <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/data.frame">data.frame</a></span>(<span class="dt">rifampicin =</span> <span class="kw">sample_rsi</span>(),</a>
|
<a class="sourceLine" id="cb1-10" data-line-number="10">my_TB_data <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/data.frame">data.frame</a></span>(<span class="dt">rifampicin =</span> <span class="kw">sample_rsi</span>(),</a>
|
||||||
<a class="sourceLine" id="cb1-11" title="11"> <span class="dt">isoniazid =</span> <span class="kw">sample_rsi</span>(),</a>
|
<a class="sourceLine" id="cb1-11" data-line-number="11"> <span class="dt">isoniazid =</span> <span class="kw">sample_rsi</span>(),</a>
|
||||||
<a class="sourceLine" id="cb1-12" title="12"> <span class="dt">gatifloxacin =</span> <span class="kw">sample_rsi</span>(),</a>
|
<a class="sourceLine" id="cb1-12" data-line-number="12"> <span class="dt">gatifloxacin =</span> <span class="kw">sample_rsi</span>(),</a>
|
||||||
<a class="sourceLine" id="cb1-13" title="13"> <span class="dt">ethambutol =</span> <span class="kw">sample_rsi</span>(),</a>
|
<a class="sourceLine" id="cb1-13" data-line-number="13"> <span class="dt">ethambutol =</span> <span class="kw">sample_rsi</span>(),</a>
|
||||||
<a class="sourceLine" id="cb1-14" title="14"> <span class="dt">pyrazinamide =</span> <span class="kw">sample_rsi</span>(),</a>
|
<a class="sourceLine" id="cb1-14" data-line-number="14"> <span class="dt">pyrazinamide =</span> <span class="kw">sample_rsi</span>(),</a>
|
||||||
<a class="sourceLine" id="cb1-15" title="15"> <span class="dt">moxifloxacin =</span> <span class="kw">sample_rsi</span>(),</a>
|
<a class="sourceLine" id="cb1-15" data-line-number="15"> <span class="dt">moxifloxacin =</span> <span class="kw">sample_rsi</span>(),</a>
|
||||||
<a class="sourceLine" id="cb1-16" title="16"> <span class="dt">kanamycin =</span> <span class="kw">sample_rsi</span>())</a></code></pre></div>
|
<a class="sourceLine" id="cb1-16" data-line-number="16"> <span class="dt">kanamycin =</span> <span class="kw">sample_rsi</span>())</a></code></pre></div>
|
||||||
<p>Because all column names are automatically verified for valid drug names or codes, this would have worked exactly the same:</p>
|
<p>Because all column names are automatically verified for valid drug names or codes, this would have worked exactly the same:</p>
|
||||||
<div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb2-1" title="1">my_TB_data <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/data.frame">data.frame</a></span>(<span class="dt">RIF =</span> <span class="kw">sample_rsi</span>(),</a>
|
<div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb2-1" data-line-number="1">my_TB_data <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/data.frame">data.frame</a></span>(<span class="dt">RIF =</span> <span class="kw">sample_rsi</span>(),</a>
|
||||||
<a class="sourceLine" id="cb2-2" title="2"> <span class="dt">INH =</span> <span class="kw">sample_rsi</span>(),</a>
|
<a class="sourceLine" id="cb2-2" data-line-number="2"> <span class="dt">INH =</span> <span class="kw">sample_rsi</span>(),</a>
|
||||||
<a class="sourceLine" id="cb2-3" title="3"> <span class="dt">GAT =</span> <span class="kw">sample_rsi</span>(),</a>
|
<a class="sourceLine" id="cb2-3" data-line-number="3"> <span class="dt">GAT =</span> <span class="kw">sample_rsi</span>(),</a>
|
||||||
<a class="sourceLine" id="cb2-4" title="4"> <span class="dt">ETH =</span> <span class="kw">sample_rsi</span>(),</a>
|
<a class="sourceLine" id="cb2-4" data-line-number="4"> <span class="dt">ETH =</span> <span class="kw">sample_rsi</span>(),</a>
|
||||||
<a class="sourceLine" id="cb2-5" title="5"> <span class="dt">PZA =</span> <span class="kw">sample_rsi</span>(),</a>
|
<a class="sourceLine" id="cb2-5" data-line-number="5"> <span class="dt">PZA =</span> <span class="kw">sample_rsi</span>(),</a>
|
||||||
<a class="sourceLine" id="cb2-6" title="6"> <span class="dt">MFX =</span> <span class="kw">sample_rsi</span>(),</a>
|
<a class="sourceLine" id="cb2-6" data-line-number="6"> <span class="dt">MFX =</span> <span class="kw">sample_rsi</span>(),</a>
|
||||||
<a class="sourceLine" id="cb2-7" title="7"> <span class="dt">KAN =</span> <span class="kw">sample_rsi</span>())</a></code></pre></div>
|
<a class="sourceLine" id="cb2-7" data-line-number="7"> <span class="dt">KAN =</span> <span class="kw">sample_rsi</span>())</a></code></pre></div>
|
||||||
<p>The data set looks like this now:</p>
|
<p>The data set looks like this now:</p>
|
||||||
<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb3-1" title="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/utils/topics/head">head</a></span>(my_TB_data)</a>
|
<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb3-1" data-line-number="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/utils/topics/head">head</a></span>(my_TB_data)</a>
|
||||||
<a class="sourceLine" id="cb3-2" title="2"><span class="co"># rifampicin isoniazid gatifloxacin ethambutol pyrazinamide moxifloxacin</span></a>
|
<a class="sourceLine" id="cb3-2" data-line-number="2"><span class="co"># rifampicin isoniazid gatifloxacin ethambutol pyrazinamide moxifloxacin</span></a>
|
||||||
<a class="sourceLine" id="cb3-3" title="3"><span class="co"># 1 R R S S R I</span></a>
|
<a class="sourceLine" id="cb3-3" data-line-number="3"><span class="co"># 1 R S S R S R</span></a>
|
||||||
<a class="sourceLine" id="cb3-4" title="4"><span class="co"># 2 R R S R S R</span></a>
|
<a class="sourceLine" id="cb3-4" data-line-number="4"><span class="co"># 2 R S R S S S</span></a>
|
||||||
<a class="sourceLine" id="cb3-5" title="5"><span class="co"># 3 R S S R R R</span></a>
|
<a class="sourceLine" id="cb3-5" data-line-number="5"><span class="co"># 3 R R R R S R</span></a>
|
||||||
<a class="sourceLine" id="cb3-6" title="6"><span class="co"># 4 R R S S S I</span></a>
|
<a class="sourceLine" id="cb3-6" data-line-number="6"><span class="co"># 4 S S R S R S</span></a>
|
||||||
<a class="sourceLine" id="cb3-7" title="7"><span class="co"># 5 R R S S R I</span></a>
|
<a class="sourceLine" id="cb3-7" data-line-number="7"><span class="co"># 5 R R S I S S</span></a>
|
||||||
<a class="sourceLine" id="cb3-8" title="8"><span class="co"># 6 R S R R S S</span></a>
|
<a class="sourceLine" id="cb3-8" data-line-number="8"><span class="co"># 6 S S R R R S</span></a>
|
||||||
<a class="sourceLine" id="cb3-9" title="9"><span class="co"># kanamycin</span></a>
|
<a class="sourceLine" id="cb3-9" data-line-number="9"><span class="co"># kanamycin</span></a>
|
||||||
<a class="sourceLine" id="cb3-10" title="10"><span class="co"># 1 S</span></a>
|
<a class="sourceLine" id="cb3-10" data-line-number="10"><span class="co"># 1 S</span></a>
|
||||||
<a class="sourceLine" id="cb3-11" title="11"><span class="co"># 2 S</span></a>
|
<a class="sourceLine" id="cb3-11" data-line-number="11"><span class="co"># 2 S</span></a>
|
||||||
<a class="sourceLine" id="cb3-12" title="12"><span class="co"># 3 S</span></a>
|
<a class="sourceLine" id="cb3-12" data-line-number="12"><span class="co"># 3 S</span></a>
|
||||||
<a class="sourceLine" id="cb3-13" title="13"><span class="co"># 4 R</span></a>
|
<a class="sourceLine" id="cb3-13" data-line-number="13"><span class="co"># 4 R</span></a>
|
||||||
<a class="sourceLine" id="cb3-14" title="14"><span class="co"># 5 R</span></a>
|
<a class="sourceLine" id="cb3-14" data-line-number="14"><span class="co"># 5 R</span></a>
|
||||||
<a class="sourceLine" id="cb3-15" title="15"><span class="co"># 6 S</span></a></code></pre></div>
|
<a class="sourceLine" id="cb3-15" data-line-number="15"><span class="co"># 6 S</span></a></code></pre></div>
|
||||||
<p>We can now add the interpretation of MDR-TB to our data set:</p>
|
<p>We can now add the interpretation of MDR-TB to our data set:</p>
|
||||||
<div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb4-1" title="1">my_TB_data<span class="op">$</span>mdr <-<span class="st"> </span><span class="kw"><a href="../reference/mdro.html">mdr_tb</a></span>(my_TB_data)</a>
|
<div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb4-1" data-line-number="1">my_TB_data<span class="op">$</span>mdr <-<span class="st"> </span><span class="kw"><a href="../reference/mdro.html">mdr_tb</a></span>(my_TB_data)</a>
|
||||||
<a class="sourceLine" id="cb4-2" title="2"><span class="co"># </span><span class="al">NOTE</span><span class="co">: No column found as input for `col_mo`, assuming all records contain Mycobacterium tuberculosis.</span></a>
|
<a class="sourceLine" id="cb4-2" data-line-number="2"><span class="co"># </span><span class="al">NOTE</span><span class="co">: No column found as input for `col_mo`, assuming all records contain Mycobacterium tuberculosis.</span></a>
|
||||||
<a class="sourceLine" id="cb4-3" title="3"><span class="co"># Determining multidrug-resistant organisms (MDRO), according to:</span></a>
|
<a class="sourceLine" id="cb4-3" data-line-number="3"><span class="co"># Determining multidrug-resistant organisms (MDRO), according to:</span></a>
|
||||||
<a class="sourceLine" id="cb4-4" title="4"><span class="co"># Guideline: Companion handbook to the WHO guidelines for the programmatic management of drug-resistant tuberculosis</span></a>
|
<a class="sourceLine" id="cb4-4" data-line-number="4"><span class="co"># Guideline: Companion handbook to the WHO guidelines for the programmatic management of drug-resistant tuberculosis</span></a>
|
||||||
<a class="sourceLine" id="cb4-5" title="5"><span class="co"># Version: WHO/HTM/TB/2014.11</span></a>
|
<a class="sourceLine" id="cb4-5" data-line-number="5"><span class="co"># Version: WHO/HTM/TB/2014.11</span></a>
|
||||||
<a class="sourceLine" id="cb4-6" title="6"><span class="co"># Author: WHO (World Health Organization)</span></a>
|
<a class="sourceLine" id="cb4-6" data-line-number="6"><span class="co"># Author: WHO (World Health Organization)</span></a>
|
||||||
<a class="sourceLine" id="cb4-7" title="7"><span class="co"># Source: https://www.who.int/tb/publications/pmdt_companionhandbook/en/</span></a>
|
<a class="sourceLine" id="cb4-7" data-line-number="7"><span class="co"># Source: https://www.who.int/tb/publications/pmdt_companionhandbook/en/</span></a>
|
||||||
<a class="sourceLine" id="cb4-8" title="8"><span class="co"># </span><span class="al">NOTE</span><span class="co">: Reliability might be improved if these antimicrobial results would be available too: CAP (capreomycin), RIB (rifabutin), RFP (rifapentine)</span></a></code></pre></div>
|
<a class="sourceLine" id="cb4-8" data-line-number="8"><span class="co"># </span><span class="al">NOTE</span><span class="co">: Reliability might be improved if these antimicrobial results would be available too: CAP (capreomycin), RIB (rifabutin), RFP (rifapentine)</span></a></code></pre></div>
|
||||||
<p>And review the result with a frequency table:</p>
|
<p>And review the result with a frequency table:</p>
|
||||||
<div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb5-1" title="1"><span class="kw"><a href="../reference/freq.html">freq</a></span>(my_TB_data<span class="op">$</span>mdr)</a></code></pre></div>
|
<div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb5-1" data-line-number="1"><span class="kw"><a href="../reference/freq.html">freq</a></span>(my_TB_data<span class="op">$</span>mdr)</a></code></pre></div>
|
||||||
<p><strong>Frequency table of <code>mdr</code> from <code>my_TB_data</code> (5,000 x 8)</strong></p>
|
<p><strong>Frequency table of <code>mdr</code> from <code>my_TB_data</code> (5,000 x 8)</strong></p>
|
||||||
<p>Class: factor > ordered (numeric)<br>
|
<p>Class: factor > ordered (numeric)<br>
|
||||||
Length: 5,000 (of which NA: 0 = 0.00%)<br>
|
Length: 5,000 (of which NA: 0 = 0.00%)<br>
|
||||||
@ -277,40 +277,40 @@ Unique: 5</p>
|
|||||||
<tr class="odd">
|
<tr class="odd">
|
||||||
<td align="left">1</td>
|
<td align="left">1</td>
|
||||||
<td align="left">Mono-resistance</td>
|
<td align="left">Mono-resistance</td>
|
||||||
<td align="right">3,222</td>
|
<td align="right">3,273</td>
|
||||||
<td align="right">64.4%</td>
|
<td align="right">65.5%</td>
|
||||||
<td align="right">3,222</td>
|
<td align="right">3,273</td>
|
||||||
<td align="right">64.4%</td>
|
<td align="right">65.5%</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="even">
|
<tr class="even">
|
||||||
<td align="left">2</td>
|
<td align="left">2</td>
|
||||||
<td align="left">Negative</td>
|
<td align="left">Negative</td>
|
||||||
<td align="right">659</td>
|
<td align="right">687</td>
|
||||||
<td align="right">13.2%</td>
|
<td align="right">13.7%</td>
|
||||||
<td align="right">3,881</td>
|
<td align="right">3,960</td>
|
||||||
<td align="right">77.6%</td>
|
<td align="right">79.2%</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="odd">
|
<tr class="odd">
|
||||||
<td align="left">3</td>
|
<td align="left">3</td>
|
||||||
<td align="left">Multidrug resistance</td>
|
<td align="left">Multidrug resistance</td>
|
||||||
<td align="right">589</td>
|
<td align="right">569</td>
|
||||||
<td align="right">11.8%</td>
|
<td align="right">11.4%</td>
|
||||||
<td align="right">4,470</td>
|
<td align="right">4,529</td>
|
||||||
<td align="right">89.4%</td>
|
<td align="right">90.6%</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="even">
|
<tr class="even">
|
||||||
<td align="left">4</td>
|
<td align="left">4</td>
|
||||||
<td align="left">Poly-resistance</td>
|
<td align="left">Poly-resistance</td>
|
||||||
<td align="right">313</td>
|
<td align="right">277</td>
|
||||||
<td align="right">6.3%</td>
|
<td align="right">5.5%</td>
|
||||||
<td align="right">4,783</td>
|
<td align="right">4,806</td>
|
||||||
<td align="right">95.7%</td>
|
<td align="right">96.1%</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="odd">
|
<tr class="odd">
|
||||||
<td align="left">5</td>
|
<td align="left">5</td>
|
||||||
<td align="left">Extensive drug resistance</td>
|
<td align="left">Extensive drug resistance</td>
|
||||||
<td align="right">217</td>
|
<td align="right">194</td>
|
||||||
<td align="right">4.3%</td>
|
<td align="right">3.9%</td>
|
||||||
<td align="right">5,000</td>
|
<td align="right">5,000</td>
|
||||||
<td align="right">100.0%</td>
|
<td align="right">100.0%</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9005</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -192,7 +192,7 @@
|
|||||||
<h1>How to import data from SPSS / SAS / Stata</h1>
|
<h1>How to import data from SPSS / SAS / Stata</h1>
|
||||||
<h4 class="author">Matthijs S. Berends</h4>
|
<h4 class="author">Matthijs S. Berends</h4>
|
||||||
|
|
||||||
<h4 class="date">01 July 2019</h4>
|
<h4 class="date">10 July 2019</h4>
|
||||||
|
|
||||||
|
|
||||||
<div class="hidden name"><code>SPSS.Rmd</code></div>
|
<div class="hidden name"><code>SPSS.Rmd</code></div>
|
||||||
@ -242,39 +242,39 @@
|
|||||||
</ul>
|
</ul>
|
||||||
<p>If you sometimes write syntaxes in SPSS to run a complete analysis or to ‘automate’ some of your work, you should perhaps do this 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>If you sometimes write syntaxes in SPSS to run a complete analysis or to ‘automate’ some of your work, you should perhaps do this 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>To demonstrate the first point:</p>
|
<p>To demonstrate the first point:</p>
|
||||||
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" title="1"><span class="co"># not all values are valid MIC values:</span></a>
|
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" data-line-number="1"><span class="co"># not all values are valid MIC values:</span></a>
|
||||||
<a class="sourceLine" id="cb1-2" title="2"><span class="kw"><a href="../reference/as.mic.html">as.mic</a></span>(<span class="fl">0.125</span>)</a>
|
<a class="sourceLine" id="cb1-2" data-line-number="2"><span class="kw"><a href="../reference/as.mic.html">as.mic</a></span>(<span class="fl">0.125</span>)</a>
|
||||||
<a class="sourceLine" id="cb1-3" title="3"><span class="co"># Class 'mic'</span></a>
|
<a class="sourceLine" id="cb1-3" data-line-number="3"><span class="co"># Class 'mic'</span></a>
|
||||||
<a class="sourceLine" id="cb1-4" title="4"><span class="co"># [1] 0.125</span></a>
|
<a class="sourceLine" id="cb1-4" data-line-number="4"><span class="co"># [1] 0.125</span></a>
|
||||||
<a class="sourceLine" id="cb1-5" title="5"><span class="kw"><a href="../reference/as.mic.html">as.mic</a></span>(<span class="st">"testvalue"</span>)</a>
|
<a class="sourceLine" id="cb1-5" data-line-number="5"><span class="kw"><a href="../reference/as.mic.html">as.mic</a></span>(<span class="st">"testvalue"</span>)</a>
|
||||||
<a class="sourceLine" id="cb1-6" title="6"><span class="co"># Class 'mic'</span></a>
|
<a class="sourceLine" id="cb1-6" data-line-number="6"><span class="co"># Class 'mic'</span></a>
|
||||||
<a class="sourceLine" id="cb1-7" title="7"><span class="co"># [1] <NA></span></a>
|
<a class="sourceLine" id="cb1-7" data-line-number="7"><span class="co"># [1] <NA></span></a>
|
||||||
<a class="sourceLine" id="cb1-8" title="8"></a>
|
<a class="sourceLine" id="cb1-8" data-line-number="8"></a>
|
||||||
<a class="sourceLine" id="cb1-9" title="9"><span class="co"># the Gram stain is avaiable for all bacteria:</span></a>
|
<a class="sourceLine" id="cb1-9" data-line-number="9"><span class="co"># the Gram stain is avaiable for all bacteria:</span></a>
|
||||||
<a class="sourceLine" id="cb1-10" title="10"><span class="kw"><a href="../reference/mo_property.html">mo_gramstain</a></span>(<span class="st">"E. coli"</span>)</a>
|
<a class="sourceLine" id="cb1-10" data-line-number="10"><span class="kw"><a href="../reference/mo_property.html">mo_gramstain</a></span>(<span class="st">"E. coli"</span>)</a>
|
||||||
<a class="sourceLine" id="cb1-11" title="11"><span class="co"># [1] "Gram-negative"</span></a>
|
<a class="sourceLine" id="cb1-11" data-line-number="11"><span class="co"># [1] "Gram-negative"</span></a>
|
||||||
<a class="sourceLine" id="cb1-12" title="12"></a>
|
<a class="sourceLine" id="cb1-12" data-line-number="12"></a>
|
||||||
<a class="sourceLine" id="cb1-13" title="13"><span class="co"># Klebsiella is intrinsic resistant to amoxicllin, according to EUCAST:</span></a>
|
<a class="sourceLine" id="cb1-13" data-line-number="13"><span class="co"># Klebsiella is intrinsic resistant to amoxicllin, according to EUCAST:</span></a>
|
||||||
<a class="sourceLine" id="cb1-14" title="14">klebsiella_test <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/data.frame">data.frame</a></span>(<span class="dt">mo =</span> <span class="st">"klebsiella"</span>, </a>
|
<a class="sourceLine" id="cb1-14" data-line-number="14">klebsiella_test <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/data.frame">data.frame</a></span>(<span class="dt">mo =</span> <span class="st">"klebsiella"</span>, </a>
|
||||||
<a class="sourceLine" id="cb1-15" title="15"> <span class="dt">amox =</span> <span class="st">"S"</span>,</a>
|
<a class="sourceLine" id="cb1-15" data-line-number="15"> <span class="dt">amox =</span> <span class="st">"S"</span>,</a>
|
||||||
<a class="sourceLine" id="cb1-16" title="16"> <span class="dt">stringsAsFactors =</span> <span class="ot">FALSE</span>)</a>
|
<a class="sourceLine" id="cb1-16" data-line-number="16"> <span class="dt">stringsAsFactors =</span> <span class="ot">FALSE</span>)</a>
|
||||||
<a class="sourceLine" id="cb1-17" title="17">klebsiella_test</a>
|
<a class="sourceLine" id="cb1-17" data-line-number="17">klebsiella_test</a>
|
||||||
<a class="sourceLine" id="cb1-18" title="18"><span class="co"># mo amox</span></a>
|
<a class="sourceLine" id="cb1-18" data-line-number="18"><span class="co"># mo amox</span></a>
|
||||||
<a class="sourceLine" id="cb1-19" title="19"><span class="co"># 1 klebsiella S</span></a>
|
<a class="sourceLine" id="cb1-19" data-line-number="19"><span class="co"># 1 klebsiella S</span></a>
|
||||||
<a class="sourceLine" id="cb1-20" title="20"><span class="kw"><a href="../reference/eucast_rules.html">eucast_rules</a></span>(klebsiella_test, <span class="dt">info =</span> <span class="ot">FALSE</span>)</a>
|
<a class="sourceLine" id="cb1-20" data-line-number="20"><span class="kw"><a href="../reference/eucast_rules.html">eucast_rules</a></span>(klebsiella_test, <span class="dt">info =</span> <span class="ot">FALSE</span>)</a>
|
||||||
<a class="sourceLine" id="cb1-21" title="21"><span class="co"># mo amox</span></a>
|
<a class="sourceLine" id="cb1-21" data-line-number="21"><span class="co"># mo amox</span></a>
|
||||||
<a class="sourceLine" id="cb1-22" title="22"><span class="co"># 1 klebsiella R</span></a>
|
<a class="sourceLine" id="cb1-22" data-line-number="22"><span class="co"># 1 klebsiella R</span></a>
|
||||||
<a class="sourceLine" id="cb1-23" title="23"></a>
|
<a class="sourceLine" id="cb1-23" data-line-number="23"></a>
|
||||||
<a class="sourceLine" id="cb1-24" title="24"><span class="co"># hundreds of trade names can be translated to a name, trade name or an ATC code:</span></a>
|
<a class="sourceLine" id="cb1-24" data-line-number="24"><span class="co"># hundreds of trade names can be translated to a name, trade name or an ATC code:</span></a>
|
||||||
<a class="sourceLine" id="cb1-25" title="25"><span class="kw"><a href="../reference/ab_property.html">ab_name</a></span>(<span class="st">"floxapen"</span>)</a>
|
<a class="sourceLine" id="cb1-25" data-line-number="25"><span class="kw"><a href="../reference/ab_property.html">ab_name</a></span>(<span class="st">"floxapen"</span>)</a>
|
||||||
<a class="sourceLine" id="cb1-26" title="26"><span class="co"># [1] "Flucloxacillin"</span></a>
|
<a class="sourceLine" id="cb1-26" data-line-number="26"><span class="co"># [1] "Flucloxacillin"</span></a>
|
||||||
<a class="sourceLine" id="cb1-27" title="27"><span class="kw"><a href="../reference/ab_property.html">ab_tradenames</a></span>(<span class="st">"floxapen"</span>)</a>
|
<a class="sourceLine" id="cb1-27" data-line-number="27"><span class="kw"><a href="../reference/ab_property.html">ab_tradenames</a></span>(<span class="st">"floxapen"</span>)</a>
|
||||||
<a class="sourceLine" id="cb1-28" title="28"><span class="co"># [1] "Floxacillin" "FLOXACILLIN" "Floxapen" </span></a>
|
<a class="sourceLine" id="cb1-28" data-line-number="28"><span class="co"># [1] "Floxacillin" "FLOXACILLIN" "Floxapen" </span></a>
|
||||||
<a class="sourceLine" id="cb1-29" title="29"><span class="co"># [4] "Floxapen sodium salt" "Fluclox" "Flucloxacilina" </span></a>
|
<a class="sourceLine" id="cb1-29" data-line-number="29"><span class="co"># [4] "Floxapen sodium salt" "Fluclox" "Flucloxacilina" </span></a>
|
||||||
<a class="sourceLine" id="cb1-30" title="30"><span class="co"># [7] "Flucloxacillin" "Flucloxacilline" "Flucloxacillinum" </span></a>
|
<a class="sourceLine" id="cb1-30" data-line-number="30"><span class="co"># [7] "Flucloxacillin" "Flucloxacilline" "Flucloxacillinum" </span></a>
|
||||||
<a class="sourceLine" id="cb1-31" title="31"><span class="co"># [10] "Fluorochloroxacillin"</span></a>
|
<a class="sourceLine" id="cb1-31" data-line-number="31"><span class="co"># [10] "Fluorochloroxacillin"</span></a>
|
||||||
<a class="sourceLine" id="cb1-32" title="32"><span class="kw"><a href="../reference/ab_property.html">ab_atc</a></span>(<span class="st">"floxapen"</span>)</a>
|
<a class="sourceLine" id="cb1-32" data-line-number="32"><span class="kw"><a href="../reference/ab_property.html">ab_atc</a></span>(<span class="st">"floxapen"</span>)</a>
|
||||||
<a class="sourceLine" id="cb1-33" title="33"><span class="co"># [1] "J01CF05"</span></a></code></pre></div>
|
<a class="sourceLine" id="cb1-33" data-line-number="33"><span class="co"># [1] "J01CF05"</span></a></code></pre></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="import-data-from-spsssasstata" class="section level2">
|
<div id="import-data-from-spsssasstata" class="section level2">
|
||||||
<h2 class="hasAnchor">
|
<h2 class="hasAnchor">
|
||||||
@ -290,97 +290,97 @@
|
|||||||
<p><img src="https://gitlab.com/msberends/AMR/raw/master/docs/import2.png"></p>
|
<p><img src="https://gitlab.com/msberends/AMR/raw/master/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">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">as_factor()</a></code>.</p>
|
||||||
<p>The difference is this:</p>
|
<p>The difference is this:</p>
|
||||||
<div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb2-1" title="1">SPSS_data</a>
|
<div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb2-1" data-line-number="1">SPSS_data</a>
|
||||||
<a class="sourceLine" id="cb2-2" title="2"><span class="co"># # A tibble: 4,203 x 4</span></a>
|
<a class="sourceLine" id="cb2-2" data-line-number="2"><span class="co"># # A tibble: 4,203 x 4</span></a>
|
||||||
<a class="sourceLine" id="cb2-3" title="3"><span class="co"># v001 sex status statusage</span></a>
|
<a class="sourceLine" id="cb2-3" data-line-number="3"><span class="co"># v001 sex status statusage</span></a>
|
||||||
<a class="sourceLine" id="cb2-4" title="4"><span class="co"># <dbl> <dbl+lbl> <dbl+lbl> <dbl></span></a>
|
<a class="sourceLine" id="cb2-4" data-line-number="4"><span class="co"># <dbl> <dbl+lbl> <dbl+lbl> <dbl></span></a>
|
||||||
<a class="sourceLine" id="cb2-5" title="5"><span class="co"># 1 10002 1 1 76.6</span></a>
|
<a class="sourceLine" id="cb2-5" data-line-number="5"><span class="co"># 1 10002 1 1 76.6</span></a>
|
||||||
<a class="sourceLine" id="cb2-6" title="6"><span class="co"># 2 10004 0 1 59.1</span></a>
|
<a class="sourceLine" id="cb2-6" data-line-number="6"><span class="co"># 2 10004 0 1 59.1</span></a>
|
||||||
<a class="sourceLine" id="cb2-7" title="7"><span class="co"># 3 10005 1 1 54.5</span></a>
|
<a class="sourceLine" id="cb2-7" data-line-number="7"><span class="co"># 3 10005 1 1 54.5</span></a>
|
||||||
<a class="sourceLine" id="cb2-8" title="8"><span class="co"># 4 10006 1 1 54.1</span></a>
|
<a class="sourceLine" id="cb2-8" data-line-number="8"><span class="co"># 4 10006 1 1 54.1</span></a>
|
||||||
<a class="sourceLine" id="cb2-9" title="9"><span class="co"># 5 10007 1 1 57.7</span></a>
|
<a class="sourceLine" id="cb2-9" data-line-number="9"><span class="co"># 5 10007 1 1 57.7</span></a>
|
||||||
<a class="sourceLine" id="cb2-10" title="10"><span class="co"># 6 10008 1 1 62.8</span></a>
|
<a class="sourceLine" id="cb2-10" data-line-number="10"><span class="co"># 6 10008 1 1 62.8</span></a>
|
||||||
<a class="sourceLine" id="cb2-11" title="11"><span class="co"># 7 10010 0 1 63.7</span></a>
|
<a class="sourceLine" id="cb2-11" data-line-number="11"><span class="co"># 7 10010 0 1 63.7</span></a>
|
||||||
<a class="sourceLine" id="cb2-12" title="12"><span class="co"># 8 10011 1 1 73.1</span></a>
|
<a class="sourceLine" id="cb2-12" data-line-number="12"><span class="co"># 8 10011 1 1 73.1</span></a>
|
||||||
<a class="sourceLine" id="cb2-13" title="13"><span class="co"># 9 10017 1 1 56.7</span></a>
|
<a class="sourceLine" id="cb2-13" data-line-number="13"><span class="co"># 9 10017 1 1 56.7</span></a>
|
||||||
<a class="sourceLine" id="cb2-14" title="14"><span class="co"># 10 10018 0 1 66.6</span></a>
|
<a class="sourceLine" id="cb2-14" data-line-number="14"><span class="co"># 10 10018 0 1 66.6</span></a>
|
||||||
<a class="sourceLine" id="cb2-15" title="15"><span class="co"># # … with 4,193 more rows</span></a>
|
<a class="sourceLine" id="cb2-15" data-line-number="15"><span class="co"># # … with 4,193 more rows</span></a>
|
||||||
<a class="sourceLine" id="cb2-16" title="16"></a>
|
<a class="sourceLine" id="cb2-16" data-line-number="16"></a>
|
||||||
<a class="sourceLine" id="cb2-17" title="17"><span class="kw">as_factor</span>(SPSS_data)</a>
|
<a class="sourceLine" id="cb2-17" data-line-number="17"><span class="kw">as_factor</span>(SPSS_data)</a>
|
||||||
<a class="sourceLine" id="cb2-18" title="18"><span class="co"># # A tibble: 4,203 x 4</span></a>
|
<a class="sourceLine" id="cb2-18" data-line-number="18"><span class="co"># # A tibble: 4,203 x 4</span></a>
|
||||||
<a class="sourceLine" id="cb2-19" title="19"><span class="co"># v001 sex status statusage</span></a>
|
<a class="sourceLine" id="cb2-19" data-line-number="19"><span class="co"># v001 sex status statusage</span></a>
|
||||||
<a class="sourceLine" id="cb2-20" title="20"><span class="co"># <dbl> <fct> <fct> <dbl></span></a>
|
<a class="sourceLine" id="cb2-20" data-line-number="20"><span class="co"># <dbl> <fct> <fct> <dbl></span></a>
|
||||||
<a class="sourceLine" id="cb2-21" title="21"><span class="co"># 1 10002 Male alive 76.6</span></a>
|
<a class="sourceLine" id="cb2-21" data-line-number="21"><span class="co"># 1 10002 Male alive 76.6</span></a>
|
||||||
<a class="sourceLine" id="cb2-22" title="22"><span class="co"># 2 10004 Female alive 59.1</span></a>
|
<a class="sourceLine" id="cb2-22" data-line-number="22"><span class="co"># 2 10004 Female alive 59.1</span></a>
|
||||||
<a class="sourceLine" id="cb2-23" title="23"><span class="co"># 3 10005 Male alive 54.5</span></a>
|
<a class="sourceLine" id="cb2-23" data-line-number="23"><span class="co"># 3 10005 Male alive 54.5</span></a>
|
||||||
<a class="sourceLine" id="cb2-24" title="24"><span class="co"># 4 10006 Male alive 54.1</span></a>
|
<a class="sourceLine" id="cb2-24" data-line-number="24"><span class="co"># 4 10006 Male alive 54.1</span></a>
|
||||||
<a class="sourceLine" id="cb2-25" title="25"><span class="co"># 5 10007 Male alive 57.7</span></a>
|
<a class="sourceLine" id="cb2-25" data-line-number="25"><span class="co"># 5 10007 Male alive 57.7</span></a>
|
||||||
<a class="sourceLine" id="cb2-26" title="26"><span class="co"># 6 10008 Male alive 62.8</span></a>
|
<a class="sourceLine" id="cb2-26" data-line-number="26"><span class="co"># 6 10008 Male alive 62.8</span></a>
|
||||||
<a class="sourceLine" id="cb2-27" title="27"><span class="co"># 7 10010 Female alive 63.7</span></a>
|
<a class="sourceLine" id="cb2-27" data-line-number="27"><span class="co"># 7 10010 Female alive 63.7</span></a>
|
||||||
<a class="sourceLine" id="cb2-28" title="28"><span class="co"># 8 10011 Male alive 73.1</span></a>
|
<a class="sourceLine" id="cb2-28" data-line-number="28"><span class="co"># 8 10011 Male alive 73.1</span></a>
|
||||||
<a class="sourceLine" id="cb2-29" title="29"><span class="co"># 9 10017 Male alive 56.7</span></a>
|
<a class="sourceLine" id="cb2-29" data-line-number="29"><span class="co"># 9 10017 Male alive 56.7</span></a>
|
||||||
<a class="sourceLine" id="cb2-30" title="30"><span class="co"># 10 10018 Female alive 66.6</span></a>
|
<a class="sourceLine" id="cb2-30" data-line-number="30"><span class="co"># 10 10018 Female alive 66.6</span></a>
|
||||||
<a class="sourceLine" id="cb2-31" title="31"><span class="co"># # … with 4,193 more rows</span></a></code></pre></div>
|
<a class="sourceLine" id="cb2-31" data-line-number="31"><span class="co"># # … with 4,193 more rows</span></a></code></pre></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="base-r" class="section level3">
|
<div id="base-r" class="section level3">
|
||||||
<h3 class="hasAnchor">
|
<h3 class="hasAnchor">
|
||||||
<a href="#base-r" class="anchor"></a>Base R</h3>
|
<a href="#base-r" class="anchor"></a>Base R</h3>
|
||||||
<p>To import data from SPSS, SAS or Stata, you can use the <a href="https://haven.tidyverse.org/">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/">great <code>haven</code> package</a> yourself:</p>
|
||||||
<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb3-1" title="1"><span class="co"># download and install the latest version:</span></a>
|
<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb3-1" data-line-number="1"><span class="co"># download and install the latest version:</span></a>
|
||||||
<a class="sourceLine" id="cb3-2" title="2"><span class="kw"><a href="https://www.rdocumentation.org/packages/utils/topics/install.packages">install.packages</a></span>(<span class="st">"haven"</span>)</a>
|
<a class="sourceLine" id="cb3-2" data-line-number="2"><span class="kw"><a href="https://www.rdocumentation.org/packages/utils/topics/install.packages">install.packages</a></span>(<span class="st">"haven"</span>)</a>
|
||||||
<a class="sourceLine" id="cb3-3" title="3"><span class="co"># load the package you just installed:</span></a>
|
<a class="sourceLine" id="cb3-3" data-line-number="3"><span class="co"># load the package you just installed:</span></a>
|
||||||
<a class="sourceLine" id="cb3-4" title="4"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/library">library</a></span>(haven) </a></code></pre></div>
|
<a class="sourceLine" id="cb3-4" data-line-number="4"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/library">library</a></span>(haven) </a></code></pre></div>
|
||||||
<p>You can now import files as follows:</p>
|
<p>You can now import files as follows:</p>
|
||||||
<div id="spss" class="section level4">
|
<div id="spss" class="section level4">
|
||||||
<h4 class="hasAnchor">
|
<h4 class="hasAnchor">
|
||||||
<a href="#spss" class="anchor"></a>SPSS</h4>
|
<a href="#spss" class="anchor"></a>SPSS</h4>
|
||||||
<p>To read files from SPSS into R:</p>
|
<p>To read files from SPSS into R:</p>
|
||||||
<div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb4-1" title="1"><span class="co"># read any SPSS file based on file extension (best way):</span></a>
|
<div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb4-1" data-line-number="1"><span class="co"># read any SPSS file based on file extension (best way):</span></a>
|
||||||
<a class="sourceLine" id="cb4-2" title="2"><span class="kw"><a href="https://haven.tidyverse.org/reference/read_spss.html">read_spss</a></span>(<span class="dt">file =</span> <span class="st">"path/to/file"</span>)</a>
|
<a class="sourceLine" id="cb4-2" data-line-number="2"><span class="kw"><a href="https://haven.tidyverse.org/reference/read_spss.html">read_spss</a></span>(<span class="dt">file =</span> <span class="st">"path/to/file"</span>)</a>
|
||||||
<a class="sourceLine" id="cb4-3" title="3"></a>
|
<a class="sourceLine" id="cb4-3" data-line-number="3"></a>
|
||||||
<a class="sourceLine" id="cb4-4" title="4"><span class="co"># read .sav or .zsav file:</span></a>
|
<a class="sourceLine" id="cb4-4" data-line-number="4"><span class="co"># read .sav or .zsav file:</span></a>
|
||||||
<a class="sourceLine" id="cb4-5" title="5"><span class="kw"><a href="https://haven.tidyverse.org/reference/read_spss.html">read_sav</a></span>(<span class="dt">file =</span> <span class="st">"path/to/file"</span>)</a>
|
<a class="sourceLine" id="cb4-5" data-line-number="5"><span class="kw"><a href="https://haven.tidyverse.org/reference/read_spss.html">read_sav</a></span>(<span class="dt">file =</span> <span class="st">"path/to/file"</span>)</a>
|
||||||
<a class="sourceLine" id="cb4-6" title="6"></a>
|
<a class="sourceLine" id="cb4-6" data-line-number="6"></a>
|
||||||
<a class="sourceLine" id="cb4-7" title="7"><span class="co"># read .por file:</span></a>
|
<a class="sourceLine" id="cb4-7" data-line-number="7"><span class="co"># read .por file:</span></a>
|
||||||
<a class="sourceLine" id="cb4-8" title="8"><span class="kw"><a href="https://haven.tidyverse.org/reference/read_spss.html">read_por</a></span>(<span class="dt">file =</span> <span class="st">"path/to/file"</span>)</a></code></pre></div>
|
<a class="sourceLine" id="cb4-8" data-line-number="8"><span class="kw"><a href="https://haven.tidyverse.org/reference/read_spss.html">read_por</a></span>(<span class="dt">file =</span> <span class="st">"path/to/file"</span>)</a></code></pre></div>
|
||||||
<p>Do not forget about <code><a href="https://haven.tidyverse.org/reference/as_factor.html">as_factor()</a></code>, as mentioned above.</p>
|
<p>Do not forget about <code><a href="https://haven.tidyverse.org/reference/as_factor.html">as_factor()</a></code>, as mentioned above.</p>
|
||||||
<p>To export your R objects to the SPSS file format:</p>
|
<p>To export your R objects to the SPSS file format:</p>
|
||||||
<div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb5-1" title="1"><span class="co"># save as .sav file:</span></a>
|
<div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb5-1" data-line-number="1"><span class="co"># save as .sav file:</span></a>
|
||||||
<a class="sourceLine" id="cb5-2" title="2"><span class="kw"><a href="https://haven.tidyverse.org/reference/read_spss.html">write_sav</a></span>(<span class="dt">data =</span> yourdata, <span class="dt">path =</span> <span class="st">"path/to/file"</span>)</a>
|
<a class="sourceLine" id="cb5-2" data-line-number="2"><span class="kw"><a href="https://haven.tidyverse.org/reference/read_spss.html">write_sav</a></span>(<span class="dt">data =</span> yourdata, <span class="dt">path =</span> <span class="st">"path/to/file"</span>)</a>
|
||||||
<a class="sourceLine" id="cb5-3" title="3"></a>
|
<a class="sourceLine" id="cb5-3" data-line-number="3"></a>
|
||||||
<a class="sourceLine" id="cb5-4" title="4"><span class="co"># save as compressed .zsav file:</span></a>
|
<a class="sourceLine" id="cb5-4" data-line-number="4"><span class="co"># save as compressed .zsav file:</span></a>
|
||||||
<a class="sourceLine" id="cb5-5" title="5"><span class="kw"><a href="https://haven.tidyverse.org/reference/read_spss.html">write_sav</a></span>(<span class="dt">data =</span> yourdata, <span class="dt">path =</span> <span class="st">"path/to/file"</span>, <span class="dt">compress =</span> <span class="ot">TRUE</span>)</a></code></pre></div>
|
<a class="sourceLine" id="cb5-5" data-line-number="5"><span class="kw"><a href="https://haven.tidyverse.org/reference/read_spss.html">write_sav</a></span>(<span class="dt">data =</span> yourdata, <span class="dt">path =</span> <span class="st">"path/to/file"</span>, <span class="dt">compress =</span> <span class="ot">TRUE</span>)</a></code></pre></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="sas" class="section level4">
|
<div id="sas" class="section level4">
|
||||||
<h4 class="hasAnchor">
|
<h4 class="hasAnchor">
|
||||||
<a href="#sas" class="anchor"></a>SAS</h4>
|
<a href="#sas" class="anchor"></a>SAS</h4>
|
||||||
<p>To read files from SAS into R:</p>
|
<p>To read files from SAS into R:</p>
|
||||||
<div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb6-1" title="1"><span class="co"># read .sas7bdat + .sas7bcat files:</span></a>
|
<div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb6-1" data-line-number="1"><span class="co"># read .sas7bdat + .sas7bcat files:</span></a>
|
||||||
<a class="sourceLine" id="cb6-2" title="2"><span class="kw"><a href="https://haven.tidyverse.org/reference/read_sas.html">read_sas</a></span>(<span class="dt">data_file =</span> <span class="st">"path/to/file"</span>, <span class="dt">catalog_file =</span> <span class="ot">NULL</span>)</a>
|
<a class="sourceLine" id="cb6-2" data-line-number="2"><span class="kw"><a href="https://haven.tidyverse.org/reference/read_sas.html">read_sas</a></span>(<span class="dt">data_file =</span> <span class="st">"path/to/file"</span>, <span class="dt">catalog_file =</span> <span class="ot">NULL</span>)</a>
|
||||||
<a class="sourceLine" id="cb6-3" title="3"></a>
|
<a class="sourceLine" id="cb6-3" data-line-number="3"></a>
|
||||||
<a class="sourceLine" id="cb6-4" title="4"><span class="co"># read SAS transport files (version 5 and version 8):</span></a>
|
<a class="sourceLine" id="cb6-4" data-line-number="4"><span class="co"># read SAS transport files (version 5 and version 8):</span></a>
|
||||||
<a class="sourceLine" id="cb6-5" title="5"><span class="kw"><a href="https://haven.tidyverse.org/reference/read_xpt.html">read_xpt</a></span>(<span class="dt">file =</span> <span class="st">"path/to/file"</span>)</a></code></pre></div>
|
<a class="sourceLine" id="cb6-5" data-line-number="5"><span class="kw"><a href="https://haven.tidyverse.org/reference/read_xpt.html">read_xpt</a></span>(<span class="dt">file =</span> <span class="st">"path/to/file"</span>)</a></code></pre></div>
|
||||||
<p>To export your R objects to the SAS file format:</p>
|
<p>To export your R objects to the SAS file format:</p>
|
||||||
<div class="sourceCode" id="cb7"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb7-1" title="1"><span class="co"># save as regular SAS file:</span></a>
|
<div class="sourceCode" id="cb7"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb7-1" data-line-number="1"><span class="co"># save as regular SAS file:</span></a>
|
||||||
<a class="sourceLine" id="cb7-2" title="2"><span class="kw"><a href="https://haven.tidyverse.org/reference/read_sas.html">write_sas</a></span>(<span class="dt">data =</span> yourdata, <span class="dt">path =</span> <span class="st">"path/to/file"</span>)</a>
|
<a class="sourceLine" id="cb7-2" data-line-number="2"><span class="kw"><a href="https://haven.tidyverse.org/reference/read_sas.html">write_sas</a></span>(<span class="dt">data =</span> yourdata, <span class="dt">path =</span> <span class="st">"path/to/file"</span>)</a>
|
||||||
<a class="sourceLine" id="cb7-3" title="3"></a>
|
<a class="sourceLine" id="cb7-3" data-line-number="3"></a>
|
||||||
<a class="sourceLine" id="cb7-4" title="4"><span class="co"># the SAS transport format is an open format </span></a>
|
<a class="sourceLine" id="cb7-4" data-line-number="4"><span class="co"># the SAS transport format is an open format </span></a>
|
||||||
<a class="sourceLine" id="cb7-5" title="5"><span class="co"># (required for submission of the data to the FDA)</span></a>
|
<a class="sourceLine" id="cb7-5" data-line-number="5"><span class="co"># (required for submission of the data to the FDA)</span></a>
|
||||||
<a class="sourceLine" id="cb7-6" title="6"><span class="kw"><a href="https://haven.tidyverse.org/reference/read_xpt.html">write_xpt</a></span>(<span class="dt">data =</span> yourdata, <span class="dt">path =</span> <span class="st">"path/to/file"</span>, <span class="dt">version =</span> <span class="dv">8</span>)</a></code></pre></div>
|
<a class="sourceLine" id="cb7-6" data-line-number="6"><span class="kw"><a href="https://haven.tidyverse.org/reference/read_xpt.html">write_xpt</a></span>(<span class="dt">data =</span> yourdata, <span class="dt">path =</span> <span class="st">"path/to/file"</span>, <span class="dt">version =</span> <span class="dv">8</span>)</a></code></pre></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="stata" class="section level4">
|
<div id="stata" class="section level4">
|
||||||
<h4 class="hasAnchor">
|
<h4 class="hasAnchor">
|
||||||
<a href="#stata" class="anchor"></a>Stata</h4>
|
<a href="#stata" class="anchor"></a>Stata</h4>
|
||||||
<p>To read files from Stata into R:</p>
|
<p>To read files from Stata into R:</p>
|
||||||
<div class="sourceCode" id="cb8"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb8-1" title="1"><span class="co"># read .dta file:</span></a>
|
<div class="sourceCode" id="cb8"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb8-1" data-line-number="1"><span class="co"># read .dta file:</span></a>
|
||||||
<a class="sourceLine" id="cb8-2" title="2"><span class="kw"><a href="https://haven.tidyverse.org/reference/read_dta.html">read_stata</a></span>(<span class="dt">file =</span> <span class="st">"/path/to/file"</span>)</a>
|
<a class="sourceLine" id="cb8-2" data-line-number="2"><span class="kw"><a href="https://haven.tidyverse.org/reference/read_dta.html">read_stata</a></span>(<span class="dt">file =</span> <span class="st">"/path/to/file"</span>)</a>
|
||||||
<a class="sourceLine" id="cb8-3" title="3"></a>
|
<a class="sourceLine" id="cb8-3" data-line-number="3"></a>
|
||||||
<a class="sourceLine" id="cb8-4" title="4"><span class="co"># works exactly the same:</span></a>
|
<a class="sourceLine" id="cb8-4" data-line-number="4"><span class="co"># works exactly the same:</span></a>
|
||||||
<a class="sourceLine" id="cb8-5" title="5"><span class="kw"><a href="https://haven.tidyverse.org/reference/read_dta.html">read_dta</a></span>(<span class="dt">file =</span> <span class="st">"/path/to/file"</span>)</a></code></pre></div>
|
<a class="sourceLine" id="cb8-5" data-line-number="5"><span class="kw"><a href="https://haven.tidyverse.org/reference/read_dta.html">read_dta</a></span>(<span class="dt">file =</span> <span class="st">"/path/to/file"</span>)</a></code></pre></div>
|
||||||
<p>To export your R objects to the Stata file format:</p>
|
<p>To export your R objects to the Stata file format:</p>
|
||||||
<div class="sourceCode" id="cb9"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb9-1" title="1"><span class="co"># save as .dta file, Stata version 14:</span></a>
|
<div class="sourceCode" id="cb9"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb9-1" data-line-number="1"><span class="co"># save as .dta file, Stata version 14:</span></a>
|
||||||
<a class="sourceLine" id="cb9-2" title="2"><span class="co"># (supports Stata v8 until v15 at the time of writing)</span></a>
|
<a class="sourceLine" id="cb9-2" data-line-number="2"><span class="co"># (supports Stata v8 until v15 at the time of writing)</span></a>
|
||||||
<a class="sourceLine" id="cb9-3" title="3"><span class="kw"><a href="https://haven.tidyverse.org/reference/read_dta.html">write_dta</a></span>(<span class="dt">data =</span> yourdata, <span class="dt">path =</span> <span class="st">"/path/to/file"</span>, <span class="dt">version =</span> <span class="dv">14</span>)</a></code></pre></div>
|
<a class="sourceLine" id="cb9-3" data-line-number="3"><span class="kw"><a href="https://haven.tidyverse.org/reference/read_dta.html">write_dta</a></span>(<span class="dt">data =</span> yourdata, <span class="dt">path =</span> <span class="st">"/path/to/file"</span>, <span class="dt">version =</span> <span class="dv">14</span>)</a></code></pre></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9005</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -192,7 +192,7 @@
|
|||||||
<h1>How to work with WHONET data</h1>
|
<h1>How to work with WHONET data</h1>
|
||||||
<h4 class="author">Matthijs S. Berends</h4>
|
<h4 class="author">Matthijs S. Berends</h4>
|
||||||
|
|
||||||
<h4 class="date">01 July 2019</h4>
|
<h4 class="date">10 July 2019</h4>
|
||||||
|
|
||||||
|
|
||||||
<div class="hidden name"><code>WHONET.Rmd</code></div>
|
<div class="hidden name"><code>WHONET.Rmd</code></div>
|
||||||
@ -206,31 +206,31 @@
|
|||||||
<a href="#import-of-data" class="anchor"></a>Import of data</h1>
|
<a href="#import-of-data" class="anchor"></a>Import of data</h1>
|
||||||
<p>This tutorial assumes you already imported the WHONET data with e.g. the <a href="https://readxl.tidyverse.org/"><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/"><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>
|
<p>An example syntax could look like this:</p>
|
||||||
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" title="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/library">library</a></span>(readxl)</a>
|
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" data-line-number="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/library">library</a></span>(readxl)</a>
|
||||||
<a class="sourceLine" id="cb1-2" title="2">data <-<span class="st"> </span><span class="kw"><a href="https://readxl.tidyverse.org/reference/read_excel.html">read_excel</a></span>(<span class="dt">path =</span> <span class="st">"path/to/your/file.xlsx"</span>)</a></code></pre></div>
|
<a class="sourceLine" id="cb1-2" data-line-number="2">data <-<span class="st"> </span><span class="kw"><a href="https://readxl.tidyverse.org/reference/read_excel.html">read_excel</a></span>(<span class="dt">path =</span> <span class="st">"path/to/your/file.xlsx"</span>)</a></code></pre></div>
|
||||||
<p>This package comes with an <a href="https://msberends.gitlab.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.gitlab.io/AMR/reference/WHONET.html">example data set <code>WHONET</code></a>. We will use it for this analysis.</p>
|
||||||
</div>
|
</div>
|
||||||
<div id="preparation" class="section level1">
|
<div id="preparation" class="section level1">
|
||||||
<h1 class="hasAnchor">
|
<h1 class="hasAnchor">
|
||||||
<a href="#preparation" class="anchor"></a>Preparation</h1>
|
<a href="#preparation" class="anchor"></a>Preparation</h1>
|
||||||
<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="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="uri">https://www.tidyverse.org/</a>.</p>
|
||||||
<div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb2-1" title="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/library">library</a></span>(dplyr) <span class="co"># part of tidyverse</span></a>
|
<div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb2-1" data-line-number="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/library">library</a></span>(dplyr) <span class="co"># part of tidyverse</span></a>
|
||||||
<a class="sourceLine" id="cb2-2" title="2"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/library">library</a></span>(ggplot2) <span class="co"># part of tidyverse</span></a>
|
<a class="sourceLine" id="cb2-2" data-line-number="2"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/library">library</a></span>(ggplot2) <span class="co"># part of tidyverse</span></a>
|
||||||
<a class="sourceLine" id="cb2-3" title="3"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/library">library</a></span>(AMR) <span class="co"># this package</span></a></code></pre></div>
|
<a class="sourceLine" id="cb2-3" data-line-number="3"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/library">library</a></span>(AMR) <span class="co"># this package</span></a></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>
|
<ul>
|
||||||
<li>Microorganisms should be transformed to our own microorganism IDs (called an <code>mo</code>) using <a href="https://msberends.gitlab.io/AMR/reference/ITIS.html">the ITIS reference data set</a>, which contains all ~20,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>Microorganisms should be transformed to our own microorganism IDs (called an <code>mo</code>) using <a href="https://msberends.gitlab.io/AMR/reference/ITIS.html">the ITIS reference data set</a>, which contains all ~20,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>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>
|
</ul>
|
||||||
<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb3-1" title="1"><span class="co"># transform variables</span></a>
|
<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb3-1" data-line-number="1"><span class="co"># transform variables</span></a>
|
||||||
<a class="sourceLine" id="cb3-2" title="2">data <-<span class="st"> </span>WHONET <span class="op">%>%</span></a>
|
<a class="sourceLine" id="cb3-2" data-line-number="2">data <-<span class="st"> </span>WHONET <span class="op">%>%</span></a>
|
||||||
<a class="sourceLine" id="cb3-3" title="3"><span class="st"> </span><span class="co"># get microbial ID based on given organism</span></a>
|
<a class="sourceLine" id="cb3-3" data-line-number="3"><span class="st"> </span><span class="co"># get microbial ID based on given organism</span></a>
|
||||||
<a class="sourceLine" id="cb3-4" title="4"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span>(<span class="dt">mo =</span> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(Organism)) <span class="op">%>%</span><span class="st"> </span></a>
|
<a class="sourceLine" id="cb3-4" data-line-number="4"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span>(<span class="dt">mo =</span> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(Organism)) <span class="op">%>%</span><span class="st"> </span></a>
|
||||||
<a class="sourceLine" id="cb3-5" title="5"><span class="st"> </span><span class="co"># transform everything from "AMP_ND10" to "CIP_EE" to the new `rsi` class</span></a>
|
<a class="sourceLine" id="cb3-5" data-line-number="5"><span class="st"> </span><span class="co"># transform everything from "AMP_ND10" to "CIP_EE" to the new `rsi` class</span></a>
|
||||||
<a class="sourceLine" id="cb3-6" title="6"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/mutate_all.html">mutate_at</a></span>(<span class="kw"><a href="https://dplyr.tidyverse.org/reference/vars.html">vars</a></span>(AMP_ND10<span class="op">:</span>CIP_EE), as.rsi)</a></code></pre></div>
|
<a class="sourceLine" id="cb3-6" data-line-number="6"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/mutate_all.html">mutate_at</a></span>(<span class="kw"><a href="https://dplyr.tidyverse.org/reference/vars.html">vars</a></span>(AMP_ND10<span class="op">:</span>CIP_EE), as.rsi)</a></code></pre></div>
|
||||||
<p>No errors or warnings, so all values are transformed succesfully. Let’s check it though, with a couple of frequency tables:</p>
|
<p>No errors or warnings, so all values are transformed succesfully. Let’s check it though, with a couple of frequency tables:</p>
|
||||||
<div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb4-1" title="1"><span class="co"># our newly created `mo` variable</span></a>
|
<div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb4-1" data-line-number="1"><span class="co"># our newly created `mo` variable</span></a>
|
||||||
<a class="sourceLine" id="cb4-2" title="2">data <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(mo, <span class="dt">nmax =</span> <span class="dv">10</span>)</a></code></pre></div>
|
<a class="sourceLine" id="cb4-2" data-line-number="2">data <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(mo, <span class="dt">nmax =</span> <span class="dv">10</span>)</a></code></pre></div>
|
||||||
<p><strong>Frequency table of <code>mo</code> from <code>data</code> (500 x 54)</strong></p>
|
<p><strong>Frequency table of <code>mo</code> from <code>data</code> (500 x 54)</strong></p>
|
||||||
<p>Class: mo (character)<br>
|
<p>Class: mo (character)<br>
|
||||||
Length: 500 (of which NA: 0 = 0.00%)<br>
|
Length: 500 (of which NA: 0 = 0.00%)<br>
|
||||||
@ -331,10 +331,10 @@ Species: 38</p>
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<p>(omitted 29 entries, n = 57 [11.4%])</p>
|
<p>(omitted 29 entries, n = 57 [11.4%])</p>
|
||||||
<div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb5-1" title="1"></a>
|
<div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb5-1" data-line-number="1"></a>
|
||||||
<a class="sourceLine" id="cb5-2" title="2"><span class="co"># our transformed antibiotic columns</span></a>
|
<a class="sourceLine" id="cb5-2" data-line-number="2"><span class="co"># our transformed antibiotic columns</span></a>
|
||||||
<a class="sourceLine" id="cb5-3" title="3"><span class="co"># amoxicillin/clavulanic acid (J01CR02) as an example</span></a>
|
<a class="sourceLine" id="cb5-3" data-line-number="3"><span class="co"># amoxicillin/clavulanic acid (J01CR02) as an example</span></a>
|
||||||
<a class="sourceLine" id="cb5-4" title="4">data <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(AMC_ND2)</a></code></pre></div>
|
<a class="sourceLine" id="cb5-4" data-line-number="4">data <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(AMC_ND2)</a></code></pre></div>
|
||||||
<p><strong>Frequency table of <code>AMC_ND2</code> from <code>data</code> (500 x 54)</strong></p>
|
<p><strong>Frequency table of <code>AMC_ND2</code> from <code>data</code> (500 x 54)</strong></p>
|
||||||
<p>Class: factor > ordered > rsi (numeric)<br>
|
<p>Class: factor > ordered > rsi (numeric)<br>
|
||||||
Length: 500 (of which NA: 19 = 3.80%)<br>
|
Length: 500 (of which NA: 19 = 3.80%)<br>
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9005</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -192,7 +192,7 @@
|
|||||||
<h1>Benchmarks</h1>
|
<h1>Benchmarks</h1>
|
||||||
<h4 class="author">Matthijs S. Berends</h4>
|
<h4 class="author">Matthijs S. Berends</h4>
|
||||||
|
|
||||||
<h4 class="date">01 July 2019</h4>
|
<h4 class="date">10 July 2019</h4>
|
||||||
|
|
||||||
|
|
||||||
<div class="hidden name"><code>benchmarks.Rmd</code></div>
|
<div class="hidden name"><code>benchmarks.Rmd</code></div>
|
||||||
@ -203,161 +203,161 @@
|
|||||||
|
|
||||||
<p>One of the most important features of this package is the complete microbial taxonomic database, supplied by the <a href="http://catalogueoflife.org">Catalogue of Life</a>. We created a function <code><a href="../reference/as.mo.html">as.mo()</a></code> that transforms any user input value to a valid microbial ID by using intelligent rules combined with the taxonomic tree of Catalogue of Life.</p>
|
<p>One of the most important features of this package is the complete microbial taxonomic database, supplied by the <a href="http://catalogueoflife.org">Catalogue of Life</a>. We created a function <code><a href="../reference/as.mo.html">as.mo()</a></code> that transforms any user input value to a valid microbial ID by using intelligent rules combined with the taxonomic tree of Catalogue of Life.</p>
|
||||||
<p>Using the <code>microbenchmark</code> package, we can review the calculation performance of this function. Its function <code><a href="https://www.rdocumentation.org/packages/microbenchmark/topics/microbenchmark">microbenchmark()</a></code> runs different input expressions independently of each other and measures their time-to-result.</p>
|
<p>Using the <code>microbenchmark</code> package, we can review the calculation performance of this function. Its function <code><a href="https://www.rdocumentation.org/packages/microbenchmark/topics/microbenchmark">microbenchmark()</a></code> runs different input expressions independently of each other and measures their time-to-result.</p>
|
||||||
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" title="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/library">library</a></span>(microbenchmark)</a>
|
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" data-line-number="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/library">library</a></span>(microbenchmark)</a>
|
||||||
<a class="sourceLine" id="cb1-2" title="2"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/library">library</a></span>(AMR)</a></code></pre></div>
|
<a class="sourceLine" id="cb1-2" data-line-number="2"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/library">library</a></span>(AMR)</a></code></pre></div>
|
||||||
<p>In the next test, we try to ‘coerce’ different input values for <em>Staphylococcus aureus</em>. The actual result is the same every time: it returns its MO code <code>B_STPHY_AUR</code> (<em>B</em> stands for <em>Bacteria</em>, the taxonomic kingdom).</p>
|
<p>In the next test, we try to ‘coerce’ different input values for <em>Staphylococcus aureus</em>. The actual result is the same every time: it returns its MO code <code>B_STPHY_AUR</code> (<em>B</em> stands for <em>Bacteria</em>, the taxonomic kingdom).</p>
|
||||||
<p>But the calculation time differs a lot:</p>
|
<p>But the calculation time differs a lot:</p>
|
||||||
<div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb2-1" title="1">S.aureus <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/microbenchmark/topics/microbenchmark">microbenchmark</a></span>(<span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"sau"</span>),</a>
|
<div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb2-1" data-line-number="1">S.aureus <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/microbenchmark/topics/microbenchmark">microbenchmark</a></span>(<span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"sau"</span>),</a>
|
||||||
<a class="sourceLine" id="cb2-2" title="2"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"stau"</span>),</a>
|
<a class="sourceLine" id="cb2-2" data-line-number="2"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"stau"</span>),</a>
|
||||||
<a class="sourceLine" id="cb2-3" title="3"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"staaur"</span>),</a>
|
<a class="sourceLine" id="cb2-3" data-line-number="3"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"staaur"</span>),</a>
|
||||||
<a class="sourceLine" id="cb2-4" title="4"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"STAAUR"</span>),</a>
|
<a class="sourceLine" id="cb2-4" data-line-number="4"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"STAAUR"</span>),</a>
|
||||||
<a class="sourceLine" id="cb2-5" title="5"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"S. aureus"</span>),</a>
|
<a class="sourceLine" id="cb2-5" data-line-number="5"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"S. aureus"</span>),</a>
|
||||||
<a class="sourceLine" id="cb2-6" title="6"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"S. aureus"</span>),</a>
|
<a class="sourceLine" id="cb2-6" data-line-number="6"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"S. aureus"</span>),</a>
|
||||||
<a class="sourceLine" id="cb2-7" title="7"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"Staphylococcus aureus"</span>),</a>
|
<a class="sourceLine" id="cb2-7" data-line-number="7"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"Staphylococcus aureus"</span>),</a>
|
||||||
<a class="sourceLine" id="cb2-8" title="8"> <span class="dt">times =</span> <span class="dv">10</span>)</a>
|
<a class="sourceLine" id="cb2-8" data-line-number="8"> <span class="dt">times =</span> <span class="dv">10</span>)</a>
|
||||||
<a class="sourceLine" id="cb2-9" title="9"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/print">print</a></span>(S.aureus, <span class="dt">unit =</span> <span class="st">"ms"</span>, <span class="dt">signif =</span> <span class="dv">2</span>)</a>
|
<a class="sourceLine" id="cb2-9" data-line-number="9"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/print">print</a></span>(S.aureus, <span class="dt">unit =</span> <span class="st">"ms"</span>, <span class="dt">signif =</span> <span class="dv">2</span>)</a>
|
||||||
<a class="sourceLine" id="cb2-10" title="10"><span class="co"># Unit: milliseconds</span></a>
|
<a class="sourceLine" id="cb2-10" data-line-number="10"><span class="co"># Unit: milliseconds</span></a>
|
||||||
<a class="sourceLine" id="cb2-11" title="11"><span class="co"># expr min lq mean median uq max neval</span></a>
|
<a class="sourceLine" id="cb2-11" data-line-number="11"><span class="co"># expr min lq mean median uq max neval</span></a>
|
||||||
<a class="sourceLine" id="cb2-12" title="12"><span class="co"># as.mo("sau") 18.0 18.0 22 18.0 18.0 61 10</span></a>
|
<a class="sourceLine" id="cb2-12" data-line-number="12"><span class="co"># as.mo("sau") 8.5 8.7 12.0 8.9 9.4 26 10</span></a>
|
||||||
<a class="sourceLine" id="cb2-13" title="13"><span class="co"># as.mo("stau") 65.0 65.0 70 66.0 66.0 110 10</span></a>
|
<a class="sourceLine" id="cb2-13" data-line-number="13"><span class="co"># as.mo("stau") 31.0 32.0 42.0 33.0 34.0 120 10</span></a>
|
||||||
<a class="sourceLine" id="cb2-14" title="14"><span class="co"># as.mo("staaur") 18.0 18.0 33 18.0 62.0 81 10</span></a>
|
<a class="sourceLine" id="cb2-14" data-line-number="14"><span class="co"># as.mo("staaur") 8.6 8.7 11.0 9.1 9.2 26 10</span></a>
|
||||||
<a class="sourceLine" id="cb2-15" title="15"><span class="co"># as.mo("STAAUR") 18.0 18.0 18 18.0 18.0 19 10</span></a>
|
<a class="sourceLine" id="cb2-15" data-line-number="15"><span class="co"># as.mo("STAAUR") 8.7 9.1 9.3 9.2 9.4 11 10</span></a>
|
||||||
<a class="sourceLine" id="cb2-16" title="16"><span class="co"># as.mo("S. aureus") 52.0 52.0 61 52.0 53.0 97 10</span></a>
|
<a class="sourceLine" id="cb2-16" data-line-number="16"><span class="co"># as.mo("S. aureus") 23.0 23.0 30.0 24.0 40.0 46 10</span></a>
|
||||||
<a class="sourceLine" id="cb2-17" title="17"><span class="co"># as.mo("S. aureus") 52.0 52.0 71 53.0 97.0 150 10</span></a>
|
<a class="sourceLine" id="cb2-17" data-line-number="17"><span class="co"># as.mo("S. aureus") 22.0 23.0 27.0 24.0 25.0 41 10</span></a>
|
||||||
<a class="sourceLine" id="cb2-18" title="18"><span class="co"># as.mo("Staphylococcus aureus") 8.1 8.1 14 8.1 8.2 63 10</span></a></code></pre></div>
|
<a class="sourceLine" id="cb2-18" data-line-number="18"><span class="co"># as.mo("Staphylococcus aureus") 3.9 4.0 5.7 4.1 4.4 20 10</span></a></code></pre></div>
|
||||||
<p>In the table above, all measurements are shown in milliseconds (thousands of seconds). A value of 5 milliseconds means it can determine 200 input values per second. It case of 100 milliseconds, this is only 10 input values per second. The second input is the only one that has to be looked up thoroughly. All the others are known codes (the first one is a WHONET code) or common laboratory codes, or common full organism names like the last one. Full organism names are always preferred.</p>
|
<p>In the table above, all measurements are shown in milliseconds (thousands of seconds). A value of 5 milliseconds means it can determine 200 input values per second. It case of 100 milliseconds, this is only 10 input values per second. The second input is the only one that has to be looked up thoroughly. All the others are known codes (the first one is a WHONET code) or common laboratory codes, or common full organism names like the last one. Full organism names are always preferred.</p>
|
||||||
<p>To achieve this speed, the <code>as.mo</code> function also takes into account the prevalence of human pathogenic microorganisms. The downside is of course that less prevalent microorganisms will be determined less fast. See this example for the ID of <em>Thermus islandicus</em> (<code>B_THERMS_ISL</code>), a bug probably never found before in humans:</p>
|
<p>To achieve this speed, the <code>as.mo</code> function also takes into account the prevalence of human pathogenic microorganisms. The downside is of course that less prevalent microorganisms will be determined less fast. See this example for the ID of <em>Thermus islandicus</em> (<code>B_THERMS_ISL</code>), a bug probably never found before in humans:</p>
|
||||||
<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb3-1" title="1">T.islandicus <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/microbenchmark/topics/microbenchmark">microbenchmark</a></span>(<span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"theisl"</span>),</a>
|
<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb3-1" data-line-number="1">T.islandicus <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/microbenchmark/topics/microbenchmark">microbenchmark</a></span>(<span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"theisl"</span>),</a>
|
||||||
<a class="sourceLine" id="cb3-2" title="2"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"THEISL"</span>),</a>
|
<a class="sourceLine" id="cb3-2" data-line-number="2"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"THEISL"</span>),</a>
|
||||||
<a class="sourceLine" id="cb3-3" title="3"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"T. islandicus"</span>),</a>
|
<a class="sourceLine" id="cb3-3" data-line-number="3"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"T. islandicus"</span>),</a>
|
||||||
<a class="sourceLine" id="cb3-4" title="4"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"T. islandicus"</span>),</a>
|
<a class="sourceLine" id="cb3-4" data-line-number="4"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"T. islandicus"</span>),</a>
|
||||||
<a class="sourceLine" id="cb3-5" title="5"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"Thermus islandicus"</span>),</a>
|
<a class="sourceLine" id="cb3-5" data-line-number="5"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"Thermus islandicus"</span>),</a>
|
||||||
<a class="sourceLine" id="cb3-6" title="6"> <span class="dt">times =</span> <span class="dv">10</span>)</a>
|
<a class="sourceLine" id="cb3-6" data-line-number="6"> <span class="dt">times =</span> <span class="dv">10</span>)</a>
|
||||||
<a class="sourceLine" id="cb3-7" title="7"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/print">print</a></span>(T.islandicus, <span class="dt">unit =</span> <span class="st">"ms"</span>, <span class="dt">signif =</span> <span class="dv">2</span>)</a>
|
<a class="sourceLine" id="cb3-7" data-line-number="7"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/print">print</a></span>(T.islandicus, <span class="dt">unit =</span> <span class="st">"ms"</span>, <span class="dt">signif =</span> <span class="dv">2</span>)</a>
|
||||||
<a class="sourceLine" id="cb3-8" title="8"><span class="co"># Unit: milliseconds</span></a>
|
<a class="sourceLine" id="cb3-8" data-line-number="8"><span class="co"># Unit: milliseconds</span></a>
|
||||||
<a class="sourceLine" id="cb3-9" title="9"><span class="co"># expr min lq mean median uq max neval</span></a>
|
<a class="sourceLine" id="cb3-9" data-line-number="9"><span class="co"># expr min lq mean median uq max neval</span></a>
|
||||||
<a class="sourceLine" id="cb3-10" title="10"><span class="co"># as.mo("theisl") 390 390 420 440 440 440 10</span></a>
|
<a class="sourceLine" id="cb3-10" data-line-number="10"><span class="co"># as.mo("theisl") 290 310 320 320 320 350 10</span></a>
|
||||||
<a class="sourceLine" id="cb3-11" title="11"><span class="co"># as.mo("THEISL") 390 390 410 400 440 440 10</span></a>
|
<a class="sourceLine" id="cb3-11" data-line-number="11"><span class="co"># as.mo("THEISL") 290 300 310 310 330 340 10</span></a>
|
||||||
<a class="sourceLine" id="cb3-12" title="12"><span class="co"># as.mo("T. islandicus") 210 210 230 220 250 270 10</span></a>
|
<a class="sourceLine" id="cb3-12" data-line-number="12"><span class="co"># as.mo("T. islandicus") 140 140 150 150 160 170 10</span></a>
|
||||||
<a class="sourceLine" id="cb3-13" title="13"><span class="co"># as.mo("T. islandicus") 210 210 240 260 260 280 10</span></a>
|
<a class="sourceLine" id="cb3-13" data-line-number="13"><span class="co"># as.mo("T. islandicus") 140 140 150 150 170 180 10</span></a>
|
||||||
<a class="sourceLine" id="cb3-14" title="14"><span class="co"># as.mo("Thermus islandicus") 72 72 92 73 120 130 10</span></a></code></pre></div>
|
<a class="sourceLine" id="cb3-14" data-line-number="14"><span class="co"># as.mo("Thermus islandicus") 50 52 58 54 68 70 10</span></a></code></pre></div>
|
||||||
<p>That takes 6.8 times as much time on average. A value of 100 milliseconds means it can only determine ~10 different input values per second. We can conclude that looking up arbitrary codes of less prevalent microorganisms is the worst way to go, in terms of calculation performance. Full names (like <em>Thermus islandicus</em>) are almost fast - these are the most probable input from most data sets.</p>
|
<p>That takes 10.2 times as much time on average. A value of 100 milliseconds means it can only determine ~10 different input values per second. We can conclude that looking up arbitrary codes of less prevalent microorganisms is the worst way to go, in terms of calculation performance. Full names (like <em>Thermus islandicus</em>) are almost fast - these are the most probable input from most data sets.</p>
|
||||||
<p>In the figure below, we compare <em>Escherichia coli</em> (which is very common) with <em>Prevotella brevis</em> (which is moderately common) and with <em>Thermus islandicus</em> (which is very uncommon):</p>
|
<p>In the figure below, we compare <em>Escherichia coli</em> (which is very common) with <em>Prevotella brevis</em> (which is moderately common) and with <em>Thermus islandicus</em> (which is very uncommon):</p>
|
||||||
<div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb4-1" title="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/graphics/topics/par">par</a></span>(<span class="dt">mar =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="dv">5</span>, <span class="dv">16</span>, <span class="dv">4</span>, <span class="dv">2</span>)) <span class="co"># set more space for left margin text (16)</span></a>
|
<div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb4-1" data-line-number="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/graphics/topics/par">par</a></span>(<span class="dt">mar =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="dv">5</span>, <span class="dv">16</span>, <span class="dv">4</span>, <span class="dv">2</span>)) <span class="co"># set more space for left margin text (16)</span></a>
|
||||||
<a class="sourceLine" id="cb4-2" title="2"></a>
|
<a class="sourceLine" id="cb4-2" data-line-number="2"></a>
|
||||||
<a class="sourceLine" id="cb4-3" title="3"><span class="kw"><a href="https://www.rdocumentation.org/packages/graphics/topics/boxplot">boxplot</a></span>(<span class="kw"><a href="https://www.rdocumentation.org/packages/microbenchmark/topics/microbenchmark">microbenchmark</a></span>(<span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"Thermus islandicus"</span>),</a>
|
<a class="sourceLine" id="cb4-3" data-line-number="3"><span class="kw"><a href="https://www.rdocumentation.org/packages/graphics/topics/boxplot">boxplot</a></span>(<span class="kw"><a href="https://www.rdocumentation.org/packages/microbenchmark/topics/microbenchmark">microbenchmark</a></span>(<span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"Thermus islandicus"</span>),</a>
|
||||||
<a class="sourceLine" id="cb4-4" title="4"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"Prevotella brevis"</span>),</a>
|
<a class="sourceLine" id="cb4-4" data-line-number="4"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"Prevotella brevis"</span>),</a>
|
||||||
<a class="sourceLine" id="cb4-5" title="5"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"Escherichia coli"</span>),</a>
|
<a class="sourceLine" id="cb4-5" data-line-number="5"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"Escherichia coli"</span>),</a>
|
||||||
<a class="sourceLine" id="cb4-6" title="6"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"T. islandicus"</span>),</a>
|
<a class="sourceLine" id="cb4-6" data-line-number="6"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"T. islandicus"</span>),</a>
|
||||||
<a class="sourceLine" id="cb4-7" title="7"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"P. brevis"</span>),</a>
|
<a class="sourceLine" id="cb4-7" data-line-number="7"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"P. brevis"</span>),</a>
|
||||||
<a class="sourceLine" id="cb4-8" title="8"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"E. coli"</span>),</a>
|
<a class="sourceLine" id="cb4-8" data-line-number="8"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"E. coli"</span>),</a>
|
||||||
<a class="sourceLine" id="cb4-9" title="9"> <span class="dt">times =</span> <span class="dv">10</span>),</a>
|
<a class="sourceLine" id="cb4-9" data-line-number="9"> <span class="dt">times =</span> <span class="dv">10</span>),</a>
|
||||||
<a class="sourceLine" id="cb4-10" title="10"> <span class="dt">horizontal =</span> <span class="ot">TRUE</span>, <span class="dt">las =</span> <span class="dv">1</span>, <span class="dt">unit =</span> <span class="st">"s"</span>, <span class="dt">log =</span> <span class="ot">FALSE</span>,</a>
|
<a class="sourceLine" id="cb4-10" data-line-number="10"> <span class="dt">horizontal =</span> <span class="ot">TRUE</span>, <span class="dt">las =</span> <span class="dv">1</span>, <span class="dt">unit =</span> <span class="st">"s"</span>, <span class="dt">log =</span> <span class="ot">FALSE</span>,</a>
|
||||||
<a class="sourceLine" id="cb4-11" title="11"> <span class="dt">xlab =</span> <span class="st">""</span>, <span class="dt">ylab =</span> <span class="st">"Time in seconds"</span>,</a>
|
<a class="sourceLine" id="cb4-11" data-line-number="11"> <span class="dt">xlab =</span> <span class="st">""</span>, <span class="dt">ylab =</span> <span class="st">"Time in seconds"</span>,</a>
|
||||||
<a class="sourceLine" id="cb4-12" title="12"> <span class="dt">main =</span> <span class="st">"Benchmarks per prevalence"</span>)</a></code></pre></div>
|
<a class="sourceLine" id="cb4-12" data-line-number="12"> <span class="dt">main =</span> <span class="st">"Benchmarks per prevalence"</span>)</a></code></pre></div>
|
||||||
<p><img src="benchmarks_files/figure-html/unnamed-chunk-5-1.png" width="720"></p>
|
<p><img src="benchmarks_files/figure-html/unnamed-chunk-5-1.png" width="720"></p>
|
||||||
<p>Uncommon microorganisms take a lot more time than common microorganisms. To relieve this pitfall and further improve performance, two important calculations take almost no time at all: <strong>repetitive results</strong> and <strong>already precalculated results</strong>.</p>
|
<p>Uncommon microorganisms take a lot more time than common microorganisms. To relieve this pitfall and further improve performance, two important calculations take almost no time at all: <strong>repetitive results</strong> and <strong>already precalculated results</strong>.</p>
|
||||||
<div id="repetitive-results" class="section level3">
|
<div id="repetitive-results" class="section level3">
|
||||||
<h3 class="hasAnchor">
|
<h3 class="hasAnchor">
|
||||||
<a href="#repetitive-results" class="anchor"></a>Repetitive results</h3>
|
<a href="#repetitive-results" class="anchor"></a>Repetitive results</h3>
|
||||||
<p>Repetitive results are unique values that are present more than once. Unique values will only be calculated once by <code><a href="../reference/as.mo.html">as.mo()</a></code>. We will use <code><a href="../reference/mo_property.html">mo_fullname()</a></code> for this test - a helper function that returns the full microbial name (genus, species and possibly subspecies) which uses <code><a href="../reference/as.mo.html">as.mo()</a></code> internally.</p>
|
<p>Repetitive results are unique values that are present more than once. Unique values will only be calculated once by <code><a href="../reference/as.mo.html">as.mo()</a></code>. We will use <code><a href="../reference/mo_property.html">mo_fullname()</a></code> for this test - a helper function that returns the full microbial name (genus, species and possibly subspecies) which uses <code><a href="../reference/as.mo.html">as.mo()</a></code> internally.</p>
|
||||||
<div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb5-1" title="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/library">library</a></span>(dplyr)</a>
|
<div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb5-1" data-line-number="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/library">library</a></span>(dplyr)</a>
|
||||||
<a class="sourceLine" id="cb5-2" title="2"><span class="co"># take all MO codes from the septic_patients data set</span></a>
|
<a class="sourceLine" id="cb5-2" data-line-number="2"><span class="co"># take all MO codes from the septic_patients data set</span></a>
|
||||||
<a class="sourceLine" id="cb5-3" title="3">x <-<span class="st"> </span>septic_patients<span class="op">$</span>mo <span class="op">%>%</span></a>
|
<a class="sourceLine" id="cb5-3" data-line-number="3">x <-<span class="st"> </span>septic_patients<span class="op">$</span>mo <span class="op">%>%</span></a>
|
||||||
<a class="sourceLine" id="cb5-4" title="4"><span class="st"> </span><span class="co"># keep only the unique ones</span></a>
|
<a class="sourceLine" id="cb5-4" data-line-number="4"><span class="st"> </span><span class="co"># keep only the unique ones</span></a>
|
||||||
<a class="sourceLine" id="cb5-5" title="5"><span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/unique">unique</a></span>() <span class="op">%>%</span></a>
|
<a class="sourceLine" id="cb5-5" data-line-number="5"><span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/unique">unique</a></span>() <span class="op">%>%</span></a>
|
||||||
<a class="sourceLine" id="cb5-6" title="6"><span class="st"> </span><span class="co"># pick 50 of them at random</span></a>
|
<a class="sourceLine" id="cb5-6" data-line-number="6"><span class="st"> </span><span class="co"># pick 50 of them at random</span></a>
|
||||||
<a class="sourceLine" id="cb5-7" title="7"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/sample.html">sample</a></span>(<span class="dv">50</span>) <span class="op">%>%</span></a>
|
<a class="sourceLine" id="cb5-7" data-line-number="7"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/sample.html">sample</a></span>(<span class="dv">50</span>) <span class="op">%>%</span></a>
|
||||||
<a class="sourceLine" id="cb5-8" title="8"><span class="st"> </span><span class="co"># paste that 10,000 times</span></a>
|
<a class="sourceLine" id="cb5-8" data-line-number="8"><span class="st"> </span><span class="co"># paste that 10,000 times</span></a>
|
||||||
<a class="sourceLine" id="cb5-9" title="9"><span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/rep">rep</a></span>(<span class="dv">10000</span>) <span class="op">%>%</span></a>
|
<a class="sourceLine" id="cb5-9" data-line-number="9"><span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/rep">rep</a></span>(<span class="dv">10000</span>) <span class="op">%>%</span></a>
|
||||||
<a class="sourceLine" id="cb5-10" title="10"><span class="st"> </span><span class="co"># scramble it</span></a>
|
<a class="sourceLine" id="cb5-10" data-line-number="10"><span class="st"> </span><span class="co"># scramble it</span></a>
|
||||||
<a class="sourceLine" id="cb5-11" title="11"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/sample.html">sample</a></span>()</a>
|
<a class="sourceLine" id="cb5-11" data-line-number="11"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/sample.html">sample</a></span>()</a>
|
||||||
<a class="sourceLine" id="cb5-12" title="12"> </a>
|
<a class="sourceLine" id="cb5-12" data-line-number="12"> </a>
|
||||||
<a class="sourceLine" id="cb5-13" title="13"><span class="co"># got indeed 50 times 10,000 = half a million?</span></a>
|
<a class="sourceLine" id="cb5-13" data-line-number="13"><span class="co"># got indeed 50 times 10,000 = half a million?</span></a>
|
||||||
<a class="sourceLine" id="cb5-14" title="14"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/length">length</a></span>(x)</a>
|
<a class="sourceLine" id="cb5-14" data-line-number="14"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/length">length</a></span>(x)</a>
|
||||||
<a class="sourceLine" id="cb5-15" title="15"><span class="co"># [1] 500000</span></a>
|
<a class="sourceLine" id="cb5-15" data-line-number="15"><span class="co"># [1] 500000</span></a>
|
||||||
<a class="sourceLine" id="cb5-16" title="16"></a>
|
<a class="sourceLine" id="cb5-16" data-line-number="16"></a>
|
||||||
<a class="sourceLine" id="cb5-17" title="17"><span class="co"># and how many unique values do we have?</span></a>
|
<a class="sourceLine" id="cb5-17" data-line-number="17"><span class="co"># and how many unique values do we have?</span></a>
|
||||||
<a class="sourceLine" id="cb5-18" title="18"><span class="kw"><a href="https://dplyr.tidyverse.org/reference/n_distinct.html">n_distinct</a></span>(x)</a>
|
<a class="sourceLine" id="cb5-18" data-line-number="18"><span class="kw"><a href="https://dplyr.tidyverse.org/reference/n_distinct.html">n_distinct</a></span>(x)</a>
|
||||||
<a class="sourceLine" id="cb5-19" title="19"><span class="co"># [1] 50</span></a>
|
<a class="sourceLine" id="cb5-19" data-line-number="19"><span class="co"># [1] 50</span></a>
|
||||||
<a class="sourceLine" id="cb5-20" title="20"></a>
|
<a class="sourceLine" id="cb5-20" data-line-number="20"></a>
|
||||||
<a class="sourceLine" id="cb5-21" title="21"><span class="co"># now let's see:</span></a>
|
<a class="sourceLine" id="cb5-21" data-line-number="21"><span class="co"># now let's see:</span></a>
|
||||||
<a class="sourceLine" id="cb5-22" title="22">run_it <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/microbenchmark/topics/microbenchmark">microbenchmark</a></span>(<span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(x),</a>
|
<a class="sourceLine" id="cb5-22" data-line-number="22">run_it <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/microbenchmark/topics/microbenchmark">microbenchmark</a></span>(<span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(x),</a>
|
||||||
<a class="sourceLine" id="cb5-23" title="23"> <span class="dt">times =</span> <span class="dv">10</span>)</a>
|
<a class="sourceLine" id="cb5-23" data-line-number="23"> <span class="dt">times =</span> <span class="dv">10</span>)</a>
|
||||||
<a class="sourceLine" id="cb5-24" title="24"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/print">print</a></span>(run_it, <span class="dt">unit =</span> <span class="st">"ms"</span>, <span class="dt">signif =</span> <span class="dv">3</span>)</a>
|
<a class="sourceLine" id="cb5-24" data-line-number="24"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/print">print</a></span>(run_it, <span class="dt">unit =</span> <span class="st">"ms"</span>, <span class="dt">signif =</span> <span class="dv">3</span>)</a>
|
||||||
<a class="sourceLine" id="cb5-25" title="25"><span class="co"># Unit: milliseconds</span></a>
|
<a class="sourceLine" id="cb5-25" data-line-number="25"><span class="co"># Unit: milliseconds</span></a>
|
||||||
<a class="sourceLine" id="cb5-26" title="26"><span class="co"># expr min lq mean median uq max neval</span></a>
|
<a class="sourceLine" id="cb5-26" data-line-number="26"><span class="co"># expr min lq mean median uq max neval</span></a>
|
||||||
<a class="sourceLine" id="cb5-27" title="27"><span class="co"># mo_fullname(x) 1050 1050 1100 1090 1120 1230 10</span></a></code></pre></div>
|
<a class="sourceLine" id="cb5-27" data-line-number="27"><span class="co"># mo_fullname(x) 611 628 643 635 650 714 10</span></a></code></pre></div>
|
||||||
<p>So transforming 500,000 values (!!) of 50 unique values only takes 1.09 seconds (1092 ms). You only lose time on your unique input values.</p>
|
<p>So transforming 500,000 values (!!) of 50 unique values only takes 0.63 seconds (634 ms). You only lose time on your unique input values.</p>
|
||||||
</div>
|
</div>
|
||||||
<div id="precalculated-results" class="section level3">
|
<div id="precalculated-results" class="section level3">
|
||||||
<h3 class="hasAnchor">
|
<h3 class="hasAnchor">
|
||||||
<a href="#precalculated-results" class="anchor"></a>Precalculated results</h3>
|
<a href="#precalculated-results" class="anchor"></a>Precalculated results</h3>
|
||||||
<p>What about precalculated results? If the input is an already precalculated result of a helper function like <code><a href="../reference/mo_property.html">mo_fullname()</a></code>, it almost doesn’t take any time at all (see ‘C’ below):</p>
|
<p>What about precalculated results? If the input is an already precalculated result of a helper function like <code><a href="../reference/mo_property.html">mo_fullname()</a></code>, it almost doesn’t take any time at all (see ‘C’ below):</p>
|
||||||
<div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb6-1" title="1">run_it <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/microbenchmark/topics/microbenchmark">microbenchmark</a></span>(<span class="dt">A =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"B_STPHY_AUR"</span>),</a>
|
<div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb6-1" data-line-number="1">run_it <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/microbenchmark/topics/microbenchmark">microbenchmark</a></span>(<span class="dt">A =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"B_STPHY_AUR"</span>),</a>
|
||||||
<a class="sourceLine" id="cb6-2" title="2"> <span class="dt">B =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"S. aureus"</span>),</a>
|
<a class="sourceLine" id="cb6-2" data-line-number="2"> <span class="dt">B =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"S. aureus"</span>),</a>
|
||||||
<a class="sourceLine" id="cb6-3" title="3"> <span class="dt">C =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"Staphylococcus aureus"</span>),</a>
|
<a class="sourceLine" id="cb6-3" data-line-number="3"> <span class="dt">C =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"Staphylococcus aureus"</span>),</a>
|
||||||
<a class="sourceLine" id="cb6-4" title="4"> <span class="dt">times =</span> <span class="dv">10</span>)</a>
|
<a class="sourceLine" id="cb6-4" data-line-number="4"> <span class="dt">times =</span> <span class="dv">10</span>)</a>
|
||||||
<a class="sourceLine" id="cb6-5" title="5"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/print">print</a></span>(run_it, <span class="dt">unit =</span> <span class="st">"ms"</span>, <span class="dt">signif =</span> <span class="dv">3</span>)</a>
|
<a class="sourceLine" id="cb6-5" data-line-number="5"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/print">print</a></span>(run_it, <span class="dt">unit =</span> <span class="st">"ms"</span>, <span class="dt">signif =</span> <span class="dv">3</span>)</a>
|
||||||
<a class="sourceLine" id="cb6-6" title="6"><span class="co"># Unit: milliseconds</span></a>
|
<a class="sourceLine" id="cb6-6" data-line-number="6"><span class="co"># Unit: milliseconds</span></a>
|
||||||
<a class="sourceLine" id="cb6-7" title="7"><span class="co"># expr min lq mean median uq max neval</span></a>
|
<a class="sourceLine" id="cb6-7" data-line-number="7"><span class="co"># expr min lq mean median uq max neval</span></a>
|
||||||
<a class="sourceLine" id="cb6-8" title="8"><span class="co"># A 13.00 13.20 13.60 13.60 14.00 14.40 10</span></a>
|
<a class="sourceLine" id="cb6-8" data-line-number="8"><span class="co"># A 6.730 7.030 8.030 7.750 8.72 9.73 10</span></a>
|
||||||
<a class="sourceLine" id="cb6-9" title="9"><span class="co"># B 49.40 50.00 57.50 51.90 52.40 103.00 10</span></a>
|
<a class="sourceLine" id="cb6-9" data-line-number="9"><span class="co"># B 22.400 23.000 27.100 23.600 27.10 46.00 10</span></a>
|
||||||
<a class="sourceLine" id="cb6-10" title="10"><span class="co"># C 1.52 1.72 1.81 1.78 1.98 1.99 10</span></a></code></pre></div>
|
<a class="sourceLine" id="cb6-10" data-line-number="10"><span class="co"># C 0.835 0.877 0.978 0.925 1.12 1.18 10</span></a></code></pre></div>
|
||||||
<p>So going from <code><a href="../reference/mo_property.html">mo_fullname("Staphylococcus aureus")</a></code> to <code>"Staphylococcus aureus"</code> takes 0.0018 seconds - it doesn’t even start calculating <em>if the result would be the same as the expected resulting value</em>. That goes for all helper functions:</p>
|
<p>So going from <code><a href="../reference/mo_property.html">mo_fullname("Staphylococcus aureus")</a></code> to <code>"Staphylococcus aureus"</code> takes 0.0009 seconds - it doesn’t even start calculating <em>if the result would be the same as the expected resulting value</em>. That goes for all helper functions:</p>
|
||||||
<div class="sourceCode" id="cb7"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb7-1" title="1">run_it <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/microbenchmark/topics/microbenchmark">microbenchmark</a></span>(<span class="dt">A =</span> <span class="kw"><a href="../reference/mo_property.html">mo_species</a></span>(<span class="st">"aureus"</span>),</a>
|
<div class="sourceCode" id="cb7"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb7-1" data-line-number="1">run_it <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/microbenchmark/topics/microbenchmark">microbenchmark</a></span>(<span class="dt">A =</span> <span class="kw"><a href="../reference/mo_property.html">mo_species</a></span>(<span class="st">"aureus"</span>),</a>
|
||||||
<a class="sourceLine" id="cb7-2" title="2"> <span class="dt">B =</span> <span class="kw"><a href="../reference/mo_property.html">mo_genus</a></span>(<span class="st">"Staphylococcus"</span>),</a>
|
<a class="sourceLine" id="cb7-2" data-line-number="2"> <span class="dt">B =</span> <span class="kw"><a href="../reference/mo_property.html">mo_genus</a></span>(<span class="st">"Staphylococcus"</span>),</a>
|
||||||
<a class="sourceLine" id="cb7-3" title="3"> <span class="dt">C =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"Staphylococcus aureus"</span>),</a>
|
<a class="sourceLine" id="cb7-3" data-line-number="3"> <span class="dt">C =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"Staphylococcus aureus"</span>),</a>
|
||||||
<a class="sourceLine" id="cb7-4" title="4"> <span class="dt">D =</span> <span class="kw"><a href="../reference/mo_property.html">mo_family</a></span>(<span class="st">"Staphylococcaceae"</span>),</a>
|
<a class="sourceLine" id="cb7-4" data-line-number="4"> <span class="dt">D =</span> <span class="kw"><a href="../reference/mo_property.html">mo_family</a></span>(<span class="st">"Staphylococcaceae"</span>),</a>
|
||||||
<a class="sourceLine" id="cb7-5" title="5"> <span class="dt">E =</span> <span class="kw"><a href="../reference/mo_property.html">mo_order</a></span>(<span class="st">"Bacillales"</span>),</a>
|
<a class="sourceLine" id="cb7-5" data-line-number="5"> <span class="dt">E =</span> <span class="kw"><a href="../reference/mo_property.html">mo_order</a></span>(<span class="st">"Bacillales"</span>),</a>
|
||||||
<a class="sourceLine" id="cb7-6" title="6"> <span class="dt">F =</span> <span class="kw"><a href="../reference/mo_property.html">mo_class</a></span>(<span class="st">"Bacilli"</span>),</a>
|
<a class="sourceLine" id="cb7-6" data-line-number="6"> <span class="dt">F =</span> <span class="kw"><a href="../reference/mo_property.html">mo_class</a></span>(<span class="st">"Bacilli"</span>),</a>
|
||||||
<a class="sourceLine" id="cb7-7" title="7"> <span class="dt">G =</span> <span class="kw"><a href="../reference/mo_property.html">mo_phylum</a></span>(<span class="st">"Firmicutes"</span>),</a>
|
<a class="sourceLine" id="cb7-7" data-line-number="7"> <span class="dt">G =</span> <span class="kw"><a href="../reference/mo_property.html">mo_phylum</a></span>(<span class="st">"Firmicutes"</span>),</a>
|
||||||
<a class="sourceLine" id="cb7-8" title="8"> <span class="dt">H =</span> <span class="kw"><a href="../reference/mo_property.html">mo_kingdom</a></span>(<span class="st">"Bacteria"</span>),</a>
|
<a class="sourceLine" id="cb7-8" data-line-number="8"> <span class="dt">H =</span> <span class="kw"><a href="../reference/mo_property.html">mo_kingdom</a></span>(<span class="st">"Bacteria"</span>),</a>
|
||||||
<a class="sourceLine" id="cb7-9" title="9"> <span class="dt">times =</span> <span class="dv">10</span>)</a>
|
<a class="sourceLine" id="cb7-9" data-line-number="9"> <span class="dt">times =</span> <span class="dv">10</span>)</a>
|
||||||
<a class="sourceLine" id="cb7-10" title="10"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/print">print</a></span>(run_it, <span class="dt">unit =</span> <span class="st">"ms"</span>, <span class="dt">signif =</span> <span class="dv">3</span>)</a>
|
<a class="sourceLine" id="cb7-10" data-line-number="10"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/print">print</a></span>(run_it, <span class="dt">unit =</span> <span class="st">"ms"</span>, <span class="dt">signif =</span> <span class="dv">3</span>)</a>
|
||||||
<a class="sourceLine" id="cb7-11" title="11"><span class="co"># Unit: milliseconds</span></a>
|
<a class="sourceLine" id="cb7-11" data-line-number="11"><span class="co"># Unit: milliseconds</span></a>
|
||||||
<a class="sourceLine" id="cb7-12" title="12"><span class="co"># expr min lq mean median uq max neval</span></a>
|
<a class="sourceLine" id="cb7-12" data-line-number="12"><span class="co"># expr min lq mean median uq max neval</span></a>
|
||||||
<a class="sourceLine" id="cb7-13" title="13"><span class="co"># A 0.612 0.623 0.685 0.653 0.789 0.814 10</span></a>
|
<a class="sourceLine" id="cb7-13" data-line-number="13"><span class="co"># A 0.468 0.470 0.533 0.489 0.595 0.690 10</span></a>
|
||||||
<a class="sourceLine" id="cb7-14" title="14"><span class="co"># B 0.556 0.575 0.680 0.671 0.689 0.958 10</span></a>
|
<a class="sourceLine" id="cb7-14" data-line-number="14"><span class="co"># B 0.504 0.513 0.555 0.520 0.571 0.711 10</span></a>
|
||||||
<a class="sourceLine" id="cb7-15" title="15"><span class="co"># C 1.520 1.710 1.800 1.820 1.950 1.970 10</span></a>
|
<a class="sourceLine" id="cb7-15" data-line-number="15"><span class="co"># C 0.629 0.687 0.864 0.855 1.050 1.130 10</span></a>
|
||||||
<a class="sourceLine" id="cb7-16" title="16"><span class="co"># D 0.547 0.665 0.723 0.688 0.811 0.997 10</span></a>
|
<a class="sourceLine" id="cb7-16" data-line-number="16"><span class="co"># D 0.505 0.515 0.575 0.530 0.649 0.767 10</span></a>
|
||||||
<a class="sourceLine" id="cb7-17" title="17"><span class="co"># E 0.490 0.541 0.633 0.629 0.748 0.756 10</span></a>
|
<a class="sourceLine" id="cb7-17" data-line-number="17"><span class="co"># E 0.442 0.457 0.529 0.481 0.531 0.774 10</span></a>
|
||||||
<a class="sourceLine" id="cb7-18" title="18"><span class="co"># F 0.482 0.569 0.612 0.590 0.663 0.756 10</span></a>
|
<a class="sourceLine" id="cb7-18" data-line-number="18"><span class="co"># F 0.447 0.510 0.554 0.568 0.609 0.618 10</span></a>
|
||||||
<a class="sourceLine" id="cb7-19" title="19"><span class="co"># G 0.551 0.558 0.601 0.586 0.632 0.735 10</span></a>
|
<a class="sourceLine" id="cb7-19" data-line-number="19"><span class="co"># G 0.443 0.470 0.492 0.477 0.506 0.601 10</span></a>
|
||||||
<a class="sourceLine" id="cb7-20" title="20"><span class="co"># H 0.494 0.564 0.595 0.575 0.608 0.757 10</span></a></code></pre></div>
|
<a class="sourceLine" id="cb7-20" data-line-number="20"><span class="co"># H 0.448 0.459 0.491 0.466 0.515 0.633 10</span></a></code></pre></div>
|
||||||
<p>Of course, when running <code><a href="../reference/mo_property.html">mo_phylum("Firmicutes")</a></code> the function has zero knowledge about the actual microorganism, namely <em>S. aureus</em>. But since the result would be <code>"Firmicutes"</code> too, there is no point in calculating the result. And because this package ‘knows’ all phyla of all known bacteria (according to the Catalogue of Life), it can just return the initial value immediately.</p>
|
<p>Of course, when running <code><a href="../reference/mo_property.html">mo_phylum("Firmicutes")</a></code> the function has zero knowledge about the actual microorganism, namely <em>S. aureus</em>. But since the result would be <code>"Firmicutes"</code> too, there is no point in calculating the result. And because this package ‘knows’ all phyla of all known bacteria (according to the Catalogue of Life), it can just return the initial value immediately.</p>
|
||||||
</div>
|
</div>
|
||||||
<div id="results-in-other-languages" class="section level3">
|
<div id="results-in-other-languages" class="section level3">
|
||||||
<h3 class="hasAnchor">
|
<h3 class="hasAnchor">
|
||||||
<a href="#results-in-other-languages" class="anchor"></a>Results in other languages</h3>
|
<a href="#results-in-other-languages" class="anchor"></a>Results in other languages</h3>
|
||||||
<p>When the system language is non-English and supported by this <code>AMR</code> package, some functions will have a translated result. This almost does’t take extra time:</p>
|
<p>When the system language is non-English and supported by this <code>AMR</code> package, some functions will have a translated result. This almost does’t take extra time:</p>
|
||||||
<div class="sourceCode" id="cb8"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb8-1" title="1"><span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"en"</span>) <span class="co"># or just mo_fullname("CoNS") on an English system</span></a>
|
<div class="sourceCode" id="cb8"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb8-1" data-line-number="1"><span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"en"</span>) <span class="co"># or just mo_fullname("CoNS") on an English system</span></a>
|
||||||
<a class="sourceLine" id="cb8-2" title="2"><span class="co"># [1] "Coagulase-negative Staphylococcus (CoNS)"</span></a>
|
<a class="sourceLine" id="cb8-2" data-line-number="2"><span class="co"># [1] "Coagulase-negative Staphylococcus (CoNS)"</span></a>
|
||||||
<a class="sourceLine" id="cb8-3" title="3"></a>
|
<a class="sourceLine" id="cb8-3" data-line-number="3"></a>
|
||||||
<a class="sourceLine" id="cb8-4" title="4"><span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"es"</span>) <span class="co"># or just mo_fullname("CoNS") on a Spanish system</span></a>
|
<a class="sourceLine" id="cb8-4" data-line-number="4"><span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"es"</span>) <span class="co"># or just mo_fullname("CoNS") on a Spanish system</span></a>
|
||||||
<a class="sourceLine" id="cb8-5" title="5"><span class="co"># [1] "Staphylococcus coagulasa negativo (SCN)"</span></a>
|
<a class="sourceLine" id="cb8-5" data-line-number="5"><span class="co"># [1] "Staphylococcus coagulasa negativo (SCN)"</span></a>
|
||||||
<a class="sourceLine" id="cb8-6" title="6"></a>
|
<a class="sourceLine" id="cb8-6" data-line-number="6"></a>
|
||||||
<a class="sourceLine" id="cb8-7" title="7"><span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"nl"</span>) <span class="co"># or just mo_fullname("CoNS") on a Dutch system</span></a>
|
<a class="sourceLine" id="cb8-7" data-line-number="7"><span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"nl"</span>) <span class="co"># or just mo_fullname("CoNS") on a Dutch system</span></a>
|
||||||
<a class="sourceLine" id="cb8-8" title="8"><span class="co"># [1] "Coagulase-negatieve Staphylococcus (CNS)"</span></a>
|
<a class="sourceLine" id="cb8-8" data-line-number="8"><span class="co"># [1] "Coagulase-negatieve Staphylococcus (CNS)"</span></a>
|
||||||
<a class="sourceLine" id="cb8-9" title="9"></a>
|
<a class="sourceLine" id="cb8-9" data-line-number="9"></a>
|
||||||
<a class="sourceLine" id="cb8-10" title="10">run_it <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/microbenchmark/topics/microbenchmark">microbenchmark</a></span>(<span class="dt">en =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"en"</span>),</a>
|
<a class="sourceLine" id="cb8-10" data-line-number="10">run_it <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/microbenchmark/topics/microbenchmark">microbenchmark</a></span>(<span class="dt">en =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"en"</span>),</a>
|
||||||
<a class="sourceLine" id="cb8-11" title="11"> <span class="dt">de =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"de"</span>),</a>
|
<a class="sourceLine" id="cb8-11" data-line-number="11"> <span class="dt">de =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"de"</span>),</a>
|
||||||
<a class="sourceLine" id="cb8-12" title="12"> <span class="dt">nl =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"nl"</span>),</a>
|
<a class="sourceLine" id="cb8-12" data-line-number="12"> <span class="dt">nl =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"nl"</span>),</a>
|
||||||
<a class="sourceLine" id="cb8-13" title="13"> <span class="dt">es =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"es"</span>),</a>
|
<a class="sourceLine" id="cb8-13" data-line-number="13"> <span class="dt">es =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"es"</span>),</a>
|
||||||
<a class="sourceLine" id="cb8-14" title="14"> <span class="dt">it =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"it"</span>),</a>
|
<a class="sourceLine" id="cb8-14" data-line-number="14"> <span class="dt">it =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"it"</span>),</a>
|
||||||
<a class="sourceLine" id="cb8-15" title="15"> <span class="dt">fr =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"fr"</span>),</a>
|
<a class="sourceLine" id="cb8-15" data-line-number="15"> <span class="dt">fr =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"fr"</span>),</a>
|
||||||
<a class="sourceLine" id="cb8-16" title="16"> <span class="dt">pt =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"pt"</span>),</a>
|
<a class="sourceLine" id="cb8-16" data-line-number="16"> <span class="dt">pt =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"pt"</span>),</a>
|
||||||
<a class="sourceLine" id="cb8-17" title="17"> <span class="dt">times =</span> <span class="dv">10</span>)</a>
|
<a class="sourceLine" id="cb8-17" data-line-number="17"> <span class="dt">times =</span> <span class="dv">10</span>)</a>
|
||||||
<a class="sourceLine" id="cb8-18" title="18"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/print">print</a></span>(run_it, <span class="dt">unit =</span> <span class="st">"ms"</span>, <span class="dt">signif =</span> <span class="dv">4</span>)</a>
|
<a class="sourceLine" id="cb8-18" data-line-number="18"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/print">print</a></span>(run_it, <span class="dt">unit =</span> <span class="st">"ms"</span>, <span class="dt">signif =</span> <span class="dv">4</span>)</a>
|
||||||
<a class="sourceLine" id="cb8-19" title="19"><span class="co"># Unit: milliseconds</span></a>
|
<a class="sourceLine" id="cb8-19" data-line-number="19"><span class="co"># Unit: milliseconds</span></a>
|
||||||
<a class="sourceLine" id="cb8-20" title="20"><span class="co"># expr min lq mean median uq max neval</span></a>
|
<a class="sourceLine" id="cb8-20" data-line-number="20"><span class="co"># expr min lq mean median uq max neval</span></a>
|
||||||
<a class="sourceLine" id="cb8-21" title="21"><span class="co"># en 43.00 43.12 45.51 44.82 44.89 56.61 10</span></a>
|
<a class="sourceLine" id="cb8-21" data-line-number="21"><span class="co"># en 19.29 20.39 22.42 20.64 21.26 38.98 10</span></a>
|
||||||
<a class="sourceLine" id="cb8-22" title="22"><span class="co"># de 46.47 46.99 52.11 47.57 48.11 93.77 10</span></a>
|
<a class="sourceLine" id="cb8-22" data-line-number="22"><span class="co"># de 22.03 22.40 23.78 23.08 23.60 31.74 10</span></a>
|
||||||
<a class="sourceLine" id="cb8-23" title="23"><span class="co"># nl 60.86 62.72 67.57 63.69 63.99 108.20 10</span></a>
|
<a class="sourceLine" id="cb8-23" data-line-number="23"><span class="co"># nl 27.98 28.60 29.22 28.87 30.13 30.53 10</span></a>
|
||||||
<a class="sourceLine" id="cb8-24" title="24"><span class="co"># es 45.74 46.05 52.37 46.42 47.98 103.00 10</span></a>
|
<a class="sourceLine" id="cb8-24" data-line-number="24"><span class="co"># es 21.44 22.97 30.04 24.11 45.71 46.46 10</span></a>
|
||||||
<a class="sourceLine" id="cb8-25" title="25"><span class="co"># it 45.84 45.89 51.90 47.66 47.73 94.83 10</span></a>
|
<a class="sourceLine" id="cb8-25" data-line-number="25"><span class="co"># it 21.17 21.82 22.47 22.44 23.27 23.52 10</span></a>
|
||||||
<a class="sourceLine" id="cb8-26" title="26"><span class="co"># fr 45.97 46.92 47.44 47.76 47.86 48.49 10</span></a>
|
<a class="sourceLine" id="cb8-26" data-line-number="26"><span class="co"># fr 20.75 21.58 24.10 22.04 22.41 42.96 10</span></a>
|
||||||
<a class="sourceLine" id="cb8-27" title="27"><span class="co"># pt 45.93 46.77 47.36 47.77 47.93 48.12 10</span></a></code></pre></div>
|
<a class="sourceLine" id="cb8-27" data-line-number="27"><span class="co"># pt 21.24 21.92 24.31 22.75 23.26 39.91 10</span></a></code></pre></div>
|
||||||
<p>Currently supported are German, Dutch, Spanish, Italian, French and Portuguese.</p>
|
<p>Currently supported are German, Dutch, Spanish, Italian, French and Portuguese.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 84 KiB |
@ -40,7 +40,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9005</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -192,7 +192,7 @@
|
|||||||
<h1>How to create frequency tables</h1>
|
<h1>How to create frequency tables</h1>
|
||||||
<h4 class="author">Matthijs S. Berends</h4>
|
<h4 class="author">Matthijs S. Berends</h4>
|
||||||
|
|
||||||
<h4 class="date">01 July 2019</h4>
|
<h4 class="date">10 July 2019</h4>
|
||||||
|
|
||||||
|
|
||||||
<div class="hidden name"><code>freq.Rmd</code></div>
|
<div class="hidden name"><code>freq.Rmd</code></div>
|
||||||
@ -210,17 +210,17 @@
|
|||||||
<h2 class="hasAnchor">
|
<h2 class="hasAnchor">
|
||||||
<a href="#frequencies-of-one-variable" class="anchor"></a>Frequencies of one variable</h2>
|
<a href="#frequencies-of-one-variable" class="anchor"></a>Frequencies of one variable</h2>
|
||||||
<p>To only show and quickly review the content of one variable, you can just select this variable in various ways. Let’s say we want to get the frequencies of the <code>gender</code> variable of the <code>septic_patients</code> dataset:</p>
|
<p>To only show and quickly review the content of one variable, you can just select this variable in various ways. Let’s say we want to get the frequencies of the <code>gender</code> variable of the <code>septic_patients</code> dataset:</p>
|
||||||
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" title="1"><span class="co"># Any of these will work:</span></a>
|
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" data-line-number="1"><span class="co"># Any of these will work:</span></a>
|
||||||
<a class="sourceLine" id="cb1-2" title="2"><span class="co"># freq(septic_patients$gender)</span></a>
|
<a class="sourceLine" id="cb1-2" data-line-number="2"><span class="co"># freq(septic_patients$gender)</span></a>
|
||||||
<a class="sourceLine" id="cb1-3" title="3"><span class="co"># freq(septic_patients[, "gender"])</span></a>
|
<a class="sourceLine" id="cb1-3" data-line-number="3"><span class="co"># freq(septic_patients[, "gender"])</span></a>
|
||||||
<a class="sourceLine" id="cb1-4" title="4"></a>
|
<a class="sourceLine" id="cb1-4" data-line-number="4"></a>
|
||||||
<a class="sourceLine" id="cb1-5" title="5"><span class="co"># Using tidyverse:</span></a>
|
<a class="sourceLine" id="cb1-5" data-line-number="5"><span class="co"># Using tidyverse:</span></a>
|
||||||
<a class="sourceLine" id="cb1-6" title="6"><span class="co"># septic_patients$gender %>% freq()</span></a>
|
<a class="sourceLine" id="cb1-6" data-line-number="6"><span class="co"># septic_patients$gender %>% freq()</span></a>
|
||||||
<a class="sourceLine" id="cb1-7" title="7"><span class="co"># septic_patients[, "gender"] %>% freq()</span></a>
|
<a class="sourceLine" id="cb1-7" data-line-number="7"><span class="co"># septic_patients[, "gender"] %>% freq()</span></a>
|
||||||
<a class="sourceLine" id="cb1-8" title="8"><span class="co"># septic_patients %>% freq("gender")</span></a>
|
<a class="sourceLine" id="cb1-8" data-line-number="8"><span class="co"># septic_patients %>% freq("gender")</span></a>
|
||||||
<a class="sourceLine" id="cb1-9" title="9"></a>
|
<a class="sourceLine" id="cb1-9" data-line-number="9"></a>
|
||||||
<a class="sourceLine" id="cb1-10" title="10"><span class="co"># Probably the fastest and easiest:</span></a>
|
<a class="sourceLine" id="cb1-10" data-line-number="10"><span class="co"># Probably the fastest and easiest:</span></a>
|
||||||
<a class="sourceLine" id="cb1-11" title="11">septic_patients <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(gender) </a></code></pre></div>
|
<a class="sourceLine" id="cb1-11" data-line-number="11">septic_patients <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(gender) </a></code></pre></div>
|
||||||
<p><strong>Frequency table of <code>gender</code> from <code>septic_patients</code> (2,000 x 49)</strong></p>
|
<p><strong>Frequency table of <code>gender</code> from <code>septic_patients</code> (2,000 x 49)</strong></p>
|
||||||
<p>Class: character<br>
|
<p>Class: character<br>
|
||||||
Length: 2,000 (of which NA: 0 = 0.00%)<br>
|
Length: 2,000 (of which NA: 0 = 0.00%)<br>
|
||||||
@ -262,22 +262,22 @@ Longest: 1</p>
|
|||||||
<a href="#frequencies-of-more-than-one-variable" class="anchor"></a>Frequencies of more than one variable</h2>
|
<a href="#frequencies-of-more-than-one-variable" class="anchor"></a>Frequencies of more than one variable</h2>
|
||||||
<p>Multiple variables will be pasted into one variable to review individual cases, keeping a univariate frequency table.</p>
|
<p>Multiple variables will be pasted into one variable to review individual cases, keeping a univariate frequency table.</p>
|
||||||
<p>For illustration, we could add some more variables to the <code>septic_patients</code> dataset to learn about bacterial properties:</p>
|
<p>For illustration, we could add some more variables to the <code>septic_patients</code> dataset to learn about bacterial properties:</p>
|
||||||
<div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb2-1" title="1">my_patients <-<span class="st"> </span>septic_patients <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/join.html">left_join_microorganisms</a></span>()</a>
|
<div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb2-1" data-line-number="1">my_patients <-<span class="st"> </span>septic_patients <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/join.html">left_join_microorganisms</a></span>()</a>
|
||||||
<a class="sourceLine" id="cb2-2" title="2"><span class="co"># Joining, by = "mo"</span></a></code></pre></div>
|
<a class="sourceLine" id="cb2-2" data-line-number="2"><span class="co"># Joining, by = "mo"</span></a></code></pre></div>
|
||||||
<p>Now all variables of the <code>microorganisms</code> dataset have been joined to the <code>septic_patients</code> dataset. The <code>microorganisms</code> dataset consists of the following variables:</p>
|
<p>Now all variables of the <code>microorganisms</code> dataset have been joined to the <code>septic_patients</code> dataset. The <code>microorganisms</code> dataset consists of the following variables:</p>
|
||||||
<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb3-1" title="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/colnames">colnames</a></span>(microorganisms)</a>
|
<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb3-1" data-line-number="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/colnames">colnames</a></span>(microorganisms)</a>
|
||||||
<a class="sourceLine" id="cb3-2" title="2"><span class="co"># [1] "mo" "col_id" "fullname" "kingdom" "phylum" </span></a>
|
<a class="sourceLine" id="cb3-2" data-line-number="2"><span class="co"># [1] "mo" "col_id" "fullname" "kingdom" "phylum" </span></a>
|
||||||
<a class="sourceLine" id="cb3-3" title="3"><span class="co"># [6] "class" "order" "family" "genus" "species" </span></a>
|
<a class="sourceLine" id="cb3-3" data-line-number="3"><span class="co"># [6] "class" "order" "family" "genus" "species" </span></a>
|
||||||
<a class="sourceLine" id="cb3-4" title="4"><span class="co"># [11] "subspecies" "rank" "ref" "species_id" "source" </span></a>
|
<a class="sourceLine" id="cb3-4" data-line-number="4"><span class="co"># [11] "subspecies" "rank" "ref" "species_id" "source" </span></a>
|
||||||
<a class="sourceLine" id="cb3-5" title="5"><span class="co"># [16] "prevalence"</span></a></code></pre></div>
|
<a class="sourceLine" id="cb3-5" data-line-number="5"><span class="co"># [16] "prevalence"</span></a></code></pre></div>
|
||||||
<p>If we compare the dimensions between the old and new dataset, we can see that these 15 variables were added:</p>
|
<p>If we compare the dimensions between the old and new dataset, we can see that these 15 variables were added:</p>
|
||||||
<div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb4-1" title="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/dim">dim</a></span>(septic_patients)</a>
|
<div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb4-1" data-line-number="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/dim">dim</a></span>(septic_patients)</a>
|
||||||
<a class="sourceLine" id="cb4-2" title="2"><span class="co"># [1] 2000 49</span></a>
|
<a class="sourceLine" id="cb4-2" data-line-number="2"><span class="co"># [1] 2000 49</span></a>
|
||||||
<a class="sourceLine" id="cb4-3" title="3"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/dim">dim</a></span>(my_patients)</a>
|
<a class="sourceLine" id="cb4-3" data-line-number="3"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/dim">dim</a></span>(my_patients)</a>
|
||||||
<a class="sourceLine" id="cb4-4" title="4"><span class="co"># [1] 2000 64</span></a></code></pre></div>
|
<a class="sourceLine" id="cb4-4" data-line-number="4"><span class="co"># [1] 2000 64</span></a></code></pre></div>
|
||||||
<p>So now the <code>genus</code> and <code>species</code> variables are available. A frequency table of these combined variables can be created like this:</p>
|
<p>So now the <code>genus</code> and <code>species</code> variables are available. A frequency table of these combined variables can be created like this:</p>
|
||||||
<div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb5-1" title="1">my_patients <span class="op">%>%</span></a>
|
<div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb5-1" data-line-number="1">my_patients <span class="op">%>%</span></a>
|
||||||
<a class="sourceLine" id="cb5-2" title="2"><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(genus, species, <span class="dt">nmax =</span> <span class="dv">15</span>)</a></code></pre></div>
|
<a class="sourceLine" id="cb5-2" data-line-number="2"><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(genus, species, <span class="dt">nmax =</span> <span class="dv">15</span>)</a></code></pre></div>
|
||||||
<p><strong>Frequency table of <code>genus</code> and <code>species</code> from <code>my_patients</code> (2,000 x 64)</strong></p>
|
<p><strong>Frequency table of <code>genus</code> and <code>species</code> from <code>my_patients</code> (2,000 x 64)</strong></p>
|
||||||
<p>Columns: 2<br>
|
<p>Columns: 2<br>
|
||||||
Length: 2,000 (of which NA: 0 = 0.00%)<br>
|
Length: 2,000 (of which NA: 0 = 0.00%)<br>
|
||||||
@ -423,10 +423,10 @@ Longest: 34</p>
|
|||||||
<a href="#frequencies-of-numeric-values" class="anchor"></a>Frequencies of numeric values</h2>
|
<a href="#frequencies-of-numeric-values" class="anchor"></a>Frequencies of numeric values</h2>
|
||||||
<p>Frequency tables can be created of any input.</p>
|
<p>Frequency tables can be created of any input.</p>
|
||||||
<p>In case of numeric values (like integers, doubles, etc.) additional descriptive statistics will be calculated and shown into the header:</p>
|
<p>In case of numeric values (like integers, doubles, etc.) additional descriptive statistics will be calculated and shown into the header:</p>
|
||||||
<div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb6-1" title="1"><span class="co"># # get age distribution of unique patients</span></a>
|
<div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb6-1" data-line-number="1"><span class="co"># # get age distribution of unique patients</span></a>
|
||||||
<a class="sourceLine" id="cb6-2" title="2">septic_patients <span class="op">%>%</span><span class="st"> </span></a>
|
<a class="sourceLine" id="cb6-2" data-line-number="2">septic_patients <span class="op">%>%</span><span class="st"> </span></a>
|
||||||
<a class="sourceLine" id="cb6-3" title="3"><span class="st"> </span><span class="kw">distinct</span>(patient_id, <span class="dt">.keep_all =</span> <span class="ot">TRUE</span>) <span class="op">%>%</span><span class="st"> </span></a>
|
<a class="sourceLine" id="cb6-3" data-line-number="3"><span class="st"> </span><span class="kw">distinct</span>(patient_id, <span class="dt">.keep_all =</span> <span class="ot">TRUE</span>) <span class="op">%>%</span><span class="st"> </span></a>
|
||||||
<a class="sourceLine" id="cb6-4" title="4"><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(age, <span class="dt">nmax =</span> <span class="dv">5</span>, <span class="dt">header =</span> <span class="ot">TRUE</span>)</a></code></pre></div>
|
<a class="sourceLine" id="cb6-4" data-line-number="4"><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(age, <span class="dt">nmax =</span> <span class="dv">5</span>, <span class="dt">header =</span> <span class="ot">TRUE</span>)</a></code></pre></div>
|
||||||
<p><strong>Frequency table of <code>age</code> from a <code>data.frame</code> (981 x 49)</strong></p>
|
<p><strong>Frequency table of <code>age</code> from a <code>data.frame</code> (981 x 49)</strong></p>
|
||||||
<p>Class: numeric<br>
|
<p>Class: numeric<br>
|
||||||
Length: 981 (of which NA: 0 = 0.00%)<br>
|
Length: 981 (of which NA: 0 = 0.00%)<br>
|
||||||
@ -506,8 +506,8 @@ Outliers: 15 (unique count: 12)</p>
|
|||||||
<a href="#frequencies-of-factors" class="anchor"></a>Frequencies of factors</h2>
|
<a href="#frequencies-of-factors" class="anchor"></a>Frequencies of factors</h2>
|
||||||
<p>To sort frequencies of factors on their levels instead of item count, use the <code>sort.count</code> parameter.</p>
|
<p>To sort frequencies of factors on their levels instead of item count, use the <code>sort.count</code> parameter.</p>
|
||||||
<p><code>sort.count</code> is <code>TRUE</code> by default. Compare this default behaviour…</p>
|
<p><code>sort.count</code> is <code>TRUE</code> by default. Compare this default behaviour…</p>
|
||||||
<div class="sourceCode" id="cb7"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb7-1" title="1">septic_patients <span class="op">%>%</span></a>
|
<div class="sourceCode" id="cb7"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb7-1" data-line-number="1">septic_patients <span class="op">%>%</span></a>
|
||||||
<a class="sourceLine" id="cb7-2" title="2"><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(hospital_id)</a></code></pre></div>
|
<a class="sourceLine" id="cb7-2" data-line-number="2"><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(hospital_id)</a></code></pre></div>
|
||||||
<p><strong>Frequency table of <code>hospital_id</code> from <code>septic_patients</code> (2,000 x 49)</strong></p>
|
<p><strong>Frequency table of <code>hospital_id</code> from <code>septic_patients</code> (2,000 x 49)</strong></p>
|
||||||
<p>Class: factor (numeric)<br>
|
<p>Class: factor (numeric)<br>
|
||||||
Length: 2,000 (of which NA: 0 = 0.00%)<br>
|
Length: 2,000 (of which NA: 0 = 0.00%)<br>
|
||||||
@ -558,8 +558,8 @@ Unique: 4</p>
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<p>… to this, where items are now sorted on factor levels:</p>
|
<p>… to this, where items are now sorted on factor levels:</p>
|
||||||
<div class="sourceCode" id="cb8"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb8-1" title="1">septic_patients <span class="op">%>%</span></a>
|
<div class="sourceCode" id="cb8"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb8-1" data-line-number="1">septic_patients <span class="op">%>%</span></a>
|
||||||
<a class="sourceLine" id="cb8-2" title="2"><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(hospital_id, <span class="dt">sort.count =</span> <span class="ot">FALSE</span>)</a></code></pre></div>
|
<a class="sourceLine" id="cb8-2" data-line-number="2"><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(hospital_id, <span class="dt">sort.count =</span> <span class="ot">FALSE</span>)</a></code></pre></div>
|
||||||
<p><strong>Frequency table of <code>hospital_id</code> from <code>septic_patients</code> (2,000 x 49)</strong></p>
|
<p><strong>Frequency table of <code>hospital_id</code> from <code>septic_patients</code> (2,000 x 49)</strong></p>
|
||||||
<p>Class: factor (numeric)<br>
|
<p>Class: factor (numeric)<br>
|
||||||
Length: 2,000 (of which NA: 0 = 0.00%)<br>
|
Length: 2,000 (of which NA: 0 = 0.00%)<br>
|
||||||
@ -610,8 +610,8 @@ Unique: 4</p>
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<p>All classes will be printed into the header. Variables with the new <code>rsi</code> class of this AMR package are actually ordered factors and have three classes (look at <code>Class</code> in the header):</p>
|
<p>All classes will be printed into the header. Variables with the new <code>rsi</code> class of this AMR package are actually ordered factors and have three classes (look at <code>Class</code> in the header):</p>
|
||||||
<div class="sourceCode" id="cb9"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb9-1" title="1">septic_patients <span class="op">%>%</span></a>
|
<div class="sourceCode" id="cb9"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb9-1" data-line-number="1">septic_patients <span class="op">%>%</span></a>
|
||||||
<a class="sourceLine" id="cb9-2" title="2"><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(AMX, <span class="dt">header =</span> <span class="ot">TRUE</span>)</a></code></pre></div>
|
<a class="sourceLine" id="cb9-2" data-line-number="2"><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(AMX, <span class="dt">header =</span> <span class="ot">TRUE</span>)</a></code></pre></div>
|
||||||
<p><strong>Frequency table of <code>AMX</code> from <code>septic_patients</code> (2,000 x 49)</strong></p>
|
<p><strong>Frequency table of <code>AMX</code> from <code>septic_patients</code> (2,000 x 49)</strong></p>
|
||||||
<p>Class: factor > ordered > rsi (numeric)<br>
|
<p>Class: factor > ordered > rsi (numeric)<br>
|
||||||
Length: 2,000 (of which NA: 771 = 38.55%)<br>
|
Length: 2,000 (of which NA: 771 = 38.55%)<br>
|
||||||
@ -661,8 +661,8 @@ Group: Beta-lactams/penicillins<br>
|
|||||||
<h2 class="hasAnchor">
|
<h2 class="hasAnchor">
|
||||||
<a href="#frequencies-of-dates" class="anchor"></a>Frequencies of dates</h2>
|
<a href="#frequencies-of-dates" class="anchor"></a>Frequencies of dates</h2>
|
||||||
<p>Frequencies of dates will show the oldest and newest date in the data, and the amount of days between them:</p>
|
<p>Frequencies of dates will show the oldest and newest date in the data, and the amount of days between them:</p>
|
||||||
<div class="sourceCode" id="cb10"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb10-1" title="1">septic_patients <span class="op">%>%</span></a>
|
<div class="sourceCode" id="cb10"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb10-1" data-line-number="1">septic_patients <span class="op">%>%</span></a>
|
||||||
<a class="sourceLine" id="cb10-2" title="2"><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(date, <span class="dt">nmax =</span> <span class="dv">5</span>, <span class="dt">header =</span> <span class="ot">TRUE</span>)</a></code></pre></div>
|
<a class="sourceLine" id="cb10-2" data-line-number="2"><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(date, <span class="dt">nmax =</span> <span class="dv">5</span>, <span class="dt">header =</span> <span class="ot">TRUE</span>)</a></code></pre></div>
|
||||||
<p><strong>Frequency table of <code>date</code> from <code>septic_patients</code> (2,000 x 49)</strong></p>
|
<p><strong>Frequency table of <code>date</code> from <code>septic_patients</code> (2,000 x 49)</strong></p>
|
||||||
<p>Class: Date (numeric)<br>
|
<p>Class: Date (numeric)<br>
|
||||||
Length: 2,000 (of which NA: 0 = 0.00%)<br>
|
Length: 2,000 (of which NA: 0 = 0.00%)<br>
|
||||||
@ -728,11 +728,11 @@ Median: 31 July 2009 (47.39%)</p>
|
|||||||
<h2 class="hasAnchor">
|
<h2 class="hasAnchor">
|
||||||
<a href="#assigning-a-frequency-table-to-an-object" class="anchor"></a>Assigning a frequency table to an object</h2>
|
<a href="#assigning-a-frequency-table-to-an-object" class="anchor"></a>Assigning a frequency table to an object</h2>
|
||||||
<p>A frequency table is actually a regular <code>data.frame</code>, with the exception that it contains an additional class.</p>
|
<p>A frequency table is actually a regular <code>data.frame</code>, with the exception that it contains an additional class.</p>
|
||||||
<div class="sourceCode" id="cb11"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb11-1" title="1">my_df <-<span class="st"> </span>septic_patients <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(age)</a>
|
<div class="sourceCode" id="cb11"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb11-1" data-line-number="1">my_df <-<span class="st"> </span>septic_patients <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(age)</a>
|
||||||
<a class="sourceLine" id="cb11-2" title="2"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/class">class</a></span>(my_df)</a></code></pre></div>
|
<a class="sourceLine" id="cb11-2" data-line-number="2"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/class">class</a></span>(my_df)</a></code></pre></div>
|
||||||
<p>[1] “freq” “data.frame”</p>
|
<p>[1] “freq” “data.frame”</p>
|
||||||
<p>Because of this additional class, a frequency table prints like the examples above. But the object itself contains the complete table without a row limitation:</p>
|
<p>Because of this additional class, a frequency table prints like the examples above. But the object itself contains the complete table without a row limitation:</p>
|
||||||
<div class="sourceCode" id="cb12"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb12-1" title="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/dim">dim</a></span>(my_df)</a></code></pre></div>
|
<div class="sourceCode" id="cb12"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb12-1" data-line-number="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/dim">dim</a></span>(my_df)</a></code></pre></div>
|
||||||
<p>[1] 74 5</p>
|
<p>[1] 74 5</p>
|
||||||
</div>
|
</div>
|
||||||
<div id="additional-parameters" class="section level2">
|
<div id="additional-parameters" class="section level2">
|
||||||
@ -743,8 +743,8 @@ Median: 31 July 2009 (47.39%)</p>
|
|||||||
<a href="#parameter-na-rm" class="anchor"></a>Parameter <code>na.rm</code>
|
<a href="#parameter-na-rm" class="anchor"></a>Parameter <code>na.rm</code>
|
||||||
</h3>
|
</h3>
|
||||||
<p>With the <code>na.rm</code> parameter you can remove <code>NA</code> values from the frequency table (defaults to <code>TRUE</code>, but the number of <code>NA</code> values will always be shown into the header):</p>
|
<p>With the <code>na.rm</code> parameter you can remove <code>NA</code> values from the frequency table (defaults to <code>TRUE</code>, but the number of <code>NA</code> values will always be shown into the header):</p>
|
||||||
<div class="sourceCode" id="cb13"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb13-1" title="1">septic_patients <span class="op">%>%</span></a>
|
<div class="sourceCode" id="cb13"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb13-1" data-line-number="1">septic_patients <span class="op">%>%</span></a>
|
||||||
<a class="sourceLine" id="cb13-2" title="2"><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(AMX, <span class="dt">na.rm =</span> <span class="ot">FALSE</span>)</a></code></pre></div>
|
<a class="sourceLine" id="cb13-2" data-line-number="2"><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(AMX, <span class="dt">na.rm =</span> <span class="ot">FALSE</span>)</a></code></pre></div>
|
||||||
<p><strong>Frequency table of <code>AMX</code> from <code>septic_patients</code> (2,000 x 49)</strong></p>
|
<p><strong>Frequency table of <code>AMX</code> from <code>septic_patients</code> (2,000 x 49)</strong></p>
|
||||||
<p>Class: factor > ordered > rsi (numeric)<br>
|
<p>Class: factor > ordered > rsi (numeric)<br>
|
||||||
Length: 2,000 (of which NA: 771 = 38.55%)<br>
|
Length: 2,000 (of which NA: 771 = 38.55%)<br>
|
||||||
@ -803,8 +803,8 @@ Group: Beta-lactams/penicillins<br>
|
|||||||
<a href="#parameter-row-names" class="anchor"></a>Parameter <code>row.names</code>
|
<a href="#parameter-row-names" class="anchor"></a>Parameter <code>row.names</code>
|
||||||
</h3>
|
</h3>
|
||||||
<p>A frequency table shows row indices. To remove them, use <code>row.names = FALSE</code>:</p>
|
<p>A frequency table shows row indices. To remove them, use <code>row.names = FALSE</code>:</p>
|
||||||
<div class="sourceCode" id="cb14"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb14-1" title="1">septic_patients <span class="op">%>%</span></a>
|
<div class="sourceCode" id="cb14"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb14-1" data-line-number="1">septic_patients <span class="op">%>%</span></a>
|
||||||
<a class="sourceLine" id="cb14-2" title="2"><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(hospital_id, <span class="dt">row.names =</span> <span class="ot">FALSE</span>)</a></code></pre></div>
|
<a class="sourceLine" id="cb14-2" data-line-number="2"><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(hospital_id, <span class="dt">row.names =</span> <span class="ot">FALSE</span>)</a></code></pre></div>
|
||||||
<p><strong>Frequency table of <code>hospital_id</code> from <code>septic_patients</code> (2,000 x 49)</strong></p>
|
<p><strong>Frequency table of <code>hospital_id</code> from <code>septic_patients</code> (2,000 x 49)</strong></p>
|
||||||
<p>Class: factor (numeric)<br>
|
<p>Class: factor (numeric)<br>
|
||||||
Length: 2,000 (of which NA: 0 = 0.00%)<br>
|
Length: 2,000 (of which NA: 0 = 0.00%)<br>
|
||||||
@ -855,21 +855,21 @@ Unique: 4</p>
|
|||||||
<a href="#parameter-markdown" class="anchor"></a>Parameter <code>markdown</code>
|
<a href="#parameter-markdown" class="anchor"></a>Parameter <code>markdown</code>
|
||||||
</h3>
|
</h3>
|
||||||
<p>The <code>markdown</code> parameter is <code>TRUE</code> at default in non-interactive sessions, like in reports created with R Markdown. This will always print all rows, unless <code>nmax</code> is set. Without markdown (like in regular R), a frequency table would print like:</p>
|
<p>The <code>markdown</code> parameter is <code>TRUE</code> at default in non-interactive sessions, like in reports created with R Markdown. This will always print all rows, unless <code>nmax</code> is set. Without markdown (like in regular R), a frequency table would print like:</p>
|
||||||
<div class="sourceCode" id="cb15"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb15-1" title="1">septic_patients <span class="op">%>%</span></a>
|
<div class="sourceCode" id="cb15"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb15-1" data-line-number="1">septic_patients <span class="op">%>%</span></a>
|
||||||
<a class="sourceLine" id="cb15-2" title="2"><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(hospital_id, <span class="dt">markdown =</span> <span class="ot">FALSE</span>)</a>
|
<a class="sourceLine" id="cb15-2" data-line-number="2"><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(hospital_id, <span class="dt">markdown =</span> <span class="ot">FALSE</span>)</a>
|
||||||
<a class="sourceLine" id="cb15-3" title="3"><span class="co"># Frequency table of `hospital_id` from `septic_patients` (2,000 x 49) </span></a>
|
<a class="sourceLine" id="cb15-3" data-line-number="3"><span class="co"># Frequency table of `hospital_id` from `septic_patients` (2,000 x 49) </span></a>
|
||||||
<a class="sourceLine" id="cb15-4" title="4"><span class="co"># </span></a>
|
<a class="sourceLine" id="cb15-4" data-line-number="4"><span class="co"># </span></a>
|
||||||
<a class="sourceLine" id="cb15-5" title="5"><span class="co"># Class: factor (numeric)</span></a>
|
<a class="sourceLine" id="cb15-5" data-line-number="5"><span class="co"># Class: factor (numeric)</span></a>
|
||||||
<a class="sourceLine" id="cb15-6" title="6"><span class="co"># Length: 2,000 (of which NA: 0 = 0.00%)</span></a>
|
<a class="sourceLine" id="cb15-6" data-line-number="6"><span class="co"># Length: 2,000 (of which NA: 0 = 0.00%)</span></a>
|
||||||
<a class="sourceLine" id="cb15-7" title="7"><span class="co"># Levels: 4: A, B, C, D</span></a>
|
<a class="sourceLine" id="cb15-7" data-line-number="7"><span class="co"># Levels: 4: A, B, C, D</span></a>
|
||||||
<a class="sourceLine" id="cb15-8" title="8"><span class="co"># Unique: 4</span></a>
|
<a class="sourceLine" id="cb15-8" data-line-number="8"><span class="co"># Unique: 4</span></a>
|
||||||
<a class="sourceLine" id="cb15-9" title="9"><span class="co"># </span></a>
|
<a class="sourceLine" id="cb15-9" data-line-number="9"><span class="co"># </span></a>
|
||||||
<a class="sourceLine" id="cb15-10" title="10"><span class="co"># Item Count Percent Cum. Count Cum. Percent</span></a>
|
<a class="sourceLine" id="cb15-10" data-line-number="10"><span class="co"># Item Count Percent Cum. Count Cum. Percent</span></a>
|
||||||
<a class="sourceLine" id="cb15-11" title="11"><span class="co"># --- ----- ------ -------- ----------- -------------</span></a>
|
<a class="sourceLine" id="cb15-11" data-line-number="11"><span class="co"># --- ----- ------ -------- ----------- -------------</span></a>
|
||||||
<a class="sourceLine" id="cb15-12" title="12"><span class="co"># 1 D 762 38.1% 762 38.1%</span></a>
|
<a class="sourceLine" id="cb15-12" data-line-number="12"><span class="co"># 1 D 762 38.1% 762 38.1%</span></a>
|
||||||
<a class="sourceLine" id="cb15-13" title="13"><span class="co"># 2 B 663 33.2% 1,425 71.2%</span></a>
|
<a class="sourceLine" id="cb15-13" data-line-number="13"><span class="co"># 2 B 663 33.2% 1,425 71.2%</span></a>
|
||||||
<a class="sourceLine" id="cb15-14" title="14"><span class="co"># 3 A 321 16.0% 1,746 87.3%</span></a>
|
<a class="sourceLine" id="cb15-14" data-line-number="14"><span class="co"># 3 A 321 16.0% 1,746 87.3%</span></a>
|
||||||
<a class="sourceLine" id="cb15-15" title="15"><span class="co"># 4 C 254 12.7% 2,000 100.0%</span></a></code></pre></div>
|
<a class="sourceLine" id="cb15-15" data-line-number="15"><span class="co"># 4 C 254 12.7% 2,000 100.0%</span></a></code></pre></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -78,7 +78,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9010</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9005</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -192,7 +192,7 @@
|
|||||||
<h1>How to predict antimicrobial resistance</h1>
|
<h1>How to predict antimicrobial resistance</h1>
|
||||||
<h4 class="author">Matthijs S. Berends</h4>
|
<h4 class="author">Matthijs S. Berends</h4>
|
||||||
|
|
||||||
<h4 class="date">01 July 2019</h4>
|
<h4 class="date">10 July 2019</h4>
|
||||||
|
|
||||||
|
|
||||||
<div class="hidden name"><code>resistance_predict.Rmd</code></div>
|
<div class="hidden name"><code>resistance_predict.Rmd</code></div>
|
||||||
@ -206,28 +206,28 @@
|
|||||||
<a href="#needed-r-packages" class="anchor"></a>Needed R packages</h2>
|
<a href="#needed-r-packages" class="anchor"></a>Needed R packages</h2>
|
||||||
<p>As with many uses in R, we need some additional packages for AMR analysis. Our package works closely together with the <a href="https://www.tidyverse.org">tidyverse packages</a> <a href="https://dplyr.tidyverse.org/"><code>dplyr</code></a> and <a href="https://ggplot2.tidyverse.org"><code>ggplot2</code></a> by Dr Hadley Wickham. The tidyverse tremendously improves the way we conduct data science - it allows for a very natural way of writing syntaxes and creating beautiful plots in R.</p>
|
<p>As with many uses in R, we need some additional packages for AMR analysis. Our package works closely together with the <a href="https://www.tidyverse.org">tidyverse packages</a> <a href="https://dplyr.tidyverse.org/"><code>dplyr</code></a> and <a href="https://ggplot2.tidyverse.org"><code>ggplot2</code></a> by Dr Hadley Wickham. The tidyverse tremendously improves the way we conduct data science - it allows for a very natural way of writing syntaxes and creating beautiful plots in R.</p>
|
||||||
<p>Our <code>AMR</code> package depends on these packages and even extends their use and functions.</p>
|
<p>Our <code>AMR</code> package depends on these packages and even extends their use and functions.</p>
|
||||||
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" title="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/library">library</a></span>(dplyr)</a>
|
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" data-line-number="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/library">library</a></span>(dplyr)</a>
|
||||||
<a class="sourceLine" id="cb1-2" title="2"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/library">library</a></span>(ggplot2)</a>
|
<a class="sourceLine" id="cb1-2" data-line-number="2"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/library">library</a></span>(ggplot2)</a>
|
||||||
<a class="sourceLine" id="cb1-3" title="3"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/library">library</a></span>(AMR)</a>
|
<a class="sourceLine" id="cb1-3" data-line-number="3"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/library">library</a></span>(AMR)</a>
|
||||||
<a class="sourceLine" id="cb1-4" title="4"></a>
|
<a class="sourceLine" id="cb1-4" data-line-number="4"></a>
|
||||||
<a class="sourceLine" id="cb1-5" title="5"><span class="co"># (if not yet installed, install with:)</span></a>
|
<a class="sourceLine" id="cb1-5" data-line-number="5"><span class="co"># (if not yet installed, install with:)</span></a>
|
||||||
<a class="sourceLine" id="cb1-6" title="6"><span class="co"># install.packages(c("tidyverse", "AMR"))</span></a></code></pre></div>
|
<a class="sourceLine" id="cb1-6" data-line-number="6"><span class="co"># install.packages(c("tidyverse", "AMR"))</span></a></code></pre></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="prediction-analysis" class="section level2">
|
<div id="prediction-analysis" class="section level2">
|
||||||
<h2 class="hasAnchor">
|
<h2 class="hasAnchor">
|
||||||
<a href="#prediction-analysis" class="anchor"></a>Prediction analysis</h2>
|
<a href="#prediction-analysis" class="anchor"></a>Prediction analysis</h2>
|
||||||
<p>Our package contains a function <code><a href="../reference/resistance_predict.html">resistance_predict()</a></code>, which takes the same input as functions for <a href="./AMR.html">other AMR analysis</a>. Based on a date column, it calculates cases per year and uses a regression model to predict antimicrobial resistance.</p>
|
<p>Our package contains a function <code><a href="../reference/resistance_predict.html">resistance_predict()</a></code>, which takes the same input as functions for <a href="./AMR.html">other AMR analysis</a>. Based on a date column, it calculates cases per year and uses a regression model to predict antimicrobial resistance.</p>
|
||||||
<p>It is basically as easy as:</p>
|
<p>It is basically as easy as:</p>
|
||||||
<div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb2-1" title="1"><span class="co"># resistance prediction of piperacillin/tazobactam (TZP):</span></a>
|
<div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb2-1" data-line-number="1"><span class="co"># resistance prediction of piperacillin/tazobactam (TZP):</span></a>
|
||||||
<a class="sourceLine" id="cb2-2" title="2"><span class="kw"><a href="../reference/resistance_predict.html">resistance_predict</a></span>(<span class="dt">tbl =</span> septic_patients, <span class="dt">col_date =</span> <span class="st">"date"</span>, <span class="dt">col_ab =</span> <span class="st">"TZP"</span>)</a>
|
<a class="sourceLine" id="cb2-2" data-line-number="2"><span class="kw"><a href="../reference/resistance_predict.html">resistance_predict</a></span>(<span class="dt">tbl =</span> septic_patients, <span class="dt">col_date =</span> <span class="st">"date"</span>, <span class="dt">col_ab =</span> <span class="st">"TZP"</span>)</a>
|
||||||
<a class="sourceLine" id="cb2-3" title="3"></a>
|
<a class="sourceLine" id="cb2-3" data-line-number="3"></a>
|
||||||
<a class="sourceLine" id="cb2-4" title="4"><span class="co"># or:</span></a>
|
<a class="sourceLine" id="cb2-4" data-line-number="4"><span class="co"># or:</span></a>
|
||||||
<a class="sourceLine" id="cb2-5" title="5">septic_patients <span class="op">%>%</span><span class="st"> </span></a>
|
<a class="sourceLine" id="cb2-5" data-line-number="5">septic_patients <span class="op">%>%</span><span class="st"> </span></a>
|
||||||
<a class="sourceLine" id="cb2-6" title="6"><span class="st"> </span><span class="kw"><a href="../reference/resistance_predict.html">resistance_predict</a></span>(<span class="dt">col_ab =</span> <span class="st">"TZP"</span>)</a>
|
<a class="sourceLine" id="cb2-6" data-line-number="6"><span class="st"> </span><span class="kw"><a href="../reference/resistance_predict.html">resistance_predict</a></span>(<span class="dt">col_ab =</span> <span class="st">"TZP"</span>)</a>
|
||||||
<a class="sourceLine" id="cb2-7" title="7"></a>
|
<a class="sourceLine" id="cb2-7" data-line-number="7"></a>
|
||||||
<a class="sourceLine" id="cb2-8" title="8"><span class="co"># to bind it to object 'predict_TZP' for example:</span></a>
|
<a class="sourceLine" id="cb2-8" data-line-number="8"><span class="co"># to bind it to object 'predict_TZP' for example:</span></a>
|
||||||
<a class="sourceLine" id="cb2-9" title="9">predict_TZP <-<span class="st"> </span>septic_patients <span class="op">%>%</span><span class="st"> </span></a>
|
<a class="sourceLine" id="cb2-9" data-line-number="9">predict_TZP <-<span class="st"> </span>septic_patients <span class="op">%>%</span><span class="st"> </span></a>
|
||||||
<a class="sourceLine" id="cb2-10" title="10"><span class="st"> </span><span class="kw"><a href="../reference/resistance_predict.html">resistance_predict</a></span>(<span class="dt">col_ab =</span> <span class="st">"TZP"</span>)</a></code></pre></div>
|
<a class="sourceLine" id="cb2-10" data-line-number="10"><span class="st"> </span><span class="kw"><a href="../reference/resistance_predict.html">resistance_predict</a></span>(<span class="dt">col_ab =</span> <span class="st">"TZP"</span>)</a></code></pre></div>
|
||||||
<p>The function will look for a date column itself if <code>col_date</code> is not set.</p>
|
<p>The function will look for a date column itself if <code>col_date</code> is not set.</p>
|
||||||
<p>When running any of these commands, a summary of the regression model will be printed unless using <code><a href="../reference/resistance_predict.html">resistance_predict(..., info = FALSE)</a></code>.</p>
|
<p>When running any of these commands, a summary of the regression model will be printed unless using <code><a href="../reference/resistance_predict.html">resistance_predict(..., info = FALSE)</a></code>.</p>
|
||||||
<pre><code># NOTE: Using column `date` as input for `col_date`.
|
<pre><code># NOTE: Using column `date` as input for `col_date`.
|
||||||
@ -257,55 +257,55 @@
|
|||||||
#
|
#
|
||||||
# Number of Fisher Scoring iterations: 4</code></pre>
|
# Number of Fisher Scoring iterations: 4</code></pre>
|
||||||
<p>This text is only a printed summary - the actual result (output) of the function is a <code>data.frame</code> containing for each year: the number of observations, the actual observed resistance, the estimated resistance and the standard error below and above the estimation:</p>
|
<p>This text is only a printed summary - the actual result (output) of the function is a <code>data.frame</code> containing for each year: the number of observations, the actual observed resistance, the estimated resistance and the standard error below and above the estimation:</p>
|
||||||
<div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb4-1" title="1">predict_TZP</a>
|
<div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb4-1" data-line-number="1">predict_TZP</a>
|
||||||
<a class="sourceLine" id="cb4-2" title="2"><span class="co"># year value se_min se_max observations observed estimated</span></a>
|
<a class="sourceLine" id="cb4-2" data-line-number="2"><span class="co"># year value se_min se_max observations observed estimated</span></a>
|
||||||
<a class="sourceLine" id="cb4-3" title="3"><span class="co"># 1 2003 0.06250000 NA NA 32 0.06250000 0.05486389</span></a>
|
<a class="sourceLine" id="cb4-3" data-line-number="3"><span class="co"># 1 2003 0.06250000 NA NA 32 0.06250000 0.05486389</span></a>
|
||||||
<a class="sourceLine" id="cb4-4" title="4"><span class="co"># 2 2004 0.08536585 NA NA 82 0.08536585 0.06089002</span></a>
|
<a class="sourceLine" id="cb4-4" data-line-number="4"><span class="co"># 2 2004 0.08536585 NA NA 82 0.08536585 0.06089002</span></a>
|
||||||
<a class="sourceLine" id="cb4-5" title="5"><span class="co"># 3 2005 0.05000000 NA NA 60 0.05000000 0.06753075</span></a>
|
<a class="sourceLine" id="cb4-5" data-line-number="5"><span class="co"># 3 2005 0.05000000 NA NA 60 0.05000000 0.06753075</span></a>
|
||||||
<a class="sourceLine" id="cb4-6" title="6"><span class="co"># 4 2006 0.05084746 NA NA 59 0.05084746 0.07483801</span></a>
|
<a class="sourceLine" id="cb4-6" data-line-number="6"><span class="co"># 4 2006 0.05084746 NA NA 59 0.05084746 0.07483801</span></a>
|
||||||
<a class="sourceLine" id="cb4-7" title="7"><span class="co"># 5 2007 0.12121212 NA NA 66 0.12121212 0.08286570</span></a>
|
<a class="sourceLine" id="cb4-7" data-line-number="7"><span class="co"># 5 2007 0.12121212 NA NA 66 0.12121212 0.08286570</span></a>
|
||||||
<a class="sourceLine" id="cb4-8" title="8"><span class="co"># 6 2008 0.04166667 NA NA 72 0.04166667 0.09166918</span></a>
|
<a class="sourceLine" id="cb4-8" data-line-number="8"><span class="co"># 6 2008 0.04166667 NA NA 72 0.04166667 0.09166918</span></a>
|
||||||
<a class="sourceLine" id="cb4-9" title="9"><span class="co"># 7 2009 0.01639344 NA NA 61 0.01639344 0.10130461</span></a>
|
<a class="sourceLine" id="cb4-9" data-line-number="9"><span class="co"># 7 2009 0.01639344 NA NA 61 0.01639344 0.10130461</span></a>
|
||||||
<a class="sourceLine" id="cb4-10" title="10"><span class="co"># 8 2010 0.05660377 NA NA 53 0.05660377 0.11182814</span></a>
|
<a class="sourceLine" id="cb4-10" data-line-number="10"><span class="co"># 8 2010 0.05660377 NA NA 53 0.05660377 0.11182814</span></a>
|
||||||
<a class="sourceLine" id="cb4-11" title="11"><span class="co"># 9 2011 0.18279570 NA NA 93 0.18279570 0.12329488</span></a>
|
<a class="sourceLine" id="cb4-11" data-line-number="11"><span class="co"># 9 2011 0.18279570 NA NA 93 0.18279570 0.12329488</span></a>
|
||||||
<a class="sourceLine" id="cb4-12" title="12"><span class="co"># 10 2012 0.30769231 NA NA 65 0.30769231 0.13575768</span></a>
|
<a class="sourceLine" id="cb4-12" data-line-number="12"><span class="co"># 10 2012 0.30769231 NA NA 65 0.30769231 0.13575768</span></a>
|
||||||
<a class="sourceLine" id="cb4-13" title="13"><span class="co"># 11 2013 0.06896552 NA NA 58 0.06896552 0.14926576</span></a>
|
<a class="sourceLine" id="cb4-13" data-line-number="13"><span class="co"># 11 2013 0.06896552 NA NA 58 0.06896552 0.14926576</span></a>
|
||||||
<a class="sourceLine" id="cb4-14" title="14"><span class="co"># 12 2014 0.10000000 NA NA 60 0.10000000 0.16386307</span></a>
|
<a class="sourceLine" id="cb4-14" data-line-number="14"><span class="co"># 12 2014 0.10000000 NA NA 60 0.10000000 0.16386307</span></a>
|
||||||
<a class="sourceLine" id="cb4-15" title="15"><span class="co"># 13 2015 0.23636364 NA NA 55 0.23636364 0.17958657</span></a>
|
<a class="sourceLine" id="cb4-15" data-line-number="15"><span class="co"># 13 2015 0.23636364 NA NA 55 0.23636364 0.17958657</span></a>
|
||||||
<a class="sourceLine" id="cb4-16" title="16"><span class="co"># 14 2016 0.22619048 NA NA 84 0.22619048 0.19646431</span></a>
|
<a class="sourceLine" id="cb4-16" data-line-number="16"><span class="co"># 14 2016 0.22619048 NA NA 84 0.22619048 0.19646431</span></a>
|
||||||
<a class="sourceLine" id="cb4-17" title="17"><span class="co"># 15 2017 0.16279070 NA NA 86 0.16279070 0.21451350</span></a>
|
<a class="sourceLine" id="cb4-17" data-line-number="17"><span class="co"># 15 2017 0.16279070 NA NA 86 0.16279070 0.21451350</span></a>
|
||||||
<a class="sourceLine" id="cb4-18" title="18"><span class="co"># 16 2018 0.23373852 0.2021578 0.2653193 NA NA 0.23373852</span></a>
|
<a class="sourceLine" id="cb4-18" data-line-number="18"><span class="co"># 16 2018 0.23373852 0.2021578 0.2653193 NA NA 0.23373852</span></a>
|
||||||
<a class="sourceLine" id="cb4-19" title="19"><span class="co"># 17 2019 0.25412909 0.2168525 0.2914057 NA NA 0.25412909</span></a>
|
<a class="sourceLine" id="cb4-19" data-line-number="19"><span class="co"># 17 2019 0.25412909 0.2168525 0.2914057 NA NA 0.25412909</span></a>
|
||||||
<a class="sourceLine" id="cb4-20" title="20"><span class="co"># 18 2020 0.27565854 0.2321869 0.3191302 NA NA 0.27565854</span></a>
|
<a class="sourceLine" id="cb4-20" data-line-number="20"><span class="co"># 18 2020 0.27565854 0.2321869 0.3191302 NA NA 0.27565854</span></a>
|
||||||
<a class="sourceLine" id="cb4-21" title="21"><span class="co"># 19 2021 0.29828252 0.2481942 0.3483709 NA NA 0.29828252</span></a>
|
<a class="sourceLine" id="cb4-21" data-line-number="21"><span class="co"># 19 2021 0.29828252 0.2481942 0.3483709 NA NA 0.29828252</span></a>
|
||||||
<a class="sourceLine" id="cb4-22" title="22"><span class="co"># 20 2022 0.32193804 0.2649008 0.3789753 NA NA 0.32193804</span></a>
|
<a class="sourceLine" id="cb4-22" data-line-number="22"><span class="co"># 20 2022 0.32193804 0.2649008 0.3789753 NA NA 0.32193804</span></a>
|
||||||
<a class="sourceLine" id="cb4-23" title="23"><span class="co"># 21 2023 0.34654311 0.2823269 0.4107593 NA NA 0.34654311</span></a>
|
<a class="sourceLine" id="cb4-23" data-line-number="23"><span class="co"># 21 2023 0.34654311 0.2823269 0.4107593 NA NA 0.34654311</span></a>
|
||||||
<a class="sourceLine" id="cb4-24" title="24"><span class="co"># 22 2024 0.37199700 0.3004860 0.4435080 NA NA 0.37199700</span></a>
|
<a class="sourceLine" id="cb4-24" data-line-number="24"><span class="co"># 22 2024 0.37199700 0.3004860 0.4435080 NA NA 0.37199700</span></a>
|
||||||
<a class="sourceLine" id="cb4-25" title="25"><span class="co"># 23 2025 0.39818127 0.3193839 0.4769787 NA NA 0.39818127</span></a>
|
<a class="sourceLine" id="cb4-25" data-line-number="25"><span class="co"># 23 2025 0.39818127 0.3193839 0.4769787 NA NA 0.39818127</span></a>
|
||||||
<a class="sourceLine" id="cb4-26" title="26"><span class="co"># 24 2026 0.42496142 0.3390173 0.5109056 NA NA 0.42496142</span></a>
|
<a class="sourceLine" id="cb4-26" data-line-number="26"><span class="co"># 24 2026 0.42496142 0.3390173 0.5109056 NA NA 0.42496142</span></a>
|
||||||
<a class="sourceLine" id="cb4-27" title="27"><span class="co"># 25 2027 0.45218939 0.3593720 0.5450068 NA NA 0.45218939</span></a>
|
<a class="sourceLine" id="cb4-27" data-line-number="27"><span class="co"># 25 2027 0.45218939 0.3593720 0.5450068 NA NA 0.45218939</span></a>
|
||||||
<a class="sourceLine" id="cb4-28" title="28"><span class="co"># 26 2028 0.47970658 0.3804212 0.5789920 NA NA 0.47970658</span></a>
|
<a class="sourceLine" id="cb4-28" data-line-number="28"><span class="co"># 26 2028 0.47970658 0.3804212 0.5789920 NA NA 0.47970658</span></a>
|
||||||
<a class="sourceLine" id="cb4-29" title="29"><span class="co"># 27 2029 0.50734745 0.4021241 0.6125708 NA NA 0.50734745</span></a></code></pre></div>
|
<a class="sourceLine" id="cb4-29" data-line-number="29"><span class="co"># 27 2029 0.50734745 0.4021241 0.6125708 NA NA 0.50734745</span></a></code></pre></div>
|
||||||
<p>The function <code>plot</code> is available in base R, and can be extended by other packages to depend the output based on the type of input. We extended its function to cope with resistance predictions:</p>
|
<p>The function <code>plot</code> is available in base R, and can be extended by other packages to depend the output based on the type of input. We extended its function to cope with resistance predictions:</p>
|
||||||
<div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb5-1" title="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/graphics/topics/plot">plot</a></span>(predict_TZP)</a></code></pre></div>
|
<div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb5-1" data-line-number="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/graphics/topics/plot">plot</a></span>(predict_TZP)</a></code></pre></div>
|
||||||
<p><img src="resistance_predict_files/figure-html/unnamed-chunk-4-1.png" width="720"></p>
|
<p><img src="resistance_predict_files/figure-html/unnamed-chunk-4-1.png" width="720"></p>
|
||||||
<p>This is the fastest way to plot the result. It automatically adds the right axes, error bars, titles, number of available observations and type of model.</p>
|
<p>This is the fastest way to plot the result. It automatically adds the right axes, error bars, titles, number of available observations and type of model.</p>
|
||||||
<p>We also support the <code>ggplot2</code> package with our custom function <code><a href="../reference/resistance_predict.html">ggplot_rsi_predict()</a></code> to create more appealing plots:</p>
|
<p>We also support the <code>ggplot2</code> package with our custom function <code><a href="../reference/resistance_predict.html">ggplot_rsi_predict()</a></code> to create more appealing plots:</p>
|
||||||
<div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb6-1" title="1"><span class="kw"><a href="../reference/resistance_predict.html">ggplot_rsi_predict</a></span>(predict_TZP)</a></code></pre></div>
|
<div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb6-1" data-line-number="1"><span class="kw"><a href="../reference/resistance_predict.html">ggplot_rsi_predict</a></span>(predict_TZP)</a></code></pre></div>
|
||||||
<p><img src="resistance_predict_files/figure-html/unnamed-chunk-5-1.png" width="720"></p>
|
<p><img src="resistance_predict_files/figure-html/unnamed-chunk-5-1.png" width="720"></p>
|
||||||
<div class="sourceCode" id="cb7"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb7-1" title="1"></a>
|
<div class="sourceCode" id="cb7"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb7-1" data-line-number="1"></a>
|
||||||
<a class="sourceLine" id="cb7-2" title="2"><span class="co"># choose for error bars instead of a ribbon</span></a>
|
<a class="sourceLine" id="cb7-2" data-line-number="2"><span class="co"># choose for error bars instead of a ribbon</span></a>
|
||||||
<a class="sourceLine" id="cb7-3" title="3"><span class="kw"><a href="../reference/resistance_predict.html">ggplot_rsi_predict</a></span>(predict_TZP, <span class="dt">ribbon =</span> <span class="ot">FALSE</span>)</a></code></pre></div>
|
<a class="sourceLine" id="cb7-3" data-line-number="3"><span class="kw"><a href="../reference/resistance_predict.html">ggplot_rsi_predict</a></span>(predict_TZP, <span class="dt">ribbon =</span> <span class="ot">FALSE</span>)</a></code></pre></div>
|
||||||
<p><img src="resistance_predict_files/figure-html/unnamed-chunk-5-2.png" width="720"></p>
|
<p><img src="resistance_predict_files/figure-html/unnamed-chunk-5-2.png" width="720"></p>
|
||||||
<div id="choosing-the-right-model" class="section level3">
|
<div id="choosing-the-right-model" class="section level3">
|
||||||
<h3 class="hasAnchor">
|
<h3 class="hasAnchor">
|
||||||
<a href="#choosing-the-right-model" class="anchor"></a>Choosing the right model</h3>
|
<a href="#choosing-the-right-model" class="anchor"></a>Choosing the right model</h3>
|
||||||
<p>Resistance is not easily predicted; if we look at vancomycin resistance in Gram positives, the spread (i.e. standard error) is enormous:</p>
|
<p>Resistance is not easily predicted; if we look at vancomycin resistance in Gram positives, the spread (i.e. standard error) is enormous:</p>
|
||||||
<div class="sourceCode" id="cb8"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb8-1" title="1">septic_patients <span class="op">%>%</span></a>
|
<div class="sourceCode" id="cb8"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb8-1" data-line-number="1">septic_patients <span class="op">%>%</span></a>
|
||||||
<a class="sourceLine" id="cb8-2" title="2"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span>(<span class="kw"><a href="../reference/mo_property.html">mo_gramstain</a></span>(mo, <span class="dt">language =</span> <span class="ot">NULL</span>) <span class="op">==</span><span class="st"> "Gram-positive"</span>) <span class="op">%>%</span></a>
|
<a class="sourceLine" id="cb8-2" data-line-number="2"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span>(<span class="kw"><a href="../reference/mo_property.html">mo_gramstain</a></span>(mo, <span class="dt">language =</span> <span class="ot">NULL</span>) <span class="op">==</span><span class="st"> "Gram-positive"</span>) <span class="op">%>%</span></a>
|
||||||
<a class="sourceLine" id="cb8-3" title="3"><span class="st"> </span><span class="kw"><a href="../reference/resistance_predict.html">resistance_predict</a></span>(<span class="dt">col_ab =</span> <span class="st">"VAN"</span>, <span class="dt">year_min =</span> <span class="dv">2010</span>, <span class="dt">info =</span> <span class="ot">FALSE</span>) <span class="op">%>%</span><span class="st"> </span></a>
|
<a class="sourceLine" id="cb8-3" data-line-number="3"><span class="st"> </span><span class="kw"><a href="../reference/resistance_predict.html">resistance_predict</a></span>(<span class="dt">col_ab =</span> <span class="st">"VAN"</span>, <span class="dt">year_min =</span> <span class="dv">2010</span>, <span class="dt">info =</span> <span class="ot">FALSE</span>) <span class="op">%>%</span><span class="st"> </span></a>
|
||||||
<a class="sourceLine" id="cb8-4" title="4"><span class="st"> </span><span class="kw"><a href="../reference/resistance_predict.html">ggplot_rsi_predict</a></span>()</a>
|
<a class="sourceLine" id="cb8-4" data-line-number="4"><span class="st"> </span><span class="kw"><a href="../reference/resistance_predict.html">ggplot_rsi_predict</a></span>()</a>
|
||||||
<a class="sourceLine" id="cb8-5" title="5"><span class="co"># </span><span class="al">NOTE</span><span class="co">: Using column `date` as input for `col_date`.</span></a></code></pre></div>
|
<a class="sourceLine" id="cb8-5" data-line-number="5"><span class="co"># </span><span class="al">NOTE</span><span class="co">: Using column `date` as input for `col_date`.</span></a></code></pre></div>
|
||||||
<p><img src="resistance_predict_files/figure-html/unnamed-chunk-6-1.png" width="720"></p>
|
<p><img src="resistance_predict_files/figure-html/unnamed-chunk-6-1.png" width="720"></p>
|
||||||
<p>Vancomycin resistance could be 100% in ten years, but might also stay around 0%.</p>
|
<p>Vancomycin resistance could be 100% in ten years, but might also stay around 0%.</p>
|
||||||
<p>You can define the model with the <code>model</code> parameter. The default model is a generalised linear regression model using a binomial distribution, assuming that a period of zero resistance was followed by a period of increasing resistance leading slowly to more and more resistance.</p>
|
<p>You can define the model with the <code>model</code> parameter. The default model is a generalised linear regression model using a binomial distribution, assuming that a period of zero resistance was followed by a period of increasing resistance leading slowly to more and more resistance.</p>
|
||||||
@ -346,25 +346,25 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<p>For the vancomycin resistance in Gram positive bacteria, a linear model might be more appropriate since no (left half of a) binomial distribution is to be expected based on the observed years:</p>
|
<p>For the vancomycin resistance in Gram positive bacteria, a linear model might be more appropriate since no (left half of a) binomial distribution is to be expected based on the observed years:</p>
|
||||||
<div class="sourceCode" id="cb9"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb9-1" title="1">septic_patients <span class="op">%>%</span></a>
|
<div class="sourceCode" id="cb9"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb9-1" data-line-number="1">septic_patients <span class="op">%>%</span></a>
|
||||||
<a class="sourceLine" id="cb9-2" title="2"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span>(<span class="kw"><a href="../reference/mo_property.html">mo_gramstain</a></span>(mo, <span class="dt">language =</span> <span class="ot">NULL</span>) <span class="op">==</span><span class="st"> "Gram-positive"</span>) <span class="op">%>%</span></a>
|
<a class="sourceLine" id="cb9-2" data-line-number="2"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span>(<span class="kw"><a href="../reference/mo_property.html">mo_gramstain</a></span>(mo, <span class="dt">language =</span> <span class="ot">NULL</span>) <span class="op">==</span><span class="st"> "Gram-positive"</span>) <span class="op">%>%</span></a>
|
||||||
<a class="sourceLine" id="cb9-3" title="3"><span class="st"> </span><span class="kw"><a href="../reference/resistance_predict.html">resistance_predict</a></span>(<span class="dt">col_ab =</span> <span class="st">"VAN"</span>, <span class="dt">year_min =</span> <span class="dv">2010</span>, <span class="dt">info =</span> <span class="ot">FALSE</span>, <span class="dt">model =</span> <span class="st">"linear"</span>) <span class="op">%>%</span><span class="st"> </span></a>
|
<a class="sourceLine" id="cb9-3" data-line-number="3"><span class="st"> </span><span class="kw"><a href="../reference/resistance_predict.html">resistance_predict</a></span>(<span class="dt">col_ab =</span> <span class="st">"VAN"</span>, <span class="dt">year_min =</span> <span class="dv">2010</span>, <span class="dt">info =</span> <span class="ot">FALSE</span>, <span class="dt">model =</span> <span class="st">"linear"</span>) <span class="op">%>%</span><span class="st"> </span></a>
|
||||||
<a class="sourceLine" id="cb9-4" title="4"><span class="st"> </span><span class="kw"><a href="../reference/resistance_predict.html">ggplot_rsi_predict</a></span>()</a>
|
<a class="sourceLine" id="cb9-4" data-line-number="4"><span class="st"> </span><span class="kw"><a href="../reference/resistance_predict.html">ggplot_rsi_predict</a></span>()</a>
|
||||||
<a class="sourceLine" id="cb9-5" title="5"><span class="co"># </span><span class="al">NOTE</span><span class="co">: Using column `date` as input for `col_date`.</span></a></code></pre></div>
|
<a class="sourceLine" id="cb9-5" data-line-number="5"><span class="co"># </span><span class="al">NOTE</span><span class="co">: Using column `date` as input for `col_date`.</span></a></code></pre></div>
|
||||||
<p><img src="resistance_predict_files/figure-html/unnamed-chunk-7-1.png" width="720"></p>
|
<p><img src="resistance_predict_files/figure-html/unnamed-chunk-7-1.png" width="720"></p>
|
||||||
<p>This seems more likely, doesn’t it?</p>
|
<p>This seems more likely, doesn’t it?</p>
|
||||||
<p>The model itself is also available from the object, as an <code>attribute</code>:</p>
|
<p>The model itself is also available from the object, as an <code>attribute</code>:</p>
|
||||||
<div class="sourceCode" id="cb10"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb10-1" title="1">model <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/attributes">attributes</a></span>(predict_TZP)<span class="op">$</span>model</a>
|
<div class="sourceCode" id="cb10"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb10-1" data-line-number="1">model <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/attributes">attributes</a></span>(predict_TZP)<span class="op">$</span>model</a>
|
||||||
<a class="sourceLine" id="cb10-2" title="2"></a>
|
<a class="sourceLine" id="cb10-2" data-line-number="2"></a>
|
||||||
<a class="sourceLine" id="cb10-3" title="3"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/summary">summary</a></span>(model)<span class="op">$</span>family</a>
|
<a class="sourceLine" id="cb10-3" data-line-number="3"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/summary">summary</a></span>(model)<span class="op">$</span>family</a>
|
||||||
<a class="sourceLine" id="cb10-4" title="4"><span class="co"># </span></a>
|
<a class="sourceLine" id="cb10-4" data-line-number="4"><span class="co"># </span></a>
|
||||||
<a class="sourceLine" id="cb10-5" title="5"><span class="co"># Family: binomial </span></a>
|
<a class="sourceLine" id="cb10-5" data-line-number="5"><span class="co"># Family: binomial </span></a>
|
||||||
<a class="sourceLine" id="cb10-6" title="6"><span class="co"># Link function: logit</span></a>
|
<a class="sourceLine" id="cb10-6" data-line-number="6"><span class="co"># Link function: logit</span></a>
|
||||||
<a class="sourceLine" id="cb10-7" title="7"></a>
|
<a class="sourceLine" id="cb10-7" data-line-number="7"></a>
|
||||||
<a class="sourceLine" id="cb10-8" title="8"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/summary">summary</a></span>(model)<span class="op">$</span>coefficients</a>
|
<a class="sourceLine" id="cb10-8" data-line-number="8"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/summary">summary</a></span>(model)<span class="op">$</span>coefficients</a>
|
||||||
<a class="sourceLine" id="cb10-9" title="9"><span class="co"># Estimate Std. Error z value Pr(>|z|)</span></a>
|
<a class="sourceLine" id="cb10-9" data-line-number="9"><span class="co"># Estimate Std. Error z value Pr(>|z|)</span></a>
|
||||||
<a class="sourceLine" id="cb10-10" title="10"><span class="co"># (Intercept) -224.3987194 48.0335384 -4.671709 2.987038e-06</span></a>
|
<a class="sourceLine" id="cb10-10" data-line-number="10"><span class="co"># (Intercept) -224.3987194 48.0335384 -4.671709 2.987038e-06</span></a>
|
||||||
<a class="sourceLine" id="cb10-11" title="11"><span class="co"># year 0.1106102 0.0238753 4.632831 3.606990e-06</span></a></code></pre></div>
|
<a class="sourceLine" id="cb10-11" data-line-number="11"><span class="co"># year 0.1106102 0.0238753 4.632831 3.606990e-06</span></a></code></pre></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 95 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 94 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 91 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 94 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 87 KiB |
@ -78,7 +78,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="index.html">AMR (for R)</a>
|
<a class="navbar-link" href="index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9010</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="index.html">AMR (for R)</a>
|
<a class="navbar-link" href="index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9010</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -190,9 +190,9 @@
|
|||||||
|
|
||||||
</header><div class="row">
|
</header><div class="row">
|
||||||
<div class="contents col-md-9">
|
<div class="contents col-md-9">
|
||||||
<div id="amr-for-r-" class="section level1">
|
<div id="amr-for-r" class="section level1">
|
||||||
<div class="page-header"><h1 class="hasAnchor">
|
<div class="page-header"><h1 class="hasAnchor">
|
||||||
<a href="#amr-for-r-" class="anchor"></a><code>AMR</code> (for R) <img src="./logo.png" align="right" height="120px">
|
<a href="#amr-for-r" class="anchor"></a><code>AMR</code> (for R) <img src="./logo.png" align="right" height="120px">
|
||||||
</h1></div>
|
</h1></div>
|
||||||
<p><em>(<help title="Too Long, Didn't Read">TLDR</help> - to find out how to conduct AMR analysis, please <a href="./articles/AMR.html">continue reading here to get started</a>.</em></p>
|
<p><em>(<help title="Too Long, Didn't Read">TLDR</help> - to find out how to conduct AMR analysis, please <a href="./articles/AMR.html">continue reading here to get started</a>.</em></p>
|
||||||
<hr>
|
<hr>
|
||||||
@ -248,7 +248,7 @@
|
|||||||
<h4 class="hasAnchor">
|
<h4 class="hasAnchor">
|
||||||
<a href="#latest-released-version" class="anchor"></a>Latest released version</h4>
|
<a href="#latest-released-version" class="anchor"></a>Latest released version</h4>
|
||||||
<p>This package is available <a href="https://cran.r-project.org/package=AMR">on the official R network (CRAN)</a>, which has a peer-reviewed submission process. Install this package in R with:</p>
|
<p>This package is available <a href="https://cran.r-project.org/package=AMR">on the official R network (CRAN)</a>, which has a peer-reviewed submission process. Install this package in R with:</p>
|
||||||
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" title="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/utils/topics/install.packages">install.packages</a></span>(<span class="st">"AMR"</span>)</a></code></pre></div>
|
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" data-line-number="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/utils/topics/install.packages">install.packages</a></span>(<span class="st">"AMR"</span>)</a></code></pre></div>
|
||||||
<p>It will be downloaded and installed automatically. For RStudio, click on the menu <em>Tools</em> > <em>Install Packages…</em> and then type in “AMR” and press <kbd>Install</kbd>.</p>
|
<p>It will be downloaded and installed automatically. For RStudio, click on the menu <em>Tools</em> > <em>Install Packages…</em> and then type in “AMR” and press <kbd>Install</kbd>.</p>
|
||||||
<p><strong>Note:</strong> Not all functions on this website may be available in this latest release. To use all functions and data sets mentioned on this website, install the latest development version.</p>
|
<p><strong>Note:</strong> Not all functions on this website may be available in this latest release. To use all functions and data sets mentioned on this website, install the latest development version.</p>
|
||||||
</div>
|
</div>
|
||||||
@ -256,8 +256,8 @@
|
|||||||
<h4 class="hasAnchor">
|
<h4 class="hasAnchor">
|
||||||
<a href="#latest-development-version" class="anchor"></a>Latest development version</h4>
|
<a href="#latest-development-version" class="anchor"></a>Latest development version</h4>
|
||||||
<p>The latest and unpublished development version can be installed with (<strong>precaution: may be unstable</strong>):</p>
|
<p>The latest and unpublished development version can be installed with (<strong>precaution: may be unstable</strong>):</p>
|
||||||
<div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb2-1" title="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/utils/topics/install.packages">install.packages</a></span>(<span class="st">"devtools"</span>)</a>
|
<div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb2-1" data-line-number="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/utils/topics/install.packages">install.packages</a></span>(<span class="st">"devtools"</span>)</a>
|
||||||
<a class="sourceLine" id="cb2-2" title="2">devtools<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/devtools/topics/reexports">install_gitlab</a></span>(<span class="st">"msberends/AMR"</span>)</a></code></pre></div>
|
<a class="sourceLine" id="cb2-2" data-line-number="2">devtools<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/devtools/topics/reexports">install_gitlab</a></span>(<span class="st">"msberends/AMR"</span>)</a></code></pre></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="get-started" class="section level2">
|
<div id="get-started" class="section level2">
|
||||||
@ -299,9 +299,9 @@
|
|||||||
<p><strong>NOTE: The WHOCC copyright does not allow use for commercial purposes, unlike any other info from this package. See \url{<a href="https://www.whocc.no/copyright_disclaimer/" class="uri">https://www.whocc.no/copyright_disclaimer/</a>}.</strong></p>
|
<p><strong>NOTE: The WHOCC copyright does not allow use for commercial purposes, unlike any other info from this package. See \url{<a href="https://www.whocc.no/copyright_disclaimer/" class="uri">https://www.whocc.no/copyright_disclaimer/</a>}.</strong></p>
|
||||||
<p>Read more about the data from WHOCC <a href="./reference/WHOCC.html">in our manual</a>.</p>
|
<p>Read more about the data from WHOCC <a href="./reference/WHOCC.html">in our manual</a>.</p>
|
||||||
</div>
|
</div>
|
||||||
<div id="whonet--ears-net" class="section level4">
|
<div id="whonet-ears-net" class="section level4">
|
||||||
<h4 class="hasAnchor">
|
<h4 class="hasAnchor">
|
||||||
<a href="#whonet--ears-net" class="anchor"></a>WHONET / EARS-Net</h4>
|
<a href="#whonet-ears-net" class="anchor"></a>WHONET / EARS-Net</h4>
|
||||||
<p><img src="./whonet.png"></p>
|
<p><img src="./whonet.png"></p>
|
||||||
<p>We support WHONET and EARS-Net data. Exported files from WHONET can be imported into R and can be analysed easily using this package. For education purposes, we created an <a href="./reference/WHONET.html">example data set <code>WHONET</code></a> with the exact same structure as a WHONET export file. Furthermore, this package also contains a <a href="./reference/antibiotics.html">data set <code>antibiotics</code></a> with all EARS-Net antibiotic abbreviations, and knows almost all WHONET abbreviations for microorganisms. When using WHONET data as input for analysis, all input parameters will be set automatically.</p>
|
<p>We support WHONET and EARS-Net data. Exported files from WHONET can be imported into R and can be analysed easily using this package. For education purposes, we created an <a href="./reference/WHONET.html">example data set <code>WHONET</code></a> with the exact same structure as a WHONET export file. Furthermore, this package also contains a <a href="./reference/antibiotics.html">data set <code>antibiotics</code></a> with all EARS-Net antibiotic abbreviations, and knows almost all WHONET abbreviations for microorganisms. When using WHONET data as input for analysis, all input parameters will be set automatically.</p>
|
||||||
<p>Read our tutorial about <a href="./articles/WHONET.html">how to work with WHONET data here</a>.</p>
|
<p>Read our tutorial about <a href="./articles/WHONET.html">how to work with WHONET data here</a>.</p>
|
||||||
|
@ -78,7 +78,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9010</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -232,9 +232,9 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="amr-0719010" class="section level1">
|
<div id="amr-0-7-1-9012" class="section level1">
|
||||||
<h1 class="page-header">
|
<h1 class="page-header">
|
||||||
<a href="#amr-0719010" class="anchor"></a>AMR 0.7.1.9010<small> Unreleased </small>
|
<a href="#amr-0-7-1-9012" class="anchor"></a>AMR 0.7.1.9012<small> Unreleased </small>
|
||||||
</h1>
|
</h1>
|
||||||
<div id="new" class="section level3">
|
<div id="new" class="section level3">
|
||||||
<h3 class="hasAnchor">
|
<h3 class="hasAnchor">
|
||||||
@ -242,29 +242,29 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<p>Additional way to calculate co-resistance, i.e. when using multiple antibiotics as input for <code>portion_*</code> functions or <code>count_*</code> functions. This can be used to determine the empiric susceptibily of a combination therapy. A new parameter <code>only_all_tested</code> (<strong>which defaults to <code>FALSE</code></strong>) replaces the old <code>also_single_tested</code> and can be used to select one of the two methods to count isolates and calculate portions. The difference can be seen in this example table (which is also on the <code>portion</code> and <code>count</code> help pages), where the %SI is being determined:</p>
|
<p>Additional way to calculate co-resistance, i.e. when using multiple antibiotics as input for <code>portion_*</code> functions or <code>count_*</code> functions. This can be used to determine the empiric susceptibily of a combination therapy. A new parameter <code>only_all_tested</code> (<strong>which defaults to <code>FALSE</code></strong>) replaces the old <code>also_single_tested</code> and can be used to select one of the two methods to count isolates and calculate portions. The difference can be seen in this example table (which is also on the <code>portion</code> and <code>count</code> help pages), where the %SI is being determined:</p>
|
||||||
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" title="1"><span class="co"># -------------------------------------------------------------------------</span></a>
|
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" data-line-number="1"><span class="co"># -------------------------------------------------------------------------</span></a>
|
||||||
<a class="sourceLine" id="cb1-2" title="2"><span class="co"># only_all_tested = FALSE only_all_tested = TRUE</span></a>
|
<a class="sourceLine" id="cb1-2" data-line-number="2"><span class="co"># only_all_tested = FALSE only_all_tested = TRUE</span></a>
|
||||||
<a class="sourceLine" id="cb1-3" title="3"><span class="co"># Antibiotic Antibiotic ----------------------- -----------------------</span></a>
|
<a class="sourceLine" id="cb1-3" data-line-number="3"><span class="co"># Antibiotic Antibiotic ----------------------- -----------------------</span></a>
|
||||||
<a class="sourceLine" id="cb1-4" title="4"><span class="co"># A B include as include as include as include as</span></a>
|
<a class="sourceLine" id="cb1-4" data-line-number="4"><span class="co"># A B include as include as include as include as</span></a>
|
||||||
<a class="sourceLine" id="cb1-5" title="5"><span class="co"># numerator denominator numerator denominator</span></a>
|
<a class="sourceLine" id="cb1-5" data-line-number="5"><span class="co"># numerator denominator numerator denominator</span></a>
|
||||||
<a class="sourceLine" id="cb1-6" title="6"><span class="co"># ---------- ---------- ---------- ----------- ---------- -----------</span></a>
|
<a class="sourceLine" id="cb1-6" data-line-number="6"><span class="co"># ---------- ---------- ---------- ----------- ---------- -----------</span></a>
|
||||||
<a class="sourceLine" id="cb1-7" title="7"><span class="co"># S S X X X X</span></a>
|
<a class="sourceLine" id="cb1-7" data-line-number="7"><span class="co"># S S X X X X</span></a>
|
||||||
<a class="sourceLine" id="cb1-8" title="8"><span class="co"># I S X X X X</span></a>
|
<a class="sourceLine" id="cb1-8" data-line-number="8"><span class="co"># I S X X X X</span></a>
|
||||||
<a class="sourceLine" id="cb1-9" title="9"><span class="co"># R S X X X X</span></a>
|
<a class="sourceLine" id="cb1-9" data-line-number="9"><span class="co"># R S X X X X</span></a>
|
||||||
<a class="sourceLine" id="cb1-10" title="10"><span class="co"># not tested S X X - -</span></a>
|
<a class="sourceLine" id="cb1-10" data-line-number="10"><span class="co"># not tested S X X - -</span></a>
|
||||||
<a class="sourceLine" id="cb1-11" title="11"><span class="co"># S I X X X X</span></a>
|
<a class="sourceLine" id="cb1-11" data-line-number="11"><span class="co"># S I X X X X</span></a>
|
||||||
<a class="sourceLine" id="cb1-12" title="12"><span class="co"># I I X X X X</span></a>
|
<a class="sourceLine" id="cb1-12" data-line-number="12"><span class="co"># I I X X X X</span></a>
|
||||||
<a class="sourceLine" id="cb1-13" title="13"><span class="co"># R I X X X X</span></a>
|
<a class="sourceLine" id="cb1-13" data-line-number="13"><span class="co"># R I X X X X</span></a>
|
||||||
<a class="sourceLine" id="cb1-14" title="14"><span class="co"># not tested I X X - -</span></a>
|
<a class="sourceLine" id="cb1-14" data-line-number="14"><span class="co"># not tested I X X - -</span></a>
|
||||||
<a class="sourceLine" id="cb1-15" title="15"><span class="co"># S R X X X X</span></a>
|
<a class="sourceLine" id="cb1-15" data-line-number="15"><span class="co"># S R X X X X</span></a>
|
||||||
<a class="sourceLine" id="cb1-16" title="16"><span class="co"># I R X X X X</span></a>
|
<a class="sourceLine" id="cb1-16" data-line-number="16"><span class="co"># I R X X X X</span></a>
|
||||||
<a class="sourceLine" id="cb1-17" title="17"><span class="co"># R R - X - X</span></a>
|
<a class="sourceLine" id="cb1-17" data-line-number="17"><span class="co"># R R - X - X</span></a>
|
||||||
<a class="sourceLine" id="cb1-18" title="18"><span class="co"># not tested R - - - -</span></a>
|
<a class="sourceLine" id="cb1-18" data-line-number="18"><span class="co"># not tested R - - - -</span></a>
|
||||||
<a class="sourceLine" id="cb1-19" title="19"><span class="co"># S not tested X X - -</span></a>
|
<a class="sourceLine" id="cb1-19" data-line-number="19"><span class="co"># S not tested X X - -</span></a>
|
||||||
<a class="sourceLine" id="cb1-20" title="20"><span class="co"># I not tested X X - -</span></a>
|
<a class="sourceLine" id="cb1-20" data-line-number="20"><span class="co"># I not tested X X - -</span></a>
|
||||||
<a class="sourceLine" id="cb1-21" title="21"><span class="co"># R not tested - - - -</span></a>
|
<a class="sourceLine" id="cb1-21" data-line-number="21"><span class="co"># R not tested - - - -</span></a>
|
||||||
<a class="sourceLine" id="cb1-22" title="22"><span class="co"># not tested not tested - - - -</span></a>
|
<a class="sourceLine" id="cb1-22" data-line-number="22"><span class="co"># not tested not tested - - - -</span></a>
|
||||||
<a class="sourceLine" id="cb1-23" title="23"><span class="co"># -------------------------------------------------------------------------</span></a></code></pre></div>
|
<a class="sourceLine" id="cb1-23" data-line-number="23"><span class="co"># -------------------------------------------------------------------------</span></a></code></pre></div>
|
||||||
<p>Since this is a major change, usage of the old <code>also_single_tested</code> will throw an informative error that it has been replaced by <code>only_all_tested</code>.</p>
|
<p>Since this is a major change, usage of the old <code>also_single_tested</code> will throw an informative error that it has been replaced by <code>only_all_tested</code>.</p>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -288,9 +288,9 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="amr-071" class="section level1">
|
<div id="amr-0-7-1" class="section level1">
|
||||||
<h1 class="page-header">
|
<h1 class="page-header">
|
||||||
<a href="#amr-071" class="anchor"></a>AMR 0.7.1<small> 2019-06-23 </small>
|
<a href="#amr-0-7-1" class="anchor"></a>AMR 0.7.1<small> 2019-06-23 </small>
|
||||||
</h1>
|
</h1>
|
||||||
<div id="new-1" class="section level4">
|
<div id="new-1" class="section level4">
|
||||||
<h4 class="hasAnchor">
|
<h4 class="hasAnchor">
|
||||||
@ -298,14 +298,14 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<p>Function <code><a href="../reference/portion.html">rsi_df()</a></code> to transform a <code>data.frame</code> to a data set containing only the microbial interpretation (S, I, R), the antibiotic, the percentage of S/I/R and the number of available isolates. This is a convenient combination of the existing functions <code><a href="../reference/count.html">count_df()</a></code> and <code><a href="../reference/portion.html">portion_df()</a></code> to immediately show resistance percentages and number of available isolates:</p>
|
<p>Function <code><a href="../reference/portion.html">rsi_df()</a></code> to transform a <code>data.frame</code> to a data set containing only the microbial interpretation (S, I, R), the antibiotic, the percentage of S/I/R and the number of available isolates. This is a convenient combination of the existing functions <code><a href="../reference/count.html">count_df()</a></code> and <code><a href="../reference/portion.html">portion_df()</a></code> to immediately show resistance percentages and number of available isolates:</p>
|
||||||
<div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb2-1" title="1">septic_patients <span class="op">%>%</span></a>
|
<div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb2-1" data-line-number="1">septic_patients <span class="op">%>%</span></a>
|
||||||
<a class="sourceLine" id="cb2-2" title="2"><span class="st"> </span><span class="kw">select</span>(AMX, CIP) <span class="op">%>%</span></a>
|
<a class="sourceLine" id="cb2-2" data-line-number="2"><span class="st"> </span><span class="kw">select</span>(AMX, CIP) <span class="op">%>%</span></a>
|
||||||
<a class="sourceLine" id="cb2-3" title="3"><span class="st"> </span><span class="kw"><a href="../reference/portion.html">rsi_df</a></span>()</a>
|
<a class="sourceLine" id="cb2-3" data-line-number="3"><span class="st"> </span><span class="kw"><a href="../reference/portion.html">rsi_df</a></span>()</a>
|
||||||
<a class="sourceLine" id="cb2-4" title="4"><span class="co"># antibiotic interpretation value isolates</span></a>
|
<a class="sourceLine" id="cb2-4" data-line-number="4"><span class="co"># antibiotic interpretation value isolates</span></a>
|
||||||
<a class="sourceLine" id="cb2-5" title="5"><span class="co"># 1 Amoxicillin SI 0.4442636 546</span></a>
|
<a class="sourceLine" id="cb2-5" data-line-number="5"><span class="co"># 1 Amoxicillin SI 0.4442636 546</span></a>
|
||||||
<a class="sourceLine" id="cb2-6" title="6"><span class="co"># 2 Amoxicillin R 0.5557364 683</span></a>
|
<a class="sourceLine" id="cb2-6" data-line-number="6"><span class="co"># 2 Amoxicillin R 0.5557364 683</span></a>
|
||||||
<a class="sourceLine" id="cb2-7" title="7"><span class="co"># 3 Ciprofloxacin SI 0.8381831 1181</span></a>
|
<a class="sourceLine" id="cb2-7" data-line-number="7"><span class="co"># 3 Ciprofloxacin SI 0.8381831 1181</span></a>
|
||||||
<a class="sourceLine" id="cb2-8" title="8"><span class="co"># 4 Ciprofloxacin R 0.1618169 228</span></a></code></pre></div>
|
<a class="sourceLine" id="cb2-8" data-line-number="8"><span class="co"># 4 Ciprofloxacin R 0.1618169 228</span></a></code></pre></div>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<p>Support for all scientifically published pathotypes of <em>E. coli</em> to date (that we could find). Supported are:</p>
|
<p>Support for all scientifically published pathotypes of <em>E. coli</em> to date (that we could find). Supported are:</p>
|
||||||
@ -323,12 +323,12 @@
|
|||||||
<li>UPEC (Uropathogenic <em>E. coli</em>)</li>
|
<li>UPEC (Uropathogenic <em>E. coli</em>)</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>All these lead to the microbial ID of <em>E. coli</em>:</p>
|
<p>All these lead to the microbial ID of <em>E. coli</em>:</p>
|
||||||
<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb3-1" title="1"><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"UPEC"</span>)</a>
|
<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb3-1" data-line-number="1"><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"UPEC"</span>)</a>
|
||||||
<a class="sourceLine" id="cb3-2" title="2"><span class="co"># B_ESCHR_COL</span></a>
|
<a class="sourceLine" id="cb3-2" data-line-number="2"><span class="co"># B_ESCHR_COL</span></a>
|
||||||
<a class="sourceLine" id="cb3-3" title="3"><span class="kw"><a href="../reference/mo_property.html">mo_name</a></span>(<span class="st">"UPEC"</span>)</a>
|
<a class="sourceLine" id="cb3-3" data-line-number="3"><span class="kw"><a href="../reference/mo_property.html">mo_name</a></span>(<span class="st">"UPEC"</span>)</a>
|
||||||
<a class="sourceLine" id="cb3-4" title="4"><span class="co"># "Escherichia coli"</span></a>
|
<a class="sourceLine" id="cb3-4" data-line-number="4"><span class="co"># "Escherichia coli"</span></a>
|
||||||
<a class="sourceLine" id="cb3-5" title="5"><span class="kw"><a href="../reference/mo_property.html">mo_gramstain</a></span>(<span class="st">"EHEC"</span>)</a>
|
<a class="sourceLine" id="cb3-5" data-line-number="5"><span class="kw"><a href="../reference/mo_property.html">mo_gramstain</a></span>(<span class="st">"EHEC"</span>)</a>
|
||||||
<a class="sourceLine" id="cb3-6" title="6"><span class="co"># "Gram-negative"</span></a></code></pre></div>
|
<a class="sourceLine" id="cb3-6" data-line-number="6"><span class="co"># "Gram-negative"</span></a></code></pre></div>
|
||||||
</li>
|
</li>
|
||||||
<li>Function <code><a href="../reference/mo_property.html">mo_info()</a></code> as an analogy to <code><a href="../reference/ab_property.html">ab_info()</a></code>. The <code><a href="../reference/mo_property.html">mo_info()</a></code> prints a list with the full taxonomy, authors, and the URL to the online database of a microorganism</li>
|
<li>Function <code><a href="../reference/mo_property.html">mo_info()</a></code> as an analogy to <code><a href="../reference/ab_property.html">ab_info()</a></code>. The <code><a href="../reference/mo_property.html">mo_info()</a></code> prints a list with the full taxonomy, authors, and the URL to the online database of a microorganism</li>
|
||||||
<li><p>Function <code><a href="../reference/mo_property.html">mo_synonyms()</a></code> to get all previously accepted taxonomic names of a microorganism</p></li>
|
<li><p>Function <code><a href="../reference/mo_property.html">mo_synonyms()</a></code> to get all previously accepted taxonomic names of a microorganism</p></li>
|
||||||
@ -369,9 +369,9 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="amr-070" class="section level1">
|
<div id="amr-0-7-0" class="section level1">
|
||||||
<h1 class="page-header">
|
<h1 class="page-header">
|
||||||
<a href="#amr-070" class="anchor"></a>AMR 0.7.0<small> 2019-06-03 </small>
|
<a href="#amr-0-7-0" class="anchor"></a>AMR 0.7.0<small> 2019-06-03 </small>
|
||||||
</h1>
|
</h1>
|
||||||
<div id="new-2" class="section level4">
|
<div id="new-2" class="section level4">
|
||||||
<h4 class="hasAnchor">
|
<h4 class="hasAnchor">
|
||||||
@ -427,14 +427,14 @@ Please <a href="https://gitlab.com/msberends/AMR/issues/new?issue%5Btitle%5D=Tra
|
|||||||
<li>when all values are unique it now shows a message instead of a warning</li>
|
<li>when all values are unique it now shows a message instead of a warning</li>
|
||||||
<li>
|
<li>
|
||||||
<p>support for boxplots:</p>
|
<p>support for boxplots:</p>
|
||||||
<div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb4-1" title="1">septic_patients <span class="op">%>%</span><span class="st"> </span></a>
|
<div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb4-1" data-line-number="1">septic_patients <span class="op">%>%</span><span class="st"> </span></a>
|
||||||
<a class="sourceLine" id="cb4-2" title="2"><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(age) <span class="op">%>%</span><span class="st"> </span></a>
|
<a class="sourceLine" id="cb4-2" data-line-number="2"><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(age) <span class="op">%>%</span><span class="st"> </span></a>
|
||||||
<a class="sourceLine" id="cb4-3" title="3"><span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/graphics/topics/boxplot">boxplot</a></span>()</a>
|
<a class="sourceLine" id="cb4-3" data-line-number="3"><span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/graphics/topics/boxplot">boxplot</a></span>()</a>
|
||||||
<a class="sourceLine" id="cb4-4" title="4"><span class="co"># grouped boxplots:</span></a>
|
<a class="sourceLine" id="cb4-4" data-line-number="4"><span class="co"># grouped boxplots:</span></a>
|
||||||
<a class="sourceLine" id="cb4-5" title="5">septic_patients <span class="op">%>%</span><span class="st"> </span></a>
|
<a class="sourceLine" id="cb4-5" data-line-number="5">septic_patients <span class="op">%>%</span><span class="st"> </span></a>
|
||||||
<a class="sourceLine" id="cb4-6" title="6"><span class="st"> </span><span class="kw">group_by</span>(hospital_id) <span class="op">%>%</span><span class="st"> </span></a>
|
<a class="sourceLine" id="cb4-6" data-line-number="6"><span class="st"> </span><span class="kw">group_by</span>(hospital_id) <span class="op">%>%</span><span class="st"> </span></a>
|
||||||
<a class="sourceLine" id="cb4-7" title="7"><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(age) <span class="op">%>%</span></a>
|
<a class="sourceLine" id="cb4-7" data-line-number="7"><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(age) <span class="op">%>%</span></a>
|
||||||
<a class="sourceLine" id="cb4-8" title="8"><span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/graphics/topics/boxplot">boxplot</a></span>()</a></code></pre></div>
|
<a class="sourceLine" id="cb4-8" data-line-number="8"><span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/graphics/topics/boxplot">boxplot</a></span>()</a></code></pre></div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
@ -466,9 +466,9 @@ Please <a href="https://gitlab.com/msberends/AMR/issues/new?issue%5Btitle%5D=EUC
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="amr-061" class="section level1">
|
<div id="amr-0-6-1" class="section level1">
|
||||||
<h1 class="page-header">
|
<h1 class="page-header">
|
||||||
<a href="#amr-061" class="anchor"></a>AMR 0.6.1<small> 2019-03-29 </small>
|
<a href="#amr-0-6-1" class="anchor"></a>AMR 0.6.1<small> 2019-03-29 </small>
|
||||||
</h1>
|
</h1>
|
||||||
<div id="changed-3" class="section level4">
|
<div id="changed-3" class="section level4">
|
||||||
<h4 class="hasAnchor">
|
<h4 class="hasAnchor">
|
||||||
@ -480,9 +480,9 @@ Please <a href="https://gitlab.com/msberends/AMR/issues/new?issue%5Btitle%5D=EUC
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="amr-060" class="section level1">
|
<div id="amr-0-6-0" class="section level1">
|
||||||
<h1 class="page-header">
|
<h1 class="page-header">
|
||||||
<a href="#amr-060" class="anchor"></a>AMR 0.6.0<small> 2019-03-27 </small>
|
<a href="#amr-0-6-0" class="anchor"></a>AMR 0.6.0<small> 2019-03-27 </small>
|
||||||
</h1>
|
</h1>
|
||||||
<p><strong>New website!</strong></p>
|
<p><strong>New website!</strong></p>
|
||||||
<p>We’ve got a new website: <a href="https://msberends.gitlab.io/AMR/">https://msberends.gitlab.io/AMR</a> (built with the great <a href="https://pkgdown.r-lib.org/"><code>pkgdown</code></a>)</p>
|
<p>We’ve got a new website: <a href="https://msberends.gitlab.io/AMR/">https://msberends.gitlab.io/AMR</a> (built with the great <a href="https://pkgdown.r-lib.org/"><code>pkgdown</code></a>)</p>
|
||||||
@ -505,7 +505,7 @@ Please <a href="https://gitlab.com/msberends/AMR/issues/new?issue%5Btitle%5D=EUC
|
|||||||
<li>
|
<li>
|
||||||
<p>The responsible author(s) and year of scientific publication</p>
|
<p>The responsible author(s) and year of scientific publication</p>
|
||||||
This data is updated annually - check the included version with the new function <code><a href="../reference/catalogue_of_life_version.html">catalogue_of_life_version()</a></code>.</li>
|
This data is updated annually - check the included version with the new function <code><a href="../reference/catalogue_of_life_version.html">catalogue_of_life_version()</a></code>.</li>
|
||||||
<li>Due to this change, some <code>mo</code> codes changed (e.g. <em>Streptococcus</em> changed from <code>B_STRPTC</code> to <code>B_STRPT</code>). A translation table is used internally to support older microorganism IDs, so users will not notice this difference.</li>
|
<li>Due to this change, some <code>mo</code> codes changed (e.g. <em>Streptococcus</em> changed from <code>B_STRPTC</code> to <code>B_STRPT</code>). A translation table is used internally to support older microorganism IDs, so users will not notice this difference.</li>
|
||||||
<li>New function <code><a href="../reference/mo_property.html">mo_rank()</a></code> for the taxonomic rank (genus, species, infraspecies, etc.)</li>
|
<li>New function <code><a href="../reference/mo_property.html">mo_rank()</a></code> for the taxonomic rank (genus, species, infraspecies, etc.)</li>
|
||||||
<li>New function <code><a href="../reference/mo_property.html">mo_url()</a></code> to get the direct URL of a species from the Catalogue of Life</li>
|
<li>New function <code><a href="../reference/mo_property.html">mo_url()</a></code> to get the direct URL of a species from the Catalogue of Life</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -519,33 +519,33 @@ This data is updated annually - check the included version with the new function
|
|||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<p>New filters for antimicrobial classes. Use these functions to filter isolates on results in one of more antibiotics from a specific class:</p>
|
<p>New filters for antimicrobial classes. Use these functions to filter isolates on results in one of more antibiotics from a specific class:</p>
|
||||||
<div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb5-1" title="1"><span class="kw"><a href="../reference/filter_ab_class.html">filter_aminoglycosides</a></span>()</a>
|
<div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb5-1" data-line-number="1"><span class="kw"><a href="../reference/filter_ab_class.html">filter_aminoglycosides</a></span>()</a>
|
||||||
<a class="sourceLine" id="cb5-2" title="2"><span class="kw"><a href="../reference/filter_ab_class.html">filter_carbapenems</a></span>()</a>
|
<a class="sourceLine" id="cb5-2" data-line-number="2"><span class="kw"><a href="../reference/filter_ab_class.html">filter_carbapenems</a></span>()</a>
|
||||||
<a class="sourceLine" id="cb5-3" title="3"><span class="kw"><a href="../reference/filter_ab_class.html">filter_cephalosporins</a></span>()</a>
|
<a class="sourceLine" id="cb5-3" data-line-number="3"><span class="kw"><a href="../reference/filter_ab_class.html">filter_cephalosporins</a></span>()</a>
|
||||||
<a class="sourceLine" id="cb5-4" title="4"><span class="kw"><a href="../reference/filter_ab_class.html">filter_1st_cephalosporins</a></span>()</a>
|
<a class="sourceLine" id="cb5-4" data-line-number="4"><span class="kw"><a href="../reference/filter_ab_class.html">filter_1st_cephalosporins</a></span>()</a>
|
||||||
<a class="sourceLine" id="cb5-5" title="5"><span class="kw"><a href="../reference/filter_ab_class.html">filter_2nd_cephalosporins</a></span>()</a>
|
<a class="sourceLine" id="cb5-5" data-line-number="5"><span class="kw"><a href="../reference/filter_ab_class.html">filter_2nd_cephalosporins</a></span>()</a>
|
||||||
<a class="sourceLine" id="cb5-6" title="6"><span class="kw"><a href="../reference/filter_ab_class.html">filter_3rd_cephalosporins</a></span>()</a>
|
<a class="sourceLine" id="cb5-6" data-line-number="6"><span class="kw"><a href="../reference/filter_ab_class.html">filter_3rd_cephalosporins</a></span>()</a>
|
||||||
<a class="sourceLine" id="cb5-7" title="7"><span class="kw"><a href="../reference/filter_ab_class.html">filter_4th_cephalosporins</a></span>()</a>
|
<a class="sourceLine" id="cb5-7" data-line-number="7"><span class="kw"><a href="../reference/filter_ab_class.html">filter_4th_cephalosporins</a></span>()</a>
|
||||||
<a class="sourceLine" id="cb5-8" title="8"><span class="kw"><a href="../reference/filter_ab_class.html">filter_fluoroquinolones</a></span>()</a>
|
<a class="sourceLine" id="cb5-8" data-line-number="8"><span class="kw"><a href="../reference/filter_ab_class.html">filter_fluoroquinolones</a></span>()</a>
|
||||||
<a class="sourceLine" id="cb5-9" title="9"><span class="kw"><a href="../reference/filter_ab_class.html">filter_glycopeptides</a></span>()</a>
|
<a class="sourceLine" id="cb5-9" data-line-number="9"><span class="kw"><a href="../reference/filter_ab_class.html">filter_glycopeptides</a></span>()</a>
|
||||||
<a class="sourceLine" id="cb5-10" title="10"><span class="kw"><a href="../reference/filter_ab_class.html">filter_macrolides</a></span>()</a>
|
<a class="sourceLine" id="cb5-10" data-line-number="10"><span class="kw"><a href="../reference/filter_ab_class.html">filter_macrolides</a></span>()</a>
|
||||||
<a class="sourceLine" id="cb5-11" title="11"><span class="kw"><a href="../reference/filter_ab_class.html">filter_tetracyclines</a></span>()</a></code></pre></div>
|
<a class="sourceLine" id="cb5-11" data-line-number="11"><span class="kw"><a href="../reference/filter_ab_class.html">filter_tetracyclines</a></span>()</a></code></pre></div>
|
||||||
<p>The <code>antibiotics</code> data set will be searched, after which the input data will be checked for column names with a value in any abbreviations, codes or official names found in the <code>antibiotics</code> data set. For example:</p>
|
<p>The <code>antibiotics</code> data set will be searched, after which the input data will be checked for column names with a value in any abbreviations, codes or official names found in the <code>antibiotics</code> data set. For example:</p>
|
||||||
<div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb6-1" title="1">septic_patients <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/filter_ab_class.html">filter_glycopeptides</a></span>(<span class="dt">result =</span> <span class="st">"R"</span>)</a>
|
<div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb6-1" data-line-number="1">septic_patients <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/filter_ab_class.html">filter_glycopeptides</a></span>(<span class="dt">result =</span> <span class="st">"R"</span>)</a>
|
||||||
<a class="sourceLine" id="cb6-2" title="2"><span class="co"># Filtering on glycopeptide antibacterials: any of `vanc` or `teic` is R</span></a>
|
<a class="sourceLine" id="cb6-2" data-line-number="2"><span class="co"># Filtering on glycopeptide antibacterials: any of `vanc` or `teic` is R</span></a>
|
||||||
<a class="sourceLine" id="cb6-3" title="3">septic_patients <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/filter_ab_class.html">filter_glycopeptides</a></span>(<span class="dt">result =</span> <span class="st">"R"</span>, <span class="dt">scope =</span> <span class="st">"all"</span>)</a>
|
<a class="sourceLine" id="cb6-3" data-line-number="3">septic_patients <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/filter_ab_class.html">filter_glycopeptides</a></span>(<span class="dt">result =</span> <span class="st">"R"</span>, <span class="dt">scope =</span> <span class="st">"all"</span>)</a>
|
||||||
<a class="sourceLine" id="cb6-4" title="4"><span class="co"># Filtering on glycopeptide antibacterials: all of `vanc` and `teic` is R</span></a></code></pre></div>
|
<a class="sourceLine" id="cb6-4" data-line-number="4"><span class="co"># Filtering on glycopeptide antibacterials: all of `vanc` and `teic` is R</span></a></code></pre></div>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<p>All <code>ab_*</code> functions are deprecated and replaced by <code>atc_*</code> functions:</p>
|
<p>All <code>ab_*</code> functions are deprecated and replaced by <code>atc_*</code> functions:</p>
|
||||||
<div class="sourceCode" id="cb7"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb7-1" title="1">ab_property -><span class="st"> </span><span class="kw">atc_property</span>()</a>
|
<div class="sourceCode" id="cb7"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb7-1" data-line-number="1">ab_property -><span class="st"> </span><span class="kw">atc_property</span>()</a>
|
||||||
<a class="sourceLine" id="cb7-2" title="2">ab_name -><span class="st"> </span><span class="kw">atc_name</span>()</a>
|
<a class="sourceLine" id="cb7-2" data-line-number="2">ab_name -><span class="st"> </span><span class="kw">atc_name</span>()</a>
|
||||||
<a class="sourceLine" id="cb7-3" title="3">ab_official -><span class="st"> </span><span class="kw">atc_official</span>()</a>
|
<a class="sourceLine" id="cb7-3" data-line-number="3">ab_official -><span class="st"> </span><span class="kw">atc_official</span>()</a>
|
||||||
<a class="sourceLine" id="cb7-4" title="4">ab_trivial_nl -><span class="st"> </span><span class="kw">atc_trivial_nl</span>()</a>
|
<a class="sourceLine" id="cb7-4" data-line-number="4">ab_trivial_nl -><span class="st"> </span><span class="kw">atc_trivial_nl</span>()</a>
|
||||||
<a class="sourceLine" id="cb7-5" title="5">ab_certe -><span class="st"> </span><span class="kw">atc_certe</span>()</a>
|
<a class="sourceLine" id="cb7-5" data-line-number="5">ab_certe -><span class="st"> </span><span class="kw">atc_certe</span>()</a>
|
||||||
<a class="sourceLine" id="cb7-6" title="6">ab_umcg -><span class="st"> </span><span class="kw">atc_umcg</span>()</a>
|
<a class="sourceLine" id="cb7-6" data-line-number="6">ab_umcg -><span class="st"> </span><span class="kw">atc_umcg</span>()</a>
|
||||||
<a class="sourceLine" id="cb7-7" title="7">ab_tradenames -><span class="st"> </span><span class="kw">atc_tradenames</span>()</a></code></pre></div>
|
<a class="sourceLine" id="cb7-7" data-line-number="7">ab_tradenames -><span class="st"> </span><span class="kw">atc_tradenames</span>()</a></code></pre></div>
|
||||||
These functions use <code><a href="../reference/AMR-deprecated.html">as.atc()</a></code> internally. The old <code>atc_property</code> has been renamed <code><a href="../reference/atc_online.html">atc_online_property()</a></code>. This is done for two reasons: firstly, not all ATC codes are of antibiotics (ab) but can also be of antivirals or antifungals. Secondly, the input must have class <code>atc</code> or must be coerable to this class. Properties of these classes should start with the same class name, analogous to <code><a href="../reference/as.mo.html">as.mo()</a></code> and e.g. <code>mo_genus</code>.</li>
|
These functions use <code><a href="../reference/AMR-deprecated.html">as.atc()</a></code> internally. The old <code>atc_property</code> has been renamed <code><a href="../reference/atc_online.html">atc_online_property()</a></code>. This is done for two reasons: firstly, not all ATC codes are of antibiotics (ab) but can also be of antivirals or antifungals. Secondly, the input must have class <code>atc</code> or must be coerable to this class. Properties of these classes should start with the same class name, analogous to <code><a href="../reference/as.mo.html">as.mo()</a></code> and e.g. <code>mo_genus</code>.</li>
|
||||||
<li>New functions <code><a href="../reference/mo_source.html">set_mo_source()</a></code> and <code><a href="../reference/mo_source.html">get_mo_source()</a></code> to use your own predefined MO codes as input for <code><a href="../reference/as.mo.html">as.mo()</a></code> and consequently all <code>mo_*</code> functions</li>
|
<li>New functions <code><a href="../reference/mo_source.html">set_mo_source()</a></code> and <code><a href="../reference/mo_source.html">get_mo_source()</a></code> to use your own predefined MO codes as input for <code><a href="../reference/as.mo.html">as.mo()</a></code> and consequently all <code>mo_*</code> functions</li>
|
||||||
<li>Support for the upcoming <a href="https://dplyr.tidyverse.org"><code>dplyr</code></a> version 0.8.0</li>
|
<li>Support for the upcoming <a href="https://dplyr.tidyverse.org"><code>dplyr</code></a> version 0.8.0</li>
|
||||||
<li>New function <code><a href="../reference/guess_ab_col.html">guess_ab_col()</a></code> to find an antibiotic column in a table</li>
|
<li>New function <code><a href="../reference/guess_ab_col.html">guess_ab_col()</a></code> to find an antibiotic column in a table</li>
|
||||||
@ -556,20 +556,20 @@ These functions use <code><a href="../reference/AMR-deprecated.html">as.atc()</a
|
|||||||
<li>New function <code><a href="../reference/age_groups.html">age_groups()</a></code> to split ages into custom or predefined groups (like children or elderly). This allows for easier demographic antimicrobial resistance analysis per age group.</li>
|
<li>New function <code><a href="../reference/age_groups.html">age_groups()</a></code> to split ages into custom or predefined groups (like children or elderly). This allows for easier demographic antimicrobial resistance analysis per age group.</li>
|
||||||
<li>
|
<li>
|
||||||
<p>New function <code><a href="../reference/resistance_predict.html">ggplot_rsi_predict()</a></code> as well as the base R <code><a href="https://www.rdocumentation.org/packages/graphics/topics/plot">plot()</a></code> function can now be used for resistance prediction calculated with <code><a href="../reference/resistance_predict.html">resistance_predict()</a></code>:</p>
|
<p>New function <code><a href="../reference/resistance_predict.html">ggplot_rsi_predict()</a></code> as well as the base R <code><a href="https://www.rdocumentation.org/packages/graphics/topics/plot">plot()</a></code> function can now be used for resistance prediction calculated with <code><a href="../reference/resistance_predict.html">resistance_predict()</a></code>:</p>
|
||||||
<div class="sourceCode" id="cb8"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb8-1" title="1">x <-<span class="st"> </span><span class="kw"><a href="../reference/resistance_predict.html">resistance_predict</a></span>(septic_patients, <span class="dt">col_ab =</span> <span class="st">"amox"</span>)</a>
|
<div class="sourceCode" id="cb8"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb8-1" data-line-number="1">x <-<span class="st"> </span><span class="kw"><a href="../reference/resistance_predict.html">resistance_predict</a></span>(septic_patients, <span class="dt">col_ab =</span> <span class="st">"amox"</span>)</a>
|
||||||
<a class="sourceLine" id="cb8-2" title="2"><span class="kw"><a href="https://www.rdocumentation.org/packages/graphics/topics/plot">plot</a></span>(x)</a>
|
<a class="sourceLine" id="cb8-2" data-line-number="2"><span class="kw"><a href="https://www.rdocumentation.org/packages/graphics/topics/plot">plot</a></span>(x)</a>
|
||||||
<a class="sourceLine" id="cb8-3" title="3"><span class="kw"><a href="../reference/resistance_predict.html">ggplot_rsi_predict</a></span>(x)</a></code></pre></div>
|
<a class="sourceLine" id="cb8-3" data-line-number="3"><span class="kw"><a href="../reference/resistance_predict.html">ggplot_rsi_predict</a></span>(x)</a></code></pre></div>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<p>Functions <code><a href="../reference/first_isolate.html">filter_first_isolate()</a></code> and <code><a href="../reference/first_isolate.html">filter_first_weighted_isolate()</a></code> to shorten and fasten filtering on data sets with antimicrobial results, e.g.:</p>
|
<p>Functions <code><a href="../reference/first_isolate.html">filter_first_isolate()</a></code> and <code><a href="../reference/first_isolate.html">filter_first_weighted_isolate()</a></code> to shorten and fasten filtering on data sets with antimicrobial results, e.g.:</p>
|
||||||
<div class="sourceCode" id="cb9"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb9-1" title="1">septic_patients <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/first_isolate.html">filter_first_isolate</a></span>(...)</a>
|
<div class="sourceCode" id="cb9"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb9-1" data-line-number="1">septic_patients <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/first_isolate.html">filter_first_isolate</a></span>(...)</a>
|
||||||
<a class="sourceLine" id="cb9-2" title="2"><span class="co"># or</span></a>
|
<a class="sourceLine" id="cb9-2" data-line-number="2"><span class="co"># or</span></a>
|
||||||
<a class="sourceLine" id="cb9-3" title="3"><span class="kw"><a href="../reference/first_isolate.html">filter_first_isolate</a></span>(septic_patients, ...)</a></code></pre></div>
|
<a class="sourceLine" id="cb9-3" data-line-number="3"><span class="kw"><a href="../reference/first_isolate.html">filter_first_isolate</a></span>(septic_patients, ...)</a></code></pre></div>
|
||||||
<p>is equal to:</p>
|
<p>is equal to:</p>
|
||||||
<div class="sourceCode" id="cb10"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb10-1" title="1">septic_patients <span class="op">%>%</span></a>
|
<div class="sourceCode" id="cb10"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb10-1" data-line-number="1">septic_patients <span class="op">%>%</span></a>
|
||||||
<a class="sourceLine" id="cb10-2" title="2"><span class="st"> </span><span class="kw">mutate</span>(<span class="dt">only_firsts =</span> <span class="kw"><a href="../reference/first_isolate.html">first_isolate</a></span>(septic_patients, ...)) <span class="op">%>%</span></a>
|
<a class="sourceLine" id="cb10-2" data-line-number="2"><span class="st"> </span><span class="kw">mutate</span>(<span class="dt">only_firsts =</span> <span class="kw"><a href="../reference/first_isolate.html">first_isolate</a></span>(septic_patients, ...)) <span class="op">%>%</span></a>
|
||||||
<a class="sourceLine" id="cb10-3" title="3"><span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/stats/topics/filter">filter</a></span>(only_firsts <span class="op">==</span><span class="st"> </span><span class="ot">TRUE</span>) <span class="op">%>%</span></a>
|
<a class="sourceLine" id="cb10-3" data-line-number="3"><span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/stats/topics/filter">filter</a></span>(only_firsts <span class="op">==</span><span class="st"> </span><span class="ot">TRUE</span>) <span class="op">%>%</span></a>
|
||||||
<a class="sourceLine" id="cb10-4" title="4"><span class="st"> </span><span class="kw">select</span>(<span class="op">-</span>only_firsts)</a></code></pre></div>
|
<a class="sourceLine" id="cb10-4" data-line-number="4"><span class="st"> </span><span class="kw">select</span>(<span class="op">-</span>only_firsts)</a></code></pre></div>
|
||||||
</li>
|
</li>
|
||||||
<li>New function <code><a href="../reference/availability.html">availability()</a></code> to check the number of available (non-empty) results in a <code>data.frame</code>
|
<li>New function <code><a href="../reference/availability.html">availability()</a></code> to check the number of available (non-empty) results in a <code>data.frame</code>
|
||||||
</li>
|
</li>
|
||||||
@ -598,33 +598,33 @@ These functions use <code><a href="../reference/AMR-deprecated.html">as.atc()</a
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<p>Now handles incorrect spelling, like <code>i</code> instead of <code>y</code> and <code>f</code> instead of <code>ph</code>:</p>
|
<p>Now handles incorrect spelling, like <code>i</code> instead of <code>y</code> and <code>f</code> instead of <code>ph</code>:</p>
|
||||||
<div class="sourceCode" id="cb11"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb11-1" title="1"><span class="co"># mo_fullname() uses as.mo() internally</span></a>
|
<div class="sourceCode" id="cb11"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb11-1" data-line-number="1"><span class="co"># mo_fullname() uses as.mo() internally</span></a>
|
||||||
<a class="sourceLine" id="cb11-2" title="2"></a>
|
<a class="sourceLine" id="cb11-2" data-line-number="2"></a>
|
||||||
<a class="sourceLine" id="cb11-3" title="3"><span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"Sthafilokockus aaureuz"</span>)</a>
|
<a class="sourceLine" id="cb11-3" data-line-number="3"><span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"Sthafilokockus aaureuz"</span>)</a>
|
||||||
<a class="sourceLine" id="cb11-4" title="4"><span class="co">#> [1] "Staphylococcus aureus"</span></a>
|
<a class="sourceLine" id="cb11-4" data-line-number="4"><span class="co">#> [1] "Staphylococcus aureus"</span></a>
|
||||||
<a class="sourceLine" id="cb11-5" title="5"></a>
|
<a class="sourceLine" id="cb11-5" data-line-number="5"></a>
|
||||||
<a class="sourceLine" id="cb11-6" title="6"><span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"S. klossi"</span>)</a>
|
<a class="sourceLine" id="cb11-6" data-line-number="6"><span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"S. klossi"</span>)</a>
|
||||||
<a class="sourceLine" id="cb11-7" title="7"><span class="co">#> [1] "Staphylococcus kloosii"</span></a></code></pre></div>
|
<a class="sourceLine" id="cb11-7" data-line-number="7"><span class="co">#> [1] "Staphylococcus kloosii"</span></a></code></pre></div>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<p>Uncertainty of the algorithm is now divided into four levels, 0 to 3, where the default <code>allow_uncertain = TRUE</code> is equal to uncertainty level 2. Run <code><a href="../reference/as.mo.html">?as.mo</a></code> for more info about these levels.</p>
|
<p>Uncertainty of the algorithm is now divided into four levels, 0 to 3, where the default <code>allow_uncertain = TRUE</code> is equal to uncertainty level 2. Run <code><a href="../reference/as.mo.html">?as.mo</a></code> for more info about these levels.</p>
|
||||||
<div class="sourceCode" id="cb12"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb12-1" title="1"><span class="co"># equal:</span></a>
|
<div class="sourceCode" id="cb12"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb12-1" data-line-number="1"><span class="co"># equal:</span></a>
|
||||||
<a class="sourceLine" id="cb12-2" title="2"><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(..., <span class="dt">allow_uncertain =</span> <span class="ot">TRUE</span>)</a>
|
<a class="sourceLine" id="cb12-2" data-line-number="2"><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(..., <span class="dt">allow_uncertain =</span> <span class="ot">TRUE</span>)</a>
|
||||||
<a class="sourceLine" id="cb12-3" title="3"><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(..., <span class="dt">allow_uncertain =</span> <span class="dv">2</span>)</a>
|
<a class="sourceLine" id="cb12-3" data-line-number="3"><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(..., <span class="dt">allow_uncertain =</span> <span class="dv">2</span>)</a>
|
||||||
<a class="sourceLine" id="cb12-4" title="4"></a>
|
<a class="sourceLine" id="cb12-4" data-line-number="4"></a>
|
||||||
<a class="sourceLine" id="cb12-5" title="5"><span class="co"># also equal:</span></a>
|
<a class="sourceLine" id="cb12-5" data-line-number="5"><span class="co"># also equal:</span></a>
|
||||||
<a class="sourceLine" id="cb12-6" title="6"><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(..., <span class="dt">allow_uncertain =</span> <span class="ot">FALSE</span>)</a>
|
<a class="sourceLine" id="cb12-6" data-line-number="6"><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(..., <span class="dt">allow_uncertain =</span> <span class="ot">FALSE</span>)</a>
|
||||||
<a class="sourceLine" id="cb12-7" title="7"><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(..., <span class="dt">allow_uncertain =</span> <span class="dv">0</span>)</a></code></pre></div>
|
<a class="sourceLine" id="cb12-7" data-line-number="7"><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(..., <span class="dt">allow_uncertain =</span> <span class="dv">0</span>)</a></code></pre></div>
|
||||||
Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a></code> could lead to very unreliable results.</li>
|
Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a></code> could lead to very unreliable results.</li>
|
||||||
<li>Implemented the latest publication of Becker <em>et al.</em> (2019), for categorising coagulase-negative <em>Staphylococci</em>
|
<li>Implemented the latest publication of Becker <em>et al.</em> (2019), for categorising coagulase-negative <em>Staphylococci</em>
|
||||||
</li>
|
</li>
|
||||||
<li>All microbial IDs that found are now saved to a local file <code>~/.Rhistory_mo</code>. Use the new function <code>clean_mo_history()</code> to delete this file, which resets the algorithms.</li>
|
<li>All microbial IDs that found are now saved to a local file <code>~/.Rhistory_mo</code>. Use the new function <code>clean_mo_history()</code> to delete this file, which resets the algorithms.</li>
|
||||||
<li>
|
<li>
|
||||||
<p>Incoercible results will now be considered ‘unknown’, MO code <code>UNKNOWN</code>. On foreign systems, properties of these will be translated to all languages already previously supported: German, Dutch, French, Italian, Spanish and Portuguese:</p>
|
<p>Incoercible results will now be considered ‘unknown’, MO code <code>UNKNOWN</code>. On foreign systems, properties of these will be translated to all languages already previously supported: German, Dutch, French, Italian, Spanish and Portuguese:</p>
|
||||||
<div class="sourceCode" id="cb13"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb13-1" title="1"><span class="kw"><a href="../reference/mo_property.html">mo_genus</a></span>(<span class="st">"qwerty"</span>, <span class="dt">language =</span> <span class="st">"es"</span>)</a>
|
<div class="sourceCode" id="cb13"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb13-1" data-line-number="1"><span class="kw"><a href="../reference/mo_property.html">mo_genus</a></span>(<span class="st">"qwerty"</span>, <span class="dt">language =</span> <span class="st">"es"</span>)</a>
|
||||||
<a class="sourceLine" id="cb13-2" title="2"><span class="co"># Warning: </span></a>
|
<a class="sourceLine" id="cb13-2" data-line-number="2"><span class="co"># Warning: </span></a>
|
||||||
<a class="sourceLine" id="cb13-3" title="3"><span class="co"># one unique value (^= 100.0%) could not be coerced and is considered 'unknown': "qwerty". Use mo_failures() to review it.</span></a>
|
<a class="sourceLine" id="cb13-3" data-line-number="3"><span class="co"># one unique value (^= 100.0%) could not be coerced and is considered 'unknown': "qwerty". Use mo_failures() to review it.</span></a>
|
||||||
<a class="sourceLine" id="cb13-4" title="4"><span class="co">#> [1] "(género desconocido)"</span></a></code></pre></div>
|
<a class="sourceLine" id="cb13-4" data-line-number="4"><span class="co">#> [1] "(género desconocido)"</span></a></code></pre></div>
|
||||||
</li>
|
</li>
|
||||||
<li>Fix for vector containing only empty values</li>
|
<li>Fix for vector containing only empty values</li>
|
||||||
<li>Finds better results when input is in other languages</li>
|
<li>Finds better results when input is in other languages</li>
|
||||||
@ -670,19 +670,19 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<p>Support for tidyverse quasiquotation! Now you can create frequency tables of function outcomes:</p>
|
<p>Support for tidyverse quasiquotation! Now you can create frequency tables of function outcomes:</p>
|
||||||
<div class="sourceCode" id="cb14"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb14-1" title="1"><span class="co"># Determine genus of microorganisms (mo) in `septic_patients` data set:</span></a>
|
<div class="sourceCode" id="cb14"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb14-1" data-line-number="1"><span class="co"># Determine genus of microorganisms (mo) in `septic_patients` data set:</span></a>
|
||||||
<a class="sourceLine" id="cb14-2" title="2"><span class="co"># OLD WAY</span></a>
|
<a class="sourceLine" id="cb14-2" data-line-number="2"><span class="co"># OLD WAY</span></a>
|
||||||
<a class="sourceLine" id="cb14-3" title="3">septic_patients <span class="op">%>%</span></a>
|
<a class="sourceLine" id="cb14-3" data-line-number="3">septic_patients <span class="op">%>%</span></a>
|
||||||
<a class="sourceLine" id="cb14-4" title="4"><span class="st"> </span><span class="kw">mutate</span>(<span class="dt">genus =</span> <span class="kw"><a href="../reference/mo_property.html">mo_genus</a></span>(mo)) <span class="op">%>%</span></a>
|
<a class="sourceLine" id="cb14-4" data-line-number="4"><span class="st"> </span><span class="kw">mutate</span>(<span class="dt">genus =</span> <span class="kw"><a href="../reference/mo_property.html">mo_genus</a></span>(mo)) <span class="op">%>%</span></a>
|
||||||
<a class="sourceLine" id="cb14-5" title="5"><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(genus)</a>
|
<a class="sourceLine" id="cb14-5" data-line-number="5"><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(genus)</a>
|
||||||
<a class="sourceLine" id="cb14-6" title="6"><span class="co"># NEW WAY</span></a>
|
<a class="sourceLine" id="cb14-6" data-line-number="6"><span class="co"># NEW WAY</span></a>
|
||||||
<a class="sourceLine" id="cb14-7" title="7">septic_patients <span class="op">%>%</span><span class="st"> </span></a>
|
<a class="sourceLine" id="cb14-7" data-line-number="7">septic_patients <span class="op">%>%</span><span class="st"> </span></a>
|
||||||
<a class="sourceLine" id="cb14-8" title="8"><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(<span class="kw"><a href="../reference/mo_property.html">mo_genus</a></span>(mo))</a>
|
<a class="sourceLine" id="cb14-8" data-line-number="8"><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(<span class="kw"><a href="../reference/mo_property.html">mo_genus</a></span>(mo))</a>
|
||||||
<a class="sourceLine" id="cb14-9" title="9"></a>
|
<a class="sourceLine" id="cb14-9" data-line-number="9"></a>
|
||||||
<a class="sourceLine" id="cb14-10" title="10"><span class="co"># Even supports grouping variables:</span></a>
|
<a class="sourceLine" id="cb14-10" data-line-number="10"><span class="co"># Even supports grouping variables:</span></a>
|
||||||
<a class="sourceLine" id="cb14-11" title="11">septic_patients <span class="op">%>%</span></a>
|
<a class="sourceLine" id="cb14-11" data-line-number="11">septic_patients <span class="op">%>%</span></a>
|
||||||
<a class="sourceLine" id="cb14-12" title="12"><span class="st"> </span><span class="kw">group_by</span>(gender) <span class="op">%>%</span><span class="st"> </span></a>
|
<a class="sourceLine" id="cb14-12" data-line-number="12"><span class="st"> </span><span class="kw">group_by</span>(gender) <span class="op">%>%</span><span class="st"> </span></a>
|
||||||
<a class="sourceLine" id="cb14-13" title="13"><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(<span class="kw"><a href="../reference/mo_property.html">mo_genus</a></span>(mo))</a></code></pre></div>
|
<a class="sourceLine" id="cb14-13" data-line-number="13"><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(<span class="kw"><a href="../reference/mo_property.html">mo_genus</a></span>(mo))</a></code></pre></div>
|
||||||
</li>
|
</li>
|
||||||
<li>Header info is now available as a list, with the <code>header</code> function</li>
|
<li>Header info is now available as a list, with the <code>header</code> function</li>
|
||||||
<li>The parameter <code>header</code> is now set to <code>TRUE</code> at default, even for markdown</li>
|
<li>The parameter <code>header</code> is now set to <code>TRUE</code> at default, even for markdown</li>
|
||||||
@ -713,9 +713,9 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="amr-050" class="section level1">
|
<div id="amr-0-5-0" class="section level1">
|
||||||
<h1 class="page-header">
|
<h1 class="page-header">
|
||||||
<a href="#amr-050" class="anchor"></a>AMR 0.5.0<small> 2018-11-30 </small>
|
<a href="#amr-0-5-0" class="anchor"></a>AMR 0.5.0<small> 2018-11-30 </small>
|
||||||
</h1>
|
</h1>
|
||||||
<div id="new-4" class="section level4">
|
<div id="new-4" class="section level4">
|
||||||
<h4 class="hasAnchor">
|
<h4 class="hasAnchor">
|
||||||
@ -757,10 +757,10 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
|
|||||||
<li>Fewer than 3 characters as input for <code>as.mo</code> will return NA</li>
|
<li>Fewer than 3 characters as input for <code>as.mo</code> will return NA</li>
|
||||||
<li>
|
<li>
|
||||||
<p>Function <code>as.mo</code> (and all <code>mo_*</code> wrappers) now supports genus abbreviations with “species” attached</p>
|
<p>Function <code>as.mo</code> (and all <code>mo_*</code> wrappers) now supports genus abbreviations with “species” attached</p>
|
||||||
<div class="sourceCode" id="cb15"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb15-1" title="1"><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"E. species"</span>) <span class="co"># B_ESCHR</span></a>
|
<div class="sourceCode" id="cb15"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb15-1" data-line-number="1"><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"E. species"</span>) <span class="co"># B_ESCHR</span></a>
|
||||||
<a class="sourceLine" id="cb15-2" title="2"><span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"E. spp."</span>) <span class="co"># "Escherichia species"</span></a>
|
<a class="sourceLine" id="cb15-2" data-line-number="2"><span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"E. spp."</span>) <span class="co"># "Escherichia species"</span></a>
|
||||||
<a class="sourceLine" id="cb15-3" title="3"><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"S. spp"</span>) <span class="co"># B_STPHY</span></a>
|
<a class="sourceLine" id="cb15-3" data-line-number="3"><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"S. spp"</span>) <span class="co"># B_STPHY</span></a>
|
||||||
<a class="sourceLine" id="cb15-4" title="4"><span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"S. species"</span>) <span class="co"># "Staphylococcus species"</span></a></code></pre></div>
|
<a class="sourceLine" id="cb15-4" data-line-number="4"><span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"S. species"</span>) <span class="co"># "Staphylococcus species"</span></a></code></pre></div>
|
||||||
</li>
|
</li>
|
||||||
<li>Added parameter <code>combine_IR</code> (TRUE/FALSE) to functions <code>portion_df</code> and <code>count_df</code>, to indicate that all values of I and R must be merged into one, so the output only consists of S vs. IR (susceptible vs. non-susceptible)</li>
|
<li>Added parameter <code>combine_IR</code> (TRUE/FALSE) to functions <code>portion_df</code> and <code>count_df</code>, to indicate that all values of I and R must be merged into one, so the output only consists of S vs. IR (susceptible vs. non-susceptible)</li>
|
||||||
<li>Fix for <code>portion_*(..., as_percent = TRUE)</code> when minimal number of isolates would not be met</li>
|
<li>Fix for <code>portion_*(..., as_percent = TRUE)</code> when minimal number of isolates would not be met</li>
|
||||||
@ -773,17 +773,17 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<p>Support for grouping variables, test with:</p>
|
<p>Support for grouping variables, test with:</p>
|
||||||
<div class="sourceCode" id="cb16"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb16-1" title="1">septic_patients <span class="op">%>%</span><span class="st"> </span></a>
|
<div class="sourceCode" id="cb16"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb16-1" data-line-number="1">septic_patients <span class="op">%>%</span><span class="st"> </span></a>
|
||||||
<a class="sourceLine" id="cb16-2" title="2"><span class="st"> </span><span class="kw">group_by</span>(hospital_id) <span class="op">%>%</span><span class="st"> </span></a>
|
<a class="sourceLine" id="cb16-2" data-line-number="2"><span class="st"> </span><span class="kw">group_by</span>(hospital_id) <span class="op">%>%</span><span class="st"> </span></a>
|
||||||
<a class="sourceLine" id="cb16-3" title="3"><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(gender)</a></code></pre></div>
|
<a class="sourceLine" id="cb16-3" data-line-number="3"><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(gender)</a></code></pre></div>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<p>Support for (un)selecting columns:</p>
|
<p>Support for (un)selecting columns:</p>
|
||||||
<div class="sourceCode" id="cb17"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb17-1" title="1">septic_patients <span class="op">%>%</span><span class="st"> </span></a>
|
<div class="sourceCode" id="cb17"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb17-1" data-line-number="1">septic_patients <span class="op">%>%</span><span class="st"> </span></a>
|
||||||
<a class="sourceLine" id="cb17-2" title="2"><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(hospital_id) <span class="op">%>%</span><span class="st"> </span></a>
|
<a class="sourceLine" id="cb17-2" data-line-number="2"><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(hospital_id) <span class="op">%>%</span><span class="st"> </span></a>
|
||||||
<a class="sourceLine" id="cb17-3" title="3"><span class="st"> </span><span class="kw">select</span>(<span class="op">-</span>count, <span class="op">-</span>cum_count) <span class="co"># only get item, percent, cum_percent</span></a></code></pre></div>
|
<a class="sourceLine" id="cb17-3" data-line-number="3"><span class="st"> </span><span class="kw">select</span>(<span class="op">-</span>count, <span class="op">-</span>cum_count) <span class="co"># only get item, percent, cum_percent</span></a></code></pre></div>
|
||||||
</li>
|
</li>
|
||||||
<li>Check for <code><a href="https://www.rdocumentation.org/packages/hms/topics/hms">hms::is.hms</a></code>
|
<li>Check for <code><a href="https://www.rdocumentation.org/packages/hms/topics/Deprecated">hms::is.hms</a></code>
|
||||||
</li>
|
</li>
|
||||||
<li>Now prints in markdown at default in non-interactive sessions</li>
|
<li>Now prints in markdown at default in non-interactive sessions</li>
|
||||||
<li>No longer adds the factor level column and sorts factors on count again</li>
|
<li>No longer adds the factor level column and sorts factors on count again</li>
|
||||||
@ -840,9 +840,9 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="amr-040" class="section level1">
|
<div id="amr-0-4-0" class="section level1">
|
||||||
<h1 class="page-header">
|
<h1 class="page-header">
|
||||||
<a href="#amr-040" class="anchor"></a>AMR 0.4.0<small> 2018-10-01 </small>
|
<a href="#amr-0-4-0" class="anchor"></a>AMR 0.4.0<small> 2018-10-01 </small>
|
||||||
</h1>
|
</h1>
|
||||||
<div id="new-5" class="section level4">
|
<div id="new-5" class="section level4">
|
||||||
<h4 class="hasAnchor">
|
<h4 class="hasAnchor">
|
||||||
@ -861,18 +861,18 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>They also come with support for German, Dutch, French, Italian, Spanish and Portuguese:</p>
|
<p>They also come with support for German, Dutch, French, Italian, Spanish and Portuguese:</p>
|
||||||
<div class="sourceCode" id="cb18"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb18-1" title="1"><span class="kw"><a href="../reference/mo_property.html">mo_gramstain</a></span>(<span class="st">"E. coli"</span>)</a>
|
<div class="sourceCode" id="cb18"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb18-1" data-line-number="1"><span class="kw"><a href="../reference/mo_property.html">mo_gramstain</a></span>(<span class="st">"E. coli"</span>)</a>
|
||||||
<a class="sourceLine" id="cb18-2" title="2"><span class="co"># [1] "Gram negative"</span></a>
|
<a class="sourceLine" id="cb18-2" data-line-number="2"><span class="co"># [1] "Gram negative"</span></a>
|
||||||
<a class="sourceLine" id="cb18-3" title="3"><span class="kw"><a href="../reference/mo_property.html">mo_gramstain</a></span>(<span class="st">"E. coli"</span>, <span class="dt">language =</span> <span class="st">"de"</span>) <span class="co"># German</span></a>
|
<a class="sourceLine" id="cb18-3" data-line-number="3"><span class="kw"><a href="../reference/mo_property.html">mo_gramstain</a></span>(<span class="st">"E. coli"</span>, <span class="dt">language =</span> <span class="st">"de"</span>) <span class="co"># German</span></a>
|
||||||
<a class="sourceLine" id="cb18-4" title="4"><span class="co"># [1] "Gramnegativ"</span></a>
|
<a class="sourceLine" id="cb18-4" data-line-number="4"><span class="co"># [1] "Gramnegativ"</span></a>
|
||||||
<a class="sourceLine" id="cb18-5" title="5"><span class="kw"><a href="../reference/mo_property.html">mo_gramstain</a></span>(<span class="st">"E. coli"</span>, <span class="dt">language =</span> <span class="st">"es"</span>) <span class="co"># Spanish</span></a>
|
<a class="sourceLine" id="cb18-5" data-line-number="5"><span class="kw"><a href="../reference/mo_property.html">mo_gramstain</a></span>(<span class="st">"E. coli"</span>, <span class="dt">language =</span> <span class="st">"es"</span>) <span class="co"># Spanish</span></a>
|
||||||
<a class="sourceLine" id="cb18-6" title="6"><span class="co"># [1] "Gram negativo"</span></a>
|
<a class="sourceLine" id="cb18-6" data-line-number="6"><span class="co"># [1] "Gram negativo"</span></a>
|
||||||
<a class="sourceLine" id="cb18-7" title="7"><span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"S. group A"</span>, <span class="dt">language =</span> <span class="st">"pt"</span>) <span class="co"># Portuguese</span></a>
|
<a class="sourceLine" id="cb18-7" data-line-number="7"><span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"S. group A"</span>, <span class="dt">language =</span> <span class="st">"pt"</span>) <span class="co"># Portuguese</span></a>
|
||||||
<a class="sourceLine" id="cb18-8" title="8"><span class="co"># [1] "Streptococcus grupo A"</span></a></code></pre></div>
|
<a class="sourceLine" id="cb18-8" data-line-number="8"><span class="co"># [1] "Streptococcus grupo A"</span></a></code></pre></div>
|
||||||
<p>Furthermore, former taxonomic names will give a note about the current taxonomic name:</p>
|
<p>Furthermore, former taxonomic names will give a note about the current taxonomic name:</p>
|
||||||
<div class="sourceCode" id="cb19"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb19-1" title="1"><span class="kw"><a href="../reference/mo_property.html">mo_gramstain</a></span>(<span class="st">"Esc blattae"</span>)</a>
|
<div class="sourceCode" id="cb19"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb19-1" data-line-number="1"><span class="kw"><a href="../reference/mo_property.html">mo_gramstain</a></span>(<span class="st">"Esc blattae"</span>)</a>
|
||||||
<a class="sourceLine" id="cb19-2" title="2"><span class="co"># Note: 'Escherichia blattae' (Burgess et al., 1973) was renamed 'Shimwellia blattae' (Priest and Barker, 2010)</span></a>
|
<a class="sourceLine" id="cb19-2" data-line-number="2"><span class="co"># Note: 'Escherichia blattae' (Burgess et al., 1973) was renamed 'Shimwellia blattae' (Priest and Barker, 2010)</span></a>
|
||||||
<a class="sourceLine" id="cb19-3" title="3"><span class="co"># [1] "Gram negative"</span></a></code></pre></div>
|
<a class="sourceLine" id="cb19-3" data-line-number="3"><span class="co"># [1] "Gram negative"</span></a></code></pre></div>
|
||||||
</li>
|
</li>
|
||||||
<li>Functions <code>count_R</code>, <code>count_IR</code>, <code>count_I</code>, <code>count_SI</code> and <code>count_S</code> to selectively count resistant or susceptible isolates
|
<li>Functions <code>count_R</code>, <code>count_IR</code>, <code>count_I</code>, <code>count_SI</code> and <code>count_S</code> to selectively count resistant or susceptible isolates
|
||||||
<ul>
|
<ul>
|
||||||
@ -883,18 +883,18 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
|
|||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<p>Functions <code>as.mo</code> and <code>is.mo</code> as replacements for <code>as.bactid</code> and <code>is.bactid</code> (since the <code>microoganisms</code> data set not only contains bacteria). These last two functions are deprecated and will be removed in a future release. The <code>as.mo</code> function determines microbial IDs using intelligent rules:</p>
|
<p>Functions <code>as.mo</code> and <code>is.mo</code> as replacements for <code>as.bactid</code> and <code>is.bactid</code> (since the <code>microoganisms</code> data set not only contains bacteria). These last two functions are deprecated and will be removed in a future release. The <code>as.mo</code> function determines microbial IDs using intelligent rules:</p>
|
||||||
<div class="sourceCode" id="cb20"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb20-1" title="1"><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"E. coli"</span>)</a>
|
<div class="sourceCode" id="cb20"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb20-1" data-line-number="1"><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"E. coli"</span>)</a>
|
||||||
<a class="sourceLine" id="cb20-2" title="2"><span class="co"># [1] B_ESCHR_COL</span></a>
|
<a class="sourceLine" id="cb20-2" data-line-number="2"><span class="co"># [1] B_ESCHR_COL</span></a>
|
||||||
<a class="sourceLine" id="cb20-3" title="3"><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"MRSA"</span>)</a>
|
<a class="sourceLine" id="cb20-3" data-line-number="3"><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"MRSA"</span>)</a>
|
||||||
<a class="sourceLine" id="cb20-4" title="4"><span class="co"># [1] B_STPHY_AUR</span></a>
|
<a class="sourceLine" id="cb20-4" data-line-number="4"><span class="co"># [1] B_STPHY_AUR</span></a>
|
||||||
<a class="sourceLine" id="cb20-5" title="5"><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"S group A"</span>)</a>
|
<a class="sourceLine" id="cb20-5" data-line-number="5"><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"S group A"</span>)</a>
|
||||||
<a class="sourceLine" id="cb20-6" title="6"><span class="co"># [1] B_STRPTC_GRA</span></a></code></pre></div>
|
<a class="sourceLine" id="cb20-6" data-line-number="6"><span class="co"># [1] B_STRPTC_GRA</span></a></code></pre></div>
|
||||||
<p>And with great speed too - on a quite regular Linux server from 2007 it takes us less than 0.02 seconds to transform 25,000 items:</p>
|
<p>And with great speed too - on a quite regular Linux server from 2007 it takes us less than 0.02 seconds to transform 25,000 items:</p>
|
||||||
<div class="sourceCode" id="cb21"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb21-1" title="1">thousands_of_E_colis <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/rep">rep</a></span>(<span class="st">"E. coli"</span>, <span class="dv">25000</span>)</a>
|
<div class="sourceCode" id="cb21"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb21-1" data-line-number="1">thousands_of_E_colis <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/rep">rep</a></span>(<span class="st">"E. coli"</span>, <span class="dv">25000</span>)</a>
|
||||||
<a class="sourceLine" id="cb21-2" title="2">microbenchmark<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/microbenchmark/topics/microbenchmark">microbenchmark</a></span>(<span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(thousands_of_E_colis), <span class="dt">unit =</span> <span class="st">"s"</span>)</a>
|
<a class="sourceLine" id="cb21-2" data-line-number="2">microbenchmark<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/microbenchmark/topics/microbenchmark">microbenchmark</a></span>(<span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(thousands_of_E_colis), <span class="dt">unit =</span> <span class="st">"s"</span>)</a>
|
||||||
<a class="sourceLine" id="cb21-3" title="3"><span class="co"># Unit: seconds</span></a>
|
<a class="sourceLine" id="cb21-3" data-line-number="3"><span class="co"># Unit: seconds</span></a>
|
||||||
<a class="sourceLine" id="cb21-4" title="4"><span class="co"># min median max neval</span></a>
|
<a class="sourceLine" id="cb21-4" data-line-number="4"><span class="co"># min median max neval</span></a>
|
||||||
<a class="sourceLine" id="cb21-5" title="5"><span class="co"># 0.01817717 0.01843957 0.03878077 100</span></a></code></pre></div>
|
<a class="sourceLine" id="cb21-5" data-line-number="5"><span class="co"># 0.01817717 0.01843957 0.03878077 100</span></a></code></pre></div>
|
||||||
</li>
|
</li>
|
||||||
<li>Added parameter <code>reference_df</code> for <code>as.mo</code>, so users can supply their own microbial IDs, name or codes as a reference table</li>
|
<li>Added parameter <code>reference_df</code> for <code>as.mo</code>, so users can supply their own microbial IDs, name or codes as a reference table</li>
|
||||||
<li>Renamed all previous references to <code>bactid</code> to <code>mo</code>, like:
|
<li>Renamed all previous references to <code>bactid</code> to <code>mo</code>, like:
|
||||||
@ -922,12 +922,12 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
|
|||||||
<li>Added three antimicrobial agents to the <code>antibiotics</code> data set: Terbinafine (D01BA02), Rifaximin (A07AA11) and Isoconazole (D01AC05)</li>
|
<li>Added three antimicrobial agents to the <code>antibiotics</code> data set: Terbinafine (D01BA02), Rifaximin (A07AA11) and Isoconazole (D01AC05)</li>
|
||||||
<li>
|
<li>
|
||||||
<p>Added 163 trade names to the <code>antibiotics</code> data set, it now contains 298 different trade names in total, e.g.:</p>
|
<p>Added 163 trade names to the <code>antibiotics</code> data set, it now contains 298 different trade names in total, e.g.:</p>
|
||||||
<div class="sourceCode" id="cb22"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb22-1" title="1"><span class="kw">ab_official</span>(<span class="st">"Bactroban"</span>)</a>
|
<div class="sourceCode" id="cb22"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb22-1" data-line-number="1"><span class="kw">ab_official</span>(<span class="st">"Bactroban"</span>)</a>
|
||||||
<a class="sourceLine" id="cb22-2" title="2"><span class="co"># [1] "Mupirocin"</span></a>
|
<a class="sourceLine" id="cb22-2" data-line-number="2"><span class="co"># [1] "Mupirocin"</span></a>
|
||||||
<a class="sourceLine" id="cb22-3" title="3"><span class="kw"><a href="../reference/ab_property.html">ab_name</a></span>(<span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="st">"Bactroban"</span>, <span class="st">"Amoxil"</span>, <span class="st">"Zithromax"</span>, <span class="st">"Floxapen"</span>))</a>
|
<a class="sourceLine" id="cb22-3" data-line-number="3"><span class="kw"><a href="../reference/ab_property.html">ab_name</a></span>(<span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="st">"Bactroban"</span>, <span class="st">"Amoxil"</span>, <span class="st">"Zithromax"</span>, <span class="st">"Floxapen"</span>))</a>
|
||||||
<a class="sourceLine" id="cb22-4" title="4"><span class="co"># [1] "Mupirocin" "Amoxicillin" "Azithromycin" "Flucloxacillin"</span></a>
|
<a class="sourceLine" id="cb22-4" data-line-number="4"><span class="co"># [1] "Mupirocin" "Amoxicillin" "Azithromycin" "Flucloxacillin"</span></a>
|
||||||
<a class="sourceLine" id="cb22-5" title="5"><span class="kw"><a href="../reference/ab_property.html">ab_atc</a></span>(<span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="st">"Bactroban"</span>, <span class="st">"Amoxil"</span>, <span class="st">"Zithromax"</span>, <span class="st">"Floxapen"</span>))</a>
|
<a class="sourceLine" id="cb22-5" data-line-number="5"><span class="kw"><a href="../reference/ab_property.html">ab_atc</a></span>(<span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="st">"Bactroban"</span>, <span class="st">"Amoxil"</span>, <span class="st">"Zithromax"</span>, <span class="st">"Floxapen"</span>))</a>
|
||||||
<a class="sourceLine" id="cb22-6" title="6"><span class="co"># [1] "R01AX06" "J01CA04" "J01FA10" "J01CF05"</span></a></code></pre></div>
|
<a class="sourceLine" id="cb22-6" data-line-number="6"><span class="co"># [1] "R01AX06" "J01CA04" "J01FA10" "J01CF05"</span></a></code></pre></div>
|
||||||
</li>
|
</li>
|
||||||
<li>For <code>first_isolate</code>, rows will be ignored when there’s no species available</li>
|
<li>For <code>first_isolate</code>, rows will be ignored when there’s no species available</li>
|
||||||
<li>Function <code>ratio</code> is now deprecated and will be removed in a future release, as it is not really the scope of this package</li>
|
<li>Function <code>ratio</code> is now deprecated and will be removed in a future release, as it is not really the scope of this package</li>
|
||||||
@ -938,13 +938,13 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
|
|||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<p>Support for quasiquotation in the functions series <code>count_*</code> and <code>portions_*</code>, and <code>n_rsi</code>. This allows to check for more than 2 vectors or columns.</p>
|
<p>Support for quasiquotation in the functions series <code>count_*</code> and <code>portions_*</code>, and <code>n_rsi</code>. This allows to check for more than 2 vectors or columns.</p>
|
||||||
<div class="sourceCode" id="cb23"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb23-1" title="1">septic_patients <span class="op">%>%</span><span class="st"> </span><span class="kw">select</span>(amox, cipr) <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/count.html">count_IR</a></span>()</a>
|
<div class="sourceCode" id="cb23"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb23-1" data-line-number="1">septic_patients <span class="op">%>%</span><span class="st"> </span><span class="kw">select</span>(amox, cipr) <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/count.html">count_IR</a></span>()</a>
|
||||||
<a class="sourceLine" id="cb23-2" title="2"><span class="co"># which is the same as:</span></a>
|
<a class="sourceLine" id="cb23-2" data-line-number="2"><span class="co"># which is the same as:</span></a>
|
||||||
<a class="sourceLine" id="cb23-3" title="3">septic_patients <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/count.html">count_IR</a></span>(amox, cipr)</a>
|
<a class="sourceLine" id="cb23-3" data-line-number="3">septic_patients <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/count.html">count_IR</a></span>(amox, cipr)</a>
|
||||||
<a class="sourceLine" id="cb23-4" title="4"></a>
|
<a class="sourceLine" id="cb23-4" data-line-number="4"></a>
|
||||||
<a class="sourceLine" id="cb23-5" title="5">septic_patients <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/portion.html">portion_S</a></span>(amcl)</a>
|
<a class="sourceLine" id="cb23-5" data-line-number="5">septic_patients <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/portion.html">portion_S</a></span>(amcl)</a>
|
||||||
<a class="sourceLine" id="cb23-6" title="6">septic_patients <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/portion.html">portion_S</a></span>(amcl, gent)</a>
|
<a class="sourceLine" id="cb23-6" data-line-number="6">septic_patients <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/portion.html">portion_S</a></span>(amcl, gent)</a>
|
||||||
<a class="sourceLine" id="cb23-7" title="7">septic_patients <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/portion.html">portion_S</a></span>(amcl, gent, pita)</a></code></pre></div>
|
<a class="sourceLine" id="cb23-7" data-line-number="7">septic_patients <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/portion.html">portion_S</a></span>(amcl, gent, pita)</a></code></pre></div>
|
||||||
</li>
|
</li>
|
||||||
<li>Edited <code>ggplot_rsi</code> and <code>geom_rsi</code> so they can cope with <code>count_df</code>. The new <code>fun</code> parameter has value <code>portion_df</code> at default, but can be set to <code>count_df</code>.</li>
|
<li>Edited <code>ggplot_rsi</code> and <code>geom_rsi</code> so they can cope with <code>count_df</code>. The new <code>fun</code> parameter has value <code>portion_df</code> at default, but can be set to <code>count_df</code>.</li>
|
||||||
<li>Fix for <code>ggplot_rsi</code> when the <code>ggplot2</code> package was not loaded</li>
|
<li>Fix for <code>ggplot_rsi</code> when the <code>ggplot2</code> package was not loaded</li>
|
||||||
@ -958,12 +958,12 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
|
|||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<p>Support for types (classes) list and matrix for <code>freq</code></p>
|
<p>Support for types (classes) list and matrix for <code>freq</code></p>
|
||||||
<div class="sourceCode" id="cb24"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb24-1" title="1">my_matrix =<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/with">with</a></span>(septic_patients, <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/matrix">matrix</a></span>(<span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(age, gender), <span class="dt">ncol =</span> <span class="dv">2</span>))</a>
|
<div class="sourceCode" id="cb24"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb24-1" data-line-number="1">my_matrix =<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/with">with</a></span>(septic_patients, <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/matrix">matrix</a></span>(<span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(age, gender), <span class="dt">ncol =</span> <span class="dv">2</span>))</a>
|
||||||
<a class="sourceLine" id="cb24-2" title="2"><span class="kw"><a href="../reference/freq.html">freq</a></span>(my_matrix)</a></code></pre></div>
|
<a class="sourceLine" id="cb24-2" data-line-number="2"><span class="kw"><a href="../reference/freq.html">freq</a></span>(my_matrix)</a></code></pre></div>
|
||||||
<p>For lists, subsetting is possible:</p>
|
<p>For lists, subsetting is possible:</p>
|
||||||
<div class="sourceCode" id="cb25"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb25-1" title="1">my_list =<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/list">list</a></span>(<span class="dt">age =</span> septic_patients<span class="op">$</span>age, <span class="dt">gender =</span> septic_patients<span class="op">$</span>gender)</a>
|
<div class="sourceCode" id="cb25"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb25-1" data-line-number="1">my_list =<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/list">list</a></span>(<span class="dt">age =</span> septic_patients<span class="op">$</span>age, <span class="dt">gender =</span> septic_patients<span class="op">$</span>gender)</a>
|
||||||
<a class="sourceLine" id="cb25-2" title="2">my_list <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(age)</a>
|
<a class="sourceLine" id="cb25-2" data-line-number="2">my_list <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(age)</a>
|
||||||
<a class="sourceLine" id="cb25-3" title="3">my_list <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(gender)</a></code></pre></div>
|
<a class="sourceLine" id="cb25-3" data-line-number="3">my_list <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(gender)</a></code></pre></div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@ -975,9 +975,9 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="amr-030" class="section level1">
|
<div id="amr-0-3-0" class="section level1">
|
||||||
<h1 class="page-header">
|
<h1 class="page-header">
|
||||||
<a href="#amr-030" class="anchor"></a>AMR 0.3.0<small> 2018-08-14 </small>
|
<a href="#amr-0-3-0" class="anchor"></a>AMR 0.3.0<small> 2018-08-14 </small>
|
||||||
</h1>
|
</h1>
|
||||||
<div id="new-6" class="section level4">
|
<div id="new-6" class="section level4">
|
||||||
<h4 class="hasAnchor">
|
<h4 class="hasAnchor">
|
||||||
@ -1082,7 +1082,7 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li>Now possible to coerce MIC values with a space between operator and value, i.e. <code><a href="../reference/as.mic.html">as.mic("<= 0.002")</a></code> now works</li>
|
<li>Now possible to coerce MIC values with a space between operator and value, i.e. <code><a href="../reference/as.mic.html">as.mic("<= 0.002")</a></code> now works</li>
|
||||||
<li>Classes <code>rsi</code> and <code>mic</code> do not add the attribute <code>package.version</code> anymore</li>
|
<li>Classes <code>rsi</code> and <code>mic</code> do not add the attribute <code>package.version</code> anymore</li>
|
||||||
<li>Added <code>"groups"</code> option for <code>atc_property(..., property)</code>. It will return a vector of the ATC hierarchy as defined by the <a href="https://www.whocc.no/atc/structure_and_principles/">WHO</a>. The new function <code>atc_groups</code> is a convenient wrapper around this.</li>
|
<li>Added <code>"groups"</code> option for <code>atc_property(..., property)</code>. It will return a vector of the ATC hierarchy as defined by the <a href="https://www.whocc.no/atc/structure_and_principles/">WHO</a>. The new function <code>atc_groups</code> is a convenient wrapper around this.</li>
|
||||||
<li>Build-in host check for <code>atc_property</code> as it requires the host set by <code>url</code> to be responsive</li>
|
<li>Build-in host check for <code>atc_property</code> as it requires the host set by <code>url</code> to be responsive</li>
|
||||||
@ -1112,9 +1112,9 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="amr-020" class="section level1">
|
<div id="amr-0-2-0" class="section level1">
|
||||||
<h1 class="page-header">
|
<h1 class="page-header">
|
||||||
<a href="#amr-020" class="anchor"></a>AMR 0.2.0<small> 2018-05-03 </small>
|
<a href="#amr-0-2-0" class="anchor"></a>AMR 0.2.0<small> 2018-05-03 </small>
|
||||||
</h1>
|
</h1>
|
||||||
<div id="new-7" class="section level4">
|
<div id="new-7" class="section level4">
|
||||||
<h4 class="hasAnchor">
|
<h4 class="hasAnchor">
|
||||||
@ -1170,9 +1170,9 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="amr-011" class="section level1">
|
<div id="amr-0-1-1" class="section level1">
|
||||||
<h1 class="page-header">
|
<h1 class="page-header">
|
||||||
<a href="#amr-011" class="anchor"></a>AMR 0.1.1<small> 2018-03-14 </small>
|
<a href="#amr-0-1-1" class="anchor"></a>AMR 0.1.1<small> 2018-03-14 </small>
|
||||||
</h1>
|
</h1>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
@ -1183,9 +1183,9 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
|
|||||||
<li>Added barplots for <code>rsi</code> and <code>mic</code> classes</li>
|
<li>Added barplots for <code>rsi</code> and <code>mic</code> classes</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div id="amr-010" class="section level1">
|
<div id="amr-0-1-0" class="section level1">
|
||||||
<h1 class="page-header">
|
<h1 class="page-header">
|
||||||
<a href="#amr-010" class="anchor"></a>AMR 0.1.0<small> 2018-02-22 </small>
|
<a href="#amr-0-1-0" class="anchor"></a>AMR 0.1.0<small> 2018-02-22 </small>
|
||||||
</h1>
|
</h1>
|
||||||
<ul>
|
<ul>
|
||||||
<li>First submission to CRAN.</li>
|
<li>First submission to CRAN.</li>
|
||||||
@ -1197,17 +1197,17 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
|
|||||||
<div id="tocnav">
|
<div id="tocnav">
|
||||||
<h2>Contents</h2>
|
<h2>Contents</h2>
|
||||||
<ul class="nav nav-pills nav-stacked">
|
<ul class="nav nav-pills nav-stacked">
|
||||||
<li><a href="#amr-0719010">0.7.1.9010</a></li>
|
<li><a href="#amr-0-7-1-9012">0.7.1.9012</a></li>
|
||||||
<li><a href="#amr-071">0.7.1</a></li>
|
<li><a href="#amr-0-7-1">0.7.1</a></li>
|
||||||
<li><a href="#amr-070">0.7.0</a></li>
|
<li><a href="#amr-0-7-0">0.7.0</a></li>
|
||||||
<li><a href="#amr-061">0.6.1</a></li>
|
<li><a href="#amr-0-6-1">0.6.1</a></li>
|
||||||
<li><a href="#amr-060">0.6.0</a></li>
|
<li><a href="#amr-0-6-0">0.6.0</a></li>
|
||||||
<li><a href="#amr-050">0.5.0</a></li>
|
<li><a href="#amr-0-5-0">0.5.0</a></li>
|
||||||
<li><a href="#amr-040">0.4.0</a></li>
|
<li><a href="#amr-0-4-0">0.4.0</a></li>
|
||||||
<li><a href="#amr-030">0.3.0</a></li>
|
<li><a href="#amr-0-3-0">0.3.0</a></li>
|
||||||
<li><a href="#amr-020">0.2.0</a></li>
|
<li><a href="#amr-0-2-0">0.2.0</a></li>
|
||||||
<li><a href="#amr-011">0.1.1</a></li>
|
<li><a href="#amr-0-1-1">0.1.1</a></li>
|
||||||
<li><a href="#amr-010">0.1.0</a></li>
|
<li><a href="#amr-0-1-0">0.1.0</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
pandoc: '2.6'
|
pandoc: 2.3.1
|
||||||
pkgdown: 1.3.0
|
pkgdown: 1.3.0
|
||||||
pkgdown_sha: ~
|
pkgdown_sha: ~
|
||||||
articles:
|
articles:
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9007</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9005</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -1,337 +0,0 @@
|
|||||||
<!-- Generated by pkgdown: do not edit by hand -->
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
|
|
||||||
<title>ITIS: Integrated Taxonomic Information System — ITIS • AMR (for R)</title>
|
|
||||||
|
|
||||||
<!-- favicons -->
|
|
||||||
<link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png">
|
|
||||||
<link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png">
|
|
||||||
<link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png" />
|
|
||||||
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png" />
|
|
||||||
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png" />
|
|
||||||
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png" />
|
|
||||||
<!-- jquery -->
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
|
|
||||||
<!-- Bootstrap -->
|
|
||||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.3.7/flatly/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous" />
|
|
||||||
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
|
|
||||||
|
|
||||||
<!-- Font Awesome icons -->
|
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
|
|
||||||
|
|
||||||
<!-- clipboard.js -->
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
|
|
||||||
|
|
||||||
<!-- sticky kit -->
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
|
|
||||||
|
|
||||||
<!-- pkgdown -->
|
|
||||||
<link href="../pkgdown.css" rel="stylesheet">
|
|
||||||
<script src="../pkgdown.js"></script>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- docsearch -->
|
|
||||||
<script src="../docsearch.js"></script>
|
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/docsearch.js/2.6.1/docsearch.min.css" integrity="sha256-QOSRU/ra9ActyXkIBbiIB144aDBdtvXBcNc3OTNuX/Q=" crossorigin="anonymous" />
|
|
||||||
<link href="../docsearch.css" rel="stylesheet">
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/jquery.mark.min.js" integrity="sha256-4HLtjeVgH0eIB3aZ9mLYF6E8oU5chNdjU6p6rrXpl9U=" crossorigin="anonymous"></script>
|
|
||||||
|
|
||||||
|
|
||||||
<link href="../extra.css" rel="stylesheet">
|
|
||||||
<script src="../extra.js"></script>
|
|
||||||
<meta property="og:title" content="ITIS: Integrated Taxonomic Information System — ITIS" />
|
|
||||||
|
|
||||||
<meta property="og:description" content="All taxonomic names of all microorganisms are included in this package, using the authoritative Integrated Taxonomic Information System (ITIS)." />
|
|
||||||
|
|
||||||
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
|
|
||||||
<meta name="twitter:card" content="summary" />
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- mathjax -->
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
|
|
||||||
|
|
||||||
<!--[if lt IE 9]>
|
|
||||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
|
||||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
|
||||||
<![endif]-->
|
|
||||||
|
|
||||||
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<div class="container template-reference-topic">
|
|
||||||
<header>
|
|
||||||
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
|
|
||||||
<div class="container">
|
|
||||||
<div class="navbar-header">
|
|
||||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
|
|
||||||
<span class="sr-only">Toggle navigation</span>
|
|
||||||
<span class="icon-bar"></span>
|
|
||||||
<span class="icon-bar"></span>
|
|
||||||
<span class="icon-bar"></span>
|
|
||||||
</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">0.5.0.9018</span>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="navbar" class="navbar-collapse collapse">
|
|
||||||
<ul class="nav navbar-nav">
|
|
||||||
<li>
|
|
||||||
<a href="../index.html">
|
|
||||||
<span class="fa fa-home"></span>
|
|
||||||
|
|
||||||
Home
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li class="dropdown">
|
|
||||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
|
||||||
<span class="fa fa-question-circle"></span>
|
|
||||||
|
|
||||||
How to
|
|
||||||
|
|
||||||
<span class="caret"></span>
|
|
||||||
</a>
|
|
||||||
<ul class="dropdown-menu" role="menu">
|
|
||||||
<li>
|
|
||||||
<a href="../articles/AMR.html">
|
|
||||||
<span class="fa fa-directions"></span>
|
|
||||||
|
|
||||||
Conduct AMR analysis
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="../articles/resistance_predict.html">
|
|
||||||
<span class="fa fa-dice"></span>
|
|
||||||
|
|
||||||
Predict antimicrobial resistance
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="../articles/WHONET.html">
|
|
||||||
<span class="fa fa-globe-americas"></span>
|
|
||||||
|
|
||||||
Work with WHONET data
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="../articles/SPSS.html">
|
|
||||||
<span class="fa fa-file-upload"></span>
|
|
||||||
|
|
||||||
Import data from SPSS/SAS/Stata
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="../articles/EUCAST.html">
|
|
||||||
<span class="fa fa-exchange-alt"></span>
|
|
||||||
|
|
||||||
Apply EUCAST rules
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="../reference/mo_property.html">
|
|
||||||
<span class="fa fa-bug"></span>
|
|
||||||
|
|
||||||
Get properties of a microorganism
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="../reference/atc_property.html">
|
|
||||||
<span class="fa fa-capsules"></span>
|
|
||||||
|
|
||||||
Get properties of an antibiotic
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="../articles/freq.html">
|
|
||||||
<span class="fa fa-sort-amount-down"></span>
|
|
||||||
|
|
||||||
Create frequency tables
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="../articles/G_test.html">
|
|
||||||
<span class="fa fa-clipboard-check"></span>
|
|
||||||
|
|
||||||
Use the G-test
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="../articles/benchmarks.html">
|
|
||||||
<span class="fa fa-shipping-fast"></span>
|
|
||||||
|
|
||||||
Other: benchmarks
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="../reference/">
|
|
||||||
<span class="fa fa-book-open"></span>
|
|
||||||
|
|
||||||
Manual
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="../authors.html">
|
|
||||||
<span class="fa fa-users"></span>
|
|
||||||
|
|
||||||
Authors
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="../news/">
|
|
||||||
<span class="far fa far fa-newspaper"></span>
|
|
||||||
|
|
||||||
Changelog
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<ul class="nav navbar-nav navbar-right">
|
|
||||||
<li>
|
|
||||||
<a href="https://gitlab.com/msberends/AMR">
|
|
||||||
<span class="fab fa fab fa-gitlab"></span>
|
|
||||||
|
|
||||||
Source Code
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="../LICENSE-text.html">
|
|
||||||
<span class="fa fa-book"></span>
|
|
||||||
|
|
||||||
Licence
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<form class="navbar-form navbar-right" role="search">
|
|
||||||
<div class="form-group">
|
|
||||||
<input type="search" class="form-control" name="search-input" id="search-input" placeholder="Search..." aria-label="Search for..." autocomplete="off">
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
</div><!--/.nav-collapse -->
|
|
||||||
</div><!--/.container -->
|
|
||||||
</div><!--/.navbar -->
|
|
||||||
|
|
||||||
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-9 contents">
|
|
||||||
<div class="page-header">
|
|
||||||
<h1>ITIS: Integrated Taxonomic Information System</h1>
|
|
||||||
|
|
||||||
<div class="hidden name"><code>ITIS.Rd</code></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="ref-description">
|
|
||||||
|
|
||||||
<p>All taxonomic names of all microorganisms are included in this package, using the authoritative Integrated Taxonomic Information System (ITIS).</p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<h2 class="hasAnchor" id="itis"><a class="anchor" href="#itis"></a>ITIS</h2>
|
|
||||||
|
|
||||||
|
|
||||||
<p><img src='figures/logo_itis.jpg' height=60px style=margin-bottom:5px /> <br />
|
|
||||||
This package contains the <strong>complete microbial taxonomic data</strong> (with all nine taxonomic ranks - from kingdom to subspecies) from the publicly available Integrated Taxonomic Information System (ITIS, <a href='https://www.itis.gov'>https://www.itis.gov</a>).</p>
|
|
||||||
<p>All ~20,000 (sub)species from <strong>the taxonomic kingdoms Bacteria, Fungi and Protozoa are included in this package</strong>, as well as all their ~2,500 previously accepted names known to ITIS. Furthermore, the responsible authors and year of publication are available. This allows users to use authoritative taxonomic information for their data analysis on any microorganism, not only human pathogens. It also helps to quickly determine the Gram stain of bacteria, since ITIS honours the taxonomic branching order of bacterial phyla according to Cavalier-Smith (2002), which defines that all bacteria are classified into either subkingdom Negibacteria or subkingdom Posibacteria.</p>
|
|
||||||
<p>ITIS is a partnership of U.S., Canadian, and Mexican agencies and taxonomic specialists [3].</p>
|
|
||||||
|
|
||||||
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
|
|
||||||
|
|
||||||
|
|
||||||
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
|
|
||||||
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR analysis, the <a href='https://msberends.gitlab.io/AMR/reference'>complete documentation of all functions</a> (which reads a lot easier than here in R) and <a href='https://msberends.gitlab.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
|
|
||||||
<pre class="examples"><span class='co'># NOT RUN {</span>
|
|
||||||
<span class='co'># Get a note when a species was renamed</span>
|
|
||||||
<span class='fu'><a href='mo_property.html'>mo_shortname</a></span>(<span class='st'>"Chlamydia psittaci"</span>)
|
|
||||||
<span class='co'># Note: 'Chlamydia psittaci' (Page, 1968) was renamed</span>
|
|
||||||
<span class='co'># 'Chlamydophila psittaci' (Everett et al., 1999)</span>
|
|
||||||
<span class='co'># [1] "C. psittaci"</span>
|
|
||||||
|
|
||||||
<span class='co'># Get any property from the entire taxonomic tree for all included species</span>
|
|
||||||
<span class='fu'><a href='mo_property.html'>mo_class</a></span>(<span class='st'>"E. coli"</span>)
|
|
||||||
<span class='co'># [1] "Gammaproteobacteria"</span>
|
|
||||||
|
|
||||||
<span class='fu'><a href='mo_property.html'>mo_family</a></span>(<span class='st'>"E. coli"</span>)
|
|
||||||
<span class='co'># [1] "Enterobacteriaceae"</span>
|
|
||||||
|
|
||||||
<span class='fu'><a href='mo_property.html'>mo_subkingdom</a></span>(<span class='st'>"E. coli"</span>)
|
|
||||||
<span class='co'># [1] "Negibacteria"</span>
|
|
||||||
|
|
||||||
<span class='fu'><a href='mo_property.html'>mo_gramstain</a></span>(<span class='st'>"E. coli"</span>) <span class='co'># based on subkingdom</span>
|
|
||||||
<span class='co'># [1] "Gram negative"</span>
|
|
||||||
|
|
||||||
<span class='fu'><a href='mo_property.html'>mo_ref</a></span>(<span class='st'>"E. coli"</span>)
|
|
||||||
<span class='co'># [1] "Castellani and Chalmers, 1919"</span>
|
|
||||||
|
|
||||||
<span class='co'># Do not get mistaken - the package only includes microorganisms</span>
|
|
||||||
<span class='fu'><a href='mo_property.html'>mo_phylum</a></span>(<span class='st'>"C. elegans"</span>)
|
|
||||||
<span class='co'># [1] "Cyanobacteria" # Bacteria?!</span>
|
|
||||||
<span class='fu'><a href='mo_property.html'>mo_fullname</a></span>(<span class='st'>"C. elegans"</span>)
|
|
||||||
<span class='co'># [1] "Chroococcus limneticus elegans" # Because a microorganism was found</span>
|
|
||||||
<span class='co'># }</span></pre>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
|
|
||||||
<h2>Contents</h2>
|
|
||||||
<ul class="nav nav-pills nav-stacked">
|
|
||||||
|
|
||||||
<li><a href="#itis">ITIS</a></li>
|
|
||||||
|
|
||||||
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
|
|
||||||
|
|
||||||
<li><a href="#examples">Examples</a></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<footer>
|
|
||||||
<div class="copyright">
|
|
||||||
<p>Developed by <a href='https://www.rug.nl/staff/m.s.berends/'>Matthijs S. Berends</a>, <a href='https://www.rug.nl/staff/c.f.luz/'>Christian F. Luz</a>, <a href='https://www.rug.nl/staff/c.glasner/'>Corinna Glasner</a>, <a href='https://www.rug.nl/staff/a.w.friedrich/'>Alex W. Friedrich</a>, <a href='https://www.rug.nl/staff/b.sinha/'>Bhanu N. M. Sinha</a>.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="pkgdown">
|
|
||||||
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
|
|
||||||
</div>
|
|
||||||
</footer>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/docsearch.js/2.6.1/docsearch.min.js" integrity="sha256-GKvGqXDznoRYHCwKXGnuchvKSwmx9SRMrZOTh2g4Sb0=" crossorigin="anonymous"></script>
|
|
||||||
<script>
|
|
||||||
docsearch({
|
|
||||||
|
|
||||||
|
|
||||||
apiKey: 'f737050abfd4d726c63938e18f8c496e',
|
|
||||||
indexName: 'amr',
|
|
||||||
inputSelector: 'input#search-input.form-control',
|
|
||||||
transformData: function(hits) {
|
|
||||||
return hits.map(function (hit) {
|
|
||||||
hit.url = updateHitURL(hit);
|
|
||||||
return hit;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
@ -80,7 +80,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9009</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9007</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9005</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9005</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9005</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9009</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9009</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9005</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9005</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9007</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9005</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9005</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ count_R and count_IR can be used to count resistant isolates, count_S and count_
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9007</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9010</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9005</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9005</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9005</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9005</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9007</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9005</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9010</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -1,316 +0,0 @@
|
|||||||
<!-- Generated by pkgdown: do not edit by hand -->
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
|
|
||||||
<title>ITIS: Integrated Taxonomic Information System — itis • AMR (for R)</title>
|
|
||||||
|
|
||||||
<!-- favicons -->
|
|
||||||
<link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png">
|
|
||||||
<link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png">
|
|
||||||
<link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png" />
|
|
||||||
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png" />
|
|
||||||
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png" />
|
|
||||||
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png" />
|
|
||||||
<!-- jquery -->
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
|
|
||||||
<!-- Bootstrap -->
|
|
||||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.3.7/flatly/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous" />
|
|
||||||
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
|
|
||||||
|
|
||||||
<!-- Font Awesome icons -->
|
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
|
|
||||||
|
|
||||||
<!-- clipboard.js -->
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
|
|
||||||
|
|
||||||
<!-- sticky kit -->
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
|
|
||||||
|
|
||||||
<!-- pkgdown -->
|
|
||||||
<link href="../pkgdown.css" rel="stylesheet">
|
|
||||||
<script src="../pkgdown.js"></script>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- docsearch -->
|
|
||||||
<script src="../docsearch.js"></script>
|
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/docsearch.js/2.6.1/docsearch.min.css" integrity="sha256-QOSRU/ra9ActyXkIBbiIB144aDBdtvXBcNc3OTNuX/Q=" crossorigin="anonymous" />
|
|
||||||
<link href="../docsearch.css" rel="stylesheet">
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/jquery.mark.min.js" integrity="sha256-4HLtjeVgH0eIB3aZ9mLYF6E8oU5chNdjU6p6rrXpl9U=" crossorigin="anonymous"></script>
|
|
||||||
|
|
||||||
|
|
||||||
<link href="../extra.css" rel="stylesheet">
|
|
||||||
<script src="../extra.js"></script>
|
|
||||||
<meta property="og:title" content="ITIS: Integrated Taxonomic Information System — itis" />
|
|
||||||
|
|
||||||
<meta property="og:description" content="All taxonomic names of all microorganisms are included in this package, using the authoritative Integrated Taxonomic Information System (ITIS)." />
|
|
||||||
|
|
||||||
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
|
|
||||||
<meta name="twitter:card" content="summary" />
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- mathjax -->
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
|
|
||||||
|
|
||||||
<!--[if lt IE 9]>
|
|
||||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
|
||||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
|
||||||
<![endif]-->
|
|
||||||
|
|
||||||
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<div class="container template-reference-topic">
|
|
||||||
<header>
|
|
||||||
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
|
|
||||||
<div class="container">
|
|
||||||
<div class="navbar-header">
|
|
||||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
|
|
||||||
<span class="sr-only">Toggle navigation</span>
|
|
||||||
<span class="icon-bar"></span>
|
|
||||||
<span class="icon-bar"></span>
|
|
||||||
<span class="icon-bar"></span>
|
|
||||||
</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">0.5.0.9009</span>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="navbar" class="navbar-collapse collapse">
|
|
||||||
<ul class="nav navbar-nav">
|
|
||||||
<li>
|
|
||||||
<a href="../index.html">
|
|
||||||
<span class="fa fa-home"></span>
|
|
||||||
|
|
||||||
Home
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li class="dropdown">
|
|
||||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
|
||||||
<span class="fa fa-question-circle"></span>
|
|
||||||
|
|
||||||
How to
|
|
||||||
|
|
||||||
<span class="caret"></span>
|
|
||||||
</a>
|
|
||||||
<ul class="dropdown-menu" role="menu">
|
|
||||||
<li>
|
|
||||||
<a href="../articles/AMR.html">
|
|
||||||
<span class="fa fa-directions"></span>
|
|
||||||
|
|
||||||
Conduct AMR analysis
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="../articles/Predict.html">
|
|
||||||
<span class="fa fa-dice"></span>
|
|
||||||
|
|
||||||
Predict antimicrobial resistance
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="../articles/EUCAST.html">
|
|
||||||
<span class="fa fa-exchange-alt"></span>
|
|
||||||
|
|
||||||
Apply EUCAST rules
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="../articles/mo_property.html">
|
|
||||||
<span class="fa fa-bug"></span>
|
|
||||||
|
|
||||||
Get properties of a microorganism
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="../articles/ab_property.html">
|
|
||||||
<span class="fa fa-capsules"></span>
|
|
||||||
|
|
||||||
Get properties of an antibiotic
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="../articles/freq.html">
|
|
||||||
<span class="fa fa-sort-amount-down"></span>
|
|
||||||
|
|
||||||
Create frequency tables
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="../articles/G_test.html">
|
|
||||||
<span class="fa fa-clipboard-check"></span>
|
|
||||||
|
|
||||||
Use the G-test
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="../reference/">
|
|
||||||
<span class="fa fa-book-open"></span>
|
|
||||||
|
|
||||||
Manual
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="../authors.html">
|
|
||||||
<span class="fa fa-users"></span>
|
|
||||||
|
|
||||||
Authors
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="../news/">
|
|
||||||
<span class="far fa far fa-newspaper"></span>
|
|
||||||
|
|
||||||
Changelog
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<ul class="nav navbar-nav navbar-right">
|
|
||||||
<li>
|
|
||||||
<a href="https://gitlab.com/msberends/AMR">
|
|
||||||
<span class="fab fa fab fa-gitlab"></span>
|
|
||||||
|
|
||||||
Source Code
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="../LICENSE-text.html">
|
|
||||||
<span class="fa fa-book"></span>
|
|
||||||
|
|
||||||
Licence
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<form class="navbar-form navbar-right" role="search">
|
|
||||||
<div class="form-group">
|
|
||||||
<input type="search" class="form-control" name="search-input" id="search-input" placeholder="Search..." aria-label="Search for..." autocomplete="off">
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
</div><!--/.nav-collapse -->
|
|
||||||
</div><!--/.container -->
|
|
||||||
</div><!--/.navbar -->
|
|
||||||
|
|
||||||
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-9 contents">
|
|
||||||
<div class="page-header">
|
|
||||||
<h1>ITIS: Integrated Taxonomic Information System</h1>
|
|
||||||
|
|
||||||
<div class="hidden name"><code>itis.Rd</code></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="ref-description">
|
|
||||||
|
|
||||||
<p>All taxonomic names of all microorganisms are included in this package, using the authoritative Integrated Taxonomic Information System (ITIS).</p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<h2 class="hasAnchor" id="itis"><a class="anchor" href="#itis"></a>ITIS</h2>
|
|
||||||
|
|
||||||
|
|
||||||
<p><img src='figures/itis_logo.jpg' height=60px style=margin-bottom:5px /> <br />
|
|
||||||
This package contains the <strong>complete microbial taxonomic data</strong> (with all nine taxonomic ranks - from kingdom to subspecies) from the publicly available Integrated Taxonomic Information System (ITIS, <a href='https://www.itis.gov'>https://www.itis.gov</a>).</p>
|
|
||||||
<p>All (sub)species from <strong>the taxonomic kingdoms Bacteria, Fungi and Protozoa are included in this package</strong>, as well as all previously accepted names known to ITIS. Furthermore, the responsible authors and year of publication are available. This allows users to use authoritative taxonomic information for their data analysis on any microorganism, not only human pathogens. It also helps to quickly determine the Gram stain of bacteria, since all bacteria are classified into subkingdom Negibacteria or Posibacteria.</p>
|
|
||||||
<p>ITIS is a partnership of U.S., Canadian, and Mexican agencies and taxonomic specialists [3].</p>
|
|
||||||
|
|
||||||
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
|
|
||||||
|
|
||||||
|
|
||||||
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
|
|
||||||
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
|
|
||||||
<pre class="examples"><span class='co'># NOT RUN {</span>
|
|
||||||
<span class='co'># Get a note when a species was renamed</span>
|
|
||||||
<span class='fu'><a href='mo_property.html'>mo_shortname</a></span>(<span class='st'>"Chlamydia psittaci"</span>)
|
|
||||||
<span class='co'># Note: 'Chlamydia psittaci' (Page, 1968) was renamed </span>
|
|
||||||
<span class='co'># 'Chlamydophila psittaci' (Everett et al., 1999)</span>
|
|
||||||
<span class='co'># [1] "C. psittaci"</span>
|
|
||||||
|
|
||||||
<span class='co'># Get any property from the entire taxonomic tree for all included species</span>
|
|
||||||
<span class='fu'><a href='mo_property.html'>mo_class</a></span>(<span class='st'>"E. coli"</span>)
|
|
||||||
<span class='co'># [1] "Gammaproteobacteria"</span>
|
|
||||||
|
|
||||||
<span class='fu'><a href='mo_property.html'>mo_family</a></span>(<span class='st'>"E. coli"</span>)
|
|
||||||
<span class='co'># [1] "Enterobacteriaceae"</span>
|
|
||||||
|
|
||||||
<span class='fu'><a href='mo_property.html'>mo_subkingdom</a></span>(<span class='st'>"E. coli"</span>)
|
|
||||||
<span class='co'># [1] "Negibacteria"</span>
|
|
||||||
|
|
||||||
<span class='fu'><a href='mo_property.html'>mo_gramstain</a></span>(<span class='st'>"E. coli"</span>) <span class='co'># based on subkingdom</span>
|
|
||||||
<span class='co'># [1] "Gram negative"</span>
|
|
||||||
|
|
||||||
<span class='fu'><a href='mo_property.html'>mo_ref</a></span>(<span class='st'>"E. coli"</span>)
|
|
||||||
<span class='co'># [1] "Castellani and Chalmers, 1919"</span>
|
|
||||||
|
|
||||||
<span class='co'># Do not get mistaken - the package only includes microorganisms</span>
|
|
||||||
<span class='fu'><a href='mo_property.html'>mo_phylum</a></span>(<span class='st'>"C. elegans"</span>)
|
|
||||||
<span class='co'># [1] "Cyanobacteria" # Bacteria?!</span>
|
|
||||||
<span class='fu'><a href='mo_property.html'>mo_fullname</a></span>(<span class='st'>"C. elegans"</span>)
|
|
||||||
<span class='co'># [1] "Chroococcus limneticus elegans" # Because a microorganism was found</span>
|
|
||||||
<span class='co'># }</span></pre>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
|
|
||||||
<h2>Contents</h2>
|
|
||||||
<ul class="nav nav-pills nav-stacked">
|
|
||||||
|
|
||||||
<li><a href="#itis">ITIS</a></li>
|
|
||||||
|
|
||||||
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
|
|
||||||
|
|
||||||
<li><a href="#examples">Examples</a></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<footer>
|
|
||||||
<div class="copyright">
|
|
||||||
<p>Developed by <a href='https://www.rug.nl/staff/m.s.berends/'>Matthijs S. Berends</a>, <a href='https://www.rug.nl/staff/c.f.luz/'>Christian F. Luz</a>, <a href='https://www.rug.nl/staff/c.glasner/'>Corinna Glasner</a>, <a href='https://www.rug.nl/staff/a.w.friedrich/'>Alex W. Friedrich</a>, <a href='https://www.rug.nl/staff/b.sinha/'>Bhanu N. M. Sinha</a>.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="pkgdown">
|
|
||||||
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
|
|
||||||
</div>
|
|
||||||
</footer>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/docsearch.js/2.6.1/docsearch.min.js" integrity="sha256-GKvGqXDznoRYHCwKXGnuchvKSwmx9SRMrZOTh2g4Sb0=" crossorigin="anonymous"></script>
|
|
||||||
<script>
|
|
||||||
docsearch({
|
|
||||||
|
|
||||||
|
|
||||||
apiKey: 'f737050abfd4d726c63938e18f8c496e',
|
|
||||||
indexName: 'amr',
|
|
||||||
inputSelector: 'input#search-input.form-control',
|
|
||||||
transformData: function(hits) {
|
|
||||||
return hits.map(function (hit) {
|
|
||||||
hit.url = updateHitURL(hit);
|
|
||||||
return hit;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
@ -80,7 +80,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9005</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9005</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9005</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9005</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9009</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ This is the fastest way to have your organisation (or analysis) specific codes p
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9005</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9005</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ portion_R and portion_IR can be used to calculate resistance, portion_S and port
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9007</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9005</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9005</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9005</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9007</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ When negative: the left tail is longer; the mass of the distribution is concentr
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9005</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9005</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.1.9012</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -50,6 +50,7 @@ test_that("mo_property works", {
|
|||||||
expect_equal(mo_year("Escherichia coli"), 1919)
|
expect_equal(mo_year("Escherichia coli"), 1919)
|
||||||
|
|
||||||
expect_equal(mo_shortname("Escherichia coli"), "E. coli")
|
expect_equal(mo_shortname("Escherichia coli"), "E. coli")
|
||||||
|
expect_equal(mo_shortname("Escherichia"), "E. spp.")
|
||||||
expect_equal(mo_shortname("Staphylococcus aureus"), "S. aureus")
|
expect_equal(mo_shortname("Staphylococcus aureus"), "S. aureus")
|
||||||
expect_equal(mo_shortname("Staphylococcus aureus", Becker = TRUE), "S. aureus")
|
expect_equal(mo_shortname("Staphylococcus aureus", Becker = TRUE), "S. aureus")
|
||||||
expect_equal(mo_shortname("Staphylococcus aureus", Becker = "all", language = "en"), "CoPS")
|
expect_equal(mo_shortname("Staphylococcus aureus", Becker = "all", language = "en"), "CoPS")
|
||||||
|