Built site for AMR: 2.0.0.9003@c28cfa3

This commit is contained in:
github-actions 2023-03-16 08:03:33 +00:00
parent f56524ba9c
commit bd4f12016d
91 changed files with 417 additions and 413 deletions

View File

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

View File

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

View File

@ -38,7 +38,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.0.0.9002</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.0.0.9003</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -187,7 +187,7 @@
website update since they are based on randomly created values and the
page was written in <a href="https://rmarkdown.rstudio.com/" class="external-link">R
Markdown</a>. However, the methodology remains unchanged. This page was
generated on 14 March 2023.</p>
generated on 16 March 2023.</p>
<div class="section level2">
<h2 id="introduction">Introduction<a class="anchor" aria-label="anchor" href="#introduction"></a>
</h2>
@ -243,21 +243,21 @@ make the structure of your data generally look like this:</p>
</tr></thead>
<tbody>
<tr class="odd">
<td align="center">2023-03-14</td>
<td align="center">2023-03-16</td>
<td align="center">abcd</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
<td align="center">S</td>
</tr>
<tr class="even">
<td align="center">2023-03-14</td>
<td align="center">2023-03-16</td>
<td align="center">abcd</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
<td align="center">R</td>
</tr>
<tr class="odd">
<td align="center">2023-03-14</td>
<td align="center">2023-03-16</td>
<td align="center">efgh</td>
<td align="center">Escherichia coli</td>
<td align="center">R</td>
@ -962,110 +962,110 @@ antibiograms:</p>
<tr class="odd">
<td align="left">Cardial</td>
<td align="left">
<em>E. coli</em> (428-428)</td>
<td align="right">64</td>
<td align="right">60</td>
<em>E. coli</em> (386-386)</td>
<td align="right">61</td>
<td align="right">58</td>
<td align="right">57</td>
<td align="right">60</td>
<td align="right">62</td>
</tr>
<tr class="even">
<td align="left">Respiratory</td>
<td align="left">
<em>E. coli</em> (409-409)</td>
<td align="right">64</td>
<em>E. coli</em> (400-400)</td>
<td align="right">65</td>
<td align="right">61</td>
<td align="right">56</td>
<td align="right">58</td>
<td align="right">63</td>
<td align="right">62</td>
</tr>
<tr class="odd">
<td align="left">Rheumatic</td>
<td align="left">
<em>E. coli</em> (413-413)</td>
<td align="right">63</td>
<td align="right">59</td>
<td align="right">58</td>
<td align="right">66</td>
</tr>
<tr class="even">
<td align="left">Cardial</td>
<td align="left">
<em>K. pneumoniae</em> (96-96)</td>
<td align="right">71</td>
<td align="right">53</td>
<td align="right">64</td>
<td align="right">64</td>
</tr>
<tr class="odd">
<td align="left">Respiratory</td>
<td align="left">
<em>K. pneumoniae</em> (110-110)</td>
<td align="right">59</td>
<td align="right">53</td>
<td align="right">52</td>
<td align="right">54</td>
</tr>
<tr class="even">
<td align="left">Rheumatic</td>
<td align="left">
<em>K. pneumoniae</em> (110-110)</td>
<td align="right">60</td>
<td align="right">52</td>
<td align="right">62</td>
<td align="right">64</td>
</tr>
<tr class="odd">
<td align="left">Cardial</td>
<td align="left">
<em>S. aureus</em> (232-232)</td>
<td align="right">68</td>
<td align="right">51</td>
<td align="right">58</td>
<td align="right">66</td>
</tr>
<tr class="even">
<td align="left">Respiratory</td>
<td align="left">
<em>S. aureus</em> (205-205)</td>
<td align="right">58</td>
<td align="right">57</td>
<td align="right">58</td>
<td align="right">60</td>
</tr>
<tr class="odd">
<td align="left">Rheumatic</td>
<td align="left">
<em>S. aureus</em> (224-224)</td>
<td align="right">67</td>
<td align="right">62</td>
<td align="right">57</td>
<td align="right">62</td>
</tr>
<tr class="even">
<td align="left">Cardial</td>
<td align="left">
<em>S. pneumoniae</em> (154-154)</td>
<td align="right">62</td>
<td align="right">52</td>
<td align="right">57</td>
<td align="right">64</td>
</tr>
<tr class="odd">
<td align="left">Respiratory</td>
<td align="left">
<em>S. pneumoniae</em> (118-118)</td>
<td align="right">68</td>
<em>E. coli</em> (464-464)</td>
<td align="right">65</td>
<td align="right">56</td>
<td align="right">63</td>
<td align="right">59</td>
<td align="right">65</td>
</tr>
<tr class="even">
<td align="left">Cardial</td>
<td align="left">
<em>K. pneumoniae</em> (104-104)</td>
<td align="right">64</td>
<td align="right">52</td>
<td align="right">58</td>
<td align="right">62</td>
</tr>
<tr class="odd">
<td align="left">Respiratory</td>
<td align="left">
<em>K. pneumoniae</em> (94-94)</td>
<td align="right">66</td>
<td align="right">45</td>
<td align="right">60</td>
<td align="right">62</td>
</tr>
<tr class="even">
<td align="left">Rheumatic</td>
<td align="left">
<em>S. pneumoniae</em> (127-127)</td>
<td align="right">62</td>
<td align="right">61</td>
<em>K. pneumoniae</em> (118-118)</td>
<td align="right">59</td>
<td align="right">59</td>
<td align="right">59</td>
<td align="right">58</td>
</tr>
<tr class="odd">
<td align="left">Cardial</td>
<td align="left">
<em>S. aureus</em> (230-230)</td>
<td align="right">63</td>
<td align="right">57</td>
<td align="right">56</td>
<td align="right">66</td>
</tr>
<tr class="even">
<td align="left">Respiratory</td>
<td align="left">
<em>S. aureus</em> (222-222)</td>
<td align="right">66</td>
<td align="right">58</td>
<td align="right">57</td>
<td align="right">60</td>
<td align="right">69</td>
</tr>
<tr class="odd">
<td align="left">Rheumatic</td>
<td align="left">
<em>S. aureus</em> (209-209)</td>
<td align="right">65</td>
<td align="right">56</td>
<td align="right">60</td>
<td align="right">63</td>
</tr>
<tr class="even">
<td align="left">Cardial</td>
<td align="left">
<em>S. pneumoniae</em> (110-110)</td>
<td align="right">68</td>
<td align="right">57</td>
<td align="right">60</td>
<td align="right">64</td>
</tr>
<tr class="odd">
<td align="left">Respiratory</td>
<td align="left">
<em>S. pneumoniae</em> (142-142)</td>
<td align="right">67</td>
<td align="right">62</td>
<td align="right">65</td>
<td align="right">72</td>
</tr>
<tr class="even">
<td align="left">Rheumatic</td>
<td align="left">
<em>S. pneumoniae</em> (147-147)</td>
<td align="right">58</td>
<td align="right">49</td>
<td align="right">54</td>
<td align="right">61</td>
</tr>
</tbody>
</table>
@ -1090,46 +1090,46 @@ antibiograms:</p>
<tbody>
<tr class="odd">
<td align="left">Cardial</td>
<td align="left">Gram-negative (524-524)</td>
<td align="right">65</td>
<td align="right">58</td>
<td align="right">61</td>
</tr>
<tr class="even">
<td align="left">Respiratory</td>
<td align="left">Gram-negative (519-519)</td>
<td align="right">63</td>
<td align="right">55</td>
<td align="right">61</td>
</tr>
<tr class="odd">
<td align="left">Rheumatic</td>
<td align="left">Gram-negative (523-523)</td>
<td align="right">63</td>
<td align="right">57</td>
<td align="right">65</td>
</tr>
<tr class="even">
<td align="left">Cardial</td>
<td align="left">Gram-positive (386-386)</td>
<td align="right">66</td>
<td align="right">52</td>
<td align="right">65</td>
</tr>
<tr class="odd">
<td align="left">Respiratory</td>
<td align="left">Gram-positive (323-323)</td>
<td align="left">Gram-negative (490-490)</td>
<td align="right">62</td>
<td align="right">56</td>
<td align="right">62</td>
</tr>
<tr class="even">
<td align="left">Rheumatic</td>
<td align="left">Gram-positive (351-351)</td>
<td align="left">Respiratory</td>
<td align="left">Gram-negative (494-494)</td>
<td align="right">65</td>
<td align="right">58</td>
<td align="right">62</td>
</tr>
<tr class="odd">
<td align="left">Rheumatic</td>
<td align="left">Gram-negative (582-582)</td>
<td align="right">64</td>
<td align="right">57</td>
<td align="right">63</td>
</tr>
<tr class="even">
<td align="left">Cardial</td>
<td align="left">Gram-positive (340-340)</td>
<td align="right">64</td>
<td align="right">57</td>
<td align="right">65</td>
</tr>
<tr class="odd">
<td align="left">Respiratory</td>
<td align="left">Gram-positive (364-364)</td>
<td align="right">66</td>
<td align="right">59</td>
<td align="right">65</td>
</tr>
<tr class="even">
<td align="left">Rheumatic</td>
<td align="left">Gram-positive (356-356)</td>
<td align="right">62</td>
<td align="right">53</td>
<td align="right">62</td>
</tr>
</tbody>
</table>
<div class="sourceCode" id="cb21"><pre class="downlit sourceCode r">
@ -1152,45 +1152,45 @@ antibiograms:</p>
<tbody>
<tr class="odd">
<td align="left">Cardial</td>
<td align="left">Gram-negative (524-524)</td>
<td align="right">65</td>
<td align="right">76</td>
<td align="right">76</td>
</tr>
<tr class="even">
<td align="left">Respiratory</td>
<td align="left">Gram-negative (519-519)</td>
<td align="right">63</td>
<td align="right">76</td>
<td align="right">73</td>
</tr>
<tr class="odd">
<td align="left">Rheumatic</td>
<td align="left">Gram-negative (523-523)</td>
<td align="right">63</td>
<td align="left">Gram-negative (490-490)</td>
<td align="right">62</td>
<td align="right">76</td>
<td align="right">75</td>
</tr>
<tr class="even">
<td align="left">Respiratory</td>
<td align="left">Gram-negative (494-494)</td>
<td align="right">65</td>
<td align="right">77</td>
<td align="right">75</td>
</tr>
<tr class="odd">
<td align="left">Rheumatic</td>
<td align="left">Gram-negative (582-582)</td>
<td align="right">64</td>
<td align="right">75</td>
<td align="right">75</td>
</tr>
<tr class="even">
<td align="left">Cardial</td>
<td align="left">Gram-positive (386-386)</td>
<td align="left">Gram-positive (340-340)</td>
<td align="right">64</td>
<td align="right">75</td>
<td align="right">75</td>
</tr>
<tr class="odd">
<td align="left">Respiratory</td>
<td align="left">Gram-positive (364-364)</td>
<td align="right">66</td>
<td align="right">80</td>
<td align="right">77</td>
</tr>
<tr class="odd">
<td align="left">Respiratory</td>
<td align="left">Gram-positive (323-323)</td>
<td align="right">62</td>
<td align="right">76</td>
<td align="right">73</td>
</tr>
<tr class="even">
<td align="left">Rheumatic</td>
<td align="left">Gram-positive (351-351)</td>
<td align="right">65</td>
<td align="right">76</td>
<td align="right">76</td>
<td align="left">Gram-positive (356-356)</td>
<td align="right">62</td>
<td align="right">77</td>
<td align="right">74</td>
</tr>
</tbody>
</table>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

View File

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

View File

@ -38,7 +38,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.0.0.9002</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.0.0.9003</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -385,19 +385,19 @@ names or codes, this would have worked exactly the same way:</p>
<div class="sourceCode" id="cb8"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/r/utils/head.html" class="external-link">head</a></span><span class="op">(</span><span class="va">my_TB_data</span><span class="op">)</span></span>
<span><span class="co">#&gt; rifampicin isoniazid gatifloxacin ethambutol pyrazinamide moxifloxacin</span></span>
<span><span class="co">#&gt; 1 S R R R S R</span></span>
<span><span class="co">#&gt; 2 R S I R I I</span></span>
<span><span class="co">#&gt; 3 I I I I I I</span></span>
<span><span class="co">#&gt; 4 R I I I S S</span></span>
<span><span class="co">#&gt; 5 R I R I S I</span></span>
<span><span class="co">#&gt; 6 R I S R R S</span></span>
<span><span class="co">#&gt; 1 R R R I R I</span></span>
<span><span class="co">#&gt; 2 I R S I I R</span></span>
<span><span class="co">#&gt; 3 I R I I I R</span></span>
<span><span class="co">#&gt; 4 R I I S S I</span></span>
<span><span class="co">#&gt; 5 I R R R I S</span></span>
<span><span class="co">#&gt; 6 S S S R I R</span></span>
<span><span class="co">#&gt; kanamycin</span></span>
<span><span class="co">#&gt; 1 I</span></span>
<span><span class="co">#&gt; 2 I</span></span>
<span><span class="co">#&gt; 3 S</span></span>
<span><span class="co">#&gt; 2 R</span></span>
<span><span class="co">#&gt; 3 I</span></span>
<span><span class="co">#&gt; 4 S</span></span>
<span><span class="co">#&gt; 5 I</span></span>
<span><span class="co">#&gt; 6 S</span></span></code></pre></div>
<span><span class="co">#&gt; 5 S</span></span>
<span><span class="co">#&gt; 6 I</span></span></code></pre></div>
<p>We can now add the interpretation of MDR-TB to our data set. You can
use:</p>
<div class="sourceCode" id="cb9"><pre class="downlit sourceCode r">
@ -438,40 +438,40 @@ Unique: 5</p>
<tr class="odd">
<td align="left">1</td>
<td align="left">Mono-resistant</td>
<td align="right">3267</td>
<td align="right">65.34%</td>
<td align="right">3267</td>
<td align="right">65.34%</td>
<td align="right">3239</td>
<td align="right">64.78%</td>
<td align="right">3239</td>
<td align="right">64.78%</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="left">Negative</td>
<td align="right">935</td>
<td align="right">18.70%</td>
<td align="right">4202</td>
<td align="right">84.04%</td>
<td align="right">1004</td>
<td align="right">20.08%</td>
<td align="right">4243</td>
<td align="right">84.86%</td>
</tr>
<tr class="odd">
<td align="left">3</td>
<td align="left">Multi-drug-resistant</td>
<td align="right">442</td>
<td align="right">8.84%</td>
<td align="right">4644</td>
<td align="right">92.88%</td>
<td align="right">423</td>
<td align="right">8.46%</td>
<td align="right">4666</td>
<td align="right">93.32%</td>
</tr>
<tr class="even">
<td align="left">4</td>
<td align="left">Poly-resistant</td>
<td align="right">242</td>
<td align="right">4.84%</td>
<td align="right">4886</td>
<td align="right">97.72%</td>
<td align="right">250</td>
<td align="right">5.00%</td>
<td align="right">4916</td>
<td align="right">98.32%</td>
</tr>
<tr class="odd">
<td align="left">5</td>
<td align="left">Extensively drug-resistant</td>
<td align="right">114</td>
<td align="right">2.28%</td>
<td align="right">84</td>
<td align="right">1.68%</td>
<td align="right">5000</td>
<td align="right">100.00%</td>
</tr>

View File

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

View File

@ -38,7 +38,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.0.0.9002</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.0.0.9003</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -178,7 +178,7 @@
<h4 data-toc-skip class="author">Dr. Matthijs
Berends</h4>
<h4 data-toc-skip class="date">14 March 2023</h4>
<h4 data-toc-skip class="date">16 March 2023</h4>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/HEAD/vignettes/SPSS.Rmd" class="external-link"><code>vignettes/SPSS.Rmd</code></a></small>
<div class="d-none name"><code>SPSS.Rmd</code></div>

View File

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

View File

@ -38,7 +38,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.0.0.9002</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.0.0.9003</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -176,7 +176,7 @@
<main id="main" class="col-md-9"><div class="page-header">
<img src="../logo.svg" class="logo" alt=""><h1>Data sets for download / own use</h1>
<h4 data-toc-skip class="date">14 March 2023</h4>
<h4 data-toc-skip class="date">16 March 2023</h4>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/HEAD/vignettes/datasets.Rmd" class="external-link"><code>vignettes/datasets.Rmd</code></a></small>
<div class="d-none name"><code>datasets.Rmd</code></div>

View File

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

View File

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

View File

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

View File

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

View File

@ -42,7 +42,7 @@
<a class="navbar-brand me-2" href="index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.0.0.9002</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.0.0.9003</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -762,7 +762,7 @@
<p>Manually, using:</p>
<div class="sourceCode" id="cb12"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/r/utils/install.packages.html" class="external-link">install.packages</a></span><span class="op">(</span><span class="st">"remotes"</span><span class="op">)</span> <span class="co"># if you haven't already</span></span>
<span><span class="fu">remotes</span><span class="fu">::</span><span class="fu"><a href="https://remotes.r-lib.org/reference/install_github.html" class="external-link">install_github</a></span><span class="op">(</span><span class="st">"msberends/AMR"</span><span class="op">)</span></span></code></pre></div>
<span><span class="fu">remotes</span><span class="fu">::</span><span class="fu">install_github</span><span class="op">(</span><span class="st">"msberends/AMR"</span><span class="op">)</span></span></code></pre></div>
</li>
<li>
<p>Automatically, using the <a href="https://ropensci.org/r-universe/" class="external-link">rOpenSci R-universe platform</a>, by adding <a href="https://msberends.r-universe.dev" class="external-link">our R-universe address</a> to your list of repositories (repos):</p>

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.0.0.9002</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.0.0.9003</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -142,7 +142,15 @@
</div>
<div class="section level2">
<h2 class="pkg-version" data-toc-text="2.0.0.9002" id="amr-2009002">AMR 2.0.0.9002<a class="anchor" aria-label="anchor" href="#amr-2009002"></a></h2>
<h2 class="pkg-version" data-toc-text="2.0.0.9003" id="amr-2009003">AMR 2.0.0.9003<a class="anchor" aria-label="anchor" href="#amr-2009003"></a></h2>
<div class="section level3">
<h3 id="changed-2-0-0-9003">Changed<a class="anchor" aria-label="anchor" href="#changed-2-0-0-9003"></a></h3>
<ul><li>formatting fix for <code><a href="../reference/as.sir.html">sir_interpretation_history()</a></code>
</li>
</ul></div>
</div>
<div class="section level2">
<h2 class="pkg-version" data-toc-text="2.0.0" id="amr-200">AMR 2.0.0<a class="anchor" aria-label="anchor" href="#amr-200"></a></h2><p class="text-muted">CRAN release: 2023-03-12</p>
<p>This is a new major release of the AMR package, with great new additions but also some breaking changes for current users. These are all listed below.</p>
<p><strong><a href="https://en.wikipedia.org/wiki/TL;DR" class="external-link">TL;DR</a></strong></p>
<ul><li>All functions and arguments with rsi were replaced with sir, such as the interpretation of MIC values (now <code><a href="../reference/as.sir.html">as.sir()</a></code> instead of <code><a href="../reference/AMR-deprecated.html">as.rsi()</a></code>) - all old functions still work for now</li>
@ -155,37 +163,37 @@
<li>Now available in 20 languages</li>
<li>Many small bug fixes</li>
</ul><div class="section level3">
<h3 id="new-2-0-0-9002">New<a class="anchor" aria-label="anchor" href="#new-2-0-0-9002"></a></h3>
<h3 id="new-2-0-0">New<a class="anchor" aria-label="anchor" href="#new-2-0-0"></a></h3>
<div class="section level4">
<h4 id="sir-vs-rsi-2-0-0-9002">SIR vs. RSI<a class="anchor" aria-label="anchor" href="#sir-vs-rsi-2-0-0-9002"></a></h4>
<h4 id="sir-vs-rsi-2-0-0">SIR vs. RSI<a class="anchor" aria-label="anchor" href="#sir-vs-rsi-2-0-0"></a></h4>
<p>For this milestone version, we replaced all mentions of RSI with SIR, to comply with what is actually being commonly used in the field of clinical microbiology when it comes to this tri-form regarding AMR.</p>
<p>While existing functions such as <code><a href="../reference/AMR-deprecated.html">as.rsi()</a></code>, <code><a href="../reference/AMR-deprecated.html">rsi_df()</a></code> and <code><a href="../reference/AMR-deprecated.html">ggplot_rsi()</a></code> still work, their replacements <code><a href="../reference/as.sir.html">as.sir()</a></code>, <code><a href="../reference/proportion.html">sir_df()</a></code>, <code><a href="../reference/ggplot_sir.html">ggplot_sir()</a></code> are now the current functions for AMR data analysis. A warning will be thrown once a session to remind users about this. The data set <code>rsi_translation</code> is now called <code>clinical_breakpoints</code> to better reflect its content.</p>
<p>The RSI functions will be removed in a future version, but not before late 2023 / early 2024.</p>
</div>
<div class="section level4">
<h4 id="new-antibiogram-function-2-0-0-9002">New antibiogram function<a class="anchor" aria-label="anchor" href="#new-antibiogram-function-2-0-0-9002"></a></h4>
<h4 id="new-antibiogram-function-2-0-0">New antibiogram function<a class="anchor" aria-label="anchor" href="#new-antibiogram-function-2-0-0"></a></h4>
<p>With the new <code><a href="../reference/antibiogram.html">antibiogram()</a></code> function, users can now generate traditional, combined, syndromic, and even weighted-incidence syndromic combination antibiograms (WISCA). With this, we follow the logic in the previously described work of Klinker <em>et al.</em> (2021, DOI <a href="https://doi.org/10.1177/20499361211011373" class="external-link">10.1177/20499361211011373</a>) and Barbieri <em>et al.</em> (2021, DOI <a href="https://doi.org/10.1186/s13756-021-00939-2" class="external-link">10.1186/s13756-021-00939-2</a>).</p>
<p>The help page for <code><a href="../reference/antibiogram.html">antibiogram()</a></code> extensively elaborates on use cases, and <code><a href="../reference/antibiogram.html">antibiogram()</a></code> also supports printing in R Markdown and Quarto, with support for 20 languages.</p>
<p>Furthermore, different plotting methods were implemented to allow for graphical visualisations as well.</p>
</div>
<div class="section level4">
<h4 id="interpretation-of-mic-and-disk-diffusion-values-2-0-0-9002">Interpretation of MIC and disk diffusion values<a class="anchor" aria-label="anchor" href="#interpretation-of-mic-and-disk-diffusion-values-2-0-0-9002"></a></h4>
<h4 id="interpretation-of-mic-and-disk-diffusion-values-2-0-0">Interpretation of MIC and disk diffusion values<a class="anchor" aria-label="anchor" href="#interpretation-of-mic-and-disk-diffusion-values-2-0-0"></a></h4>
<p>The clinical breakpoints and intrinsic resistance of EUCAST 2022 and CLSI 2022 have been added for <code><a href="../reference/as.sir.html">as.sir()</a></code>. EUCAST 2022 (v12.0) is now the new default guideline for all MIC and disks diffusion interpretations, and for <code><a href="../reference/eucast_rules.html">eucast_rules()</a></code> to apply EUCAST Expert Rules. The default guideline (EUCAST) can now be changed with the new <code>AMR_guideline</code> option, such as: <code>options(AMR_guideline = "CLSI 2020")</code>.</p>
<p>With the new arguments <code>include_PKPD</code> (default: <code>TRUE</code>) and <code>include_screening</code> (default: <code>FALSE</code>), users can now specify whether breakpoints for screening and from the PK/PD table should be included when interpreting MICs and disks diffusion values. These options can be set globally, which can be read in <a href="https://msberends.github.io/AMR/reference/AMR-options.html">our new manual</a>.</p>
<p>Interpretation guidelines older than 10 years were removed, the oldest now included guidelines of EUCAST and CLSI are from 2013.</p>
</div>
<div class="section level4">
<h4 id="supported-languages-2-0-0-9002">Supported languages<a class="anchor" aria-label="anchor" href="#supported-languages-2-0-0-9002"></a></h4>
<h4 id="supported-languages-2-0-0">Supported languages<a class="anchor" aria-label="anchor" href="#supported-languages-2-0-0"></a></h4>
<p>We added support for the following ten languages: Chinese (simplified), Czech, Finnish, Greek, Japanese, Norwegian (bokmål), Polish, Romanian, Turkish and Ukrainian. All antibiotic names are now available in these languages, and the AMR package will automatically determine a supported language based on the users system language.</p>
<p>We are very grateful for the valuable input by our colleagues from other countries. The <code>AMR</code> package is now available in 20 languages in total, and according to download stats used in almost all countries in the world!</p>
</div>
<div class="section level4">
<h4 id="outbreak-management-2-0-0-9002">Outbreak management<a class="anchor" aria-label="anchor" href="#outbreak-management-2-0-0-9002"></a></h4>
<h4 id="outbreak-management-2-0-0">Outbreak management<a class="anchor" aria-label="anchor" href="#outbreak-management-2-0-0"></a></h4>
<p>For analysis in outbreak management, we updated the <code><a href="../reference/get_episode.html">get_episode()</a></code> and <code><a href="../reference/get_episode.html">is_new_episode()</a></code> functions: they now contain an argument <code>case_free_days</code>. This argument can be used to quantify the duration of case-free days (the inter-epidemic interval), after which a new episode will start.</p>
<p>This is common requirement in outbreak management, e.g. when determining the number of norovirus outbreaks in a hospital. The case-free period could then be 14 or 28 days, so that new norovirus cases after that time will be considered a different (or new) episode.</p>
</div>
<div class="section level4">
<h4 id="microbiological-taxonomy-2-0-0-9002">Microbiological taxonomy<a class="anchor" aria-label="anchor" href="#microbiological-taxonomy-2-0-0-9002"></a></h4>
<h4 id="microbiological-taxonomy-2-0-0">Microbiological taxonomy<a class="anchor" aria-label="anchor" href="#microbiological-taxonomy-2-0-0"></a></h4>
<p>The <code>microorganisms</code> data set no longer relies on the Catalogue of Life, but on the List of Prokaryotic names with Standing in Nomenclature (LPSN) and is supplemented with the backbone taxonomy from the Global Biodiversity Information Facility (GBIF). The structure of this data set has changed to include separate LPSN and GBIF identifiers. Almost all previous MO codes were retained. It contains over 1,400 taxonomic names from 2022.</p>
<p>We previously relied on our own experience to categorise species into pathogenic groups, but we were very happy to encounter the very recent work of Bartlett <em>et al.</em> (2022, DOI <a href="https://doi.org/10.1099/mic.0.001269" class="external-link">10.1099/mic.0.001269</a>) who extensively studied medical-scientific literature to categorise all bacterial species into groups. See <code><a href="../reference/mo_matching_score.html">mo_matching_score()</a></code> on how their work was incorporated into the <code>prevalence</code> column of the <code>microorganisms</code> data set. Using their results, the <code><a href="../reference/as.mo.html">as.mo()</a></code> and all <code>mo_*()</code> functions are now much better capable of converting user input to valid taxonomic records.</p>
<p>The new function <code><a href="../reference/add_custom_microorganisms.html">add_custom_microorganisms()</a></code> allows users to add custom microorganisms to the <code>AMR</code> package.</p>
@ -210,7 +218,7 @@
<li>The <code>microorganisms.old</code> data set was removed, and all previously accepted names are now included in the <code>microorganisms</code> data set. A new column <code>status</code> contains <code>"accepted"</code> for currently accepted names and <code>"synonym"</code> for taxonomic synonyms; currently invalid names. All previously accepted names now have a microorganisms ID and - if available - an LPSN, GBIF and SNOMED CT identifier.</li>
</ul></div>
<div class="section level4">
<h4 id="antibiotic-agents-and-selectors-2-0-0-9002">Antibiotic agents and selectors<a class="anchor" aria-label="anchor" href="#antibiotic-agents-and-selectors-2-0-0-9002"></a></h4>
<h4 id="antibiotic-agents-and-selectors-2-0-0">Antibiotic agents and selectors<a class="anchor" aria-label="anchor" href="#antibiotic-agents-and-selectors-2-0-0"></a></h4>
<p>The new function <code><a href="../reference/add_custom_antimicrobials.html">add_custom_antimicrobials()</a></code> allows users to add custom antimicrobial codes and names to the <code>AMR</code> package.</p>
<p>The <code>antibiotics</code> data set was greatly updated:</p>
<ul><li>The following 20 antibiotics have been added (also includes the <a href="https://www.whocc.no/atc_ddd_index/?code=J01RA&amp;showdescription=no" class="external-link">new J01RA ATC group</a>): azithromycin/fluconazole/secnidazole (AFC), cefepime/amikacin (CFA), cefixime/ornidazole (CEO), ceftriaxone/beta-lactamase inhibitor (CEB), ciprofloxacin/metronidazole (CIM), ciprofloxacin/ornidazole (CIO), ciprofloxacin/tinidazole (CIT), furazidin (FUR), isoniazid/sulfamethoxazole/trimethoprim/pyridoxine (IST), lascufloxacin (LSC), levofloxacin/ornidazole (LEO), nemonoxacin (NEM), norfloxacin/metronidazole (NME), norfloxacin/tinidazole (NTI), ofloxacin/ornidazole (OOR), oteseconazole (OTE), rifampicin/ethambutol/isoniazid (REI), sarecycline (SRC), tetracycline/oleandomycin (TOL), and thioacetazone (TAT)</li>
@ -222,21 +230,21 @@
</ul><p>Also, we added support for using antibiotic selectors in scoped <code>dplyr</code> verbs (with or without using <code><a href="https://dplyr.tidyverse.org/reference/vars.html" class="external-link">vars()</a></code>), such as in: <code>... %&gt;% summarise_at(aminoglycosides(), resistance)</code>, please see <code><a href="../reference/proportion.html">resistance()</a></code> for examples.</p>
</div>
<div class="section level4">
<h4 id="antiviral-agents-2-0-0-9002">Antiviral agents<a class="anchor" aria-label="anchor" href="#antiviral-agents-2-0-0-9002"></a></h4>
<h4 id="antiviral-agents-2-0-0">Antiviral agents<a class="anchor" aria-label="anchor" href="#antiviral-agents-2-0-0"></a></h4>
<p>We now added extensive support for antiviral agents! For the first time, the <code>AMR</code> package has extensive support for antiviral drugs and to work with their names, codes and other data in any way.</p>
<ul><li>The <code>antivirals</code> data set has been extended with 18 new drugs (also from the <a href="https://www.whocc.no/atc_ddd_index/?code=J05AJ&amp;showdescription=no" class="external-link">new J05AJ ATC group</a>) and now also contains antiviral identifiers and LOINC codes</li>
<li>A new data type <code>av</code> (<em>antivirals</em>) has been added, which is functionally similar to <code>ab</code> for antibiotics</li>
<li>Functions <code><a href="../reference/as.av.html">as.av()</a></code>, <code><a href="../reference/av_property.html">av_name()</a></code>, <code><a href="../reference/av_property.html">av_atc()</a></code>, <code><a href="../reference/av_property.html">av_synonyms()</a></code>, <code><a href="../reference/av_from_text.html">av_from_text()</a></code> have all been added as siblings to their <code>ab_*()</code> equivalents</li>
</ul></div>
<div class="section level4">
<h4 id="other-new-functions-2-0-0-9002">Other new functions<a class="anchor" aria-label="anchor" href="#other-new-functions-2-0-0-9002"></a></h4>
<h4 id="other-new-functions-2-0-0">Other new functions<a class="anchor" aria-label="anchor" href="#other-new-functions-2-0-0"></a></h4>
<ul><li>Function <code><a href="../reference/proportion.html">sir_confidence_interval()</a></code> to add confidence intervals in AMR calculation. This is now also included in <code><a href="../reference/proportion.html">sir_df()</a></code> and <code><a href="../reference/proportion.html">proportion_df()</a></code>.</li>
<li>Function <code><a href="../reference/mean_amr_distance.html">mean_amr_distance()</a></code> to calculate the mean AMR distance. The mean AMR distance is a normalised numeric value to compare AMR test results and can help to identify similar isolates, without comparing antibiograms by hand.</li>
<li>Function <code><a href="../reference/as.sir.html">sir_interpretation_history()</a></code> to view the history of previous runs of <code><a href="../reference/as.sir.html">as.sir()</a></code> (previously <code><a href="../reference/AMR-deprecated.html">as.rsi()</a></code>). This returns a logbook with the selected guideline, reference table and specific interpretation of each row in a data set on which <code><a href="../reference/as.sir.html">as.sir()</a></code> was run.</li>
</ul></div>
</div>
<div class="section level3">
<h3 id="changes-2-0-0-9002">Changes<a class="anchor" aria-label="anchor" href="#changes-2-0-0-9002"></a></h3>
<h3 id="changes-2-0-0">Changes<a class="anchor" aria-label="anchor" href="#changes-2-0-0"></a></h3>
<ul><li>
<code><a href="../reference/get_episode.html">get_episode()</a></code> (and its wrapper <code><a href="../reference/get_episode.html">is_new_episode()</a></code>):
<ul><li>Fix for working with <code>NA</code> values</li>
@ -284,7 +292,7 @@
<code>mo_synonyns()</code> now contains the scientific reference as names</li>
</ul></div>
<div class="section level3">
<h3 id="other-2-0-0-9002">Other<a class="anchor" aria-label="anchor" href="#other-2-0-0-9002"></a></h3>
<h3 id="other-2-0-0">Other<a class="anchor" aria-label="anchor" href="#other-2-0-0"></a></h3>
<ul><li>Added Peter Dutey-Magni, Dmytro Mykhailenko, Anton Mymrikov, Andrew Norgan, Jonas Salm, and Anita Williams as contributors, to thank them for their valuable input</li>
<li>New website to make use of the new Bootstrap 5 and pkgdown 2.0. The website now contains results for all examples and will be automatically regenerated with every change to our repository, using GitHub Actions</li>
<li>All R and Rmd files in this project are now styled using the <code>styler</code> package</li>

View File

@ -11,7 +11,7 @@ articles:
datasets: datasets.html
resistance_predict: resistance_predict.html
welcome_to_AMR: welcome_to_AMR.html
last_built: 2023-03-14T18:57Z
last_built: 2023-03-16T08:00Z
urls:
reference: https://msberends.github.io/AMR/reference
article: https://msberends.github.io/AMR/articles

View File

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

View File

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

View File

@ -5,14 +5,14 @@ This work was published in the Journal of Statistical Software (Volume 104(3); d
) and formed the basis of two PhD theses (doi:10.33612/diss.177417131
and doi:10.33612/diss.192486375
).
After installing this package, R knows ~52 000 microorganisms (updated december 2022) and all ~600 antibiotic, antimycotic and antiviral drugs by name and code (including ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid SIR and MIC values. The integral breakpoint guidelines from CLSI and EUCAST are included from the last 10 years. It supports and can read any data format, including WHONET data. This package works on Windows, macOS and Linux with all versions of R since R-3.0 (April 2013). It was designed to work in any setting, including those with very limited resources. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the University of Groningen, in collaboration with non-profit organisations Certe Medical Diagnostics and Advice Foundation and University Medical Center Groningen.
After installing this package, R knows ~52 000 microorganisms (updated December 2022) and all ~600 antibiotic, antimycotic and antiviral drugs by name and code (including ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid SIR and MIC values. The integral breakpoint guidelines from CLSI and EUCAST are included from the last 10 years. It supports and can read any data format, including WHONET data. This package works on Windows, macOS and Linux with all versions of R since R-3.0 (April 2013). It was designed to work in any setting, including those with very limited resources. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the University of Groningen, in collaboration with non-profit organisations Certe Medical Diagnostics and Advice Foundation and University Medical Center Groningen.
The AMR package is available in English, Chinese, Czech, Danish, Dutch, Finnish, French, German, Greek, Italian, Japanese, Norwegian, Polish, Portuguese, Romanian, Russian, Spanish, Swedish, Turkish, and Ukrainian. Antimicrobial drug (group) names and colloquial microorganism names are provided in these languages."><title>The AMR Package — AMR • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><link href="../deps/Fira_Code-0.4.5/font.css" rel="stylesheet"><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="The AMR Package — AMR"><meta property="og:description" content="Welcome to the AMR package.
The AMR package is a free and open-source R package with zero dependencies to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial data and properties, by using evidence-based methods. Our aim is to provide a standard for clean and reproducible AMR data analysis, that can therefore empower epidemiological analyses to continuously enable surveillance and treatment evaluation in any setting. Many different researchers from around the globe are continually helping us to make this a successful and durable project!
This work was published in the Journal of Statistical Software (Volume 104(3); doi:jss.v104.i03
) and formed the basis of two PhD theses (doi:10.33612/diss.177417131
and doi:10.33612/diss.192486375
).
After installing this package, R knows ~52 000 microorganisms (updated december 2022) and all ~600 antibiotic, antimycotic and antiviral drugs by name and code (including ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid SIR and MIC values. The integral breakpoint guidelines from CLSI and EUCAST are included from the last 10 years. It supports and can read any data format, including WHONET data. This package works on Windows, macOS and Linux with all versions of R since R-3.0 (April 2013). It was designed to work in any setting, including those with very limited resources. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the University of Groningen, in collaboration with non-profit organisations Certe Medical Diagnostics and Advice Foundation and University Medical Center Groningen.
After installing this package, R knows ~52 000 microorganisms (updated December 2022) and all ~600 antibiotic, antimycotic and antiviral drugs by name and code (including ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid SIR and MIC values. The integral breakpoint guidelines from CLSI and EUCAST are included from the last 10 years. It supports and can read any data format, including WHONET data. This package works on Windows, macOS and Linux with all versions of R since R-3.0 (April 2013). It was designed to work in any setting, including those with very limited resources. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the University of Groningen, in collaboration with non-profit organisations Certe Medical Diagnostics and Advice Foundation and University Medical Center Groningen.
The AMR package is available in English, Chinese, Czech, Danish, Dutch, Finnish, French, German, Greek, Italian, Japanese, Norwegian, Polish, Portuguese, Romanian, Russian, Spanish, Swedish, Turkish, and Ukrainian. Antimicrobial drug (group) names and colloquial microorganism names are provided in these languages."><meta property="og:image" content="https://msberends.github.io/AMR/logo.svg"><meta name="twitter:card" content="summary_large_image"><meta name="twitter:creator" content="@msberends"><meta name="twitter:site" content="@msberends"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
@ -24,7 +24,7 @@ The AMR package is available in English, Chinese, Czech, Danish, Dutch, Finnish,
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.0.0.9002</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.0.0.9003</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -163,7 +163,7 @@ The AMR package is available in English, Chinese, Czech, Danish, Dutch, Finnish,
) and formed the basis of two PhD theses (<a href="https://doi.org/10.33612/diss.177417131" class="external-link">doi:10.33612/diss.177417131</a>
and <a href="https://doi.org/10.33612/diss.192486375" class="external-link">doi:10.33612/diss.192486375</a>
).</p>
<p>After installing this package, R knows <a href="https://msberends.github.io/AMR/reference/microorganisms.html"><strong>~52 000 microorganisms</strong></a> (updated december 2022) and all <a href="https://msberends.github.io/AMR/reference/antibiotics.html"><strong>~600 antibiotic, antimycotic and antiviral drugs</strong></a> by name and code (including ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid SIR and MIC values. The integral breakpoint guidelines from CLSI and EUCAST are included from the last 10 years. It supports and can read any data format, including WHONET data. This package works on Windows, macOS and Linux with all versions of R since R-3.0 (April 2013). <strong>It was designed to work in any setting, including those with very limited resources</strong>. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the <a href="https://www.rug.nl" class="external-link">University of Groningen</a>, in collaboration with non-profit organisations <a href="https://www.certe.nl" class="external-link">Certe Medical Diagnostics and Advice Foundation</a> and <a href="https://www.umcg.nl" class="external-link">University Medical Center Groningen</a>.</p>
<p>After installing this package, R knows <a href="https://msberends.github.io/AMR/reference/microorganisms.html"><strong>~52 000 microorganisms</strong></a> (updated December 2022) and all <a href="https://msberends.github.io/AMR/reference/antibiotics.html"><strong>~600 antibiotic, antimycotic and antiviral drugs</strong></a> by name and code (including ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid SIR and MIC values. The integral breakpoint guidelines from CLSI and EUCAST are included from the last 10 years. It supports and can read any data format, including WHONET data. This package works on Windows, macOS and Linux with all versions of R since R-3.0 (April 2013). <strong>It was designed to work in any setting, including those with very limited resources</strong>. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the <a href="https://www.rug.nl" class="external-link">University of Groningen</a>, in collaboration with non-profit organisations <a href="https://www.certe.nl" class="external-link">Certe Medical Diagnostics and Advice Foundation</a> and <a href="https://www.umcg.nl" class="external-link">University Medical Center Groningen</a>.</p>
<p>The <code>AMR</code> package is available in English, Chinese, Czech, Danish, Dutch, Finnish, French, German, Greek, Italian, Japanese, Norwegian, Polish, Portuguese, Romanian, Russian, Spanish, Swedish, Turkish, and Ukrainian. Antimicrobial drug (group) names and colloquial microorganism names are provided in these languages.</p>
</div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.0.0.9002</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.0.0.9003</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -205,16 +205,16 @@
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="va">df</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> birth_date age age_exact age_at_y2k</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 1974-04-24 48 48.88767 25</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 1976-01-15 47 47.15890 23</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 1971-07-03 51 51.69589 28</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 1939-11-17 83 83.32055 60</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 1937-04-17 85 85.90685 62</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 1934-11-28 88 88.29041 65</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 1944-07-14 78 78.66575 55</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 1992-04-05 30 30.93973 7</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 1936-06-15 86 86.74521 63</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 1998-02-23 25 25.05205 1</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 1960-01-29 63 63.12603 39</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 1987-04-14 35 35.92055 12</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 1976-01-12 47 47.17260 23</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 1951-10-24 71 71.39178 48</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 1982-07-07 40 40.69041 17</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 1997-02-24 26 26.05479 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 1940-02-14 83 83.08219 59</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 1975-04-24 47 47.89315 24</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 1996-09-25 26 26.47123 3</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 1949-01-29 74 74.12603 50</span>
</code></pre></div>
</div>
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>

View File

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

View File

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

View File

@ -12,7 +12,7 @@ In short, if you have a column name that resembles an antimicrobial drug, it wil
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.0.0.9002</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.0.0.9003</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -609,9 +609,9 @@ In short, if you have a column name that resembles an antimicrobial drug, it wil
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 5 × 1</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> kefzol</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;sir&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> R </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> S </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> S </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">3</span> S </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">3</span> I </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">4</span> I </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">5</span> I </span>
<span class="r-in"><span></span></span>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -12,7 +12,7 @@ All breakpoints used for interpretation are publicly available in the clinical_b
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.0.0.9002</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.0.0.9003</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -531,24 +531,22 @@ A microorganism is categorised as "Resistant" when there is a high likelihood of
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># return a 'logbook' about the results:</span></span></span>
<span class="r-in"><span><span class="fu">sir_interpretation_history</span><span class="op">(</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 50 × 17</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 50 × 12</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> datetime index ab_input ab_guid…¹ mo_in…² mo_guideline guide…³</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dttm&gt;</span> <span style="color: #949494; font-style: italic;">&lt;int&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;ab&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;mo&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> 2023-03-14 <span style="color: #949494;">18:58:01</span> 1 TOB TOB Escher… B_[ORD]_ENTRBCTR EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> 2023-03-14 <span style="color: #949494;">18:58:00</span> 1 GEN GEN Escher… B_[ORD]_ENTRBCTR EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> 2023-03-14 <span style="color: #949494;">18:58:00</span> 1 CIP CIP Escher… B_[ORD]_ENTRBCTR EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> 2023-03-14 <span style="color: #949494;">18:58:00</span> 1 AMP AMP Escher… B_[ORD]_ENTRBCTR EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 2023-03-14 <span style="color: #949494;">18:57:56</span> 1 CIP CIP B_ESCH… B_[ORD]_ENTRBCTR EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> 2023-03-14 <span style="color: #949494;">18:57:56</span> 2 CIP CIP B_ESCH… B_[ORD]_ENTRBCTR EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> 2023-03-14 <span style="color: #949494;">18:57:56</span> 3 CIP CIP B_ESCH… B_[ORD]_ENTRBCTR EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 2023-03-14 <span style="color: #949494;">18:57:56</span> 4 CIP CIP B_ESCH… B_[ORD]_ENTRBCTR EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 2023-03-14 <span style="color: #949494;">18:57:56</span> 5 CIP CIP B_ESCH… B_[ORD]_ENTRBCTR EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> 2023-03-14 <span style="color: #949494;">18:57:56</span> 6 CIP CIP B_ESCH… B_[ORD]_ENTRBCTR EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># … with 40 more rows, 10 more variables: ref_table &lt;chr&gt;, method &lt;chr&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># input &lt;dbl&gt;, outcome &lt;sir&gt;, breakpoint_S_R &lt;chr&gt;, ab_considered &lt;lgl&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># mo_considered &lt;lgl&gt;, breakpoint_S &lt;lgl&gt;, breakpoint_R &lt;lgl&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># interpretation &lt;lgl&gt;, and abbreviated variable names ¹ab_guideline,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># ²mo_input, ³guideline</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> 2023-03-16 <span style="color: #949494;">08:01:12</span> 1 TOB TOB Escher… B_[ORD]_ENTRBCTR EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> 2023-03-16 <span style="color: #949494;">08:01:12</span> 1 GEN GEN Escher… B_[ORD]_ENTRBCTR EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> 2023-03-16 <span style="color: #949494;">08:01:11</span> 1 CIP CIP Escher… B_[ORD]_ENTRBCTR EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> 2023-03-16 <span style="color: #949494;">08:01:11</span> 1 AMP AMP Escher… B_[ORD]_ENTRBCTR EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 2023-03-16 <span style="color: #949494;">08:01:07</span> 1 CIP CIP B_ESCH… B_[ORD]_ENTRBCTR EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> 2023-03-16 <span style="color: #949494;">08:01:07</span> 2 CIP CIP B_ESCH… B_[ORD]_ENTRBCTR EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> 2023-03-16 <span style="color: #949494;">08:01:07</span> 3 CIP CIP B_ESCH… B_[ORD]_ENTRBCTR EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 2023-03-16 <span style="color: #949494;">08:01:07</span> 4 CIP CIP B_ESCH… B_[ORD]_ENTRBCTR EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 2023-03-16 <span style="color: #949494;">08:01:07</span> 5 CIP CIP B_ESCH… B_[ORD]_ENTRBCTR EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> 2023-03-16 <span style="color: #949494;">08:01:07</span> 6 CIP CIP B_ESCH… B_[ORD]_ENTRBCTR EUCAST…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># … with 40 more rows, 5 more variables: ref_table &lt;chr&gt;, method &lt;chr&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># input &lt;dbl&gt;, outcome &lt;sir&gt;, breakpoint_S_R &lt;chr&gt;, and abbreviated variable</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># names ¹ab_guideline, ²mo_input, ³guideline</span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># for single values</span></span></span>
<span class="r-in"><span><span class="fu">as.sir</span><span class="op">(</span></span></span>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

File diff suppressed because one or more lines are too long

View File

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

View File

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

View File

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

View File

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

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.0.0.9002</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.0.0.9003</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -246,28 +246,27 @@
<span class="r-in"><span><span class="va">df</span> <span class="op">&lt;-</span> <span class="va">example_isolates</span><span class="op">[</span><span class="fu"><a href="https://rdrr.io/r/base/sample.html" class="external-link">sample</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/seq.html" class="external-link">seq_len</a></span><span class="op">(</span><span class="fl">2000</span><span class="op">)</span>, size <span class="op">=</span> <span class="fl">100</span><span class="op">)</span>, <span class="op">]</span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="fu">get_episode</span><span class="op">(</span><span class="va">df</span><span class="op">$</span><span class="va">date</span>, episode_days <span class="op">=</span> <span class="fl">60</span><span class="op">)</span> <span class="co"># indices</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 42 11 13 43 29 19 8 20 30 45 40 18 12 46 20 18 23 21 32 16 31 12 14 46 13</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [26] 22 5 37 45 16 41 19 17 8 21 31 7 8 29 32 34 22 25 41 15 3 17 17 2 25</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [51] 8 9 4 46 25 36 3 39 43 4 43 38 10 21 44 11 15 4 37 25 41 13 10 18 20</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [76] 6 35 10 36 24 18 24 41 27 37 21 26 1 6 22 12 15 14 33 28 44 7 23 46 5</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 9 18 19 37 25 43 21 38 23 21 50 4 13 25 49 13 47 17 18 49 4 10 20 39 32</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [26] 17 38 4 23 40 41 2 32 47 45 42 31 41 30 5 26 34 8 46 14 11 1 13 45 48</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [51] 1 33 45 3 30 22 6 6 16 24 9 47 35 7 10 47 44 19 6 18 28 12 16 11 49</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [76] 27 15 33 29 28 7 10 22 6 46 10 12 22 41 32 36 40 40 25 23 5 16 46 46 8</span>
<span class="r-in"><span><span class="fu">is_new_episode</span><span class="op">(</span><span class="va">df</span><span class="op">$</span><span class="va">date</span>, episode_days <span class="op">=</span> <span class="fl">60</span><span class="op">)</span> <span class="co"># TRUE/FALSE</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [13] TRUE TRUE FALSE FALSE TRUE TRUE TRUE TRUE TRUE FALSE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [25] FALSE TRUE TRUE TRUE FALSE FALSE TRUE FALSE TRUE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [37] TRUE FALSE FALSE FALSE TRUE FALSE TRUE FALSE TRUE TRUE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [49] TRUE FALSE FALSE TRUE TRUE FALSE FALSE TRUE FALSE TRUE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [61] FALSE TRUE TRUE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [73] FALSE FALSE FALSE TRUE TRUE FALSE FALSE TRUE FALSE FALSE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [85] FALSE FALSE TRUE TRUE FALSE FALSE FALSE FALSE FALSE TRUE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE FALSE TRUE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [13] TRUE FALSE TRUE FALSE TRUE TRUE FALSE FALSE FALSE TRUE TRUE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [25] TRUE FALSE FALSE FALSE FALSE TRUE TRUE TRUE FALSE FALSE TRUE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [37] TRUE FALSE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [49] FALSE TRUE FALSE TRUE FALSE TRUE FALSE TRUE TRUE FALSE TRUE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [61] FALSE FALSE TRUE TRUE FALSE FALSE TRUE FALSE FALSE FALSE TRUE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [73] FALSE FALSE FALSE TRUE TRUE FALSE TRUE FALSE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [85] FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [97] FALSE FALSE FALSE FALSE</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># filter on results from the third 60-day episode only, using base R</span></span></span>
<span class="r-in"><span><span class="va">df</span><span class="op">[</span><span class="fu"><a href="https://rdrr.io/r/base/which.html" class="external-link">which</a></span><span class="op">(</span><span class="fu">get_episode</span><span class="op">(</span><span class="va">df</span><span class="op">$</span><span class="va">date</span>, <span class="fl">60</span><span class="op">)</span> <span class="op">==</span> <span class="fl">3</span><span class="op">)</span>, <span class="op">]</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 2 × 46</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 1 × 46</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> date patient age gender ward mo PEN OXA FLC AMX </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;date&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dbl&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;mo&gt;</span> <span style="color: #949494; font-style: italic;">&lt;sir&gt;</span> <span style="color: #949494; font-style: italic;">&lt;sir&gt;</span> <span style="color: #949494; font-style: italic;">&lt;sir&gt;</span> <span style="color: #949494; font-style: italic;">&lt;sir&gt;</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> 2002-10-18 E55128 57 F ICU B_STPHY_AURS R NA S R </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> 2002-08-28 390178 57 M Clinical B_STRPT_SLVR S NA NA S </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> 2002-08-28 390178 57 M Clinical B_STRPT_SLVR S NA NA S </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># … with 36 more variables: AMC &lt;sir&gt;, AMP &lt;sir&gt;, TZP &lt;sir&gt;, CZO &lt;sir&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># FEP &lt;sir&gt;, CXM &lt;sir&gt;, FOX &lt;sir&gt;, CTX &lt;sir&gt;, CAZ &lt;sir&gt;, CRO &lt;sir&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># GEN &lt;sir&gt;, TOB &lt;sir&gt;, AMK &lt;sir&gt;, KAN &lt;sir&gt;, TMP &lt;sir&gt;, SXT &lt;sir&gt;,</span></span>
@ -305,16 +304,16 @@
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Groups: patient, condition [98]</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> patient date condition new_episode</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;date&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;lgl&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> 022060 2004-05-04 A TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> 059414 2006-07-21 B TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> 065133 2011-12-19 C TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> 080086 2007-10-26 B TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 083080 2010-02-25 B TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> 083080 2012-04-16 B TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> 0DBF93 2015-12-03 C TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 151041 2003-01-31 A TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 167474 2008-02-15 C TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> 174209 2011-10-03 C TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> 001213 2009-08-03 B TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> 082413 2002-06-04 C TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> 097186 2015-10-28 C TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> 0E2483 2007-05-29 A TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 107DD1 2012-09-03 B TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> 138869 2009-05-20 A TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> 13DF24 2011-08-14 C TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 151041 2006-02-10 A TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 156730 2012-04-12 B TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> 189363 2004-03-16 A TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># … with 90 more rows</span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">require</a></span><span class="op">(</span><span class="st"><a href="https://dplyr.tidyverse.org" class="external-link">"dplyr"</a></span><span class="op">)</span><span class="op">)</span> <span class="op">{</span></span></span>
@ -328,19 +327,19 @@
<span class="r-in"><span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/arrange.html" class="external-link">arrange</a></span><span class="op">(</span><span class="va">patient</span>, <span class="va">ward</span>, <span class="va">date</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="op">}</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 100 × 5</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Groups: ward, patient [93]</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Groups: ward, patient [99]</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> ward date patient new_index new_logical</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;date&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;int&gt;</span> <span style="color: #949494; font-style: italic;">&lt;lgl&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> ICU 2004-05-04 022060 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> Clinical 2006-07-21 059414 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> Clinical 2011-12-19 065133 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> Clinical 2007-10-26 080086 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> Clinical 2010-02-25 083080 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> Clinical 2012-04-16 083080 2 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> ICU 2015-12-03 0DBF93 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> Clinical 2003-01-31 151041 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> Clinical 2008-02-15 167474 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> Outpatient 2011-10-03 174209 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> Clinical 2009-08-03 001213 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> ICU 2002-06-04 082413 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> Clinical 2015-10-28 097186 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> Clinical 2007-05-29 0E2483 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> Clinical 2012-09-03 107DD1 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> Outpatient 2009-05-20 138869 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> Clinical 2011-08-14 13DF24 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> Clinical 2006-02-10 151041 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> Clinical 2012-04-12 156730 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> Clinical 2004-03-16 189363 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># … with 90 more rows</span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">require</a></span><span class="op">(</span><span class="st"><a href="https://dplyr.tidyverse.org" class="external-link">"dplyr"</a></span><span class="op">)</span><span class="op">)</span> <span class="op">{</span></span></span>
@ -356,9 +355,9 @@
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 3 × 5</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> ward n_patients n_episodes_365 n_episodes_60 n_episodes_30</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;int&gt;</span> <span style="color: #949494; font-style: italic;">&lt;int&gt;</span> <span style="color: #949494; font-style: italic;">&lt;int&gt;</span> <span style="color: #949494; font-style: italic;">&lt;int&gt;</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> Clinical 56 14 38 48</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> ICU 34 11 28 29</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">3</span> Outpatient 3 2 3 3</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> Clinical 60 13 39 48</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> ICU 29 10 22 26</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">3</span> Outpatient 10 7 9 9</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># grouping on patients and microorganisms leads to the same</span></span></span>
<span class="r-in"><span><span class="co"># results as first_isolate() when using 'episode-based':</span></span></span>
@ -387,19 +386,19 @@
<span class="r-in"><span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/select.html" class="external-link">select</a></span><span class="op">(</span><span class="fu"><a href="https://dplyr.tidyverse.org/reference/group_data.html" class="external-link">group_vars</a></span><span class="op">(</span><span class="va">.</span><span class="op">)</span>, <span class="va">flag_episode</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="op">}</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 100 × 4</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Groups: patient, mo, ward [95]</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> patient mo ward flag_episode</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;mo&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;lgl&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> 953838 B_STPHY_AURS Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> B27238 B_STRPT_MITS Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> 838434 B_STPHY_CONS Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> 5C1947 B_ESCHR_COLI Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 570226 B_ESCHR_COLI Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> CB6026 B_STPHY_CONS Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> 022060 B_ENTRBC_CLOC ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 80C025 B_ESCHR_COLI Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 065133 B_STPHY_CONS Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> 6FC260 B_STPHY_HMNS ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Groups: patient, mo, ward [100]</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> patient mo ward flag_episode</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;mo&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;lgl&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> E9C268 B_STPHY_EPDR ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> 352466 B_STRPT_PNMN ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> 521167 B_STPHY_AURS Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> 261028 B_STPHY_AURS Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 189564 B_STRPT_GRPA ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> 3B8892 B_ESCHR_COLI Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> 31C6D2 B_STPHY_CONS Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 960698 B_ESCHR_COLI Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 408807 B_STPHY_CONS Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> AB0003 B_EKNLL_CRRD Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># … with 90 more rows</span></span>
<span class="r-in"><span><span class="co"># }</span></span></span>
</code></pre></div>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.0.0.9002</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.0.0.9003</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -198,8 +198,8 @@
<div class="section level2">
<h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="co"># data.table has a more limited version of %like%, so:</span></span></span>
<span class="r-in"><span><span class="kw"><a href="https://rdrr.io/r/base/detach.html" class="external-link">detach</a></span><span class="op">(</span><span class="st">"package:data.table"</span>, unload <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span>
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="co"># data.table has a more limited version of %like%, so unload it:</span></span></span>
<span class="r-in"><span><span class="kw"><a href="https://rdrr.io/r/base/try.html" class="external-link">try</a></span><span class="op">(</span><span class="kw"><a href="https://rdrr.io/r/base/detach.html" class="external-link">detach</a></span><span class="op">(</span><span class="st">"package:data.table"</span>, unload <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span>, silent <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="va">a</span> <span class="op">&lt;-</span> <span class="st">"This is a test"</span></span></span>
<span class="r-in"><span><span class="va">b</span> <span class="op">&lt;-</span> <span class="st">"TEST"</span></span></span>

File diff suppressed because one or more lines are too long

View File

@ -10,7 +10,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.0.0.9002</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.0.0.9003</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@ -201,31 +201,31 @@
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="va">sir</span> <span class="op">&lt;-</span> <span class="fu"><a href="random.html">random_sir</a></span><span class="op">(</span><span class="fl">10</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="va">sir</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'sir'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] R I I R S I I I S R</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] S S I I S R R R I I</span>
<span class="r-in"><span><span class="fu">mean_amr_distance</span><span class="op">(</span><span class="va">sir</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 1.449138 -0.621059 -0.621059 1.449138 -0.621059 -0.621059 -0.621059</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [8] -0.621059 -0.621059 1.449138</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] -0.621059 -0.621059 -0.621059 -0.621059 -0.621059 1.449138 1.449138</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [8] 1.449138 -0.621059 -0.621059</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="va">mic</span> <span class="op">&lt;-</span> <span class="fu"><a href="random.html">random_mic</a></span><span class="op">(</span><span class="fl">10</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="va">mic</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'mic'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 2 0.0625 0.5 &lt;=0.025 1 &lt;=0.025 2 0.5 &lt;=0.025</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [10] &gt;=256 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 0.5 0.002 &lt;=0.001 0.025 0.0625 0.25 &lt;=0.001 64 &gt;=256 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [10] 32 </span>
<span class="r-in"><span><span class="fu">mean_amr_distance</span><span class="op">(</span><span class="va">mic</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 0.52989759 -0.67629105 0.04742213 -0.99518998 0.28865986 -0.99518998</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] 0.52989759 0.04742213 -0.99518998 2.21856169</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 0.18238584 -1.00659270 -1.15585340 -0.46270817 -0.26539626 0.03312514</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] -1.15585340 1.22721075 1.52573215 1.07795004</span>
<span class="r-in"><span><span class="co"># equal to the Z-score of their log2:</span></span></span>
<span class="r-in"><span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/Log.html" class="external-link">log2</a></span><span class="op">(</span><span class="va">mic</span><span class="op">)</span> <span class="op">-</span> <span class="fu"><a href="https://rdrr.io/r/base/mean.html" class="external-link">mean</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/Log.html" class="external-link">log2</a></span><span class="op">(</span><span class="va">mic</span><span class="op">)</span><span class="op">)</span><span class="op">)</span> <span class="op">/</span> <span class="fu"><a href="https://rdrr.io/r/stats/sd.html" class="external-link">sd</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/Log.html" class="external-link">log2</a></span><span class="op">(</span><span class="va">mic</span><span class="op">)</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 0.52989759 -0.67629105 0.04742213 -0.99518998 0.28865986 -0.99518998</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] 0.52989759 0.04742213 -0.99518998 2.21856169</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 0.18238584 -1.00659270 -1.15585340 -0.46270817 -0.26539626 0.03312514</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] -1.15585340 1.22721075 1.52573215 1.07795004</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="va">disk</span> <span class="op">&lt;-</span> <span class="fu"><a href="random.html">random_disk</a></span><span class="op">(</span><span class="fl">10</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="va">disk</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class 'disk'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 36 41 38 14 14 46 22 45 45 40</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 20 27 47 48 29 33 49 6 11 50</span>
<span class="r-in"><span><span class="fu">mean_amr_distance</span><span class="op">(</span><span class="va">disk</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 0.1504749 0.5464614 0.3088695 -1.5918660 -1.5918660 0.9424480</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] -0.9582875 0.8632507 0.8632507 0.4672641</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] -0.73638265 -0.30682611 0.92047832 0.98184354 -0.18409566 0.06136522</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] 1.04320876 -1.59549575 -1.28866965 1.10457398</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="va">y</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/data.frame.html" class="external-link">data.frame</a></span><span class="op">(</span></span></span>
<span class="r-in"><span> id <span class="op">=</span> <span class="va">LETTERS</span><span class="op">[</span><span class="fl">1</span><span class="op">:</span><span class="fl">10</span><span class="op">]</span>,</span></span>
@ -235,22 +235,22 @@
<span class="r-in"><span> tobr <span class="op">=</span> <span class="fu"><a href="random.html">random_mic</a></span><span class="op">(</span><span class="fl">10</span>, ab <span class="op">=</span> <span class="st">"tobr"</span>, mo <span class="op">=</span> <span class="st">"Escherichia coli"</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="va">y</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> id amox cipr gent tobr</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 A S 30 8 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 B S 30 2 1</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 C R 27 8 8</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 D I 17 &lt;=1 8</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 E I 28 &lt;=1 1</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 F R 27 4 8</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 G I 25 4 8</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 H S 19 4 0.25</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 I I 18 &lt;=1 0.25</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 J S 26 2 0.5</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> id amox cipr gent tobr</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 A R 30 &gt;=16 &lt;=0.25</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 B S 30 4 &gt;=4</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 C S 17 &gt;=16 0.5</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 D I 18 8 &gt;=4</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 E R 18 4 0.5</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 F S 27 &gt;=16 0.5</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 G S 24 &gt;=16 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 H I 17 &gt;=16 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 I I 28 4 0.5</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 J I 18 &gt;=16 1</span>
<span class="r-in"><span><span class="fu">mean_amr_distance</span><span class="op">(</span><span class="va">y</span><span class="op">)</span></span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> Calculating mean AMR distance based on columns "amox", "cipr", "gent",</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> and "tobr"</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 0.51643016 -0.02872404 1.19466519 -0.54741122 -0.34374818 0.98167950</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] 0.28671398 -0.61531550 -1.09230611 -0.35198377</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 0.62894141 0.21607485 -0.36363778 -0.05249015 -0.25341632 0.07976901</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] 0.30030036 -0.01008439 -0.40293659 -0.14252040</span>
<span class="r-in"><span><span class="va">y</span><span class="op">$</span><span class="va">amr_distance</span> <span class="op">&lt;-</span> <span class="fu">mean_amr_distance</span><span class="op">(</span><span class="va">y</span>, <span class="fu"><a href="https://tidyselect.r-lib.org/reference/where.html" class="external-link">where</a></span><span class="op">(</span><span class="va">is.mic</span><span class="op">)</span><span class="op">)</span></span></span>
<span class="r-err co"><span class="r-pr">#&gt;</span> <span class="error">Error in .subset(x, j):</span> invalid subscript type 'list'</span>
<span class="r-in"><span><span class="va">y</span><span class="op">[</span><span class="fu"><a href="https://rdrr.io/r/base/order.html" class="external-link">order</a></span><span class="op">(</span><span class="va">y</span><span class="op">$</span><span class="va">amr_distance</span><span class="op">)</span>, <span class="op">]</span></span></span>
@ -266,17 +266,17 @@
<span class="r-in"><span><span class="op">}</span></span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> Calculating mean AMR distance based on columns "amox", "cipr", "gent",</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> and "tobr"</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> id amox cipr gent tobr amr_distance check_id_C</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 C R 27 8 8 1.19466519 0.0000000</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 F R 27 4 8 0.98167950 0.2129857</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 A S 30 8 2 0.51643016 0.6782350</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 G I 25 4 8 0.28671398 0.9079512</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 B S 30 2 1 -0.02872404 1.2233892</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 E I 28 &lt;=1 1 -0.34374818 1.5384134</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 J S 26 2 0.5 -0.35198377 1.5466490</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 D I 17 &lt;=1 8 -0.54741122 1.7420764</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 H S 19 4 0.25 -0.61531550 1.8099807</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 I I 18 &lt;=1 0.25 -1.09230611 2.2869713</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> id amox cipr gent tobr amr_distance check_id_C</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 C S 17 &gt;=16 0.5 -0.36363778 0.00000000</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 I I 28 4 0.5 -0.40293659 0.03929881</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 E R 18 4 0.5 -0.25341632 0.11022146</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 J I 18 &gt;=16 1 -0.14252040 0.22111737</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 D I 18 8 &gt;=4 -0.05249015 0.31114763</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 H I 17 &gt;=16 2 -0.01008439 0.35355339</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 F S 27 &gt;=16 0.5 0.07976901 0.44340679</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 B S 30 4 &gt;=4 0.21607485 0.57971263</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 G S 24 &gt;=16 2 0.30030036 0.66393814</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 A R 30 &gt;=16 &lt;=0.25 0.62894141 0.99257919</span>
<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">require</a></span><span class="op">(</span><span class="st"><a href="https://dplyr.tidyverse.org" class="external-link">"dplyr"</a></span><span class="op">)</span><span class="op">)</span> <span class="op">{</span></span></span>
<span class="r-in"><span> <span class="co"># support for groups</span></span></span>
<span class="r-in"><span> <span class="va">example_isolates</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span></span>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

File diff suppressed because one or more lines are too long