1
0
mirror of https://github.com/msberends/AMR.git synced 2026-08-20 07:59:33 +02:00

big website update, licence txt update

This commit is contained in:
2019-01-02 23:24:07 +01:00
parent 4255707cb7
commit 6b2d464f8c
190 changed files with 8785 additions and 66176 deletions

View File

@@ -49,7 +49,7 @@
<meta property="og:description" content="These functions are Deprecated. They will be removed in a future release. Using the functions will give a warning with the name of the function it has been replaced by." />
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@@ -80,7 +80,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
</span>
</div>
@@ -93,12 +93,65 @@
Home
</a>
</li>
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-question-circle"></span>
Get Started
How to
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
Conduct AMR analysis
</a>
</li>
<li>
<a href="../articles/Predict.html">
<span class="fa fa-dice"></span>
Predict antimicrobial resistance
</a>
</li>
<li>
<a href="../articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span>
Apply EUCAST rules
</a>
</li>
<li>
<a href="../articles/mo_property.html">
<span class="fa fa-bug"></span>
Get properties of a microorganism
</a>
</li>
<li>
<a href="../articles/ab_property.html">
<span class="fa fa-capsules"></span>
Get properties of an antibiotic
</a>
</li>
<li>
<a href="../articles/freq.html">
<span class="fa fa-sort-amount-down"></span>
Create frequency tables
</a>
</li>
<li>
<a href="../articles/G_test.html">
<span class="fa fa-clipboard-check"></span>
Use the G-test
</a>
</li>
</ul>
</li>
<li>
<a href="../reference/">
@@ -121,17 +174,17 @@
Changelog
</a>
</li>
<li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://gitlab.com/msberends/AMR">
<span class="fab fa fab fa-gitlab"></span>
Source Code
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<li>
<a href="../LICENSE-text.html">
<span class="fa fa-book"></span>
@@ -169,12 +222,20 @@
<pre class="usage"><span class='fu'>ratio</span>(<span class='no'>x</span>, <span class='no'>ratio</span>)</pre>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
</ul>
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
</ul>
</div>
</div>

View File

@@ -49,7 +49,7 @@
<meta property="og:description" content="Welcome to the AMR package. This page gives some additional contact information about the authors." />
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@@ -80,7 +80,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
</span>
</div>
@@ -93,12 +93,65 @@
Home
</a>
</li>
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-question-circle"></span>
Get Started
How to
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
Conduct AMR analysis
</a>
</li>
<li>
<a href="../articles/Predict.html">
<span class="fa fa-dice"></span>
Predict antimicrobial resistance
</a>
</li>
<li>
<a href="../articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span>
Apply EUCAST rules
</a>
</li>
<li>
<a href="../articles/mo_property.html">
<span class="fa fa-bug"></span>
Get properties of a microorganism
</a>
</li>
<li>
<a href="../articles/ab_property.html">
<span class="fa fa-capsules"></span>
Get properties of an antibiotic
</a>
</li>
<li>
<a href="../articles/freq.html">
<span class="fa fa-sort-amount-down"></span>
Create frequency tables
</a>
</li>
<li>
<a href="../articles/G_test.html">
<span class="fa fa-clipboard-check"></span>
Use the G-test
</a>
</li>
</ul>
</li>
<li>
<a href="../reference/">
@@ -121,17 +174,17 @@
Changelog
</a>
</li>
<li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://gitlab.com/msberends/AMR">
<span class="fab fa fab fa-gitlab"></span>
Source Code
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<li>
<a href="../LICENSE-text.html">
<span class="fa fa-book"></span>
@@ -173,10 +226,16 @@
<p>This package was intended to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and ti work with antibiotic properties by using evidence-based methods.</p>
<p>This package was created for academic research by PhD students of the Faculty of Medical Sciences of the University of Groningen and the Medical Microbiology &amp; Infection Prevention (MMBI) department of the University Medical Center Groningen (UMCG).</p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
<h2 class="hasAnchor" id="authors"><a class="anchor" href="#authors"></a>Authors</h2>
<p>Matthijs S. Berends[1,2] Christian F. Luz[1], Erwin E.A. Hassing[2], Corinna Glasner[1], Alex W. Friedrich[1], Bhanu Sinha[1] <br /></p>
<p>Matthijs S. Berends[1,2] Christian F. Luz[1], Erwin E.A. Hassing[2], Corinna Glasner[1], Alex W. Friedrich[1], Bhanu N.M. Sinha[1] <br /></p>
<p>[1] Department of Medical Microbiology, University of Groningen, University Medical Center Groningen, Groningen, the Netherlands - <a href='rug.nl'>rug.nl</a> <a href='umcg.nl'>umcg.nl</a> <br />
[2] Certe Medical Diagnostics &amp; Advice, Groningen, the Netherlands - <a href='certe.nl'>certe.nl</a></p>
@@ -201,6 +260,8 @@ Post Office Box 30001 <br />
<li><a href="#details">Details</a></li>
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
<li><a href="#authors">Authors</a></li>
<li><a href="#contact-us">Contact us</a></li>

View File

@@ -49,7 +49,7 @@
<meta property="og:description" content="Use these functions to return a specific property of an antibiotic from the antibiotics data set, based on their ATC code. Get such a code with as.atc." />
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@@ -80,7 +80,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
</span>
</div>
@@ -93,12 +93,65 @@
Home
</a>
</li>
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-question-circle"></span>
Get Started
How to
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
Conduct AMR analysis
</a>
</li>
<li>
<a href="../articles/Predict.html">
<span class="fa fa-dice"></span>
Predict antimicrobial resistance
</a>
</li>
<li>
<a href="../articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span>
Apply EUCAST rules
</a>
</li>
<li>
<a href="../articles/mo_property.html">
<span class="fa fa-bug"></span>
Get properties of a microorganism
</a>
</li>
<li>
<a href="../articles/ab_property.html">
<span class="fa fa-capsules"></span>
Get properties of an antibiotic
</a>
</li>
<li>
<a href="../articles/freq.html">
<span class="fa fa-sort-amount-down"></span>
Create frequency tables
</a>
</li>
<li>
<a href="../articles/G_test.html">
<span class="fa fa-clipboard-check"></span>
Use the G-test
</a>
</li>
</ul>
</li>
<li>
<a href="../reference/">
@@ -121,17 +174,17 @@
Changelog
</a>
</li>
<li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://gitlab.com/msberends/AMR">
<span class="fab fa fab fa-gitlab"></span>
Source Code
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<li>
<a href="../LICENSE-text.html">
<span class="fa fa-book"></span>
@@ -204,13 +257,26 @@
<p>A vector of values. In case of <code>ab_tradenames</code>, if <code>x</code> is of length one, a vector will be returned. Otherwise a <code><a href='https://www.rdocumentation.org/packages/base/topics/list'>list</a></code>, with <code>x</code> as names.</p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p><code><a href='antibiotics.html'>antibiotics</a></code></p></div>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='fu'>ab_atc</span>(<span class='st'>"amcl"</span>) <span class='co'># J01CR02</span></div><div class='output co'>#&gt; [1] "J01CR02"</div><div class='input'><span class='fu'>ab_name</span>(<span class='st'>"amcl"</span>) <span class='co'># Amoxicillin and beta-lactamase inhibitor</span></div><div class='output co'>#&gt; [1] "Amoxicillin and beta-lactamase inhibitor"</div><div class='input'><span class='fu'>ab_name</span>(<span class='st'>"amcl"</span>, <span class='st'>"nl"</span>) <span class='co'># Amoxicilline met enzymremmer</span></div><div class='output co'>#&gt; [1] "Amoxicilline met enzymremmer"</div><div class='input'><span class='fu'>ab_trivial_nl</span>(<span class='st'>"amcl"</span>) <span class='co'># Amoxicilline/clavulaanzuur</span></div><div class='output co'>#&gt; [1] "Amoxicilline/clavulaanzuur"</div><div class='input'><span class='fu'>ab_certe</span>(<span class='st'>"amcl"</span>) <span class='co'># amcl</span></div><div class='output co'>#&gt; [1] "amcl"</div><div class='input'><span class='fu'>ab_umcg</span>(<span class='st'>"amcl"</span>) <span class='co'># AMCL</span></div><div class='output co'>#&gt; [1] "AMCL"</div></pre>
<pre class="examples"><span class='co'># NOT RUN {</span>
<span class='fu'>ab_atc</span>(<span class='st'>"amcl"</span>) <span class='co'># J01CR02</span>
<span class='fu'>ab_name</span>(<span class='st'>"amcl"</span>) <span class='co'># Amoxicillin and beta-lactamase inhibitor</span>
<span class='fu'>ab_name</span>(<span class='st'>"amcl"</span>, <span class='st'>"nl"</span>) <span class='co'># Amoxicilline met enzymremmer</span>
<span class='fu'>ab_trivial_nl</span>(<span class='st'>"amcl"</span>) <span class='co'># Amoxicilline/clavulaanzuur</span>
<span class='fu'>ab_certe</span>(<span class='st'>"amcl"</span>) <span class='co'># amcl</span>
<span class='fu'>ab_umcg</span>(<span class='st'>"amcl"</span>) <span class='co'># AMCL</span>
<span class='co'># }</span></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
@@ -219,6 +285,8 @@
<li><a href="#value">Value</a></li>
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
<li><a href="#see-also">See also</a></li>
<li><a href="#examples">Examples</a></li>

View File

@@ -49,7 +49,7 @@
<meta property="og:description" content="Convert antibiotic codes to a (trivial) antibiotic name or ATC code, or vice versa. This uses the data from antibiotics." />
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@@ -80,7 +80,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
</span>
</div>
@@ -93,12 +93,65 @@
Home
</a>
</li>
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-question-circle"></span>
Get Started
How to
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
Conduct AMR analysis
</a>
</li>
<li>
<a href="../articles/Predict.html">
<span class="fa fa-dice"></span>
Predict antimicrobial resistance
</a>
</li>
<li>
<a href="../articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span>
Apply EUCAST rules
</a>
</li>
<li>
<a href="../articles/mo_property.html">
<span class="fa fa-bug"></span>
Get properties of a microorganism
</a>
</li>
<li>
<a href="../articles/ab_property.html">
<span class="fa fa-capsules"></span>
Get properties of an antibiotic
</a>
</li>
<li>
<a href="../articles/freq.html">
<span class="fa fa-sort-amount-down"></span>
Create frequency tables
</a>
</li>
<li>
<a href="../articles/G_test.html">
<span class="fa fa-clipboard-check"></span>
Use the G-test
</a>
</li>
</ul>
</li>
<li>
<a href="../reference/">
@@ -121,17 +174,17 @@
Changelog
</a>
</li>
<li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://gitlab.com/msberends/AMR">
<span class="fab fa fab fa-gitlab"></span>
Source Code
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<li>
<a href="../LICENSE-text.html">
<span class="fa fa-book"></span>
@@ -199,30 +252,44 @@
<p><strong>The <code><a href='ab_property.html'>ab_property</a></code> functions are faster and more concise</strong>, but do not support concatenated strings, like <code>abname("AMCL+GENT"</code>.</p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='fu'>abname</span>(<span class='st'>"AMCL"</span>)</div><div class='output co'>#&gt; [1] "Amoxicillin and beta-lactamase inhibitor"</div><div class='input'><span class='co'># "Amoxicillin and beta-lactamase inhibitor"</span>
<pre class="examples"><span class='co'># NOT RUN {</span>
<span class='fu'>abname</span>(<span class='st'>"AMCL"</span>)
<span class='co'># "Amoxicillin and beta-lactamase inhibitor"</span>
<span class='co'># It is quite flexible at default (having `from = "guess"`)</span>
<span class='fu'>abname</span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"amox"</span>, <span class='st'>"J01CA04"</span>, <span class='st'>"Trimox"</span>, <span class='st'>"dispermox"</span>, <span class='st'>"Amoxil"</span>))</div><div class='output co'>#&gt; [1] "Amoxicillin" "Amoxicillin" "Amoxicillin" "Amoxicillin" "Amoxicillin"</div><div class='input'><span class='co'># "Amoxicillin" "Amoxicillin" "Amoxicillin" "Amoxicillin" "Amoxicillin"</span>
<span class='fu'>abname</span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"amox"</span>, <span class='st'>"J01CA04"</span>, <span class='st'>"Trimox"</span>, <span class='st'>"dispermox"</span>, <span class='st'>"Amoxil"</span>))
<span class='co'># "Amoxicillin" "Amoxicillin" "Amoxicillin" "Amoxicillin" "Amoxicillin"</span>
<span class='co'># Multiple antibiotics can be combined with "+".</span>
<span class='co'># The second antibiotic will be set to lower case when `tolower` was not set:</span>
<span class='fu'>abname</span>(<span class='st'>"AMCL+GENT"</span>, <span class='kw'>textbetween</span> <span class='kw'>=</span> <span class='st'>"/"</span>)</div><div class='output co'>#&gt; [1] "Amoxicillin and beta-lactamase inhibitor/gentamicin"</div><div class='input'><span class='co'># "amoxicillin and enzyme inhibitor/gentamicin"</span>
<span class='fu'>abname</span>(<span class='st'>"AMCL+GENT"</span>, <span class='kw'>textbetween</span> <span class='kw'>=</span> <span class='st'>"/"</span>)
<span class='co'># "amoxicillin and enzyme inhibitor/gentamicin"</span>
<span class='fu'>abname</span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"AMCL"</span>, <span class='st'>"GENT"</span>))</div><div class='output co'>#&gt; [1] "Amoxicillin and beta-lactamase inhibitor"
#&gt; [2] "Gentamicin" </div><div class='input'><span class='co'># "Amoxicillin and beta-lactamase inhibitor" "Gentamicin"</span>
<span class='fu'>abname</span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"AMCL"</span>, <span class='st'>"GENT"</span>))
<span class='co'># "Amoxicillin and beta-lactamase inhibitor" "Gentamicin"</span>
<span class='fu'>abname</span>(<span class='st'>"AMCL"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"trivial_nl"</span>)</div><div class='output co'>#&gt; [1] "Amoxicilline/clavulaanzuur"</div><div class='input'><span class='co'># "Amoxicilline/clavulaanzuur"</span>
<span class='fu'>abname</span>(<span class='st'>"AMCL"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"trivial_nl"</span>)
<span class='co'># "Amoxicilline/clavulaanzuur"</span>
<span class='fu'>abname</span>(<span class='st'>"AMCL"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"atc"</span>)</div><div class='output co'>#&gt; [1] "J01CR02"</div><div class='input'><span class='co'># "J01CR02"</span>
<span class='fu'>abname</span>(<span class='st'>"AMCL"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"atc"</span>)
<span class='co'># "J01CR02"</span>
<span class='co'># specific codes for University Medical Center Groningen (UMCG):</span>
<span class='fu'>abname</span>(<span class='st'>"J01CR02"</span>, <span class='kw'>from</span> <span class='kw'>=</span> <span class='st'>"atc"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"umcg"</span>)</div><div class='output co'>#&gt; [1] "AMCL"</div><div class='input'><span class='co'># "AMCL"</span>
<span class='fu'>abname</span>(<span class='st'>"J01CR02"</span>, <span class='kw'>from</span> <span class='kw'>=</span> <span class='st'>"atc"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"umcg"</span>)
<span class='co'># "AMCL"</span>
<span class='co'># specific codes for Certe:</span>
<span class='fu'>abname</span>(<span class='st'>"J01CR02"</span>, <span class='kw'>from</span> <span class='kw'>=</span> <span class='st'>"atc"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"certe"</span>)</div><div class='output co'>#&gt; [1] "amcl"</div><div class='input'># "amcl"
</div></pre>
<span class='fu'>abname</span>(<span class='st'>"J01CR02"</span>, <span class='kw'>from</span> <span class='kw'>=</span> <span class='st'>"atc"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"certe"</span>)
<span class='co'># "amcl"</span>
<span class='co'># }</span></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
@@ -232,6 +299,8 @@
<li><a href="#source">Source</a></li>
<li><a href="#details">Details</a></li>
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
<li><a href="#examples">Examples</a></li>
</ul>

View File

@@ -49,7 +49,7 @@
<meta property="og:description" content="Calculates age in years based on a reference date, which is the sytem time at default." />
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@@ -80,7 +80,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
</span>
</div>
@@ -93,12 +93,65 @@
Home
</a>
</li>
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-question-circle"></span>
Get Started
How to
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
Conduct AMR analysis
</a>
</li>
<li>
<a href="../articles/Predict.html">
<span class="fa fa-dice"></span>
Predict antimicrobial resistance
</a>
</li>
<li>
<a href="../articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span>
Apply EUCAST rules
</a>
</li>
<li>
<a href="../articles/mo_property.html">
<span class="fa fa-bug"></span>
Get properties of a microorganism
</a>
</li>
<li>
<a href="../articles/ab_property.html">
<span class="fa fa-capsules"></span>
Get properties of an antibiotic
</a>
</li>
<li>
<a href="../articles/freq.html">
<span class="fa fa-sort-amount-down"></span>
Create frequency tables
</a>
</li>
<li>
<a href="../articles/G_test.html">
<span class="fa fa-clipboard-check"></span>
Use the G-test
</a>
</li>
</ul>
</li>
<li>
<a href="../reference/">
@@ -121,17 +174,17 @@
Changelog
</a>
</li>
<li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://gitlab.com/msberends/AMR">
<span class="fab fa fab fa-gitlab"></span>
Source Code
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<li>
<a href="../LICENSE-text.html">
<span class="fa fa-book"></span>
@@ -186,6 +239,12 @@
<p>Integer (no decimals)</p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p><code><a href='age_groups.html'>age_groups</a></code> to splits age into groups</p></div>
@@ -199,6 +258,8 @@
<li><a href="#value">Value</a></li>
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
<li><a href="#see-also">See also</a></li>
</ul>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

View File

@@ -49,7 +49,7 @@
<meta property="og:description" content="Split ages into age groups defined by the split parameter. This allows for easier demographic (antimicrobial resistance) analysis." />
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@@ -80,7 +80,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
</span>
</div>
@@ -93,12 +93,65 @@
Home
</a>
</li>
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-question-circle"></span>
Get Started
How to
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
Conduct AMR analysis
</a>
</li>
<li>
<a href="../articles/Predict.html">
<span class="fa fa-dice"></span>
Predict antimicrobial resistance
</a>
</li>
<li>
<a href="../articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span>
Apply EUCAST rules
</a>
</li>
<li>
<a href="../articles/mo_property.html">
<span class="fa fa-bug"></span>
Get properties of a microorganism
</a>
</li>
<li>
<a href="../articles/ab_property.html">
<span class="fa fa-capsules"></span>
Get properties of an antibiotic
</a>
</li>
<li>
<a href="../articles/freq.html">
<span class="fa fa-sort-amount-down"></span>
Create frequency tables
</a>
</li>
<li>
<a href="../articles/G_test.html">
<span class="fa fa-clipboard-check"></span>
Use the G-test
</a>
</li>
</ul>
</li>
<li>
<a href="../reference/">
@@ -121,17 +174,17 @@
Changelog
</a>
</li>
<li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://gitlab.com/msberends/AMR">
<span class="fab fa fab fa-gitlab"></span>
Source Code
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<li>
<a href="../LICENSE-text.html">
<span class="fa fa-book"></span>
@@ -199,49 +252,51 @@
</ul></li>
</ul>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p><code><a href='age.html'>age</a></code> to determine ages based on one or more reference dates</p></div>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='no'>ages</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='fl'>3</span>, <span class='fl'>8</span>, <span class='fl'>16</span>, <span class='fl'>54</span>, <span class='fl'>31</span>, <span class='fl'>76</span>, <span class='fl'>101</span>, <span class='fl'>43</span>, <span class='fl'>21</span>)
<pre class="examples"><span class='co'># NOT RUN {</span>
<span class='no'>ages</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='fl'>3</span>, <span class='fl'>8</span>, <span class='fl'>16</span>, <span class='fl'>54</span>, <span class='fl'>31</span>, <span class='fl'>76</span>, <span class='fl'>101</span>, <span class='fl'>43</span>, <span class='fl'>21</span>)
<span class='co'># split into 0-49 and 50+</span>
<span class='fu'>age_groups</span>(<span class='no'>ages</span>, <span class='fl'>50</span>)</div><div class='output co'>#&gt; [1] 0-49 0-49 0-49 50+ 0-49 50+ 50+ 0-49 0-49
#&gt; Levels: 0-49 &lt; 50+</div><div class='input'>
<span class='fu'>age_groups</span>(<span class='no'>ages</span>, <span class='fl'>50</span>)
<span class='co'># split into 0-19, 20-49 and 50+</span>
<span class='fu'>age_groups</span>(<span class='no'>ages</span>, <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='fl'>20</span>, <span class='fl'>50</span>))</div><div class='output co'>#&gt; [1] 0-19 0-19 0-19 50+ 20-49 50+ 50+ 20-49 20-49
#&gt; Levels: 0-19 &lt; 20-49 &lt; 50+</div><div class='input'>
<span class='fu'>age_groups</span>(<span class='no'>ages</span>, <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='fl'>20</span>, <span class='fl'>50</span>))
<span class='co'># split into groups of ten years</span>
<span class='fu'>age_groups</span>(<span class='no'>ages</span>, <span class='fl'>1</span>:<span class='fl'>10</span> * <span class='fl'>10</span>)</div><div class='output co'>#&gt; [1] 0-9 0-9 10-19 50-59 30-39 70-79 100+ 40-49 20-29
#&gt; 11 Levels: 0-9 &lt; 10-19 &lt; 20-29 &lt; 30-39 &lt; 40-49 &lt; 50-59 &lt; 60-69 &lt; ... &lt; 100+</div><div class='input'><span class='fu'>age_groups</span>(<span class='no'>ages</span>, <span class='kw'>split_at</span> <span class='kw'>=</span> <span class='st'>"tens"</span>)</div><div class='output co'>#&gt; [1] 0-9 0-9 10-19 50-59 30-39 70-79 100+ 40-49 20-29
#&gt; 11 Levels: 0-9 &lt; 10-19 &lt; 20-29 &lt; 30-39 &lt; 40-49 &lt; 50-59 &lt; 60-69 &lt; ... &lt; 100+</div><div class='input'>
<span class='fu'>age_groups</span>(<span class='no'>ages</span>, <span class='fl'>1</span>:<span class='fl'>10</span> * <span class='fl'>10</span>)
<span class='fu'>age_groups</span>(<span class='no'>ages</span>, <span class='kw'>split_at</span> <span class='kw'>=</span> <span class='st'>"tens"</span>)
<span class='co'># split into groups of five years</span>
<span class='fu'>age_groups</span>(<span class='no'>ages</span>, <span class='fl'>1</span>:<span class='fl'>20</span> * <span class='fl'>5</span>)</div><div class='output co'>#&gt; [1] 0-4 5-9 15-19 50-54 30-34 75-79 100+ 40-44 20-24
#&gt; 21 Levels: 0-4 &lt; 5-9 &lt; 10-14 &lt; 15-19 &lt; 20-24 &lt; 25-29 &lt; 30-34 &lt; ... &lt; 100+</div><div class='input'><span class='fu'>age_groups</span>(<span class='no'>ages</span>, <span class='kw'>split_at</span> <span class='kw'>=</span> <span class='st'>"fives"</span>)</div><div class='output co'>#&gt; [1] 0-4 5-9 15-19 50-54 30-34 75-79 100+ 40-44 20-24
#&gt; 21 Levels: 0-4 &lt; 5-9 &lt; 10-14 &lt; 15-19 &lt; 20-24 &lt; 25-29 &lt; 30-34 &lt; ... &lt; 100+</div><div class='input'>
<span class='fu'>age_groups</span>(<span class='no'>ages</span>, <span class='fl'>1</span>:<span class='fl'>20</span> * <span class='fl'>5</span>)
<span class='fu'>age_groups</span>(<span class='no'>ages</span>, <span class='kw'>split_at</span> <span class='kw'>=</span> <span class='st'>"fives"</span>)
<span class='co'># split specifically for children</span>
<span class='fu'>age_groups</span>(<span class='no'>ages</span>, <span class='st'>"children"</span>)</div><div class='output co'>#&gt; [1] 2-3 6-12 13-17 18+ 18+ 18+ 18+ 18+ 18+
#&gt; Levels: 0 &lt; 1 &lt; 2-3 &lt; 4-5 &lt; 6-12 &lt; 13-17 &lt; 18+</div><div class='input'><span class='co'># same:</span>
<span class='fu'>age_groups</span>(<span class='no'>ages</span>, <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='fl'>1</span>, <span class='fl'>2</span>, <span class='fl'>4</span>, <span class='fl'>6</span>, <span class='fl'>13</span>, <span class='fl'>17</span>))</div><div class='output co'>#&gt; [1] 2-3 6-12 13-16 17+ 17+ 17+ 17+ 17+ 17+
#&gt; Levels: 0 &lt; 1 &lt; 2-3 &lt; 4-5 &lt; 6-12 &lt; 13-16 &lt; 17+</div><div class='input'>
<span class='fu'>age_groups</span>(<span class='no'>ages</span>, <span class='st'>"children"</span>)
<span class='co'># same:</span>
<span class='fu'>age_groups</span>(<span class='no'>ages</span>, <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='fl'>1</span>, <span class='fl'>2</span>, <span class='fl'>4</span>, <span class='fl'>6</span>, <span class='fl'>13</span>, <span class='fl'>17</span>))
<span class='co'># resistance of ciprofloxacine per age group</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/library'>library</a></span>(<span class='no'>dplyr</span>)</div><div class='output co'>#&gt; <span class='message'></span>
#&gt; <span class='message'>Attaching package: dplyr</span></div><div class='output co'>#&gt; <span class='message'>The following object is masked from package:testthat:</span>
#&gt; <span class='message'></span>
#&gt; <span class='message'> matches</span></div><div class='output co'>#&gt; <span class='message'>The following objects are masked from package:stats:</span>
#&gt; <span class='message'></span>
#&gt; <span class='message'> filter, lag</span></div><div class='output co'>#&gt; <span class='message'>The following objects are masked from package:base:</span>
#&gt; <span class='message'></span>
#&gt; <span class='message'> intersect, setdiff, setequal, union</span></div><div class='input'><span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/mutate.html'>mutate</a></span>(<span class='kw'>first_isolate</span> <span class='kw'>=</span> <span class='fu'><a href='first_isolate.html'>first_isolate</a></span>(<span class='no'>.</span>)) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/filter.html'>filter</a></span>(<span class='no'>first_isolate</span> <span class='kw'>==</span> <span class='fl'>TRUE</span>,
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/library'>library</a></span>(<span class='no'>dplyr</span>)
<span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/mutate'>mutate</a></span>(<span class='kw'>first_isolate</span> <span class='kw'>=</span> <span class='fu'><a href='first_isolate.html'>first_isolate</a></span>(<span class='no'>.</span>)) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/filter'>filter</a></span>(<span class='no'>first_isolate</span> <span class='kw'>==</span> <span class='fl'>TRUE</span>,
<span class='no'>mo</span> <span class='kw'>==</span> <span class='fu'><a href='as.mo.html'>as.mo</a></span>(<span class='st'>"E. coli"</span>)) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/group_by.html'>group_by</a></span>(<span class='kw'>age_group</span> <span class='kw'>=</span> <span class='fu'>age_groups</span>(<span class='no'>age</span>)) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/select.html'>select</a></span>(<span class='no'>age_group</span>,
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/group_by'>group_by</a></span>(<span class='kw'>age_group</span> <span class='kw'>=</span> <span class='fu'>age_groups</span>(<span class='no'>age</span>)) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/select'>select</a></span>(<span class='no'>age_group</span>,
<span class='no'>cipr</span>) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='ggplot_rsi.html'>ggplot_rsi</a></span>(<span class='kw'>x</span> <span class='kw'>=</span> <span class='st'>"age_group"</span>)</div><div class='output co'>#&gt; <span class='message'><span style='color: #0000BB;'>NOTE: Using column `</span><span style='color: #0000BB;font-weight: bold;'>mo</span><span style='color: #0000BB;'>` as input for `col_mo`.</span><span></span></div><div class='output co'>#&gt; <span class='message'></span><span style='color: #0000BB;'>NOTE: Using column `</span><span style='color: #0000BB;font-weight: bold;'>date</span><span style='color: #0000BB;'>` as input for `col_date`.</span><span></span></div><div class='output co'>#&gt; <span class='message'></span><span style='color: #0000BB;'>NOTE: Using column `</span><span style='color: #0000BB;font-weight: bold;'>patient_id</span><span style='color: #0000BB;'>` as input for `col_patient_id`.</span><span></span></div><div class='output co'>#&gt; <span class='message'>=&gt; Found </span><span style='font-weight: bold;'>1,317 first isolates</span><span> (65.9% of total)</span></div><div class='output co'>#&gt; <span class='warning'>Warning: Removed 3 rows containing missing values (geom_bar).</span></div><div class='output co'>#&gt; <span class='warning'>Warning: Removed 3 rows containing missing values (geom_text).</span></div><div class='img'><img src='age_groups-1.png' alt='' width='700' height='433' /></div></span></pre>
<span class='fu'><a href='ggplot_rsi.html'>ggplot_rsi</a></span>(<span class='kw'>x</span> <span class='kw'>=</span> <span class='st'>"age_group"</span>)
<span class='co'># }</span></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
@@ -252,6 +307,8 @@
<li><a href="#details">Details</a></li>
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
<li><a href="#see-also">See also</a></li>
<li><a href="#examples">Examples</a></li>

View File

@@ -49,7 +49,7 @@
<meta property="og:description" content="A data set containing all antibiotics with a J0 code and some other antimicrobial agents, with their DDDs. Except for trade names and abbreviations, all properties were downloaded from the WHO, see Source." />
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@@ -80,7 +80,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
</span>
</div>
@@ -93,12 +93,65 @@
Home
</a>
</li>
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-question-circle"></span>
Get Started
How to
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
Conduct AMR analysis
</a>
</li>
<li>
<a href="../articles/Predict.html">
<span class="fa fa-dice"></span>
Predict antimicrobial resistance
</a>
</li>
<li>
<a href="../articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span>
Apply EUCAST rules
</a>
</li>
<li>
<a href="../articles/mo_property.html">
<span class="fa fa-bug"></span>
Get properties of a microorganism
</a>
</li>
<li>
<a href="../articles/ab_property.html">
<span class="fa fa-capsules"></span>
Get properties of an antibiotic
</a>
</li>
<li>
<a href="../articles/freq.html">
<span class="fa fa-sort-amount-down"></span>
Create frequency tables
</a>
</li>
<li>
<a href="../articles/G_test.html">
<span class="fa fa-clipboard-check"></span>
Use the G-test
</a>
</li>
</ul>
</li>
<li>
<a href="../reference/">
@@ -121,17 +174,17 @@
Changelog
</a>
</li>
<li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://gitlab.com/msberends/AMR">
<span class="fab fa fab fa-gitlab"></span>
Source Code
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<li>
<a href="../LICENSE-text.html">
<span class="fa fa-book"></span>
@@ -196,6 +249,12 @@
<p>- World Health Organization: <a href='https://www.whocc.no/atc_ddd_index/'>https://www.whocc.no/atc_ddd_index/</a> <br /> - EUCAST - Expert rules intrinsic exceptional V3.1 <br /> - MOLIS (LIS of Certe): <a href='https://www.certe.nl'>https://www.certe.nl</a> <br /> - GLIMS (LIS of UMCG): <a href='https://www.umcg.nl'>https://www.umcg.nl</a></p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p><code><a href='microorganisms.html'>microorganisms</a></code></p></div>
@@ -210,6 +269,8 @@
<li><a href="#source">Source</a></li>
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
<li><a href="#see-also">See also</a></li>
</ul>

View File

@@ -49,7 +49,7 @@
<meta property="og:description" content="Use this function to determine the ATC code of one or more antibiotics. The data set antibiotics will be searched for abbreviations, official names and trade names." />
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@@ -80,7 +80,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
</span>
</div>
@@ -93,12 +93,65 @@
Home
</a>
</li>
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-question-circle"></span>
Get Started
How to
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
Conduct AMR analysis
</a>
</li>
<li>
<a href="../articles/Predict.html">
<span class="fa fa-dice"></span>
Predict antimicrobial resistance
</a>
</li>
<li>
<a href="../articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span>
Apply EUCAST rules
</a>
</li>
<li>
<a href="../articles/mo_property.html">
<span class="fa fa-bug"></span>
Get properties of a microorganism
</a>
</li>
<li>
<a href="../articles/ab_property.html">
<span class="fa fa-capsules"></span>
Get properties of an antibiotic
</a>
</li>
<li>
<a href="../articles/freq.html">
<span class="fa fa-sort-amount-down"></span>
Create frequency tables
</a>
</li>
<li>
<a href="../articles/G_test.html">
<span class="fa fa-clipboard-check"></span>
Use the G-test
</a>
</li>
</ul>
</li>
<li>
<a href="../reference/">
@@ -121,17 +174,17 @@
Changelog
</a>
</li>
<li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://gitlab.com/msberends/AMR">
<span class="fab fa fab fa-gitlab"></span>
Source Code
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<li>
<a href="../LICENSE-text.html">
<span class="fa fa-book"></span>
@@ -192,26 +245,35 @@
<p>In the ATC classification system, the active substances are classified in a hierarchy with five different levels. The system has fourteen main anatomical/pharmacological groups or 1st levels. Each ATC main group is divided into 2nd levels which could be either pharmacological or therapeutic groups. The 3rd and 4th levels are chemical, pharmacological or therapeutic subgroups and the 5th level is the chemical substance. The 2nd, 3rd and 4th levels are often used to identify pharmacological subgroups when that is considered more appropriate than therapeutic or chemical subgroups.
Source: <a href='https://www.whocc.no/atc/structure_and_principles/'>https://www.whocc.no/atc/structure_and_principles/</a></p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p><code><a href='antibiotics.html'>antibiotics</a></code> for the dataframe that is being used to determine ATCs.</p></div>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='co'># These examples all return "J01FA01", the ATC code of Erythromycin:</span>
<span class='fu'>as.atc</span>(<span class='st'>"J01FA01"</span>)</div><div class='output co'>#&gt; Class 'atc'
#&gt; [1] J01FA01</div><div class='input'><span class='fu'>as.atc</span>(<span class='st'>"Erythromycin"</span>)</div><div class='output co'>#&gt; Class 'atc'
#&gt; [1] J01FA01</div><div class='input'><span class='fu'>as.atc</span>(<span class='st'>"eryt"</span>)</div><div class='output co'>#&gt; Class 'atc'
#&gt; [1] J01FA01</div><div class='input'><span class='fu'>as.atc</span>(<span class='st'>" eryt 123"</span>)</div><div class='output co'>#&gt; Class 'atc'
#&gt; [1] J01FA01</div><div class='input'><span class='fu'>as.atc</span>(<span class='st'>"ERYT"</span>)</div><div class='output co'>#&gt; Class 'atc'
#&gt; [1] J01FA01</div><div class='input'><span class='fu'>as.atc</span>(<span class='st'>"ERY"</span>)</div><div class='output co'>#&gt; Class 'atc'
#&gt; [1] J01FA01</div><div class='input'><span class='fu'>as.atc</span>(<span class='st'>"Erythrocin"</span>) <span class='co'># Trade name</span></div><div class='output co'>#&gt; Class 'atc'
#&gt; [1] J01FA01</div><div class='input'><span class='fu'>as.atc</span>(<span class='st'>"Eryzole"</span>) <span class='co'># Trade name</span></div><div class='output co'>#&gt; Class 'atc'
#&gt; [1] J01FA01</div><div class='input'><span class='fu'>as.atc</span>(<span class='st'>"Pediamycin"</span>) <span class='co'># Trade name</span></div><div class='output co'>#&gt; Class 'atc'
#&gt; [1] J01FA01</div><div class='input'>
<pre class="examples"><span class='co'># NOT RUN {</span>
<span class='co'># These examples all return "J01FA01", the ATC code of Erythromycin:</span>
<span class='fu'>as.atc</span>(<span class='st'>"J01FA01"</span>)
<span class='fu'>as.atc</span>(<span class='st'>"Erythromycin"</span>)
<span class='fu'>as.atc</span>(<span class='st'>"eryt"</span>)
<span class='fu'>as.atc</span>(<span class='st'>" eryt 123"</span>)
<span class='fu'>as.atc</span>(<span class='st'>"ERYT"</span>)
<span class='fu'>as.atc</span>(<span class='st'>"ERY"</span>)
<span class='fu'>as.atc</span>(<span class='st'>"Erythrocin"</span>) <span class='co'># Trade name</span>
<span class='fu'>as.atc</span>(<span class='st'>"Eryzole"</span>) <span class='co'># Trade name</span>
<span class='fu'>as.atc</span>(<span class='st'>"Pediamycin"</span>) <span class='co'># Trade name</span>
<span class='co'># Use ab_* functions to get a specific property based on an ATC code</span>
<span class='no'>Cipro</span> <span class='kw'>&lt;-</span> <span class='fu'>as.atc</span>(<span class='st'>"cipro"</span>) <span class='co'># returns `J01MA02`</span>
<span class='fu'><a href='ab_property.html'>ab_official</a></span>(<span class='no'>Cipro</span>) <span class='co'># returns "Ciprofloxacin"</span></div><div class='output co'>#&gt; [1] "Ciprofloxacin"</div><div class='input'><span class='fu'><a href='ab_property.html'>ab_umcg</a></span>(<span class='no'>Cipro</span>) <span class='co'># returns "CIPR", the code used in the UMCG</span></div><div class='output co'>#&gt; [1] "CIPR"</div></pre>
<span class='fu'><a href='ab_property.html'>ab_official</a></span>(<span class='no'>Cipro</span>) <span class='co'># returns "Ciprofloxacin"</span>
<span class='fu'><a href='ab_property.html'>ab_umcg</a></span>(<span class='no'>Cipro</span>) <span class='co'># returns "CIPR", the code used in the UMCG</span>
<span class='co'># }</span></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
@@ -222,6 +284,8 @@
<li><a href="#details">Details</a></li>
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
<li><a href="#see-also">See also</a></li>
<li><a href="#examples">Examples</a></li>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

View File

@@ -49,7 +49,7 @@
<meta property="og:description" content="This transforms a vector to a new class mic, which is an ordered factor with valid MIC values as levels. Invalid MIC values will be translated as NA with a warning." />
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@@ -80,7 +80,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
</span>
</div>
@@ -93,12 +93,65 @@
Home
</a>
</li>
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-question-circle"></span>
Get Started
How to
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
Conduct AMR analysis
</a>
</li>
<li>
<a href="../articles/Predict.html">
<span class="fa fa-dice"></span>
Predict antimicrobial resistance
</a>
</li>
<li>
<a href="../articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span>
Apply EUCAST rules
</a>
</li>
<li>
<a href="../articles/mo_property.html">
<span class="fa fa-bug"></span>
Get properties of a microorganism
</a>
</li>
<li>
<a href="../articles/ab_property.html">
<span class="fa fa-capsules"></span>
Get properties of an antibiotic
</a>
</li>
<li>
<a href="../articles/freq.html">
<span class="fa fa-sort-amount-down"></span>
Create frequency tables
</a>
</li>
<li>
<a href="../articles/G_test.html">
<span class="fa fa-clipboard-check"></span>
Use the G-test
</a>
</li>
</ul>
</li>
<li>
<a href="../reference/">
@@ -121,17 +174,17 @@
Changelog
</a>
</li>
<li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://gitlab.com/msberends/AMR">
<span class="fab fa fab fa-gitlab"></span>
Source Code
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<li>
<a href="../LICENSE-text.html">
<span class="fa fa-book"></span>
@@ -188,31 +241,29 @@
<p>Ordered factor with new class <code>mic</code></p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p><code><a href='as.rsi.html'>as.rsi</a></code></p></div>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='no'>mic_data</span> <span class='kw'>&lt;-</span> <span class='fu'>as.mic</span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"&gt;=32"</span>, <span class='st'>"1.0"</span>, <span class='st'>"1"</span>, <span class='st'>"1.00"</span>, <span class='fl'>8</span>, <span class='st'>"&lt;=0.128"</span>, <span class='st'>"8"</span>, <span class='st'>"16"</span>, <span class='st'>"16"</span>))
<span class='fu'>is.mic</span>(<span class='no'>mic_data</span>)</div><div class='output co'>#&gt; [1] TRUE</div><div class='input'>
<pre class="examples"><span class='co'># NOT RUN {</span>
<span class='no'>mic_data</span> <span class='kw'>&lt;-</span> <span class='fu'>as.mic</span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"&gt;=32"</span>, <span class='st'>"1.0"</span>, <span class='st'>"1"</span>, <span class='st'>"1.00"</span>, <span class='fl'>8</span>, <span class='st'>"&lt;=0.128"</span>, <span class='st'>"8"</span>, <span class='st'>"16"</span>, <span class='st'>"16"</span>))
<span class='fu'>is.mic</span>(<span class='no'>mic_data</span>)
<span class='co'># this can also coerce combined MIC/RSI values:</span>
<span class='fu'>as.mic</span>(<span class='st'>"&lt;=0.002; S"</span>) <span class='co'># will return &lt;=0.002</span></div><div class='output co'>#&gt; Class 'mic'
#&gt; [1] &lt;=0.002</div><div class='input'>
<span class='fu'><a href='https://www.rdocumentation.org/packages/graphics/topics/plot'>plot</a></span>(<span class='no'>mic_data</span>)</div><div class='input'><span class='fu'><a href='https://www.rdocumentation.org/packages/graphics/topics/barplot'>barplot</a></span>(<span class='no'>mic_data</span>)</div><div class='img'><img src='as.mic-1.png' alt='' width='700' height='433' /></div><div class='input'><span class='fu'><a href='freq.html'>freq</a></span>(<span class='no'>mic_data</span>)</div><div class='output co'>#&gt;
#&gt;
#&gt; **Frequency table**
#&gt;
#&gt;
#&gt; | |Item | Count| Percent| Cum. Count| Cum. Percent|
#&gt; |:--|:-------|-----:|-------:|----------:|------------:|
#&gt; |1 |1 | 3| 33.3%| 3| 33.3%|
#&gt; |2 |8 | 2| 22.2%| 5| 55.6%|
#&gt; |3 |16 | 2| 22.2%| 7| 77.8%|
#&gt; |4 |&lt;=0.128 | 1| 11.1%| 8| 88.9%|
#&gt; |5 |&gt;=32 | 1| 11.1%| 9| 100.0%|
#&gt;
#&gt; </div></pre>
<span class='fu'>as.mic</span>(<span class='st'>"&lt;=0.002; S"</span>) <span class='co'># will return &lt;=0.002</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/graphics/topics/plot'>plot</a></span>(<span class='no'>mic_data</span>)
<span class='fu'><a href='https://www.rdocumentation.org/packages/graphics/topics/barplot'>barplot</a></span>(<span class='no'>mic_data</span>)
<span class='fu'><a href='freq.html'>freq</a></span>(<span class='no'>mic_data</span>)
<span class='co'># }</span></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
@@ -221,6 +272,8 @@
<li><a href="#value">Value</a></li>
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
<li><a href="#see-also">See also</a></li>
<li><a href="#examples">Examples</a></li>

View File

@@ -49,7 +49,7 @@
<meta property="og:description" content="Use this function to determine a valid microorganism ID (mo). Determination is done using Artificial Intelligence (AI) and the complete taxonomic kingdoms Bacteria, Fungi and Protozoa (see Source), so the input can be almost anything: a full name (like &quot;Staphylococcus aureus&quot;), an abbreviated name (like &quot;S. aureus&quot;), an abbreviation known in the field (like &quot;MRSA&quot;), or just a genus. You could also select a genus and species column, zie Examples." />
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@@ -80,7 +80,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
</span>
</div>
@@ -93,12 +93,65 @@
Home
</a>
</li>
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-question-circle"></span>
Get Started
How to
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
Conduct AMR analysis
</a>
</li>
<li>
<a href="../articles/Predict.html">
<span class="fa fa-dice"></span>
Predict antimicrobial resistance
</a>
</li>
<li>
<a href="../articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span>
Apply EUCAST rules
</a>
</li>
<li>
<a href="../articles/mo_property.html">
<span class="fa fa-bug"></span>
Get properties of a microorganism
</a>
</li>
<li>
<a href="../articles/ab_property.html">
<span class="fa fa-capsules"></span>
Get properties of an antibiotic
</a>
</li>
<li>
<a href="../articles/freq.html">
<span class="fa fa-sort-amount-down"></span>
Create frequency tables
</a>
</li>
<li>
<a href="../articles/G_test.html">
<span class="fa fa-clipboard-check"></span>
Use the G-test
</a>
</li>
</ul>
</li>
<li>
<a href="../reference/">
@@ -121,17 +174,17 @@
Changelog
</a>
</li>
<li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://gitlab.com/msberends/AMR">
<span class="fab fa fab fa-gitlab"></span>
Source Code
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<li>
<a href="../LICENSE-text.html">
<span class="fa fa-book"></span>
@@ -241,6 +294,13 @@
</ul>
<p><code>guess_mo</code> is an alias of <code>as.mo</code>.</p>
<h2 class="hasAnchor" id="source"><a class="anchor" href="#source"></a>Source</h2>
<p>[1] Becker K <em>et al.</em> <strong>Coagulase-Negative Staphylococci</strong>. 2014. Clin Microbiol Rev. 27(4): 870926. <a href='https://dx.doi.org/10.1128/CMR.00109-13'>https://dx.doi.org/10.1128/CMR.00109-13</a></p>
<p>[2] Lancefield RC <strong>A serological differentiation of human and other groups of hemolytic streptococci</strong>. 1933. J Exp Med. 57(4): 57195. <a href='https://dx.doi.org/10.1084/jem.57.4.571'>https://dx.doi.org/10.1084/jem.57.4.571</a></p>
<p>[3] Integrated Taxonomic Information System (ITIS). Retrieved September 2018. <a href='http://www.itis.gov'>http://www.itis.gov</a></p>
<h2 class="hasAnchor" id="itis"><a class="anchor" href="#itis"></a>ITIS</h2>
@@ -249,12 +309,11 @@ This package contains the <strong>complete microbial taxonomic data</strong> (wi
<p>All (sub)species from <strong>the taxonomic kingdoms Bacteria, Fungi and Protozoa are included in this package</strong>, as well as all previously accepted names known to ITIS. Furthermore, the responsible authors and year of publication are available. This allows users to use authoritative taxonomic information for their data analysis on any microorganism, not only human pathogens. It also helps to quickly determine the Gram stain of bacteria, since all bacteria are classified into subkingdom Negibacteria or Posibacteria.</p>
<p>ITIS is a partnership of U.S., Canadian, and Mexican agencies and taxonomic specialists [3].</p>
<h2 class="hasAnchor" id="source"><a class="anchor" href="#source"></a>Source</h2>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
<p>[1] Becker K <em>et al.</em> <strong>Coagulase-Negative Staphylococci</strong>. 2014. Clin Microbiol Rev. 27(4): 870926. <a href='https://dx.doi.org/10.1128/CMR.00109-13'>https://dx.doi.org/10.1128/CMR.00109-13</a></p>
<p>[2] Lancefield RC <strong>A serological differentiation of human and other groups of hemolytic streptococci</strong>. 1933. J Exp Med. 57(4): 57195. <a href='https://dx.doi.org/10.1084/jem.57.4.571'>https://dx.doi.org/10.1084/jem.57.4.571</a></p>
<p>[3] Integrated Taxonomic Information System (ITIS). Retrieved September 2018. <a href='http://www.itis.gov'>http://www.itis.gov</a></p>
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
@@ -263,52 +322,56 @@ The <code><a href='mo_property.html'>mo_property</a></code> functions (like <cod
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='co'># These examples all return "B_STPHY_AUR", the ID of S. aureus:</span>
<span class='fu'>as.mo</span>(<span class='st'>"stau"</span>)</div><div class='output co'>#&gt; Class 'mo'
#&gt; [1] B_STPHY_AUR</div><div class='input'><span class='fu'>as.mo</span>(<span class='st'>"STAU"</span>)</div><div class='output co'>#&gt; Class 'mo'
#&gt; [1] B_STPHY_AUR</div><div class='input'><span class='fu'>as.mo</span>(<span class='st'>"staaur"</span>)</div><div class='output co'>#&gt; Class 'mo'
#&gt; [1] B_STPHY_AUR</div><div class='input'><span class='fu'>as.mo</span>(<span class='st'>"S. aureus"</span>)</div><div class='output co'>#&gt; Class 'mo'
#&gt; [1] B_STPHY_AUR</div><div class='input'><span class='fu'>as.mo</span>(<span class='st'>"S aureus"</span>)</div><div class='output co'>#&gt; Class 'mo'
#&gt; [1] B_STPHY_AUR</div><div class='input'><span class='fu'>as.mo</span>(<span class='st'>"Staphylococcus aureus"</span>)</div><div class='output co'>#&gt; Class 'mo'
#&gt; [1] B_STPHY_AUR</div><div class='input'><span class='fu'>as.mo</span>(<span class='st'>"Staphylococcus aureus (MRSA)"</span>)</div><div class='output co'>#&gt; <span class='warning'>Warning: <span style='color: #BB0000;'>UNCERTAIN - "Staphylococcus aureus (MRSA)" -&gt; </span><span style='color: #BB0000;font-style: italic;'>Staphylococcus aureus</span><span style='color: #BB0000;'> (B_STPHY_AUR)</span><span></span></div><div class='output co'>#&gt; Class 'mo'
#&gt; [1] B_STPHY_AUR</div><div class='input'><span class='fu'>as.mo</span>(<span class='st'>"MRSA"</span>) <span class='co'># Methicillin Resistant S. aureus</span></div><div class='output co'>#&gt; Class 'mo'
#&gt; [1] B_STPHY_AUR</div><div class='input'><span class='fu'>as.mo</span>(<span class='st'>"VISA"</span>) <span class='co'># Vancomycin Intermediate S. aureus</span></div><div class='output co'>#&gt; Class 'mo'
#&gt; [1] B_STPHY_AUR</div><div class='input'><span class='fu'>as.mo</span>(<span class='st'>"VRSA"</span>) <span class='co'># Vancomycin Resistant S. aureus</span></div><div class='output co'>#&gt; Class 'mo'
#&gt; [1] B_STPHY_AUR</div><div class='input'><span class='fu'>as.mo</span>(<span class='fl'>369</span>) <span class='co'># Search on TSN (Taxonomic Serial Number), a unique identifier</span></div><div class='output co'>#&gt; Class 'mo'
#&gt; [1] B_STPHY_AUR</div><div class='input'> <span class='co'># for the Integrated Taxonomic Information System (ITIS)</span>
<pre class="examples"><span class='co'># NOT RUN {</span>
<span class='co'># These examples all return "B_STPHY_AUR", the ID of S. aureus:</span>
<span class='fu'>as.mo</span>(<span class='st'>"stau"</span>)
<span class='fu'>as.mo</span>(<span class='st'>"STAU"</span>)
<span class='fu'>as.mo</span>(<span class='st'>"staaur"</span>)
<span class='fu'>as.mo</span>(<span class='st'>"S. aureus"</span>)
<span class='fu'>as.mo</span>(<span class='st'>"S aureus"</span>)
<span class='fu'>as.mo</span>(<span class='st'>"Staphylococcus aureus"</span>)
<span class='fu'>as.mo</span>(<span class='st'>"Staphylococcus aureus (MRSA)"</span>)
<span class='fu'>as.mo</span>(<span class='st'>"MRSA"</span>) <span class='co'># Methicillin Resistant S. aureus</span>
<span class='fu'>as.mo</span>(<span class='st'>"VISA"</span>) <span class='co'># Vancomycin Intermediate S. aureus</span>
<span class='fu'>as.mo</span>(<span class='st'>"VRSA"</span>) <span class='co'># Vancomycin Resistant S. aureus</span>
<span class='fu'>as.mo</span>(<span class='fl'>369</span>) <span class='co'># Search on TSN (Taxonomic Serial Number), a unique identifier</span>
<span class='co'># for the Integrated Taxonomic Information System (ITIS)</span>
<span class='fu'>as.mo</span>(<span class='st'>"Streptococcus group A"</span>)
<span class='fu'>as.mo</span>(<span class='st'>"GAS"</span>) <span class='co'># Group A Streptococci</span>
<span class='fu'>as.mo</span>(<span class='st'>"GBS"</span>) <span class='co'># Group B Streptococci</span>
<span class='fu'>as.mo</span>(<span class='st'>"Streptococcus group A"</span>)</div><div class='output co'>#&gt; Class 'mo'
#&gt; [1] B_STRPTC_GRA</div><div class='input'><span class='fu'>as.mo</span>(<span class='st'>"GAS"</span>) <span class='co'># Group A Streptococci</span></div><div class='output co'>#&gt; Class 'mo'
#&gt; [1] B_STRPTC_GRA</div><div class='input'><span class='fu'>as.mo</span>(<span class='st'>"GBS"</span>) <span class='co'># Group B Streptococci</span></div><div class='output co'>#&gt; Class 'mo'
#&gt; [1] B_STRPTC_GRB</div><div class='input'>
<span class='co'># guess_mo is an alias of as.mo and works the same</span>
<span class='fu'>guess_mo</span>(<span class='st'>"S. epidermidis"</span>) <span class='co'># will remain species: B_STPHY_EPI</span></div><div class='output co'>#&gt; Class 'mo'
#&gt; [1] B_STPHY_EPI</div><div class='input'><span class='fu'>guess_mo</span>(<span class='st'>"S. epidermidis"</span>, <span class='kw'>Becker</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) <span class='co'># will not remain species: B_STPHY_CNS</span></div><div class='output co'>#&gt; Class 'mo'
#&gt; [1] B_STPHY_CNS</div><div class='input'>
<span class='fu'>guess_mo</span>(<span class='st'>"S. pyogenes"</span>) <span class='co'># will remain species: B_STRPTC_PYO</span></div><div class='output co'>#&gt; Class 'mo'
#&gt; [1] B_STRPTC_PYO</div><div class='input'><span class='fu'>guess_mo</span>(<span class='st'>"S. pyogenes"</span>, <span class='kw'>Lancefield</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) <span class='co'># will not remain species: B_STRPTC_GRA</span></div><div class='output co'>#&gt; Class 'mo'
#&gt; [1] B_STRPTC_GRA</div><div class='input'>
<span class='fu'>guess_mo</span>(<span class='st'>"S. epidermidis"</span>) <span class='co'># will remain species: B_STPHY_EPI</span>
<span class='fu'>guess_mo</span>(<span class='st'>"S. epidermidis"</span>, <span class='kw'>Becker</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) <span class='co'># will not remain species: B_STPHY_CNS</span>
<span class='fu'>guess_mo</span>(<span class='st'>"S. pyogenes"</span>) <span class='co'># will remain species: B_STRPTC_PYO</span>
<span class='fu'>guess_mo</span>(<span class='st'>"S. pyogenes"</span>, <span class='kw'>Lancefield</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) <span class='co'># will not remain species: B_STRPTC_GRA</span>
<span class='co'># Use mo_* functions to get a specific property based on `mo`</span>
<span class='no'>Ecoli</span> <span class='kw'>&lt;-</span> <span class='fu'>as.mo</span>(<span class='st'>"E. coli"</span>) <span class='co'># returns `B_ESCHR_COL`</span>
<span class='fu'><a href='mo_property.html'>mo_genus</a></span>(<span class='no'>Ecoli</span>) <span class='co'># returns "Escherichia"</span></div><div class='output co'>#&gt; [1] "Escherichia"</div><div class='input'><span class='fu'><a href='mo_property.html'>mo_gramstain</a></span>(<span class='no'>Ecoli</span>) <span class='co'># returns "Gram negative"</span></div><div class='output co'>#&gt; [1] "Gram-negatief"</div><div class='input'><span class='co'># but it uses as.mo internally too, so you could also just use:</span>
<span class='fu'><a href='mo_property.html'>mo_genus</a></span>(<span class='st'>"E. coli"</span>) <span class='co'># returns "Escherichia"</span></div><div class='output co'>#&gt; [1] "Escherichia"</div><div class='input'>
<span class='fu'><a href='mo_property.html'>mo_genus</a></span>(<span class='no'>Ecoli</span>) <span class='co'># returns "Escherichia"</span>
<span class='fu'><a href='mo_property.html'>mo_gramstain</a></span>(<span class='no'>Ecoli</span>) <span class='co'># returns "Gram negative"</span>
<span class='co'># but it uses as.mo internally too, so you could also just use:</span>
<span class='fu'><a href='mo_property.html'>mo_genus</a></span>(<span class='st'>"E. coli"</span>) <span class='co'># returns "Escherichia"</span>
</div></span><span class='co'># NOT RUN {</span>
<span class='co'># }</span><span class='co'># NOT RUN {</span>
<span class='no'>df</span>$<span class='no'>mo</span> <span class='kw'>&lt;-</span> <span class='fu'>as.mo</span>(<span class='no'>df</span>$<span class='no'>microorganism_name</span>)
<span class='co'># the select function of tidyverse is also supported:</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/library'>library</a></span>(<span class='no'>dplyr</span>)
<span class='no'>df</span>$<span class='no'>mo</span> <span class='kw'>&lt;-</span> <span class='no'>df</span> <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/select.html'>select</a></span>(<span class='no'>microorganism_name</span>) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/select'>select</a></span>(<span class='no'>microorganism_name</span>) <span class='kw'>%&gt;%</span>
<span class='fu'>as.mo</span>()
<span class='co'># and can even contain 2 columns, which is convenient for genus/species combinations:</span>
<span class='no'>df</span>$<span class='no'>mo</span> <span class='kw'>&lt;-</span> <span class='no'>df</span> <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/select.html'>select</a></span>(<span class='no'>genus</span>, <span class='no'>species</span>) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/select'>select</a></span>(<span class='no'>genus</span>, <span class='no'>species</span>) <span class='kw'>%&gt;%</span>
<span class='fu'>as.mo</span>()
<span class='co'># although this works easier and does the same:</span>
<span class='no'>df</span> <span class='kw'>&lt;-</span> <span class='no'>df</span> <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/mutate.html'>mutate</a></span>(<span class='kw'>mo</span> <span class='kw'>=</span> <span class='fu'>as.mo</span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/paste'>paste</a></span>(<span class='no'>genus</span>, <span class='no'>species</span>)))
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/mutate'>mutate</a></span>(<span class='kw'>mo</span> <span class='kw'>=</span> <span class='fu'>as.mo</span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/paste'>paste</a></span>(<span class='no'>genus</span>, <span class='no'>species</span>)))
<span class='co'># }</span></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
@@ -320,9 +383,11 @@ The <code><a href='mo_property.html'>mo_property</a></code> functions (like <cod
<li><a href="#details">Details</a></li>
<li><a href="#source">Source</a></li>
<li><a href="#itis">ITIS</a></li>
<li><a href="#source">Source</a></li>
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
<li><a href="#see-also">See also</a></li>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -49,7 +49,7 @@
<meta property="og:description" content="Gets data from the WHO to determine properties of an ATC (e.g. an antibiotic) like name, defined daily dose (DDD) or standard unit. This function requires an internet connection." />
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@@ -80,7 +80,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
</span>
</div>
@@ -93,12 +93,65 @@
Home
</a>
</li>
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-question-circle"></span>
Get Started
How to
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
Conduct AMR analysis
</a>
</li>
<li>
<a href="../articles/Predict.html">
<span class="fa fa-dice"></span>
Predict antimicrobial resistance
</a>
</li>
<li>
<a href="../articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span>
Apply EUCAST rules
</a>
</li>
<li>
<a href="../articles/mo_property.html">
<span class="fa fa-bug"></span>
Get properties of a microorganism
</a>
</li>
<li>
<a href="../articles/ab_property.html">
<span class="fa fa-capsules"></span>
Get properties of an antibiotic
</a>
</li>
<li>
<a href="../articles/freq.html">
<span class="fa fa-sort-amount-down"></span>
Create frequency tables
</a>
</li>
<li>
<a href="../articles/G_test.html">
<span class="fa fa-clipboard-check"></span>
Use the G-test
</a>
</li>
</ul>
</li>
<li>
<a href="../reference/">
@@ -121,17 +174,17 @@
Changelog
</a>
</li>
<li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://gitlab.com/msberends/AMR">
<span class="fab fa fab fa-gitlab"></span>
Source Code
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<li>
<a href="../LICENSE-text.html">
<span class="fa fa-book"></span>
@@ -230,21 +283,22 @@
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='co'># What's the ATC of amoxicillin?</span>
<span class='fu'><a href='as.atc.html'>guess_atc</a></span>(<span class='st'>"Amoxicillin"</span>)</div><div class='output co'>#&gt; Class 'atc'
#&gt; [1] J01CA04</div><div class='input'><span class='co'># [1] "J01CA04"</span>
<pre class="examples"><span class='co'># NOT RUN {</span>
<span class='co'># What's the ATC of amoxicillin?</span>
<span class='fu'><a href='as.atc.html'>guess_atc</a></span>(<span class='st'>"Amoxicillin"</span>)
<span class='co'># [1] "J01CA04"</span>
<span class='co'># oral DDD (Defined Daily Dose) of amoxicillin</span>
<span class='fu'>atc_property</span>(<span class='st'>"J01CA04"</span>, <span class='st'>"DDD"</span>, <span class='st'>"O"</span>)</div><div class='output co'>#&gt; [1] 1.5</div><div class='input'><span class='co'># parenteral DDD (Defined Daily Dose) of amoxicillin</span>
<span class='fu'>atc_property</span>(<span class='st'>"J01CA04"</span>, <span class='st'>"DDD"</span>, <span class='st'>"P"</span>)</div><div class='output co'>#&gt; [1] 3</div><div class='input'>
<span class='fu'>atc_property</span>(<span class='st'>"J01CA04"</span>, <span class='kw'>property</span> <span class='kw'>=</span> <span class='st'>"groups"</span>) <span class='co'># search hierarchical groups of amoxicillin</span></div><div class='output co'>#&gt; [1] "ANTIINFECTIVES FOR SYSTEMIC USE"
#&gt; [2] "ANTIBACTERIALS FOR SYSTEMIC USE"
#&gt; [3] "BETA-LACTAM ANTIBACTERIALS, PENICILLINS"
#&gt; [4] "Penicillins with extended spectrum" </div><div class='input'># [1] "ANTIINFECTIVES FOR SYSTEMIC USE"
# [2] "ANTIBACTERIALS FOR SYSTEMIC USE"
# [3] "BETA-LACTAM ANTIBACTERIALS, PENICILLINS"
# [4] "Penicillins with extended spectrum"
</div></pre>
<span class='fu'>atc_property</span>(<span class='st'>"J01CA04"</span>, <span class='st'>"DDD"</span>, <span class='st'>"O"</span>)
<span class='co'># parenteral DDD (Defined Daily Dose) of amoxicillin</span>
<span class='fu'>atc_property</span>(<span class='st'>"J01CA04"</span>, <span class='st'>"DDD"</span>, <span class='st'>"P"</span>)
<span class='fu'>atc_property</span>(<span class='st'>"J01CA04"</span>, <span class='kw'>property</span> <span class='kw'>=</span> <span class='st'>"groups"</span>) <span class='co'># search hierarchical groups of amoxicillin</span>
<span class='co'># [1] "ANTIINFECTIVES FOR SYSTEMIC USE"</span>
<span class='co'># [2] "ANTIBACTERIALS FOR SYSTEMIC USE"</span>
<span class='co'># [3] "BETA-LACTAM ANTIBACTERIALS, PENICILLINS"</span>
<span class='co'># [4] "Penicillins with extended spectrum"</span>
<span class='co'># }</span></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>

View File

@@ -50,7 +50,7 @@
<meta property="og:description" content="These functions can be used to count resistant/susceptible microbial isolates. All functions support quasiquotation with pipes, can be used in dplyrs summarise and support grouped variables, see Examples.
count_R and count_IR can be used to count resistant isolates, count_S and count_SI can be used to count susceptible isolates." />
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@@ -81,7 +81,7 @@ count_R and count_IR can be used to count resistant isolates, count_S and count_
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
</span>
</div>
@@ -94,12 +94,65 @@ count_R and count_IR can be used to count resistant isolates, count_S and count_
Home
</a>
</li>
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-question-circle"></span>
Get Started
How to
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
Conduct AMR analysis
</a>
</li>
<li>
<a href="../articles/Predict.html">
<span class="fa fa-dice"></span>
Predict antimicrobial resistance
</a>
</li>
<li>
<a href="../articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span>
Apply EUCAST rules
</a>
</li>
<li>
<a href="../articles/mo_property.html">
<span class="fa fa-bug"></span>
Get properties of a microorganism
</a>
</li>
<li>
<a href="../articles/ab_property.html">
<span class="fa fa-capsules"></span>
Get properties of an antibiotic
</a>
</li>
<li>
<a href="../articles/freq.html">
<span class="fa fa-sort-amount-down"></span>
Create frequency tables
</a>
</li>
<li>
<a href="../articles/G_test.html">
<span class="fa fa-clipboard-check"></span>
Use the G-test
</a>
</li>
</ul>
</li>
<li>
<a href="../reference/">
@@ -122,17 +175,17 @@ count_R and count_IR can be used to count resistant isolates, count_S and count_
Changelog
</a>
</li>
<li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://gitlab.com/msberends/AMR">
<span class="fab fa fab fa-gitlab"></span>
Source Code
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<li>
<a href="../LICENSE-text.html">
<span class="fa fa-book"></span>
@@ -222,79 +275,79 @@ count_R and count_IR can be used to count resistant isolates, count_S and count_
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
<p>These functions are meant to count isolates. Use the <code><a href='portion.html'>portion</a>_*</code> functions to calculate microbial resistance.</p>
<p><code>n_rsi</code> is an alias of <code>count_all</code>. They can be used to count all available isolates, i.e. where all input antibiotics have an available result (S, I or R). Their use is equal to <code><a href='http://dplyr.tidyverse.org/reference/n_distinct.html'>n_distinct</a></code>. Their function is equal to <code>count_S(...) + count_IR(...)</code>.</p>
<p><code>n_rsi</code> is an alias of <code>count_all</code>. They can be used to count all available isolates, i.e. where all input antibiotics have an available result (S, I or R). Their use is equal to <code><a href='https://www.rdocumentation.org/packages/dplyr/topics/n_distinct'>n_distinct</a></code>. Their function is equal to <code>count_S(...) + count_IR(...)</code>.</p>
<p><code>count_df</code> takes any variable from <code>data</code> that has an <code>"rsi"</code> class (created with <code><a href='as.rsi.html'>as.rsi</a></code>) and counts the amounts of R, I and S. The resulting <em>tidy data</em> (see Source) <code>data.frame</code> will have three rows (S/I/R) and a column for each variable with class <code>"rsi"</code>.</p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p><code><a href='portion.html'>portion</a>_*</code> to calculate microbial resistance and susceptibility.</p></div>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='co'># septic_patients is a data set available in the AMR package. It is true, genuine data.</span>
?<span class='no'>septic_patients</span></div><div class='output co'>#&gt; <span class='message'>Rendering development documentation for 'septic_patients'</span></div><div class='input'>
<pre class="examples"><span class='co'># NOT RUN {</span>
<span class='co'># septic_patients is a data set available in the AMR package. It is true, genuine data.</span>
?<span class='no'>septic_patients</span>
<span class='co'># Count resistant isolates</span>
<span class='fu'>count_R</span>(<span class='no'>septic_patients</span>$<span class='no'>amox</span>)</div><div class='output co'>#&gt; [1] 683</div><div class='input'><span class='fu'>count_IR</span>(<span class='no'>septic_patients</span>$<span class='no'>amox</span>)</div><div class='output co'>#&gt; [1] 686</div><div class='input'>
<span class='fu'>count_R</span>(<span class='no'>septic_patients</span>$<span class='no'>amox</span>)
<span class='fu'>count_IR</span>(<span class='no'>septic_patients</span>$<span class='no'>amox</span>)
<span class='co'># Or susceptible isolates</span>
<span class='fu'>count_S</span>(<span class='no'>septic_patients</span>$<span class='no'>amox</span>)</div><div class='output co'>#&gt; [1] 486</div><div class='input'><span class='fu'>count_SI</span>(<span class='no'>septic_patients</span>$<span class='no'>amox</span>)</div><div class='output co'>#&gt; [1] 489</div><div class='input'>
<span class='fu'>count_S</span>(<span class='no'>septic_patients</span>$<span class='no'>amox</span>)
<span class='fu'>count_SI</span>(<span class='no'>septic_patients</span>$<span class='no'>amox</span>)
<span class='co'># Count all available isolates</span>
<span class='fu'>count_all</span>(<span class='no'>septic_patients</span>$<span class='no'>amox</span>)</div><div class='output co'>#&gt; [1] 1172</div><div class='input'><span class='fu'>n_rsi</span>(<span class='no'>septic_patients</span>$<span class='no'>amox</span>)</div><div class='output co'>#&gt; [1] 1172</div><div class='input'>
<span class='fu'>count_all</span>(<span class='no'>septic_patients</span>$<span class='no'>amox</span>)
<span class='fu'>n_rsi</span>(<span class='no'>septic_patients</span>$<span class='no'>amox</span>)
<span class='co'># Since n_rsi counts available isolates, you can</span>
<span class='co'># calculate back to count e.g. non-susceptible isolates.</span>
<span class='co'># This results in the same:</span>
<span class='fu'>count_IR</span>(<span class='no'>septic_patients</span>$<span class='no'>amox</span>)</div><div class='output co'>#&gt; [1] 686</div><div class='input'><span class='fu'><a href='portion.html'>portion_IR</a></span>(<span class='no'>septic_patients</span>$<span class='no'>amox</span>) * <span class='fu'>n_rsi</span>(<span class='no'>septic_patients</span>$<span class='no'>amox</span>)</div><div class='output co'>#&gt; [1] 686</div><div class='input'>
<span class='fu'>count_IR</span>(<span class='no'>septic_patients</span>$<span class='no'>amox</span>)
<span class='fu'><a href='portion.html'>portion_IR</a></span>(<span class='no'>septic_patients</span>$<span class='no'>amox</span>) * <span class='fu'>n_rsi</span>(<span class='no'>septic_patients</span>$<span class='no'>amox</span>)
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/library'>library</a></span>(<span class='no'>dplyr</span>)
<span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/group_by.html'>group_by</a></span>(<span class='no'>hospital_id</span>) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/summarise.html'>summarise</a></span>(<span class='kw'>R</span> <span class='kw'>=</span> <span class='fu'>count_R</span>(<span class='no'>cipr</span>),
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/group_by'>group_by</a></span>(<span class='no'>hospital_id</span>) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/summarise'>summarise</a></span>(<span class='kw'>R</span> <span class='kw'>=</span> <span class='fu'>count_R</span>(<span class='no'>cipr</span>),
<span class='kw'>I</span> <span class='kw'>=</span> <span class='fu'>count_I</span>(<span class='no'>cipr</span>),
<span class='kw'>S</span> <span class='kw'>=</span> <span class='fu'>count_S</span>(<span class='no'>cipr</span>),
<span class='kw'>n1</span> <span class='kw'>=</span> <span class='fu'>count_all</span>(<span class='no'>cipr</span>), <span class='co'># the actual total; sum of all three</span>
<span class='kw'>n2</span> <span class='kw'>=</span> <span class='fu'>n_rsi</span>(<span class='no'>cipr</span>), <span class='co'># same - analogous to n_distinct</span>
<span class='kw'>total</span> <span class='kw'>=</span> <span class='fu'><a href='http://dplyr.tidyverse.org/reference/n.html'>n</a></span>()) <span class='co'># NOT the amount of tested isolates!</span></div><div class='output co'>#&gt; <span style='color: #949494;'># A tibble: 4 x 7</span><span>
#&gt; hospital_id R I S n1 n2 total
#&gt; </span><span style='color: #949494;font-style: italic;'>&lt;fct&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;int&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;int&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;int&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;int&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;int&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;int&gt;</span><span>
#&gt; </span><span style='color: #BCBCBC;'>1</span><span> A 26 3 178 207 207 321
#&gt; </span><span style='color: #BCBCBC;'>2</span><span> B 85 35 379 499 499 663
#&gt; </span><span style='color: #BCBCBC;'>3</span><span> C 41 22 139 202 202 254
#&gt; </span><span style='color: #BCBCBC;'>4</span><span> D 76 9 416 501 501 762</div><div class='input'>
<span class='kw'>total</span> <span class='kw'>=</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/n'>n</a></span>()) <span class='co'># NOT the amount of tested isolates!</span>
<span class='co'># Count co-resistance between amoxicillin/clav acid and gentamicin,</span>
<span class='co'># so we can see that combination therapy does a lot more than mono therapy.</span>
<span class='co'># Please mind that `portion_S` calculates percentages right away instead.</span>
<span class='fu'>count_S</span>(<span class='no'>septic_patients</span>$<span class='no'>amcl</span>) <span class='co'># S = 1057 (67.1%)</span></div><div class='output co'>#&gt; [1] 1291</div><div class='input'><span class='fu'>count_all</span>(<span class='no'>septic_patients</span>$<span class='no'>amcl</span>) <span class='co'># n = 1576</span></div><div class='output co'>#&gt; [1] 1828</div><div class='input'>
<span class='fu'>count_S</span>(<span class='no'>septic_patients</span>$<span class='no'>gent</span>) <span class='co'># S = 1372 (74.0%)</span></div><div class='output co'>#&gt; [1] 1372</div><div class='input'><span class='fu'>count_all</span>(<span class='no'>septic_patients</span>$<span class='no'>gent</span>) <span class='co'># n = 1855</span></div><div class='output co'>#&gt; [1] 1855</div><div class='input'>
<span class='fu'>count_S</span>(<span class='no'>septic_patients</span>$<span class='no'>amcl</span>) <span class='co'># S = 1057 (67.1%)</span>
<span class='fu'>count_all</span>(<span class='no'>septic_patients</span>$<span class='no'>amcl</span>) <span class='co'># n = 1576</span>
<span class='fu'>count_S</span>(<span class='no'>septic_patients</span>$<span class='no'>gent</span>) <span class='co'># S = 1372 (74.0%)</span>
<span class='fu'>count_all</span>(<span class='no'>septic_patients</span>$<span class='no'>gent</span>) <span class='co'># n = 1855</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/with'>with</a></span>(<span class='no'>septic_patients</span>,
<span class='fu'>count_S</span>(<span class='no'>amcl</span>, <span class='no'>gent</span>)) <span class='co'># S = 1396 (92.0%)</span></div><div class='output co'>#&gt; [1] 1609</div><div class='input'><span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/with'>with</a></span>(<span class='no'>septic_patients</span>, <span class='co'># n = 1517</span>
<span class='fu'>n_rsi</span>(<span class='no'>amcl</span>, <span class='no'>gent</span>))</div><div class='output co'>#&gt; [1] 1747</div><div class='input'>
<span class='fu'>count_S</span>(<span class='no'>amcl</span>, <span class='no'>gent</span>)) <span class='co'># S = 1396 (92.0%)</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/with'>with</a></span>(<span class='no'>septic_patients</span>, <span class='co'># n = 1517</span>
<span class='fu'>n_rsi</span>(<span class='no'>amcl</span>, <span class='no'>gent</span>))
<span class='co'># Get portions S/I/R immediately of all rsi columns</span>
<span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/select.html'>select</a></span>(<span class='no'>amox</span>, <span class='no'>cipr</span>) <span class='kw'>%&gt;%</span>
<span class='fu'>count_df</span>(<span class='kw'>translate</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</div><div class='output co'>#&gt; Interpretation Antibiotic Value
#&gt; 1 S amox 486
#&gt; 2 I amox 3
#&gt; 3 R amox 683
#&gt; 4 S cipr 1112
#&gt; 5 I cipr 69
#&gt; 6 R cipr 228</div><div class='input'>
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/select'>select</a></span>(<span class='no'>amox</span>, <span class='no'>cipr</span>) <span class='kw'>%&gt;%</span>
<span class='fu'>count_df</span>(<span class='kw'>translate</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)
<span class='co'># It also supports grouping variables</span>
<span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/select.html'>select</a></span>(<span class='no'>hospital_id</span>, <span class='no'>amox</span>, <span class='no'>cipr</span>) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/group_by.html'>group_by</a></span>(<span class='no'>hospital_id</span>) <span class='kw'>%&gt;%</span>
<span class='fu'>count_df</span>(<span class='kw'>translate</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</div><div class='output co'>#&gt; </span><span style='color: #949494;'># A tibble: 24 x 4</span><span>
#&gt; Interpretation hospital_id Antibiotic Value
#&gt; </span><span style='color: #949494;font-style: italic;'>&lt;ord&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;fct&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;chr&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;int&gt;</span><span>
#&gt; </span><span style='color: #BCBCBC;'> 1</span><span> S A amox 63
#&gt; </span><span style='color: #BCBCBC;'> 2</span><span> S B amox 141
#&gt; </span><span style='color: #BCBCBC;'> 3</span><span> S C amox 59
#&gt; </span><span style='color: #BCBCBC;'> 4</span><span> S D amox 223
#&gt; </span><span style='color: #BCBCBC;'> 5</span><span> I A amox 0
#&gt; </span><span style='color: #BCBCBC;'> 6</span><span> I B amox 1
#&gt; </span><span style='color: #BCBCBC;'> 7</span><span> I C amox 0
#&gt; </span><span style='color: #BCBCBC;'> 8</span><span> I D amox 2
#&gt; </span><span style='color: #BCBCBC;'> 9</span><span> R A amox 87
#&gt; </span><span style='color: #BCBCBC;'>10</span><span> R B amox 231
#&gt; </span><span style='color: #949494;'># ... with 14 more rows</span><span></div><div class='input'>
</div></span></pre>
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/select'>select</a></span>(<span class='no'>hospital_id</span>, <span class='no'>amox</span>, <span class='no'>cipr</span>) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/group_by'>group_by</a></span>(<span class='no'>hospital_id</span>) <span class='kw'>%&gt;%</span>
<span class='fu'>count_df</span>(<span class='kw'>translate</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)
<span class='co'># }</span></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
@@ -307,6 +360,8 @@ count_R and count_IR can be used to count resistant isolates, count_S and count_
<li><a href="#details">Details</a></li>
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
<li><a href="#see-also">See also</a></li>
<li><a href="#examples">Examples</a></li>

View File

@@ -49,7 +49,7 @@
<meta property="og:description" content="Apply susceptibility rules as defined by the European Committee on Antimicrobial Susceptibility Testing (EUCAST, http://eucast.org), see Source. This includes (1) expert rules, (2) intrinsic resistance and (3) inferred resistance as defined in their breakpoint tables." />
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@@ -80,7 +80,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
</span>
</div>
@@ -93,12 +93,65 @@
Home
</a>
</li>
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-question-circle"></span>
Get Started
How to
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
Conduct AMR analysis
</a>
</li>
<li>
<a href="../articles/Predict.html">
<span class="fa fa-dice"></span>
Predict antimicrobial resistance
</a>
</li>
<li>
<a href="../articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span>
Apply EUCAST rules
</a>
</li>
<li>
<a href="../articles/mo_property.html">
<span class="fa fa-bug"></span>
Get properties of a microorganism
</a>
</li>
<li>
<a href="../articles/ab_property.html">
<span class="fa fa-capsules"></span>
Get properties of an antibiotic
</a>
</li>
<li>
<a href="../articles/freq.html">
<span class="fa fa-sort-amount-down"></span>
Create frequency tables
</a>
</li>
<li>
<a href="../articles/G_test.html">
<span class="fa fa-clipboard-check"></span>
Use the G-test
</a>
</li>
</ul>
</li>
<li>
<a href="../reference/">
@@ -121,17 +174,17 @@
Changelog
</a>
</li>
<li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://gitlab.com/msberends/AMR">
<span class="fab fa fab fa-gitlab"></span>
Source Code
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<li>
<a href="../LICENSE-text.html">
<span class="fa fa-book"></span>
@@ -307,51 +360,17 @@
<strong>trsu</strong>: sulfamethoxazole and trimethoprim (<em>J01EE01</em>),
<strong>vanc</strong>: vancomycin (<em>J01XA01</em>).</p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='no'>a</span> <span class='kw'>&lt;-</span> <span class='fu'>eucast_rules</span>(<span class='no'>septic_patients</span>)</div><div class='output co'>#&gt; <span class='message'><span style='color: #0000BB;'>NOTE: Using column `</span><span style='color: #0000BB;font-weight: bold;'>mo</span><span style='color: #0000BB;'>` as input for `col_mo`.</span><span></span></div><div class='output co'>#&gt; <span class='warning'>Warning: These columns do not exist and will be ignored: azlo, aztr, cefa, cfra, clar, dapt, erta, fusi, levo, linc, mezl, mino, nali, neom, neti, novo, norf, oflo, pipe, poly, pris, qida, roxi, siso, tica.</span>
#&gt; <span class='warning'>THIS MAY STRONGLY INFLUENCE THE OUTCOME.</span></div><div class='output co'>#&gt;
#&gt; Rules by the European Committee on Antimicrobial Susceptibility Testing (EUCAST)
#&gt; </span><span style='font-weight: bold;'>
#&gt; EUCAST Clinical Breakpoints (v8.1, 2018)
#&gt; </span><span>Enterobacteriales (Order)</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span style='font-style: italic;'>Staphylococcus</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span style='font-style: italic;'>Enterococcus</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span style='font-style: italic;'>Streptococcus</span><span> groups A, B, C, G</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span style='font-style: italic;'>Streptococcus pneumoniae</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span>Viridans group streptococci</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span style='font-style: italic;'>Haemophilus influenzae</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span style='font-style: italic;'>Moraxella catarrhalis</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span>Anaerobic Gram positives</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span>Anaerobic Gram negatives</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span style='font-style: italic;'>Pasteurella multocida</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span style='font-style: italic;'>Campylobacter jejuni</span><span> and </span><span style='font-style: italic;'>C. coli</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span style='font-style: italic;'>Aerococcus sanguinicola</span><span> and </span><span style='font-style: italic;'>A. urinae</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span style='font-style: italic;'>Kingella kingae</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span style='font-weight: bold;'>
#&gt; EUCAST Expert Rules, Intrinsic Resistance and Exceptional Phenotypes (v3.1, 2016)
#&gt; </span><span>Table 1: Intrinsic resistance in </span><span style='font-style: italic;'>Enterobacteriaceae</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span>Table 2: Intrinsic resistance in non-fermentative Gram-negative bacteria</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span>Table 3: Intrinsic resistance in other Gram-negative bacteria</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span>Table 4: Intrinsic resistance in Gram-positive bacteria</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span>Table 8: Interpretive rules for B-lactam agents and Gram-positive cocci</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span>Table 9: Interpretive rules for B-lactam agents and Gram-negative rods</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span>Table 10: Interpretive rules for B-lactam agents and other Gram-negative bacteria</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span>Table 11: Interpretive rules for macrolides, lincosamides, and streptogramins</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span>Table 12: Interpretive rules for aminoglycosides</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span>Table 13: Interpretive rules for quinolones</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span style='font-weight: bold;'>
#&gt; Other rules
#&gt; </span><span>Non-EUCAST: ampicillin = R where amoxicillin/clav acid = R</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span>Non-EUCAST: piperacillin = R where piperacillin/tazobactam = R</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span>Non-EUCAST: trimethoprim = R where trimethoprim/sulfa = R</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span>Non-EUCAST: amoxicillin/clav acid = S where ampicillin = S</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span>Non-EUCAST: piperacillin/tazobactam = S where piperacillin = S</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span>Non-EUCAST: trimethoprim/sulfa = S where trimethoprim = S</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span style='font-weight: bold;'>
#&gt; =&gt; EUCAST rules affected 1,980 out of 2,000 rows -&gt; </span><span style='color: #00BB00;font-weight: bold;'>changed 0 test results.
#&gt;
#&gt; </span><span></div><div class='input'>
<pre class="examples"><span class='co'># NOT RUN {</span>
<span class='no'>a</span> <span class='kw'>&lt;-</span> <span class='fu'>eucast_rules</span>(<span class='no'>septic_patients</span>)
<span class='no'>a</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/data.frame'>data.frame</a></span>(<span class='kw'>mo</span> <span class='kw'>=</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"Staphylococcus aureus"</span>,
<span class='st'>"Enterococcus faecalis"</span>,
<span class='st'>"Escherichia coli"</span>,
@@ -366,72 +385,24 @@
<span class='kw'>cfox</span> <span class='kw'>=</span> <span class='st'>"S"</span>, <span class='co'># Cefoxitin</span>
<span class='kw'>stringsAsFactors</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)
<span class='no'>a</span></div><div class='output co'>#&gt; mo vanc amox coli cfta cfur peni cfox
#&gt; 1 Staphylococcus aureus - - - - - S S
#&gt; 2 Enterococcus faecalis - - - - - S S
#&gt; 3 Escherichia coli - - - - - S S
#&gt; 4 Klebsiella pneumoniae - - - - - S S
#&gt; 5 Pseudomonas aeruginosa - - - - - S S</div><div class='input'><span class='co'># mo vanc amox coli cfta cfur peni cfox</span>
<span class='no'>a</span>
<span class='co'># mo vanc amox coli cfta cfur peni cfox</span>
<span class='co'># 1 Staphylococcus aureus - - - - - S S</span>
<span class='co'># 2 Enterococcus faecalis - - - - - S S</span>
<span class='co'># 3 Escherichia coli - - - - - S S</span>
<span class='co'># 4 Klebsiella pneumoniae - - - - - S S</span>
<span class='co'># 5 Pseudomonas aeruginosa - - - - - S S</span>
<span class='no'>b</span> <span class='kw'>&lt;-</span> <span class='fu'>eucast_rules</span>(<span class='no'>a</span>, <span class='st'>"mo"</span>) <span class='co'># 18 results are forced as R or S</span></div><div class='output co'>#&gt; <span class='warning'>Warning: These columns do not exist and will be ignored: amcl, amik, ampi, azit, azlo, aztr, cefa, cfra, cfep, cfot, cftr, chlo, cipr, clar, clin, clox, czol, dapt, doxy, erta, eryt, fosf, fusi, gent, imip, kana, levo, linc, line, mero, mezl, mino, moxi, nali, neom, neti, nitr, novo, norf, oflo, oxac, pipe, pita, poly, pris, qida, rifa, roxi, siso, teic, tetr, tica, tige, tobr, trim, trsu.</span>
#&gt; <span class='warning'>THIS MAY STRONGLY INFLUENCE THE OUTCOME.</span></div><div class='output co'>#&gt;
#&gt; Rules by the European Committee on Antimicrobial Susceptibility Testing (EUCAST)</div><div class='output co'>#&gt; <span class='message'></span><span style='color: #0000BB;'>NOTE: Using column `</span><span style='color: #0000BB;font-weight: bold;'>amox</span><span style='color: #0000BB;'>` as input for ampicillin (J01CA01) since many EUCAST rules depend on it.</span><span></span></div><div class='output co'>#&gt; </span><span style='font-weight: bold;'>
#&gt; EUCAST Clinical Breakpoints (v8.1, 2018)
#&gt; </span><span>Enterobacteriales (Order)</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span style='font-style: italic;'>Staphylococcus</span><span style='color: #0000BB;'> (2 changes)
#&gt; </span><span style='font-style: italic;'>Enterococcus</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span style='font-style: italic;'>Streptococcus</span><span> groups A, B, C, G</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span style='font-style: italic;'>Streptococcus pneumoniae</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span>Viridans group streptococci</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span style='font-style: italic;'>Haemophilus influenzae</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span style='font-style: italic;'>Moraxella catarrhalis</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span>Anaerobic Gram positives</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span>Anaerobic Gram negatives</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span style='font-style: italic;'>Pasteurella multocida</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span style='font-style: italic;'>Campylobacter jejuni</span><span> and </span><span style='font-style: italic;'>C. coli</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span style='font-style: italic;'>Aerococcus sanguinicola</span><span> and </span><span style='font-style: italic;'>A. urinae</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span style='font-style: italic;'>Kingella kingae</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span style='font-weight: bold;'>
#&gt; EUCAST Expert Rules, Intrinsic Resistance and Exceptional Phenotypes (v3.1, 2016)
#&gt; </span><span>Table 1: Intrinsic resistance in </span><span style='font-style: italic;'>Enterobacteriaceae</span><span style='color: #0000BB;'> (5 changes)
#&gt; </span><span>Table 2: Intrinsic resistance in non-fermentative Gram-negative bacteria</span><span style='color: #0000BB;'> (5 changes)
#&gt; </span><span>Table 3: Intrinsic resistance in other Gram-negative bacteria</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span>Table 4: Intrinsic resistance in Gram-positive bacteria</span><span style='color: #0000BB;'> (6 changes)
#&gt; </span><span>Table 8: Interpretive rules for B-lactam agents and Gram-positive cocci</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span>Table 9: Interpretive rules for B-lactam agents and Gram-negative rods</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span>Table 10: Interpretive rules for B-lactam agents and other Gram-negative bacteria</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span>Table 11: Interpretive rules for macrolides, lincosamides, and streptogramins</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span>Table 12: Interpretive rules for aminoglycosides</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span>Table 13: Interpretive rules for quinolones</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span style='font-weight: bold;'>
#&gt; Other rules
#&gt; </span><span>Non-EUCAST: ampicillin = R where amoxicillin/clav acid = R</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span>Non-EUCAST: piperacillin = R where piperacillin/tazobactam = R</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span>Non-EUCAST: trimethoprim = R where trimethoprim/sulfa = R</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span>Non-EUCAST: amoxicillin/clav acid = S where ampicillin = S</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span>Non-EUCAST: piperacillin/tazobactam = S where piperacillin = S</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span>Non-EUCAST: trimethoprim/sulfa = S where trimethoprim = S</span><span style='color: #00BB00;'> (no changes)
#&gt; </span><span style='font-weight: bold;'>
#&gt; =&gt; EUCAST rules affected 5 out of 5 rows -&gt; </span><span style='color: #0000BB;font-weight: bold;'>changed 18 test results.
#&gt;
#&gt; </span><span></div><div class='input'>
<span class='no'>b</span></div><div class='output co'>#&gt; mo vanc amox coli cfta cfur peni cfox
#&gt; 1 Staphylococcus aureus - S R R S S S
#&gt; 2 Enterococcus faecalis - - R R R S R
#&gt; 3 Escherichia coli R - - - - R S
#&gt; 4 Klebsiella pneumoniae R R - - - R S
#&gt; 5 Pseudomonas aeruginosa R R - - R R R</div><div class='input'># mo vanc amox coli cfta cfur peni cfox
# 1 Staphylococcus aureus - S R R S S S
# 2 Enterococcus faecalis - - R R R S R
# 3 Escherichia coli R - - - - R S
# 4 Klebsiella pneumoniae R R - - - R S
# 5 Pseudomonas aeruginosa R R - - R R R
</div></span></pre>
<span class='no'>b</span> <span class='kw'>&lt;-</span> <span class='fu'>eucast_rules</span>(<span class='no'>a</span>, <span class='st'>"mo"</span>) <span class='co'># 18 results are forced as R or S</span>
<span class='no'>b</span>
<span class='co'># mo vanc amox coli cfta cfur peni cfox</span>
<span class='co'># 1 Staphylococcus aureus - S R R S S S</span>
<span class='co'># 2 Enterococcus faecalis - - R R R S R</span>
<span class='co'># 3 Escherichia coli R - - - - R S</span>
<span class='co'># 4 Klebsiella pneumoniae R R - - - R S</span>
<span class='co'># 5 Pseudomonas aeruginosa R R - - R R R</span>
<span class='co'># }</span></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
@@ -443,6 +414,8 @@
<li><a href="#value">Value</a></li>
<li><a href="#antibiotics">Antibiotics</a></li>
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
<li><a href="#examples">Examples</a></li>
</ul>

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

View File

@@ -50,7 +50,7 @@
<meta property="og:description" content="Create a frequency table of a vector with items or a data frame. Supports quasiquotation and markdown for reports. The best practice is: data %&amp;gt;% freq(var).
top_freq can be used to get the top/bottom n items of a frequency table, with counts as names." />
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@@ -81,7 +81,7 @@ top_freq can be used to get the top/bottom n items of a frequency table, with co
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
</span>
</div>
@@ -94,12 +94,65 @@ top_freq can be used to get the top/bottom n items of a frequency table, with co
Home
</a>
</li>
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-question-circle"></span>
Get Started
How to
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
Conduct AMR analysis
</a>
</li>
<li>
<a href="../articles/Predict.html">
<span class="fa fa-dice"></span>
Predict antimicrobial resistance
</a>
</li>
<li>
<a href="../articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span>
Apply EUCAST rules
</a>
</li>
<li>
<a href="../articles/mo_property.html">
<span class="fa fa-bug"></span>
Get properties of a microorganism
</a>
</li>
<li>
<a href="../articles/ab_property.html">
<span class="fa fa-capsules"></span>
Get properties of an antibiotic
</a>
</li>
<li>
<a href="../articles/freq.html">
<span class="fa fa-sort-amount-down"></span>
Create frequency tables
</a>
</li>
<li>
<a href="../articles/G_test.html">
<span class="fa fa-clipboard-check"></span>
Use the G-test
</a>
</li>
</ul>
</li>
<li>
<a href="../reference/">
@@ -122,17 +175,17 @@ top_freq can be used to get the top/bottom n items of a frequency table, with co
Changelog
</a>
</li>
<li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://gitlab.com/msberends/AMR">
<span class="fab fa fab fa-gitlab"></span>
Source Code
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<li>
<a href="../LICENSE-text.html">
<span class="fa fa-book"></span>
@@ -303,248 +356,62 @@ top_freq can be used to get the top/bottom n items of a frequency table, with co
<p>In factors, all factor levels that are not existing in the input data will be dropped.</p>
<p>The function <code>top_freq</code> uses <code><a href='http://dplyr.tidyverse.org/reference/top_n.html'>top_n</a></code> internally and will include more than <code>n</code> rows if there are ties.</p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/library'>library</a></span>(<span class='no'>dplyr</span>)
<pre class="examples"><span class='co'># NOT RUN {</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/library'>library</a></span>(<span class='no'>dplyr</span>)
<span class='co'># this all gives the same result:</span>
<span class='fu'>freq</span>(<span class='no'>septic_patients</span>$<span class='no'>hospital_id</span>)</div><div class='output co'>#&gt;
#&gt;
#&gt; **Frequency table**
#&gt;
#&gt;
#&gt; | |Item | Count| Percent| Cum. Count| Cum. Percent|
#&gt; |:--|:----|-----:|-------:|----------:|------------:|
#&gt; |1 |D | 762| 38.1%| 762| 38.1%|
#&gt; |2 |B | 663| 33.2%| 1,425| 71.3%|
#&gt; |3 |A | 321| 16.1%| 1,746| 87.3%|
#&gt; |4 |C | 254| 12.7%| 2,000| 100.0%|
#&gt;
#&gt; </div><div class='input'><span class='fu'>freq</span>(<span class='no'>septic_patients</span>[, <span class='st'>"hospital_id"</span>])</div><div class='output co'>#&gt;
#&gt;
#&gt; **Frequency table**
#&gt;
#&gt;
#&gt; | |Item | Count| Percent| Cum. Count| Cum. Percent|
#&gt; |:--|:----|-----:|-------:|----------:|------------:|
#&gt; |1 |D | 762| 38.1%| 762| 38.1%|
#&gt; |2 |B | 663| 33.2%| 1,425| 71.3%|
#&gt; |3 |A | 321| 16.1%| 1,746| 87.3%|
#&gt; |4 |C | 254| 12.7%| 2,000| 100.0%|
#&gt;
#&gt; </div><div class='input'><span class='no'>septic_patients</span>$<span class='no'>hospital_id</span> <span class='kw'>%&gt;%</span> <span class='fu'>freq</span>()</div><div class='output co'>#&gt;
#&gt;
#&gt; **Frequency table**
#&gt;
#&gt;
#&gt; | |Item | Count| Percent| Cum. Count| Cum. Percent|
#&gt; |:--|:----|-----:|-------:|----------:|------------:|
#&gt; |1 |D | 762| 38.1%| 762| 38.1%|
#&gt; |2 |B | 663| 33.2%| 1,425| 71.3%|
#&gt; |3 |A | 321| 16.1%| 1,746| 87.3%|
#&gt; |4 |C | 254| 12.7%| 2,000| 100.0%|
#&gt;
#&gt; </div><div class='input'><span class='no'>septic_patients</span>[, <span class='st'>"hospital_id"</span>] <span class='kw'>%&gt;%</span> <span class='fu'>freq</span>()</div><div class='output co'>#&gt;
#&gt;
#&gt; **Frequency table**
#&gt;
#&gt;
#&gt; | |Item | Count| Percent| Cum. Count| Cum. Percent|
#&gt; |:--|:----|-----:|-------:|----------:|------------:|
#&gt; |1 |D | 762| 38.1%| 762| 38.1%|
#&gt; |2 |B | 663| 33.2%| 1,425| 71.3%|
#&gt; |3 |A | 321| 16.1%| 1,746| 87.3%|
#&gt; |4 |C | 254| 12.7%| 2,000| 100.0%|
#&gt;
#&gt; </div><div class='input'><span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span> <span class='fu'>freq</span>(<span class='st'>"hospital_id"</span>)</div><div class='output co'>#&gt;
#&gt;
#&gt; **Frequency table of `hospital_id`**
#&gt;
#&gt;
#&gt; | |Item | Count| Percent| Cum. Count| Cum. Percent|
#&gt; |:--|:----|-----:|-------:|----------:|------------:|
#&gt; |1 |D | 762| 38.1%| 762| 38.1%|
#&gt; |2 |B | 663| 33.2%| 1,425| 71.3%|
#&gt; |3 |A | 321| 16.1%| 1,746| 87.3%|
#&gt; |4 |C | 254| 12.7%| 2,000| 100.0%|
#&gt;
#&gt; </div><div class='input'><span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span> <span class='fu'>freq</span>(<span class='no'>hospital_id</span>) <span class='co'>#&lt;- easiest to remember (tidyverse)</span></div><div class='output co'>#&gt;
#&gt;
#&gt; **Frequency table of `hospital_id`**
#&gt;
#&gt;
#&gt; | |Item | Count| Percent| Cum. Count| Cum. Percent|
#&gt; |:--|:----|-----:|-------:|----------:|------------:|
#&gt; |1 |D | 762| 38.1%| 762| 38.1%|
#&gt; |2 |B | 663| 33.2%| 1,425| 71.3%|
#&gt; |3 |A | 321| 16.1%| 1,746| 87.3%|
#&gt; |4 |C | 254| 12.7%| 2,000| 100.0%|
#&gt;
#&gt; </div><div class='input'>
<span class='fu'>freq</span>(<span class='no'>septic_patients</span>$<span class='no'>hospital_id</span>)
<span class='fu'>freq</span>(<span class='no'>septic_patients</span>[, <span class='st'>"hospital_id"</span>])
<span class='no'>septic_patients</span>$<span class='no'>hospital_id</span> <span class='kw'>%&gt;%</span> <span class='fu'>freq</span>()
<span class='no'>septic_patients</span>[, <span class='st'>"hospital_id"</span>] <span class='kw'>%&gt;%</span> <span class='fu'>freq</span>()
<span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span> <span class='fu'>freq</span>(<span class='st'>"hospital_id"</span>)
<span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span> <span class='fu'>freq</span>(<span class='no'>hospital_id</span>) <span class='co'>#&lt;- easiest to remember (tidyverse)</span>
<span class='co'># you could also use `select` or `pull` to get your variables</span>
<span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/filter.html'>filter</a></span>(<span class='no'>hospital_id</span> <span class='kw'>==</span> <span class='st'>"A"</span>) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/select.html'>select</a></span>(<span class='no'>mo</span>) <span class='kw'>%&gt;%</span>
<span class='fu'>freq</span>()</div><div class='output co'>#&gt;
#&gt;
#&gt; **Frequency table**
#&gt;
#&gt;
#&gt; | |Item | Count| Percent| Cum. Count| Cum. Percent|
#&gt; |:--|:------------|-----:|-------:|----------:|------------:|
#&gt; |1 |B_ESCHR_COL | 62| 19.3%| 62| 19.3%|
#&gt; |2 |B_STPHY_EPI | 46| 14.3%| 108| 33.6%|
#&gt; |3 |B_STPHY_CNS | 38| 11.8%| 146| 45.5%|
#&gt; |4 |B_STPHY_AUR | 35| 10.9%| 181| 56.4%|
#&gt; |5 |B_STPHY_HOM | 25| 7.8%| 206| 64.2%|
#&gt; |6 |B_STRPTC_PNE | 12| 3.7%| 218| 67.9%|
#&gt; |7 |B_PROTS_MIR | 11| 3.4%| 229| 71.3%|
#&gt; |8 |B_ENTRC_FAE | 10| 3.1%| 239| 74.5%|
#&gt; |9 |B_KLBSL_PNE | 8| 2.5%| 247| 76.9%|
#&gt; |10 |B_STRPTC_PYO | 7| 2.2%| 254| 79.1%|
#&gt; |11 |B_BCTRD_FRA | 5| 1.6%| 259| 80.7%|
#&gt; |12 |B_KLBSL_OXY | 5| 1.6%| 264| 82.2%|
#&gt; |13 |B_STRPTC | 5| 1.6%| 269| 83.8%|
#&gt; |14 |B_ENTRC_IUM | 4| 1.2%| 273| 85.0%|
#&gt; |15 |B_STRPTC_MIT | 4| 1.2%| 277| 86.3%|
#&gt; |16 |B_CRYNB | 3| 0.9%| 280| 87.2%|
#&gt; |17 |B_PDMNS_AER | 3| 0.9%| 283| 88.2%|
#&gt; |18 |B_STPHY_CAP | 3| 0.9%| 286| 89.1%|
#&gt; |19 |B_STRPTC_DYS | 3| 0.9%| 289| 90.0%|
#&gt; |20 |F_CANDD_GLB | 3| 0.9%| 292| 91.0%|
#&gt; |21 |B_ACNTB | 2| 0.6%| 294| 91.6%|
#&gt; |22 |B_ENTRB_CLO | 2| 0.6%| 296| 92.2%|
#&gt; |23 |B_HMPHL_INF | 2| 0.6%| 298| 92.8%|
#&gt; |24 |B_MCRCCC | 2| 0.6%| 300| 93.5%|
#&gt; |25 |B_PROTS_VUL | 2| 0.6%| 302| 94.1%|
#&gt; |26 |B_SERRT_MAR | 2| 0.6%| 304| 94.7%|
#&gt; |27 |B_STPHY_COH | 2| 0.6%| 306| 95.3%|
#&gt; |28 |B_STRPTC_BOV | 2| 0.6%| 308| 96.0%|
#&gt; |29 |B_AMYCS_ODO | 1| 0.3%| 309| 96.3%|
#&gt; |30 |B_ARCCC_URI | 1| 0.3%| 310| 96.6%|
#&gt; |31 |B_CTRDM_PER | 1| 0.3%| 311| 96.9%|
#&gt; |32 |B_CTRDM_SEP | 1| 0.3%| 312| 97.2%|
#&gt; |33 |B_STPHY_SCH | 1| 0.3%| 313| 97.5%|
#&gt; |34 |B_STRPTC_AGA | 1| 0.3%| 314| 97.8%|
#&gt; |35 |B_STRPTC_EQU | 1| 0.3%| 315| 98.1%|
#&gt; |36 |B_STRPTC_GRA | 1| 0.3%| 316| 98.4%|
#&gt; |37 |B_STRPTC_GRB | 1| 0.3%| 317| 98.8%|
#&gt; |38 |B_STRPTC_SAN | 1| 0.3%| 318| 99.1%|
#&gt; |39 |B_VLLNL_PAR | 1| 0.3%| 319| 99.4%|
#&gt; |40 |F_CANDD_ALB | 1| 0.3%| 320| 99.7%|
#&gt; |41 |F_CANDD_TRO | 1| 0.3%| 321| 100.0%|
#&gt;
#&gt; </div><div class='input'>
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/filter'>filter</a></span>(<span class='no'>hospital_id</span> <span class='kw'>==</span> <span class='st'>"A"</span>) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/select'>select</a></span>(<span class='no'>mo</span>) <span class='kw'>%&gt;%</span>
<span class='fu'>freq</span>()
<span class='co'># multiple selected variables will be pasted together</span>
<span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span>
<span class='no'>left_join_microorganisms</span> <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/filter.html'>filter</a></span>(<span class='no'>hospital_id</span> <span class='kw'>==</span> <span class='st'>"A"</span>) <span class='kw'>%&gt;%</span>
<span class='fu'>freq</span>(<span class='no'>genus</span>, <span class='no'>species</span>)</div><div class='output co'>#&gt; <span class='message'>Joining, by = "mo"</span></div><div class='output co'>#&gt;
#&gt;
#&gt; **Frequency table of `genus` and `species`**
#&gt;
#&gt;
#&gt; | |Item | Count| Percent| Cum. Count| Cum. Percent|
#&gt; |:--|:---------------------------------|-----:|-------:|----------:|------------:|
#&gt; |1 |Escherichia coli | 62| 19.3%| 62| 19.3%|
#&gt; |2 |Staphylococcus epidermidis | 46| 14.3%| 108| 33.6%|
#&gt; |3 |Staphylococcus coagulase negative | 38| 11.8%| 146| 45.5%|
#&gt; |4 |Staphylococcus aureus | 35| 10.9%| 181| 56.4%|
#&gt; |5 |Staphylococcus hominis | 25| 7.8%| 206| 64.2%|
#&gt; |6 |Streptococcus pneumoniae | 12| 3.7%| 218| 67.9%|
#&gt; |7 |Proteus mirabilis | 11| 3.4%| 229| 71.3%|
#&gt; |8 |Enterococcus faecalis | 10| 3.1%| 239| 74.5%|
#&gt; |9 |Klebsiella pneumoniae | 8| 2.5%| 247| 76.9%|
#&gt; |10 |Streptococcus pyogenes | 7| 2.2%| 254| 79.1%|
#&gt; |11 |Bacteroides fragilis | 5| 1.6%| 259| 80.7%|
#&gt; |12 |Klebsiella oxytoca | 5| 1.6%| 264| 82.2%|
#&gt; |13 |Streptococcus species | 5| 1.6%| 269| 83.8%|
#&gt; |14 |Enterococcus faecium | 4| 1.2%| 273| 85.0%|
#&gt; |15 |Streptococcus mitis | 4| 1.2%| 277| 86.3%|
#&gt; |16 |Candida glabrata | 3| 0.9%| 280| 87.2%|
#&gt; |17 |Corynebacterium species | 3| 0.9%| 283| 88.2%|
#&gt; |18 |Pseudomonas aeruginosa | 3| 0.9%| 286| 89.1%|
#&gt; |19 |Staphylococcus capitis | 3| 0.9%| 289| 90.0%|
#&gt; |20 |Streptococcus dysgalactiae | 3| 0.9%| 292| 91.0%|
#&gt; |21 |Acinetobacter species | 2| 0.6%| 294| 91.6%|
#&gt; |22 |Enterobacter cloacae | 2| 0.6%| 296| 92.2%|
#&gt; |23 |Haemophilus influenzae | 2| 0.6%| 298| 92.8%|
#&gt; |24 |Micrococcus species | 2| 0.6%| 300| 93.5%|
#&gt; |25 |Proteus vulgaris | 2| 0.6%| 302| 94.1%|
#&gt; |26 |Serratia marcescens | 2| 0.6%| 304| 94.7%|
#&gt; |27 |Staphylococcus cohnii | 2| 0.6%| 306| 95.3%|
#&gt; |28 |Streptococcus bovis | 2| 0.6%| 308| 96.0%|
#&gt; |29 |Actinomyces odontolyticus | 1| 0.3%| 309| 96.3%|
#&gt; |30 |Aerococcus urinae | 1| 0.3%| 310| 96.6%|
#&gt; |31 |Candida albicans | 1| 0.3%| 311| 96.9%|
#&gt; |32 |Candida tropicalis | 1| 0.3%| 312| 97.2%|
#&gt; |33 |Clostridium perfringens | 1| 0.3%| 313| 97.5%|
#&gt; |34 |Clostridium septicum | 1| 0.3%| 314| 97.8%|
#&gt; |35 |Staphylococcus schleiferi | 1| 0.3%| 315| 98.1%|
#&gt; |36 |Streptococcus agalactiae | 1| 0.3%| 316| 98.4%|
#&gt; |37 |Streptococcus equi | 1| 0.3%| 317| 98.8%|
#&gt; |38 |Streptococcus group A | 1| 0.3%| 318| 99.1%|
#&gt; |39 |Streptococcus group B | 1| 0.3%| 319| 99.4%|
#&gt; |40 |Streptococcus sanguinis | 1| 0.3%| 320| 99.7%|
#&gt; |41 |Veillonella parvula | 1| 0.3%| 321| 100.0%|
#&gt;
#&gt; </div><div class='input'>
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/filter'>filter</a></span>(<span class='no'>hospital_id</span> <span class='kw'>==</span> <span class='st'>"A"</span>) <span class='kw'>%&gt;%</span>
<span class='fu'>freq</span>(<span class='no'>genus</span>, <span class='no'>species</span>)
<span class='co'># group a variable and analyse another</span>
<span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/group_by.html'>group_by</a></span>(<span class='no'>hospital_id</span>) <span class='kw'>%&gt;%</span>
<span class='fu'>freq</span>(<span class='no'>gender</span>)</div><div class='output co'>#&gt;
#&gt;
#&gt; **Frequency table of `gender` (grouped by `hospital_id`)**
#&gt;
#&gt;
#&gt; | |Group |Item | Count| Percent| Cum. Count| Cum. Percent|
#&gt; |:--|:-----|:----|-----:|-------:|----------:|------------:|
#&gt; |1 |1 |F | 148| 7.4%| 148| 7.4%|
#&gt; |2 | |M | 173| 8.7%| 321| 16.1%|
#&gt; |3 |2 |F | 332| 16.6%| 332| 16.6%|
#&gt; |4 | |M | 331| 16.6%| 663| 33.2%|
#&gt; |5 |3 |F | 121| 6.1%| 121| 6.1%|
#&gt; |6 | |M | 133| 6.7%| 254| 12.7%|
#&gt; |7 |4 |F | 368| 18.4%| 368| 18.4%|
#&gt; |8 | |M | 394| 19.7%| 762| 38.1%|
#&gt;
#&gt; </div><div class='input'>
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/group_by'>group_by</a></span>(<span class='no'>hospital_id</span>) <span class='kw'>%&gt;%</span>
<span class='fu'>freq</span>(<span class='no'>gender</span>)
<span class='co'># get top 10 bugs of hospital A as a vector</span>
<span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/filter.html'>filter</a></span>(<span class='no'>hospital_id</span> <span class='kw'>==</span> <span class='st'>"A"</span>) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/filter'>filter</a></span>(<span class='no'>hospital_id</span> <span class='kw'>==</span> <span class='st'>"A"</span>) <span class='kw'>%&gt;%</span>
<span class='fu'>freq</span>(<span class='no'>mo</span>) <span class='kw'>%&gt;%</span>
<span class='fu'>top_freq</span>(<span class='fl'>10</span>)</div><div class='output co'>#&gt; 62 46 38 35 25
#&gt; "B_ESCHR_COL" "B_STPHY_EPI" "B_STPHY_CNS" "B_STPHY_AUR" "B_STPHY_HOM"
#&gt; 12 11 10 8 7
#&gt; "B_STRPTC_PNE" "B_PROTS_MIR" "B_ENTRC_FAE" "B_KLBSL_PNE" "B_STRPTC_PYO" </div><div class='input'>
<span class='fu'>top_freq</span>(<span class='fl'>10</span>)
<span class='co'># save frequency table to an object</span>
<span class='no'>years</span> <span class='kw'>&lt;-</span> <span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/mutate.html'>mutate</a></span>(<span class='kw'>year</span> <span class='kw'>=</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/format'>format</a></span>(<span class='no'>date</span>, <span class='st'>"%Y"</span>)) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/mutate'>mutate</a></span>(<span class='kw'>year</span> <span class='kw'>=</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/format'>format</a></span>(<span class='no'>date</span>, <span class='st'>"%Y"</span>)) <span class='kw'>%&gt;%</span>
<span class='fu'>freq</span>(<span class='no'>year</span>)
<span class='co'># show only the top 5</span>
<span class='no'>years</span> <span class='kw'>%&gt;%</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/print'>print</a></span>(<span class='kw'>nmax</span> <span class='kw'>=</span> <span class='fl'>5</span>)</div><div class='output co'>#&gt;
#&gt;
#&gt; **Frequency table of `year`**
#&gt;
#&gt;
#&gt; | |Item | Count| Percent| Cum. Count| Cum. Percent|
#&gt; |:--|:----|-----:|-------:|----------:|------------:|
#&gt; |1 |2017 | 168| 8.4%| 168| 8.4%|
#&gt; |2 |2004 | 167| 8.4%| 335| 16.8%|
#&gt; |3 |2016 | 143| 7.2%| 478| 23.9%|
#&gt; |4 |2002 | 136| 6.8%| 614| 30.7%|
#&gt; |5 |2003 | 135| 6.8%| 749| 37.5%|
#&gt;
#&gt; (omitted 11 entries, n = 1,251 [62.6%])
#&gt;
#&gt; </div><div class='input'>
<span class='no'>years</span> <span class='kw'>%&gt;%</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/print'>print</a></span>(<span class='kw'>nmax</span> <span class='kw'>=</span> <span class='fl'>5</span>)
<span class='co'># save to an object with formatted percentages</span>
<span class='no'>years</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/format'>format</a></span>(<span class='no'>years</span>)
@@ -553,372 +420,53 @@ top_freq can be used to get the top/bottom n items of a frequency table, with co
<span class='co'># print a histogram of numeric values</span>
<span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span>
<span class='fu'>freq</span>(<span class='no'>age</span>) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/graphics/topics/hist'>hist</a></span>()</div><div class='img'><img src='freq-1.png' alt='' width='700' height='433' /></div><div class='input'>
<span class='fu'><a href='https://www.rdocumentation.org/packages/graphics/topics/hist'>hist</a></span>()
<span class='co'># or print all points to a regular plot</span>
<span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span>
<span class='fu'>freq</span>(<span class='no'>age</span>) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/graphics/topics/plot'>plot</a></span>()</div><div class='img'><img src='freq-2.png' alt='' width='700' height='433' /></div><div class='input'>
<span class='fu'><a href='https://www.rdocumentation.org/packages/graphics/topics/plot'>plot</a></span>()
<span class='co'># transform to a data.frame or tibble</span>
<span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span>
<span class='fu'>freq</span>(<span class='no'>age</span>) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/as.data.frame'>as.data.frame</a></span>()</div><div class='output co'>#&gt; item count percent cum_count cum_percent
#&gt; 1 83 102 0.0510 102 0.0510
#&gt; 2 80 75 0.0375 177 0.0885
#&gt; 3 75 72 0.0360 249 0.1245
#&gt; 4 79 72 0.0360 321 0.1605
#&gt; 5 78 70 0.0350 391 0.1955
#&gt; 6 76 65 0.0325 456 0.2280
#&gt; 7 82 62 0.0310 518 0.2590
#&gt; 8 86 61 0.0305 579 0.2895
#&gt; 9 81 58 0.0290 637 0.3185
#&gt; 10 87 57 0.0285 694 0.3470
#&gt; 11 74 54 0.0270 748 0.3740
#&gt; 12 73 53 0.0265 801 0.4005
#&gt; 13 77 52 0.0260 853 0.4265
#&gt; 14 67 51 0.0255 904 0.4520
#&gt; 15 88 51 0.0255 955 0.4775
#&gt; 16 70 50 0.0250 1005 0.5025
#&gt; 17 69 49 0.0245 1054 0.5270
#&gt; 18 71 47 0.0235 1101 0.5505
#&gt; 19 72 45 0.0225 1146 0.5730
#&gt; 20 65 43 0.0215 1189 0.5945
#&gt; 21 66 42 0.0210 1231 0.6155
#&gt; 22 85 42 0.0210 1273 0.6365
#&gt; 23 68 41 0.0205 1314 0.6570
#&gt; 24 47 39 0.0195 1353 0.6765
#&gt; 25 90 35 0.0175 1388 0.6940
#&gt; 26 89 34 0.0170 1422 0.7110
#&gt; 27 84 33 0.0165 1455 0.7275
#&gt; 28 62 32 0.0160 1487 0.7435
#&gt; 29 59 31 0.0155 1518 0.7590
#&gt; 30 64 31 0.0155 1549 0.7745
#&gt; 31 57 29 0.0145 1578 0.7890
#&gt; 32 63 28 0.0140 1606 0.8030
#&gt; 33 51 27 0.0135 1633 0.8165
#&gt; 34 52 25 0.0125 1658 0.8290
#&gt; 35 60 25 0.0125 1683 0.8415
#&gt; 36 53 23 0.0115 1706 0.8530
#&gt; 37 58 23 0.0115 1729 0.8645
#&gt; 38 50 22 0.0110 1751 0.8755
#&gt; 39 56 21 0.0105 1772 0.8860
#&gt; 40 45 20 0.0100 1792 0.8960
#&gt; 41 55 17 0.0085 1809 0.9045
#&gt; 42 61 17 0.0085 1826 0.9130
#&gt; 43 93 16 0.0080 1842 0.9210
#&gt; 44 43 15 0.0075 1857 0.9285
#&gt; 45 44 13 0.0065 1870 0.9350
#&gt; 46 46 13 0.0065 1883 0.9415
#&gt; 47 41 10 0.0050 1893 0.9465
#&gt; 48 48 10 0.0050 1903 0.9515
#&gt; 49 30 9 0.0045 1912 0.9560
#&gt; 50 54 9 0.0045 1921 0.9605
#&gt; 51 92 9 0.0045 1930 0.9650
#&gt; 52 91 8 0.0040 1938 0.9690
#&gt; 53 42 7 0.0035 1945 0.9725
#&gt; 54 38 6 0.0030 1951 0.9755
#&gt; 55 94 6 0.0030 1957 0.9785
#&gt; 56 20 4 0.0020 1961 0.9805
#&gt; 57 39 4 0.0020 1965 0.9825
#&gt; 58 49 4 0.0020 1969 0.9845
#&gt; 59 19 3 0.0015 1972 0.9860
#&gt; 60 29 3 0.0015 1975 0.9875
#&gt; 61 33 3 0.0015 1978 0.9890
#&gt; 62 37 3 0.0015 1981 0.9905
#&gt; 63 40 3 0.0015 1984 0.9920
#&gt; 64 18 2 0.0010 1986 0.9930
#&gt; 65 24 2 0.0010 1988 0.9940
#&gt; 66 31 2 0.0010 1990 0.9950
#&gt; 67 36 2 0.0010 1992 0.9960
#&gt; 68 97 2 0.0010 1994 0.9970
#&gt; 69 14 1 0.0005 1995 0.9975
#&gt; 70 22 1 0.0005 1996 0.9980
#&gt; 71 32 1 0.0005 1997 0.9985
#&gt; 72 34 1 0.0005 1998 0.9990
#&gt; 73 35 1 0.0005 1999 0.9995
#&gt; 74 95 1 0.0005 2000 1.0000</div><div class='input'>
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/as.data.frame'>as.data.frame</a></span>()
<span class='co'># or transform (back) to a vector</span>
<span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span>
<span class='fu'>freq</span>(<span class='no'>age</span>) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/vector'>as.vector</a></span>()</div><div class='output co'>#&gt; [1] 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83
#&gt; [25] 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83
#&gt; [49] 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83
#&gt; [73] 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83
#&gt; [97] 83 83 83 83 83 83 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80
#&gt; [121] 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80
#&gt; [145] 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80
#&gt; [169] 80 80 80 80 80 80 80 80 80 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75
#&gt; [193] 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75
#&gt; [217] 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75
#&gt; [241] 75 75 75 75 75 75 75 75 75 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79
#&gt; [265] 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79
#&gt; [289] 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79
#&gt; [313] 79 79 79 79 79 79 79 79 79 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78
#&gt; [337] 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78
#&gt; [361] 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78
#&gt; [385] 78 78 78 78 78 78 78 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76
#&gt; [409] 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76
#&gt; [433] 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76
#&gt; [457] 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82
#&gt; [481] 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82
#&gt; [505] 82 82 82 82 82 82 82 82 82 82 82 82 82 82 86 86 86 86 86 86 86 86 86 86
#&gt; [529] 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86
#&gt; [553] 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86
#&gt; [577] 86 86 86 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81
#&gt; [601] 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81
#&gt; [625] 81 81 81 81 81 81 81 81 81 81 81 81 81 87 87 87 87 87 87 87 87 87 87 87
#&gt; [649] 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87
#&gt; [673] 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87 74 74
#&gt; [697] 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74
#&gt; [721] 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74
#&gt; [745] 74 74 74 74 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73
#&gt; [769] 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73
#&gt; [793] 73 73 73 73 73 73 73 73 73 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77
#&gt; [817] 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77
#&gt; [841] 77 77 77 77 77 77 77 77 77 77 77 77 77 67 67 67 67 67 67 67 67 67 67 67
#&gt; [865] 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67
#&gt; [889] 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 88 88 88 88 88 88 88 88
#&gt; [913] 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88
#&gt; [937] 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 70 70 70 70 70
#&gt; [961] 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70
#&gt; [985] 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 69 69 69
#&gt; [1009] 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69
#&gt; [1033] 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 71 71
#&gt; [1057] 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71
#&gt; [1081] 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 72 72 72
#&gt; [1105] 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72
#&gt; [1129] 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 65 65 65 65 65 65
#&gt; [1153] 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65
#&gt; [1177] 65 65 65 65 65 65 65 65 65 65 65 65 65 66 66 66 66 66 66 66 66 66 66 66
#&gt; [1201] 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66
#&gt; [1225] 66 66 66 66 66 66 66 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85
#&gt; [1249] 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85
#&gt; [1273] 85 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68
#&gt; [1297] 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 47 47 47 47 47 47
#&gt; [1321] 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47
#&gt; [1345] 47 47 47 47 47 47 47 47 47 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
#&gt; [1369] 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 89 89 89 89
#&gt; [1393] 89 89 89 89 89 89 89 89 89 89 89 89 89 89 89 89 89 89 89 89 89 89 89 89
#&gt; [1417] 89 89 89 89 89 89 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84
#&gt; [1441] 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 62 62 62 62 62 62 62 62 62
#&gt; [1465] 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 59
#&gt; [1489] 59 59 59 59 59 59 59 59 59 59 59 59 59 59 59 59 59 59 59 59 59 59 59 59
#&gt; [1513] 59 59 59 59 59 59 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64
#&gt; [1537] 64 64 64 64 64 64 64 64 64 64 64 64 64 57 57 57 57 57 57 57 57 57 57 57
#&gt; [1561] 57 57 57 57 57 57 57 57 57 57 57 57 57 57 57 57 57 57 63 63 63 63 63 63
#&gt; [1585] 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 51 51
#&gt; [1609] 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51
#&gt; [1633] 51 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52
#&gt; [1657] 52 52 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60
#&gt; [1681] 60 60 60 53 53 53 53 53 53 53 53 53 53 53 53 53 53 53 53 53 53 53 53 53
#&gt; [1705] 53 53 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58
#&gt; [1729] 58 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 56
#&gt; [1753] 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 45 45 45 45
#&gt; [1777] 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 55 55 55 55 55 55 55 55
#&gt; [1801] 55 55 55 55 55 55 55 55 55 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61
#&gt; [1825] 61 61 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 43 43 43 43 43 43
#&gt; [1849] 43 43 43 43 43 43 43 43 43 44 44 44 44 44 44 44 44 44 44 44 44 44 46 46
#&gt; [1873] 46 46 46 46 46 46 46 46 46 46 46 41 41 41 41 41 41 41 41 41 41 48 48 48
#&gt; [1897] 48 48 48 48 48 48 48 30 30 30 30 30 30 30 30 30 54 54 54 54 54 54 54 54
#&gt; [1921] 54 92 92 92 92 92 92 92 92 92 91 91 91 91 91 91 91 91 42 42 42 42 42 42
#&gt; [1945] 42 38 38 38 38 38 38 94 94 94 94 94 94 20 20 20 20 39 39 39 39 49 49 49
#&gt; [1969] 49 19 19 19 29 29 29 33 33 33 37 37 37 40 40 40 18 18 24 24 31 31 36 36
#&gt; [1993] 97 97 14 22 32 34 35 95</div><div class='input'>
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/vector'>as.vector</a></span>()
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/identical'>identical</a></span>(<span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span>
<span class='fu'>freq</span>(<span class='no'>age</span>) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/vector'>as.vector</a></span>() <span class='kw'>%&gt;%</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/sort'>sort</a></span>(),
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/sort'>sort</a></span>(<span class='no'>septic_patients</span>$<span class='no'>age</span>)) <span class='co'># TRUE</span></div><div class='output co'>#&gt; [1] TRUE</div><div class='input'>
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/sort'>sort</a></span>(<span class='no'>septic_patients</span>$<span class='no'>age</span>)) <span class='co'># TRUE</span>
<span class='co'># it also supports `table` objects</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/table'>table</a></span>(<span class='no'>septic_patients</span>$<span class='no'>gender</span>,
<span class='no'>septic_patients</span>$<span class='no'>age</span>) <span class='kw'>%&gt;%</span>
<span class='fu'>freq</span>(<span class='kw'>sep</span> <span class='kw'>=</span> <span class='st'>" **sep** "</span>)</div><div class='output co'>#&gt;
#&gt;
#&gt; **Frequency table of a `table` object**
#&gt;
#&gt;
#&gt; | |Item | Count| Percent| Cum. Count| Cum. Percent|
#&gt; |:---|:------------|-----:|-------:|----------:|------------:|
#&gt; |1 |F **sep** 83 | 55| 2.8%| 55| 2.8%|
#&gt; |2 |M **sep** 78 | 51| 2.6%| 106| 5.3%|
#&gt; |3 |M **sep** 83 | 47| 2.4%| 153| 7.7%|
#&gt; |4 |M **sep** 82 | 43| 2.2%| 196| 9.8%|
#&gt; |5 |M **sep** 79 | 42| 2.1%| 238| 11.9%|
#&gt; |6 |F **sep** 80 | 41| 2.1%| 279| 14.0%|
#&gt; |7 |F **sep** 76 | 39| 2.0%| 318| 15.9%|
#&gt; |8 |F **sep** 75 | 38| 1.9%| 356| 17.8%|
#&gt; |9 |F **sep** 86 | 38| 1.9%| 394| 19.7%|
#&gt; |10 |M **sep** 71 | 35| 1.8%| 429| 21.5%|
#&gt; |11 |M **sep** 75 | 34| 1.7%| 463| 23.2%|
#&gt; |12 |M **sep** 77 | 34| 1.7%| 497| 24.9%|
#&gt; |13 |M **sep** 80 | 34| 1.7%| 531| 26.6%|
#&gt; |14 |F **sep** 81 | 33| 1.7%| 564| 28.2%|
#&gt; |15 |M **sep** 88 | 31| 1.6%| 595| 29.8%|
#&gt; |16 |F **sep** 79 | 30| 1.5%| 625| 31.3%|
#&gt; |17 |M **sep** 74 | 30| 1.5%| 655| 32.8%|
#&gt; |18 |M **sep** 87 | 30| 1.5%| 685| 34.3%|
#&gt; |19 |F **sep** 65 | 29| 1.5%| 714| 35.7%|
#&gt; |20 |M **sep** 73 | 29| 1.5%| 743| 37.2%|
#&gt; |21 |M **sep** 69 | 28| 1.4%| 771| 38.6%|
#&gt; |22 |M **sep** 72 | 28| 1.4%| 799| 40.0%|
#&gt; |23 |F **sep** 67 | 27| 1.4%| 826| 41.3%|
#&gt; |24 |F **sep** 87 | 27| 1.4%| 853| 42.7%|
#&gt; |25 |M **sep** 76 | 26| 1.3%| 879| 44.0%|
#&gt; |26 |F **sep** 66 | 25| 1.3%| 904| 45.2%|
#&gt; |27 |F **sep** 70 | 25| 1.3%| 929| 46.5%|
#&gt; |28 |M **sep** 70 | 25| 1.3%| 954| 47.7%|
#&gt; |29 |M **sep** 81 | 25| 1.3%| 979| 49.0%|
#&gt; |30 |F **sep** 47 | 24| 1.2%| 1,003| 50.1%|
#&gt; |31 |F **sep** 73 | 24| 1.2%| 1,027| 51.4%|
#&gt; |32 |F **sep** 74 | 24| 1.2%| 1,051| 52.6%|
#&gt; |33 |M **sep** 67 | 24| 1.2%| 1,075| 53.8%|
#&gt; |34 |M **sep** 86 | 23| 1.2%| 1,098| 54.9%|
#&gt; |35 |F **sep** 89 | 22| 1.1%| 1,120| 56.0%|
#&gt; |36 |M **sep** 68 | 22| 1.1%| 1,142| 57.1%|
#&gt; |37 |M **sep** 85 | 22| 1.1%| 1,164| 58.2%|
#&gt; |38 |F **sep** 69 | 21| 1.1%| 1,185| 59.3%|
#&gt; |39 |M **sep** 62 | 21| 1.1%| 1,206| 60.3%|
#&gt; |40 |F **sep** 85 | 20| 1.0%| 1,226| 61.3%|
#&gt; |41 |F **sep** 88 | 20| 1.0%| 1,246| 62.3%|
#&gt; |42 |F **sep** 90 | 20| 1.0%| 1,266| 63.3%|
#&gt; |43 |M **sep** 64 | 20| 1.0%| 1,286| 64.3%|
#&gt; |44 |F **sep** 68 | 19| 1.0%| 1,305| 65.3%|
#&gt; |45 |F **sep** 78 | 19| 1.0%| 1,324| 66.2%|
#&gt; |46 |F **sep** 82 | 19| 1.0%| 1,343| 67.2%|
#&gt; |47 |F **sep** 45 | 18| 0.9%| 1,361| 68.1%|
#&gt; |48 |F **sep** 60 | 18| 0.9%| 1,379| 69.0%|
#&gt; |49 |F **sep** 77 | 18| 0.9%| 1,397| 69.9%|
#&gt; |50 |F **sep** 84 | 18| 0.9%| 1,415| 70.8%|
#&gt; |51 |M **sep** 51 | 18| 0.9%| 1,433| 71.7%|
#&gt; |52 |M **sep** 52 | 18| 0.9%| 1,451| 72.6%|
#&gt; |53 |F **sep** 57 | 17| 0.9%| 1,468| 73.4%|
#&gt; |54 |F **sep** 72 | 17| 0.9%| 1,485| 74.3%|
#&gt; |55 |M **sep** 66 | 17| 0.9%| 1,502| 75.1%|
#&gt; |56 |F **sep** 58 | 16| 0.8%| 1,518| 75.9%|
#&gt; |57 |F **sep** 59 | 16| 0.8%| 1,534| 76.7%|
#&gt; |58 |M **sep** 56 | 16| 0.8%| 1,550| 77.5%|
#&gt; |59 |M **sep** 47 | 15| 0.8%| 1,565| 78.3%|
#&gt; |60 |M **sep** 59 | 15| 0.8%| 1,580| 79.0%|
#&gt; |61 |M **sep** 84 | 15| 0.8%| 1,595| 79.8%|
#&gt; |62 |M **sep** 90 | 15| 0.8%| 1,610| 80.5%|
#&gt; |63 |F **sep** 63 | 14| 0.7%| 1,624| 81.2%|
#&gt; |64 |M **sep** 53 | 14| 0.7%| 1,638| 81.9%|
#&gt; |65 |M **sep** 63 | 14| 0.7%| 1,652| 82.6%|
#&gt; |66 |M **sep** 65 | 14| 0.7%| 1,666| 83.3%|
#&gt; |67 |M **sep** 61 | 13| 0.7%| 1,679| 84.0%|
#&gt; |68 |F **sep** 50 | 12| 0.6%| 1,691| 84.6%|
#&gt; |69 |F **sep** 71 | 12| 0.6%| 1,703| 85.2%|
#&gt; |70 |M **sep** 57 | 12| 0.6%| 1,715| 85.8%|
#&gt; |71 |M **sep** 89 | 12| 0.6%| 1,727| 86.4%|
#&gt; |72 |M **sep** 93 | 12| 0.6%| 1,739| 87.0%|
#&gt; |73 |F **sep** 62 | 11| 0.6%| 1,750| 87.5%|
#&gt; |74 |F **sep** 64 | 11| 0.6%| 1,761| 88.1%|
#&gt; |75 |M **sep** 50 | 10| 0.5%| 1,771| 88.6%|
#&gt; |76 |F **sep** 43 | 9| 0.5%| 1,780| 89.0%|
#&gt; |77 |F **sep** 46 | 9| 0.5%| 1,789| 89.5%|
#&gt; |78 |F **sep** 51 | 9| 0.5%| 1,798| 89.9%|
#&gt; |79 |F **sep** 53 | 9| 0.5%| 1,807| 90.4%|
#&gt; |80 |F **sep** 55 | 9| 0.5%| 1,816| 90.8%|
#&gt; |81 |M **sep** 30 | 9| 0.5%| 1,825| 91.3%|
#&gt; |82 |F **sep** 44 | 8| 0.4%| 1,833| 91.7%|
#&gt; |83 |M **sep** 55 | 8| 0.4%| 1,841| 92.1%|
#&gt; |84 |F **sep** 41 | 7| 0.4%| 1,848| 92.4%|
#&gt; |85 |F **sep** 48 | 7| 0.4%| 1,855| 92.8%|
#&gt; |86 |F **sep** 52 | 7| 0.4%| 1,862| 93.1%|
#&gt; |87 |M **sep** 58 | 7| 0.4%| 1,869| 93.5%|
#&gt; |88 |M **sep** 60 | 7| 0.4%| 1,876| 93.8%|
#&gt; |89 |F **sep** 92 | 6| 0.3%| 1,882| 94.1%|
#&gt; |90 |M **sep** 43 | 6| 0.3%| 1,888| 94.4%|
#&gt; |91 |F **sep** 38 | 5| 0.3%| 1,893| 94.7%|
#&gt; |92 |F **sep** 42 | 5| 0.3%| 1,898| 94.9%|
#&gt; |93 |F **sep** 56 | 5| 0.3%| 1,903| 95.2%|
#&gt; |94 |M **sep** 44 | 5| 0.3%| 1,908| 95.4%|
#&gt; |95 |M **sep** 54 | 5| 0.3%| 1,913| 95.7%|
#&gt; |96 |F **sep** 20 | 4| 0.2%| 1,917| 95.9%|
#&gt; |97 |F **sep** 54 | 4| 0.2%| 1,921| 96.1%|
#&gt; |98 |F **sep** 61 | 4| 0.2%| 1,925| 96.3%|
#&gt; |99 |F **sep** 91 | 4| 0.2%| 1,929| 96.5%|
#&gt; |100 |F **sep** 93 | 4| 0.2%| 1,933| 96.7%|
#&gt; |101 |F **sep** 94 | 4| 0.2%| 1,937| 96.9%|
#&gt; |102 |M **sep** 46 | 4| 0.2%| 1,941| 97.1%|
#&gt; |103 |M **sep** 91 | 4| 0.2%| 1,945| 97.3%|
#&gt; |104 |F **sep** 39 | 3| 0.2%| 1,948| 97.4%|
#&gt; |105 |M **sep** 19 | 3| 0.2%| 1,951| 97.6%|
#&gt; |106 |M **sep** 33 | 3| 0.2%| 1,954| 97.7%|
#&gt; |107 |M **sep** 41 | 3| 0.2%| 1,957| 97.9%|
#&gt; |108 |M **sep** 48 | 3| 0.2%| 1,960| 98.0%|
#&gt; |109 |M **sep** 92 | 3| 0.2%| 1,963| 98.2%|
#&gt; |110 |F **sep** 31 | 2| 0.1%| 1,965| 98.3%|
#&gt; |111 |F **sep** 49 | 2| 0.1%| 1,967| 98.4%|
#&gt; |112 |M **sep** 18 | 2| 0.1%| 1,969| 98.5%|
#&gt; |113 |M **sep** 24 | 2| 0.1%| 1,971| 98.6%|
#&gt; |114 |M **sep** 29 | 2| 0.1%| 1,973| 98.7%|
#&gt; |115 |M **sep** 36 | 2| 0.1%| 1,975| 98.8%|
#&gt; |116 |M **sep** 37 | 2| 0.1%| 1,977| 98.9%|
#&gt; |117 |M **sep** 40 | 2| 0.1%| 1,979| 99.0%|
#&gt; |118 |M **sep** 42 | 2| 0.1%| 1,981| 99.1%|
#&gt; |119 |M **sep** 45 | 2| 0.1%| 1,983| 99.2%|
#&gt; |120 |M **sep** 49 | 2| 0.1%| 1,985| 99.3%|
#&gt; |121 |M **sep** 94 | 2| 0.1%| 1,987| 99.4%|
#&gt; |122 |M **sep** 97 | 2| 0.1%| 1,989| 99.5%|
#&gt; |123 |F **sep** 22 | 1| 0.1%| 1,990| 99.5%|
#&gt; |124 |F **sep** 29 | 1| 0.1%| 1,991| 99.6%|
#&gt; |125 |F **sep** 34 | 1| 0.1%| 1,992| 99.6%|
#&gt; |126 |F **sep** 35 | 1| 0.1%| 1,993| 99.7%|
#&gt; |127 |F **sep** 37 | 1| 0.1%| 1,994| 99.7%|
#&gt; |128 |F **sep** 40 | 1| 0.1%| 1,995| 99.8%|
#&gt; |129 |M **sep** 14 | 1| 0.1%| 1,996| 99.8%|
#&gt; |130 |M **sep** 32 | 1| 0.1%| 1,997| 99.9%|
#&gt; |131 |M **sep** 38 | 1| 0.1%| 1,998| 99.9%|
#&gt; |132 |M **sep** 39 | 1| 0.1%| 1,999| 100.0%|
#&gt; |133 |M **sep** 95 | 1| 0.1%| 2,000| 100.0%|
#&gt;
#&gt; </div><div class='input'>
<span class='fu'>freq</span>(<span class='kw'>sep</span> <span class='kw'>=</span> <span class='st'>" **sep** "</span>)
<span class='co'># only get selected columns</span>
<span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span>
<span class='fu'>freq</span>(<span class='no'>hospital_id</span>) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/select.html'>select</a></span>(<span class='no'>item</span>, <span class='no'>percent</span>)</div><div class='output co'>#&gt;
#&gt;
#&gt; **Frequency table of `hospital_id`**
#&gt;
#&gt;
#&gt; | |Item | Percent|
#&gt; |:--|:----|-------:|
#&gt; |1 |D | 38.1%|
#&gt; |2 |B | 33.2%|
#&gt; |3 |A | 16.1%|
#&gt; |4 |C | 12.7%|
#&gt;
#&gt; </div><div class='input'>
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/select'>select</a></span>(<span class='no'>item</span>, <span class='no'>percent</span>)
<span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span>
<span class='fu'>freq</span>(<span class='no'>hospital_id</span>) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/select.html'>select</a></span>(-<span class='no'>count</span>, -<span class='no'>cum_count</span>)</div><div class='output co'>#&gt;
#&gt;
#&gt; **Frequency table of `hospital_id`**
#&gt;
#&gt;
#&gt; | |Item | Percent| Cum. Percent|
#&gt; |:--|:----|-------:|------------:|
#&gt; |1 |D | 38.1%| 38.1%|
#&gt; |2 |B | 33.2%| 71.3%|
#&gt; |3 |A | 16.1%| 87.3%|
#&gt; |4 |C | 12.7%| 100.0%|
#&gt;
#&gt; </div><div class='input'>
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/select'>select</a></span>(-<span class='no'>count</span>, -<span class='no'>cum_count</span>)
<span class='co'># check differences between frequency tables</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/diff'>diff</a></span>(<span class='fu'>freq</span>(<span class='no'>septic_patients</span>$<span class='no'>trim</span>),
<span class='fu'>freq</span>(<span class='no'>septic_patients</span>$<span class='no'>trsu</span>))</div><div class='output co'>#&gt; Differences between frequency tables
#&gt;
#&gt; |Item | Count #1| Count #2| Difference| Diff. percent|
#&gt; |:----|--------:|--------:|----------:|-------------:|
#&gt; |S | 918| 1392| +474| +51.6%|
#&gt; |R | 571| 361| -210| -36.8%|
#&gt; |I | 10| 6| -4| -40.0%|</div></pre>
<span class='fu'>freq</span>(<span class='no'>septic_patients</span>$<span class='no'>trsu</span>))
<span class='co'># }</span></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
@@ -928,6 +476,8 @@ top_freq can be used to get the top/bottom n items of a frequency table, with co
<li><a href="#value">Value</a></li>
<li><a href="#details">Details</a></li>
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
<li><a href="#examples">Examples</a></li>
</ul>

View File

@@ -49,7 +49,7 @@
<meta property="og:description" content="g.test performs chi-squared contingency table tests and goodness-of-fit tests, just like chisq.test but is more reliable [1]. A G-test can be used to see whether the number of observations in each category fits a theoretical expectation (called a G-test of goodness-of-fit), or to see whether the proportions of one variable are different for different values of the other variable (called a G-test of independence)." />
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@@ -80,7 +80,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
</span>
</div>
@@ -93,12 +93,65 @@
Home
</a>
</li>
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-question-circle"></span>
Get Started
How to
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
Conduct AMR analysis
</a>
</li>
<li>
<a href="../articles/Predict.html">
<span class="fa fa-dice"></span>
Predict antimicrobial resistance
</a>
</li>
<li>
<a href="../articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span>
Apply EUCAST rules
</a>
</li>
<li>
<a href="../articles/mo_property.html">
<span class="fa fa-bug"></span>
Get properties of a microorganism
</a>
</li>
<li>
<a href="../articles/ab_property.html">
<span class="fa fa-capsules"></span>
Get properties of an antibiotic
</a>
</li>
<li>
<a href="../articles/freq.html">
<span class="fa fa-sort-amount-down"></span>
Create frequency tables
</a>
</li>
<li>
<a href="../articles/G_test.html">
<span class="fa fa-clipboard-check"></span>
Use the G-test
</a>
</li>
</ul>
</li>
<li>
<a href="../reference/">
@@ -121,17 +174,17 @@
Changelog
</a>
</li>
<li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://gitlab.com/msberends/AMR">
<span class="fab fa fab fa-gitlab"></span>
Source Code
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<li>
<a href="../LICENSE-text.html">
<span class="fa fa-book"></span>
@@ -260,6 +313,12 @@
<p>where <code>df</code> are the degrees of freedom.</p>
<p>If there are more than two categories and you want to find out which ones are significantly different from their null expectation, you can use the same method of testing each category vs. the sum of all categories, with the Bonferroni correction. You use <em>G</em>-tests for each category, of course.</p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
<h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2>
<p>[1] McDonald, J.H. 2014. <strong>Handbook of Biological Statistics (3rd ed.)</strong>. Sparky House Publishing, Baltimore, Maryland. <a href='http://www.biostathandbook.com/gtestgof.html'>http://www.biostathandbook.com/gtestgof.html</a>.</p>
@@ -270,7 +329,8 @@
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='co'># = EXAMPLE 1 =</span>
<pre class="examples"><span class='co'># NOT RUN {</span>
<span class='co'># = EXAMPLE 1 =</span>
<span class='co'># Shivrain et al. (2006) crossed clearfield rice (which are resistant</span>
<span class='co'># to the herbicide imazethapyr) with red rice (which are susceptible to</span>
<span class='co'># imazethapyr). They then crossed the hybrid offspring and examined the</span>
@@ -279,7 +339,7 @@
<span class='co'># by a single gene with two co-dominant alleles, you would expect a 1:2:1</span>
<span class='co'># ratio.</span>
<span class='no'>x</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='fl'>772</span>, <span class='fl'>1611</span>, <span class='fl'>737</span>)<span class='co'>#'</span>
<span class='no'>x</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='fl'>772</span>, <span class='fl'>1611</span>, <span class='fl'>737</span>)
<span class='no'>G</span> <span class='kw'>&lt;-</span> <span class='fu'>g.test</span>(<span class='no'>x</span>, <span class='kw'>p</span> <span class='kw'>=</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='fl'>1</span>, <span class='fl'>2</span>, <span class='fl'>1</span>) / <span class='fl'>4</span>)
<span class='co'># G$p.value = 0.12574.</span>
@@ -296,17 +356,13 @@
<span class='co'># observed 1752 right-billed and 1895 left-billed crossbills.</span>
<span class='no'>x</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='fl'>1752</span>, <span class='fl'>1895</span>)
<span class='fu'>g.test</span>(<span class='no'>x</span>)</div><div class='output co'>#&gt;
#&gt; G-test of goodness-of-fit (likelihood ratio test)
#&gt;
#&gt; data: x
#&gt; X-squared = 5.6085, df = 1, p-value = 0.01787
#&gt; </div><div class='input'># p = 0.01787343
<span class='fu'>g.test</span>(<span class='no'>x</span>)
<span class='co'># p = 0.01787343</span>
# There is a significant difference from a 1:1 ratio.
# Meaning: there are significantly more left-billed birds.
<span class='co'># There is a significant difference from a 1:1 ratio.</span>
<span class='co'># Meaning: there are significantly more left-billed birds.</span>
</div></pre>
<span class='co'># }</span></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
@@ -325,6 +381,8 @@
<li><a href="#how-the-test-works">How the test works</a></li>
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
<li><a href="#references">References</a></li>
<li><a href="#see-also">See also</a></li>

View File

@@ -49,7 +49,7 @@
<meta property="og:description" content="Determines the system language to be used for language-dependent output of AMR functions, like mo_gramstain and mo_type." />
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@@ -80,7 +80,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
</span>
</div>
@@ -93,12 +93,65 @@
Home
</a>
</li>
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-question-circle"></span>
Get Started
How to
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
Conduct AMR analysis
</a>
</li>
<li>
<a href="../articles/Predict.html">
<span class="fa fa-dice"></span>
Predict antimicrobial resistance
</a>
</li>
<li>
<a href="../articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span>
Apply EUCAST rules
</a>
</li>
<li>
<a href="../articles/mo_property.html">
<span class="fa fa-bug"></span>
Get properties of a microorganism
</a>
</li>
<li>
<a href="../articles/ab_property.html">
<span class="fa fa-capsules"></span>
Get properties of an antibiotic
</a>
</li>
<li>
<a href="../articles/freq.html">
<span class="fa fa-sort-amount-down"></span>
Create frequency tables
</a>
</li>
<li>
<a href="../articles/G_test.html">
<span class="fa fa-clipboard-check"></span>
Use the G-test
</a>
</li>
</ul>
</li>
<li>
<a href="../reference/">
@@ -121,17 +174,17 @@
Changelog
</a>
</li>
<li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://gitlab.com/msberends/AMR">
<span class="fab fa fab fa-gitlab"></span>
Source Code
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<li>
<a href="../LICENSE-text.html">
<span class="fa fa-book"></span>
@@ -178,6 +231,12 @@
<p>Supported languages are <code>"en"</code> (English), <code>"de"</code> (German), <code>"nl"</code> (Dutch), <code>"es"</code> (Spanish), <code>"it"</code> (Italian), <code>"fr"</code> (French), and <code>"pt"</code> (Portuguese).</p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
@@ -187,6 +246,8 @@
<li><a href="#details">Details</a></li>
<li><a href="#supported-languages">Supported languages</a></li>
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
</ul>
</div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

View File

@@ -49,7 +49,7 @@
<meta property="og:description" content="Use these functions to create bar plots for antimicrobial resistance analysis. All functions rely on internal ggplot functions." />
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@@ -80,7 +80,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
</span>
</div>
@@ -93,12 +93,65 @@
Home
</a>
</li>
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-question-circle"></span>
Get Started
How to
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
Conduct AMR analysis
</a>
</li>
<li>
<a href="../articles/Predict.html">
<span class="fa fa-dice"></span>
Predict antimicrobial resistance
</a>
</li>
<li>
<a href="../articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span>
Apply EUCAST rules
</a>
</li>
<li>
<a href="../articles/mo_property.html">
<span class="fa fa-bug"></span>
Get properties of a microorganism
</a>
</li>
<li>
<a href="../articles/ab_property.html">
<span class="fa fa-capsules"></span>
Get properties of an antibiotic
</a>
</li>
<li>
<a href="../articles/freq.html">
<span class="fa fa-sort-amount-down"></span>
Create frequency tables
</a>
</li>
<li>
<a href="../articles/G_test.html">
<span class="fa fa-clipboard-check"></span>
Use the G-test
</a>
</li>
</ul>
</li>
<li>
<a href="../reference/">
@@ -121,17 +174,17 @@
Changelog
</a>
</li>
<li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://gitlab.com/msberends/AMR">
<span class="fab fa fab fa-gitlab"></span>
Source Code
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<li>
<a href="../LICENSE-text.html">
<span class="fa fa-book"></span>
@@ -163,7 +216,7 @@
<div class="ref-description">
<p>Use these functions to create bar plots for antimicrobial resistance analysis. All functions rely on internal <code><a href='https://ggplot2.tidyverse.org/reference/ggplot.html'>ggplot</a></code> functions.</p>
<p>Use these functions to create bar plots for antimicrobial resistance analysis. All functions rely on internal <code><a href='https://www.rdocumentation.org/packages/ggplot2/topics/ggplot'>ggplot</a></code> functions.</p>
</div>
@@ -254,97 +307,112 @@
<p>At default, the names of antibiotics will be shown on the plots using <code><a href='abname.html'>abname</a></code>. This can be set with the option <code>get_antibiotic_names</code> (a logical value), so change it e.g. to <code>FALSE</code> with <code><a href='https://www.rdocumentation.org/packages/base/topics/options'>options(get_antibiotic_names = FALSE)</a></code>.</p>
<p><strong>The functions</strong><br />
<code>geom_rsi</code> will take any variable from the data that has an <code>rsi</code> class (created with <code><a href='as.rsi.html'>as.rsi</a></code>) using <code>fun</code> (<code><a href='count.html'>count_df</a></code> at default, can also be <code><a href='portion.html'>portion_df</a></code>) and will plot bars with the percentage R, I and S. The default behaviour is to have the bars stacked and to have the different antibiotics on the x axis.</p>
<p><code>facet_rsi</code> creates 2d plots (at default based on S/I/R) using <code><a href='https://ggplot2.tidyverse.org/reference/facet_wrap.html'>facet_wrap</a></code>.</p>
<p><code>facet_rsi</code> creates 2d plots (at default based on S/I/R) using <code><a href='https://www.rdocumentation.org/packages/ggplot2/topics/facet_wrap'>facet_wrap</a></code>.</p>
<p><code>scale_y_percent</code> transforms the y axis to a 0 to 100% range using <code>scale_continuous</code>.</p>
<p><code>scale_rsi_colours</code> sets colours to the bars: green for S, yellow for I and red for R, using <code>scale_brewer</code>.</p>
<p><code>theme_rsi</code> is a <code>ggplot <a href='https://ggplot2.tidyverse.org/reference/theme.html'>theme</a></code> with minimal distraction.</p>
<p><code>theme_rsi</code> is a <code>ggplot <a href='https://www.rdocumentation.org/packages/ggplot2/topics/theme'>theme</a></code> with minimal distraction.</p>
<p><code>labels_rsi_count</code> print datalabels on the bars with percentage and amount of isolates using <code><a href='https://ggplot2.tidyverse.org/reference/geom_text.html'>geom_text</a></code></p>
<p><code>ggplot_rsi</code> is a wrapper around all above functions that uses data as first input. This makes it possible to use this function after a pipe (<code>%&gt;%</code>). See Examples.</p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/library'>library</a></span>(<span class='no'>dplyr</span>)
<pre class="examples"><span class='co'># NOT RUN {</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/library'>library</a></span>(<span class='no'>dplyr</span>)
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/library'>library</a></span>(<span class='no'>ggplot2</span>)
<span class='co'># get antimicrobial results for drugs against a UTI:</span>
<span class='fu'><a href='https://ggplot2.tidyverse.org/reference/ggplot.html'>ggplot</a></span>(<span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span> <span class='fu'><a href='http://dplyr.tidyverse.org/reference/select.html'>select</a></span>(<span class='no'>amox</span>, <span class='no'>nitr</span>, <span class='no'>fosf</span>, <span class='no'>trim</span>, <span class='no'>cipr</span>)) +
<span class='fu'>geom_rsi</span>()</div><div class='img'><img src='ggplot_rsi-1.png' alt='' width='700' height='433' /></div><div class='input'>
<span class='fu'><a href='https://www.rdocumentation.org/packages/ggplot2/topics/ggplot'>ggplot</a></span>(<span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/select'>select</a></span>(<span class='no'>amox</span>, <span class='no'>nitr</span>, <span class='no'>fosf</span>, <span class='no'>trim</span>, <span class='no'>cipr</span>)) +
<span class='fu'>geom_rsi</span>()
<span class='co'># prettify the plot using some additional functions:</span>
<span class='no'>df</span> <span class='kw'>&lt;-</span> <span class='no'>septic_patients</span>[, <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"amox"</span>, <span class='st'>"nitr"</span>, <span class='st'>"fosf"</span>, <span class='st'>"trim"</span>, <span class='st'>"cipr"</span>)]
<span class='fu'><a href='https://ggplot2.tidyverse.org/reference/ggplot.html'>ggplot</a></span>(<span class='no'>df</span>) +
<span class='fu'><a href='https://www.rdocumentation.org/packages/ggplot2/topics/ggplot'>ggplot</a></span>(<span class='no'>df</span>) +
<span class='fu'>geom_rsi</span>() +
<span class='fu'>scale_y_percent</span>() +
<span class='fu'>scale_rsi_colours</span>() +
<span class='fu'>labels_rsi_count</span>() +
<span class='fu'>theme_rsi</span>()</div><div class='img'><img src='ggplot_rsi-2.png' alt='' width='700' height='433' /></div><div class='input'>
<span class='fu'>theme_rsi</span>()
<span class='co'># or better yet, simplify this using the wrapper function - a single command:</span>
<span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/select.html'>select</a></span>(<span class='no'>amox</span>, <span class='no'>nitr</span>, <span class='no'>fosf</span>, <span class='no'>trim</span>, <span class='no'>cipr</span>) <span class='kw'>%&gt;%</span>
<span class='fu'>ggplot_rsi</span>()</div><div class='img'><img src='ggplot_rsi-3.png' alt='' width='700' height='433' /></div><div class='input'>
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/select'>select</a></span>(<span class='no'>amox</span>, <span class='no'>nitr</span>, <span class='no'>fosf</span>, <span class='no'>trim</span>, <span class='no'>cipr</span>) <span class='kw'>%&gt;%</span>
<span class='fu'>ggplot_rsi</span>()
<span class='co'># get only portions and no counts:</span>
<span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/select.html'>select</a></span>(<span class='no'>amox</span>, <span class='no'>nitr</span>, <span class='no'>fosf</span>, <span class='no'>trim</span>, <span class='no'>cipr</span>) <span class='kw'>%&gt;%</span>
<span class='fu'>ggplot_rsi</span>(<span class='kw'>fun</span> <span class='kw'>=</span> <span class='no'>portion_df</span>)</div><div class='img'><img src='ggplot_rsi-4.png' alt='' width='700' height='433' /></div><div class='input'>
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/select'>select</a></span>(<span class='no'>amox</span>, <span class='no'>nitr</span>, <span class='no'>fosf</span>, <span class='no'>trim</span>, <span class='no'>cipr</span>) <span class='kw'>%&gt;%</span>
<span class='fu'>ggplot_rsi</span>(<span class='kw'>fun</span> <span class='kw'>=</span> <span class='no'>portion_df</span>)
<span class='co'># add other ggplot2 parameters as you like:</span>
<span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/select.html'>select</a></span>(<span class='no'>amox</span>, <span class='no'>nitr</span>, <span class='no'>fosf</span>, <span class='no'>trim</span>, <span class='no'>cipr</span>) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/select'>select</a></span>(<span class='no'>amox</span>, <span class='no'>nitr</span>, <span class='no'>fosf</span>, <span class='no'>trim</span>, <span class='no'>cipr</span>) <span class='kw'>%&gt;%</span>
<span class='fu'>ggplot_rsi</span>(<span class='kw'>width</span> <span class='kw'>=</span> <span class='fl'>0.5</span>,
<span class='kw'>colour</span> <span class='kw'>=</span> <span class='st'>"black"</span>,
<span class='kw'>size</span> <span class='kw'>=</span> <span class='fl'>1</span>,
<span class='kw'>linetype</span> <span class='kw'>=</span> <span class='fl'>2</span>,
<span class='kw'>alpha</span> <span class='kw'>=</span> <span class='fl'>0.25</span>)</div><div class='img'><img src='ggplot_rsi-5.png' alt='' width='700' height='433' /></div><div class='input'>
<span class='kw'>alpha</span> <span class='kw'>=</span> <span class='fl'>0.25</span>)
<span class='co'># resistance of ciprofloxacine per age group</span>
<span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/mutate.html'>mutate</a></span>(<span class='kw'>first_isolate</span> <span class='kw'>=</span> <span class='fu'><a href='first_isolate.html'>first_isolate</a></span>(<span class='no'>.</span>)) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/filter.html'>filter</a></span>(<span class='no'>first_isolate</span> <span class='kw'>==</span> <span class='fl'>TRUE</span>,
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/mutate'>mutate</a></span>(<span class='kw'>first_isolate</span> <span class='kw'>=</span> <span class='fu'><a href='first_isolate.html'>first_isolate</a></span>(<span class='no'>.</span>)) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/filter'>filter</a></span>(<span class='no'>first_isolate</span> <span class='kw'>==</span> <span class='fl'>TRUE</span>,
<span class='no'>mo</span> <span class='kw'>==</span> <span class='fu'><a href='as.mo.html'>as.mo</a></span>(<span class='st'>"E. coli"</span>)) <span class='kw'>%&gt;%</span>
<span class='co'># `age_group` is also a function of this package:</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/group_by.html'>group_by</a></span>(<span class='kw'>age_group</span> <span class='kw'>=</span> <span class='fu'><a href='age_groups.html'>age_groups</a></span>(<span class='no'>age</span>)) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/select.html'>select</a></span>(<span class='no'>age_group</span>,
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/group_by'>group_by</a></span>(<span class='kw'>age_group</span> <span class='kw'>=</span> <span class='fu'><a href='age_groups.html'>age_groups</a></span>(<span class='no'>age</span>)) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/select'>select</a></span>(<span class='no'>age_group</span>,
<span class='no'>cipr</span>) <span class='kw'>%&gt;%</span>
<span class='fu'>ggplot_rsi</span>(<span class='kw'>x</span> <span class='kw'>=</span> <span class='st'>"age_group"</span>)</div><div class='output co'>#&gt; <span class='message'><span style='color: #0000BB;'>NOTE: Using column `</span><span style='color: #0000BB;font-weight: bold;'>mo</span><span style='color: #0000BB;'>` as input for `col_mo`.</span><span></span></div><div class='output co'>#&gt; <span class='message'></span><span style='color: #0000BB;'>NOTE: Using column `</span><span style='color: #0000BB;font-weight: bold;'>date</span><span style='color: #0000BB;'>` as input for `col_date`.</span><span></span></div><div class='output co'>#&gt; <span class='message'></span><span style='color: #0000BB;'>NOTE: Using column `</span><span style='color: #0000BB;font-weight: bold;'>patient_id</span><span style='color: #0000BB;'>` as input for `col_patient_id`.</span><span></span></div><div class='output co'>#&gt; <span class='message'>=&gt; Found </span><span style='font-weight: bold;'>1,317 first isolates</span><span> (65.9% of total)</span></div><div class='output co'>#&gt; <span class='warning'>Warning: Removed 3 rows containing missing values (geom_bar).</span></div><div class='output co'>#&gt; <span class='warning'>Warning: Removed 3 rows containing missing values (geom_text).</span></div><div class='img'><img src='ggplot_rsi-6.png' alt='' width='700' height='433' /></div></span><div class='input'>
<span class='fu'>ggplot_rsi</span>(<span class='kw'>x</span> <span class='kw'>=</span> <span class='st'>"age_group"</span>)
<span class='co'># }</span><span class='co'># NOT RUN {</span>
<span class='co'># for colourblind mode, use divergent colours from the viridis package:</span>
<span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/select.html'>select</a></span>(<span class='no'>amox</span>, <span class='no'>nitr</span>, <span class='no'>fosf</span>, <span class='no'>trim</span>, <span class='no'>cipr</span>) <span class='kw'>%&gt;%</span>
<span class='fu'>ggplot_rsi</span>() + <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/scale_viridis.html'>scale_fill_viridis_d</a></span>()</div><div class='output co'>#&gt; <span class='message'>Scale for 'fill' is already present. Adding another scale for 'fill', which</span>
#&gt; <span class='message'>will replace the existing scale.</span></div><div class='img'><img src='ggplot_rsi-7.png' alt='' width='700' height='433' /></div><div class='input'>
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/select'>select</a></span>(<span class='no'>amox</span>, <span class='no'>nitr</span>, <span class='no'>fosf</span>, <span class='no'>trim</span>, <span class='no'>cipr</span>) <span class='kw'>%&gt;%</span>
<span class='fu'>ggplot_rsi</span>() + <span class='fu'><a href='https://www.rdocumentation.org/packages/ggplot2/topics/scale_viridis'>scale_fill_viridis_d</a></span>()
<span class='co'># it also supports groups (don't forget to use the group var on `x` or `facet`):</span>
<span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/select.html'>select</a></span>(<span class='no'>hospital_id</span>, <span class='no'>amox</span>, <span class='no'>nitr</span>, <span class='no'>fosf</span>, <span class='no'>trim</span>, <span class='no'>cipr</span>) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/group_by.html'>group_by</a></span>(<span class='no'>hospital_id</span>) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/select'>select</a></span>(<span class='no'>hospital_id</span>, <span class='no'>amox</span>, <span class='no'>nitr</span>, <span class='no'>fosf</span>, <span class='no'>trim</span>, <span class='no'>cipr</span>) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/group_by'>group_by</a></span>(<span class='no'>hospital_id</span>) <span class='kw'>%&gt;%</span>
<span class='fu'>ggplot_rsi</span>(<span class='kw'>x</span> <span class='kw'>=</span> <span class='no'>hospital_id</span>,
<span class='kw'>facet</span> <span class='kw'>=</span> <span class='no'>Antibiotic</span>,
<span class='kw'>nrow</span> <span class='kw'>=</span> <span class='fl'>1</span>) +
<span class='fu'><a href='https://ggplot2.tidyverse.org/reference/labs.html'>labs</a></span>(<span class='kw'>title</span> <span class='kw'>=</span> <span class='st'>"AMR of Anti-UTI Drugs Per Hospital"</span>,
<span class='kw'>x</span> <span class='kw'>=</span> <span class='st'>"Hospital"</span>)</div><div class='output co'>#&gt; <span class='error'>Error in ggplot_rsi(., x = hospital_id, facet = Antibiotic, nrow = 1): object 'hospital_id' not found</span></div><div class='input'>
<span class='fu'><a href='https://www.rdocumentation.org/packages/ggplot2/topics/labs'>labs</a></span>(<span class='kw'>title</span> <span class='kw'>=</span> <span class='st'>"AMR of Anti-UTI Drugs Per Hospital"</span>,
<span class='kw'>x</span> <span class='kw'>=</span> <span class='st'>"Hospital"</span>)
<span class='co'># genuine analysis: check 2 most prevalent microorganisms</span>
<span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span>
<span class='co'># create new bacterial ID's, with all CoNS under the same group (Becker et al.)</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/mutate.html'>mutate</a></span>(<span class='kw'>mo</span> <span class='kw'>=</span> <span class='fu'><a href='as.mo.html'>as.mo</a></span>(<span class='no'>mo</span>, <span class='kw'>Becker</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/mutate'>mutate</a></span>(<span class='kw'>mo</span> <span class='kw'>=</span> <span class='fu'><a href='as.mo.html'>as.mo</a></span>(<span class='no'>mo</span>, <span class='kw'>Becker</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)) <span class='kw'>%&gt;%</span>
<span class='co'># filter on top three bacterial ID's</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/filter.html'>filter</a></span>(<span class='no'>mo</span> <span class='kw'>%in%</span> <span class='fu'><a href='freq.html'>top_freq</a></span>(<span class='fu'><a href='freq.html'>freq</a></span>(<span class='no'>.</span>$<span class='no'>mo</span>), <span class='fl'>3</span>)) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/filter'>filter</a></span>(<span class='no'>mo</span> <span class='kw'>%in%</span> <span class='fu'><a href='freq.html'>top_freq</a></span>(<span class='fu'><a href='freq.html'>freq</a></span>(<span class='no'>.</span>$<span class='no'>mo</span>), <span class='fl'>3</span>)) <span class='kw'>%&gt;%</span>
<span class='co'># determine first isolates</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/mutate.html'>mutate</a></span>(<span class='kw'>first_isolate</span> <span class='kw'>=</span> <span class='fu'><a href='first_isolate.html'>first_isolate</a></span>(<span class='no'>.</span>,
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/mutate'>mutate</a></span>(<span class='kw'>first_isolate</span> <span class='kw'>=</span> <span class='fu'><a href='first_isolate.html'>first_isolate</a></span>(<span class='no'>.</span>,
<span class='kw'>col_date</span> <span class='kw'>=</span> <span class='st'>"date"</span>,
<span class='kw'>col_patient_id</span> <span class='kw'>=</span> <span class='st'>"patient_id"</span>,
<span class='kw'>col_mo</span> <span class='kw'>=</span> <span class='st'>"mo"</span>)) <span class='kw'>%&gt;%</span>
<span class='co'># filter on first isolates</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/filter.html'>filter</a></span>(<span class='no'>first_isolate</span> <span class='kw'>==</span> <span class='fl'>TRUE</span>) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/filter'>filter</a></span>(<span class='no'>first_isolate</span> <span class='kw'>==</span> <span class='fl'>TRUE</span>) <span class='kw'>%&gt;%</span>
<span class='co'># get short MO names (like "E. coli")</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/mutate.html'>mutate</a></span>(<span class='kw'>mo</span> <span class='kw'>=</span> <span class='fu'><a href='mo_property.html'>mo_shortname</a></span>(<span class='no'>mo</span>, <span class='kw'>Becker</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/mutate'>mutate</a></span>(<span class='kw'>mo</span> <span class='kw'>=</span> <span class='fu'><a href='mo_property.html'>mo_shortname</a></span>(<span class='no'>mo</span>, <span class='kw'>Becker</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)) <span class='kw'>%&gt;%</span>
<span class='co'># select this short name and some antiseptic drugs</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/select.html'>select</a></span>(<span class='no'>mo</span>, <span class='no'>cfur</span>, <span class='no'>gent</span>, <span class='no'>cipr</span>) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/select'>select</a></span>(<span class='no'>mo</span>, <span class='no'>cfur</span>, <span class='no'>gent</span>, <span class='no'>cipr</span>) <span class='kw'>%&gt;%</span>
<span class='co'># group by MO</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/group_by.html'>group_by</a></span>(<span class='no'>mo</span>) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/group_by'>group_by</a></span>(<span class='no'>mo</span>) <span class='kw'>%&gt;%</span>
<span class='co'># plot the thing, putting MOs on the facet</span>
<span class='fu'>ggplot_rsi</span>(<span class='kw'>x</span> <span class='kw'>=</span> <span class='no'>Antibiotic</span>,
<span class='kw'>facet</span> <span class='kw'>=</span> <span class='no'>mo</span>,
<span class='kw'>translate_ab</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
<span class='kw'>nrow</span> <span class='kw'>=</span> <span class='fl'>1</span>) +
<span class='fu'><a href='https://ggplot2.tidyverse.org/reference/labs.html'>labs</a></span>(<span class='kw'>title</span> <span class='kw'>=</span> <span class='st'>"AMR of Top Three Microorganisms In Blood Culture Isolates"</span>,
<span class='fu'><a href='https://www.rdocumentation.org/packages/ggplot2/topics/labs'>labs</a></span>(<span class='kw'>title</span> <span class='kw'>=</span> <span class='st'>"AMR of Top Three Microorganisms In Blood Culture Isolates"</span>,
<span class='kw'>subtitle</span> <span class='kw'>=</span> <span class='st'>"Only First Isolates, CoNS grouped according to Becker et al. (2014)"</span>,
<span class='kw'>x</span> <span class='kw'>=</span> <span class='st'>"Microorganisms"</span>)</div><div class='output co'>#&gt; <span class='message'>=&gt; Found <span style='font-weight: bold;'>782 first isolates</span><span> (59.9% of total)</span></div><div class='output co'>#&gt; <span class='error'>Error in ggplot_rsi(., x = Antibiotic, facet = mo, translate_ab = FALSE, nrow = 1): object 'Antibiotic' not found</span></div></span></pre>
<span class='kw'>x</span> <span class='kw'>=</span> <span class='st'>"Microorganisms"</span>)
<span class='co'># }</span></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
@@ -352,6 +420,8 @@
<li><a href="#arguments">Arguments</a></li>
<li><a href="#details">Details</a></li>
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
<li><a href="#examples">Examples</a></li>
</ul>

View File

@@ -47,7 +47,7 @@
<script src="../extra.js"></script>
<meta property="og:title" content="Function reference" />
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@@ -78,7 +78,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
</span>
</div>
@@ -91,12 +91,65 @@
Home
</a>
</li>
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-question-circle"></span>
Get Started
How to
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
Conduct AMR analysis
</a>
</li>
<li>
<a href="../articles/Predict.html">
<span class="fa fa-dice"></span>
Predict antimicrobial resistance
</a>
</li>
<li>
<a href="../articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span>
Apply EUCAST rules
</a>
</li>
<li>
<a href="../articles/mo_property.html">
<span class="fa fa-bug"></span>
Get properties of a microorganism
</a>
</li>
<li>
<a href="../articles/ab_property.html">
<span class="fa fa-capsules"></span>
Get properties of an antibiotic
</a>
</li>
<li>
<a href="../articles/freq.html">
<span class="fa fa-sort-amount-down"></span>
Create frequency tables
</a>
</li>
<li>
<a href="../articles/G_test.html">
<span class="fa fa-clipboard-check"></span>
Use the G-test
</a>
</li>
</ul>
</li>
<li>
<a href="../reference/">
@@ -119,17 +172,17 @@
Changelog
</a>
</li>
<li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://gitlab.com/msberends/AMR">
<span class="fab fa fab fa-gitlab"></span>
Source Code
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<li>
<a href="../LICENSE-text.html">
<span class="fa fa-book"></span>
@@ -169,7 +222,7 @@
<tr>
<th colspan="2">
<h2 id="section-cleaning-your-data" class="hasAnchor"><a href="#section-cleaning-your-data" class="anchor"></a>Cleaning your data</h2>
<p class="section-desc"><p>Functions for cleaning and optimising your data, to be able to add variables later on (like taxonomic properties) or to fix and extend antibiotic interpretations by applying EUCAST rules.</p></p>
<p class="section-desc"><p>Functions for cleaning and optimising your data, to be able to add variables later on (like taxonomic properties) or to fix and extend antibiotic interpretations by applying <a href="http://www.eucast.org/expert_rules_and_intrinsic_resistance/">EUCAST rules</a>.</p></p>
</th>
</tr>
<tr>

315
docs/reference/itis.html Normal file
View File

@@ -0,0 +1,315 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ITIS: Integrated Taxonomic Information System — itis • AMR (for R)</title>
<!-- favicons -->
<link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png">
<link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png" />
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png" />
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.3.7/flatly/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
<!-- docsearch -->
<script src="../docsearch.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/docsearch.js/2.6.1/docsearch.min.css" integrity="sha256-QOSRU/ra9ActyXkIBbiIB144aDBdtvXBcNc3OTNuX/Q=" crossorigin="anonymous" />
<link href="../docsearch.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/jquery.mark.min.js" integrity="sha256-4HLtjeVgH0eIB3aZ9mLYF6E8oU5chNdjU6p6rrXpl9U=" crossorigin="anonymous"></script>
<link href="../extra.css" rel="stylesheet">
<script src="../extra.js"></script>
<meta property="og:title" content="ITIS: Integrated Taxonomic Information System — itis" />
<meta property="og:description" content="All taxonomic names of all microorganisms are included in this package, using the authoritative Integrated Taxonomic Information System (ITIS)." />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home"></span>
Home
</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-question-circle"></span>
How to
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
Conduct AMR analysis
</a>
</li>
<li>
<a href="../articles/Predict.html">
<span class="fa fa-dice"></span>
Predict antimicrobial resistance
</a>
</li>
<li>
<a href="../articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span>
Apply EUCAST rules
</a>
</li>
<li>
<a href="../articles/mo_property.html">
<span class="fa fa-bug"></span>
Get properties of a microorganism
</a>
</li>
<li>
<a href="../articles/ab_property.html">
<span class="fa fa-capsules"></span>
Get properties of an antibiotic
</a>
</li>
<li>
<a href="../articles/freq.html">
<span class="fa fa-sort-amount-down"></span>
Create frequency tables
</a>
</li>
<li>
<a href="../articles/G_test.html">
<span class="fa fa-clipboard-check"></span>
Use the G-test
</a>
</li>
</ul>
</li>
<li>
<a href="../reference/">
<span class="fa fa-book-open"></span>
Manual
</a>
</li>
<li>
<a href="../authors.html">
<span class="fa fa-users"></span>
Authors
</a>
</li>
<li>
<a href="../news/">
<span class="far fa far fa-newspaper"></span>
Changelog
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://gitlab.com/msberends/AMR">
<span class="fab fa fab fa-gitlab"></span>
Source Code
</a>
</li>
<li>
<a href="../LICENSE-text.html">
<span class="fa fa-book"></span>
Licence
</a>
</li>
</ul>
<form class="navbar-form navbar-right" role="search">
<div class="form-group">
<input type="search" class="form-control" name="search-input" id="search-input" placeholder="Search..." aria-label="Search for..." autocomplete="off">
</div>
</form>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>ITIS: Integrated Taxonomic Information System</h1>
<div class="hidden name"><code>itis.Rd</code></div>
</div>
<div class="ref-description">
<p>All taxonomic names of all microorganisms are included in this package, using the authoritative Integrated Taxonomic Information System (ITIS).</p>
</div>
<h2 class="hasAnchor" id="itis"><a class="anchor" href="#itis"></a>ITIS</h2>
<p><img src='figures/itis_logo.jpg' height=60px style=margin-bottom:5px /> <br />
This package contains the <strong>complete microbial taxonomic data</strong> (with all nine taxonomic ranks - from kingdom to subspecies) from the publicly available Integrated Taxonomic Information System (ITIS, <a href='https://www.itis.gov'>https://www.itis.gov</a>).</p>
<p>All (sub)species from <strong>the taxonomic kingdoms Bacteria, Fungi and Protozoa are included in this package</strong>, as well as all previously accepted names known to ITIS. Furthermore, the responsible authors and year of publication are available. This allows users to use authoritative taxonomic information for their data analysis on any microorganism, not only human pathogens. It also helps to quickly determine the Gram stain of bacteria, since all bacteria are classified into subkingdom Negibacteria or Posibacteria.</p>
<p>ITIS is a partnership of U.S., Canadian, and Mexican agencies and taxonomic specialists [3].</p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><span class='co'># NOT RUN {</span>
<span class='co'># Get a note when a species was renamed</span>
<span class='fu'><a href='mo_property.html'>mo_shortname</a></span>(<span class='st'>"Chlamydia psittaci"</span>)
<span class='co'># Note: 'Chlamydia psittaci' (Page, 1968) was renamed 'Chlamydophila psittaci' (Everett et al., 1999)</span>
<span class='co'># [1] "C. psittaci"</span>
<span class='co'># Get any property from the entire taxonomic tree for all included species</span>
<span class='fu'><a href='mo_property.html'>mo_class</a></span>(<span class='st'>"E. coli"</span>)
<span class='co'># [1] "Gammaproteobacteria"</span>
<span class='fu'><a href='mo_property.html'>mo_family</a></span>(<span class='st'>"E. coli"</span>)
<span class='co'># [1] "Enterobacteriaceae"</span>
<span class='fu'><a href='mo_property.html'>mo_subkingdom</a></span>(<span class='st'>"E. coli"</span>)
<span class='co'># [1] "Negibacteria"</span>
<span class='fu'><a href='mo_property.html'>mo_gramstain</a></span>(<span class='st'>"E. coli"</span>) <span class='co'># based on subkingdom</span>
<span class='co'># [1] "Gram negative"</span>
<span class='fu'><a href='mo_property.html'>mo_ref</a></span>(<span class='st'>"E. coli"</span>)
<span class='co'># [1] "Castellani and Chalmers, 1919"</span>
<span class='co'># Do not get mistaken - the package only includes microorganisms</span>
<span class='fu'><a href='mo_property.html'>mo_phylum</a></span>(<span class='st'>"C. elegans"</span>)
<span class='co'># [1] "Cyanobacteria" # Bacteria?!</span>
<span class='fu'><a href='mo_property.html'>mo_fullname</a></span>(<span class='st'>"C. elegans"</span>)
<span class='co'># [1] "Chroococcus limneticus elegans" # Because a microorganism was found</span>
<span class='co'># }</span></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#itis">ITIS</a></li>
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
<li><a href="#examples">Examples</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by <a href='https://www.rug.nl/staff/m.s.berends/'>Matthijs S. Berends</a>, <a href='https://www.rug.nl/staff/c.f.luz/'>Christian F. Luz</a>, <a href='https://www.rug.nl/staff/c.glasner/'>Corinna Glasner</a>, <a href='https://www.rug.nl/staff/a.w.friedrich/'>Alex W. Friedrich</a>, <a href='https://www.rug.nl/staff/b.sinha/'>Bhanu N. M. Sinha</a>.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
</div>
</footer>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/docsearch.js/2.6.1/docsearch.min.js" integrity="sha256-GKvGqXDznoRYHCwKXGnuchvKSwmx9SRMrZOTh2g4Sb0=" crossorigin="anonymous"></script>
<script>
docsearch({
apiKey: 'f737050abfd4d726c63938e18f8c496e',
indexName: 'amr',
inputSelector: 'input#search-input.form-control',
transformData: function(hits) {
return hits.map(function (hit) {
hit.url = updateHitURL(hit);
return hit;
});
}
});
</script>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@@ -49,7 +49,7 @@
<meta property="og:description" content="These function can be used to determine first isolates (see first_isolate). Using key antibiotics to determine first isolates is more reliable than without key antibiotics. These selected isolates will then be called first weighted isolates." />
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@@ -80,7 +80,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
</span>
</div>
@@ -93,12 +93,65 @@
Home
</a>
</li>
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-question-circle"></span>
Get Started
How to
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
Conduct AMR analysis
</a>
</li>
<li>
<a href="../articles/Predict.html">
<span class="fa fa-dice"></span>
Predict antimicrobial resistance
</a>
</li>
<li>
<a href="../articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span>
Apply EUCAST rules
</a>
</li>
<li>
<a href="../articles/mo_property.html">
<span class="fa fa-bug"></span>
Get properties of a microorganism
</a>
</li>
<li>
<a href="../articles/ab_property.html">
<span class="fa fa-capsules"></span>
Get properties of an antibiotic
</a>
</li>
<li>
<a href="../articles/freq.html">
<span class="fa fa-sort-amount-down"></span>
Create frequency tables
</a>
</li>
<li>
<a href="../articles/G_test.html">
<span class="fa fa-clipboard-check"></span>
Use the G-test
</a>
</li>
</ul>
</li>
<li>
<a href="../reference/">
@@ -121,17 +174,17 @@
Changelog
</a>
</li>
<li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://gitlab.com/msberends/AMR">
<span class="fab fa fab fa-gitlab"></span>
Source Code
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<li>
<a href="../LICENSE-text.html">
<span class="fa fa-book"></span>
@@ -249,34 +302,47 @@
<p><strong>2. Using</strong> <code>type = "points"</code> <strong>and parameter</strong> <code>points_threshold</code> <br />
A difference from I to S|R (or vice versa) means 0.5 points, a difference from S to R (or vice versa) means 1 point. When the sum of points exceeds <code>points_threshold</code>, an isolate will be (re)selected as a first weighted isolate.</p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p><code><a href='first_isolate.html'>first_isolate</a></code></p></div>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='co'># septic_patients is a dataset available in the AMR package</span>
?<span class='no'>septic_patients</span></div><div class='output co'>#&gt; <span class='message'>Rendering development documentation for 'septic_patients'</span></div><div class='input'><span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/library'>library</a></span>(<span class='no'>dplyr</span>)
<pre class="examples"><span class='co'># NOT RUN {</span>
<span class='co'># septic_patients is a dataset available in the AMR package</span>
?<span class='no'>septic_patients</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/library'>library</a></span>(<span class='no'>dplyr</span>)
<span class='co'># set key antibiotics to a new variable</span>
<span class='no'>my_patients</span> <span class='kw'>&lt;-</span> <span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/mutate.html'>mutate</a></span>(<span class='kw'>keyab</span> <span class='kw'>=</span> <span class='fu'>key_antibiotics</span>(<span class='no'>.</span>)) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/mutate.html'>mutate</a></span>(
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/mutate'>mutate</a></span>(<span class='kw'>keyab</span> <span class='kw'>=</span> <span class='fu'>key_antibiotics</span>(<span class='no'>.</span>)) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/mutate'>mutate</a></span>(
<span class='co'># now calculate first isolates</span>
<span class='kw'>first_regular</span> <span class='kw'>=</span> <span class='fu'><a href='first_isolate.html'>first_isolate</a></span>(<span class='no'>.</span>, <span class='kw'>col_keyantibiotics</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>),
<span class='co'># and first WEIGHTED isolates</span>
<span class='kw'>first_weighted</span> <span class='kw'>=</span> <span class='fu'><a href='first_isolate.html'>first_isolate</a></span>(<span class='no'>.</span>, <span class='kw'>col_keyantibiotics</span> <span class='kw'>=</span> <span class='st'>"keyab"</span>)
)</div><div class='output co'>#&gt; <span class='message'><span style='color: #0000BB;'>NOTE: Using column `</span><span style='color: #0000BB;font-weight: bold;'>mo</span><span style='color: #0000BB;'>` as input for `col_mo`.</span><span></span></div><div class='output co'>#&gt; <span class='message'></span><span style='color: #0000BB;'>NOTE: Using column `</span><span style='color: #0000BB;font-weight: bold;'>mo</span><span style='color: #0000BB;'>` as input for `col_mo`.</span><span></span></div><div class='output co'>#&gt; <span class='message'></span><span style='color: #0000BB;'>NOTE: Using column `</span><span style='color: #0000BB;font-weight: bold;'>date</span><span style='color: #0000BB;'>` as input for `col_date`.</span><span></span></div><div class='output co'>#&gt; <span class='message'></span><span style='color: #0000BB;'>NOTE: Using column `</span><span style='color: #0000BB;font-weight: bold;'>patient_id</span><span style='color: #0000BB;'>` as input for `col_patient_id`.</span><span></span></div><div class='output co'>#&gt; <span class='message'>=&gt; Found </span><span style='font-weight: bold;'>1,317 first isolates</span><span> (65.9% of total)</span></div><div class='output co'>#&gt; <span class='message'></span><span style='color: #0000BB;'>NOTE: Using column `</span><span style='color: #0000BB;font-weight: bold;'>mo</span><span style='color: #0000BB;'>` as input for `col_mo`.</span><span></span></div><div class='output co'>#&gt; <span class='message'></span><span style='color: #0000BB;'>NOTE: Using column `</span><span style='color: #0000BB;font-weight: bold;'>date</span><span style='color: #0000BB;'>` as input for `col_date`.</span><span></span></div><div class='output co'>#&gt; <span class='message'></span><span style='color: #0000BB;'>NOTE: Using column `</span><span style='color: #0000BB;font-weight: bold;'>patient_id</span><span style='color: #0000BB;'>` as input for `col_patient_id`.</span><span></span></div><div class='output co'>#&gt; [Criterion] Inclusion based on key antibiotics, ignoring I.</div><div class='output co'>#&gt; <span class='message'>=&gt; Found </span><span style='font-weight: bold;'>1,413 first weighted isolates</span><span> (70.7% of total)</span></div><div class='input'>
)
<span class='co'># Check the difference, in this data set it results in 7% more isolates:</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/sum'>sum</a></span>(<span class='no'>my_patients</span>$<span class='no'>first_regular</span>, <span class='kw'>na.rm</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#&gt; [1] 1317</div><div class='input'><span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/sum'>sum</a></span>(<span class='no'>my_patients</span>$<span class='no'>first_weighted</span>, <span class='kw'>na.rm</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#&gt; [1] 1413</div><div class='input'>
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/sum'>sum</a></span>(<span class='no'>my_patients</span>$<span class='no'>first_regular</span>, <span class='kw'>na.rm</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/sum'>sum</a></span>(<span class='no'>my_patients</span>$<span class='no'>first_weighted</span>, <span class='kw'>na.rm</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
<span class='co'># output of the `key_antibiotics` function could be like this:</span>
<span class='no'>strainA</span> <span class='kw'>&lt;-</span> <span class='st'>"SSSRR.S.R..S"</span>
<span class='no'>strainB</span> <span class='kw'>&lt;-</span> <span class='st'>"SSSIRSSSRSSS"</span>
<span class='fu'>key_antibiotics_equal</span>(<span class='no'>strainA</span>, <span class='no'>strainB</span>)</div><div class='output co'>#&gt; [1] TRUE</div><div class='input'><span class='co'># TRUE, because I is ignored (as well as missing values)</span>
<span class='fu'>key_antibiotics_equal</span>(<span class='no'>strainA</span>, <span class='no'>strainB</span>)
<span class='co'># TRUE, because I is ignored (as well as missing values)</span>
<span class='fu'>key_antibiotics_equal</span>(<span class='no'>strainA</span>, <span class='no'>strainB</span>, <span class='kw'>ignore_I</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</div><div class='output co'>#&gt; [1] FALSE</div><div class='input'># FALSE, because I is not ignored and so the 4th value differs
</div></span></pre>
<span class='fu'>key_antibiotics_equal</span>(<span class='no'>strainA</span>, <span class='no'>strainB</span>, <span class='kw'>ignore_I</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)
<span class='co'># FALSE, because I is not ignored and so the 4th value differs</span>
<span class='co'># }</span></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
@@ -287,6 +353,8 @@
<li><a href="#key-antibiotics">Key antibiotics</a></li>
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
<li><a href="#see-also">See also</a></li>
<li><a href="#examples">Examples</a></li>

View File

@@ -49,7 +49,7 @@
<meta property="og:description" content="Kurtosis is a measure of the &quot;tailedness&quot; of the probability distribution of a real-valued random variable." />
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@@ -80,7 +80,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
</span>
</div>
@@ -93,12 +93,65 @@
Home
</a>
</li>
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-question-circle"></span>
Get Started
How to
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
Conduct AMR analysis
</a>
</li>
<li>
<a href="../articles/Predict.html">
<span class="fa fa-dice"></span>
Predict antimicrobial resistance
</a>
</li>
<li>
<a href="../articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span>
Apply EUCAST rules
</a>
</li>
<li>
<a href="../articles/mo_property.html">
<span class="fa fa-bug"></span>
Get properties of a microorganism
</a>
</li>
<li>
<a href="../articles/ab_property.html">
<span class="fa fa-capsules"></span>
Get properties of an antibiotic
</a>
</li>
<li>
<a href="../articles/freq.html">
<span class="fa fa-sort-amount-down"></span>
Create frequency tables
</a>
</li>
<li>
<a href="../articles/G_test.html">
<span class="fa fa-clipboard-check"></span>
Use the G-test
</a>
</li>
</ul>
</li>
<li>
<a href="../reference/">
@@ -121,17 +174,17 @@
Changelog
</a>
</li>
<li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://gitlab.com/msberends/AMR">
<span class="fab fa fab fa-gitlab"></span>
Source Code
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<li>
<a href="../LICENSE-text.html">
<span class="fa fa-book"></span>
@@ -191,6 +244,12 @@
</tr>
</table>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p><code><a href='skewness.html'>skewness</a></code></p></div>
@@ -202,6 +261,8 @@
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
<li><a href="#see-also">See also</a></li>
</ul>

View File

@@ -49,7 +49,7 @@
<meta property="og:description" content="Convenient wrapper around grep to match a pattern: a %like% b. It always returns a logical vector and is always case-insensitive. Also, pattern (b) can be as long as x (a) to compare items of each index in both vectors." />
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@@ -80,7 +80,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
</span>
</div>
@@ -93,12 +93,65 @@
Home
</a>
</li>
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-question-circle"></span>
Get Started
How to
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
Conduct AMR analysis
</a>
</li>
<li>
<a href="../articles/Predict.html">
<span class="fa fa-dice"></span>
Predict antimicrobial resistance
</a>
</li>
<li>
<a href="../articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span>
Apply EUCAST rules
</a>
</li>
<li>
<a href="../articles/mo_property.html">
<span class="fa fa-bug"></span>
Get properties of a microorganism
</a>
</li>
<li>
<a href="../articles/ab_property.html">
<span class="fa fa-capsules"></span>
Get properties of an antibiotic
</a>
</li>
<li>
<a href="../articles/freq.html">
<span class="fa fa-sort-amount-down"></span>
Create frequency tables
</a>
</li>
<li>
<a href="../articles/G_test.html">
<span class="fa fa-clipboard-check"></span>
Use the G-test
</a>
</li>
</ul>
</li>
<li>
<a href="../reference/">
@@ -121,17 +174,17 @@
Changelog
</a>
</li>
<li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://gitlab.com/msberends/AMR">
<span class="fab fa fab fa-gitlab"></span>
Source Code
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<li>
<a href="../LICENSE-text.html">
<span class="fa fa-book"></span>
@@ -204,44 +257,40 @@
<p>Using RStudio? This function can also be inserted from the Addins menu and can have its own Keyboard Shortcut like Ctrl+Shift+L or Cmd+Shift+L (see Tools &gt; Modify Keyboard Shortcuts...).</p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p><code><a href='https://www.rdocumentation.org/packages/base/topics/grep'>grep</a></code></p></div>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='co'># simple test</span>
<pre class="examples"><span class='co'># NOT RUN {</span>
<span class='co'># simple test</span>
<span class='no'>a</span> <span class='kw'>&lt;-</span> <span class='st'>"This is a test"</span>
<span class='no'>b</span> <span class='kw'>&lt;-</span> <span class='st'>"TEST"</span>
<span class='no'>a</span> <span class='kw'>%like%</span> <span class='no'>b</span></div><div class='output co'>#&gt; [1] TRUE</div><div class='input'><span class='co'>#&gt; TRUE</span>
<span class='no'>b</span> <span class='kw'>%like%</span> <span class='no'>a</span></div><div class='output co'>#&gt; [1] FALSE</div><div class='input'><span class='co'>#&gt; FALSE</span>
<span class='no'>a</span> <span class='kw'>%like%</span> <span class='no'>b</span>
<span class='co'>#&gt; TRUE</span>
<span class='no'>b</span> <span class='kw'>%like%</span> <span class='no'>a</span>
<span class='co'>#&gt; FALSE</span>
<span class='co'># also supports multiple patterns, length must be equal to x</span>
<span class='no'>a</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"Test case"</span>, <span class='st'>"Something different"</span>, <span class='st'>"Yet another thing"</span>)
<span class='no'>b</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"case"</span>, <span class='st'>"diff"</span>, <span class='st'>"yet"</span>)
<span class='no'>a</span> <span class='kw'>%like%</span> <span class='no'>b</span></div><div class='output co'>#&gt; [1] TRUE TRUE TRUE</div><div class='input'><span class='co'>#&gt; TRUE TRUE TRUE</span>
<span class='no'>a</span> <span class='kw'>%like%</span> <span class='no'>b</span>
<span class='co'>#&gt; TRUE TRUE TRUE</span>
<span class='co'># get frequencies of bacteria whose name start with 'Ent' or 'ent'</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/library'>library</a></span>(<span class='no'>dplyr</span>)
<span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span>
<span class='fu'><a href='join.html'>left_join_microorganisms</a></span>() <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/filter.html'>filter</a></span>(<span class='no'>genus</span> <span class='kw'>%like%</span> <span class='st'>'^ent'</span>) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='freq.html'>freq</a></span>(<span class='no'>genus</span>, <span class='no'>species</span>)</div><div class='output co'>#&gt; <span class='message'>Joining, by = "mo"</span></div><div class='output co'>#&gt;
#&gt;
#&gt; **Frequency table of `genus` and `species`**
#&gt;
#&gt;
#&gt; | |Item | Count| Percent| Cum. Count| Cum. Percent|
#&gt; |:--|:--------------------------|-----:|-------:|----------:|------------:|
#&gt; |1 |Enterococcus faecalis | 39| 35.8%| 39| 35.8%|
#&gt; |2 |Enterobacter cloacae | 23| 21.1%| 62| 56.9%|
#&gt; |3 |Enterococcus faecium | 21| 19.3%| 83| 76.1%|
#&gt; |4 |Enterococcus species | 20| 18.3%| 103| 94.5%|
#&gt; |5 |Enterobacter aerogenes | 3| 2.8%| 106| 97.2%|
#&gt; |6 |Enterococcus avium | 2| 1.8%| 108| 99.1%|
#&gt; |7 |Enterococcus casseliflavus | 1| 0.9%| 109| 100.0%|
#&gt;
#&gt; </div></pre>
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/filter'>filter</a></span>(<span class='no'>genus</span> <span class='kw'>%like%</span> <span class='st'>'^ent'</span>) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='freq.html'>freq</a></span>(<span class='no'>genus</span>, <span class='no'>species</span>)
<span class='co'># }</span></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
@@ -254,6 +303,8 @@
<li><a href="#details">Details</a></li>
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
<li><a href="#see-also">See also</a></li>
<li><a href="#examples">Examples</a></li>

File diff suppressed because it is too large Load Diff

View File

@@ -49,7 +49,7 @@
<meta property="og:description" content="A data set containing all bacteria codes of Certe MMB. These codes can be joined to data with an ID from microorganisms$mo (using left_join_microorganisms). GLIMS codes can also be translated to valid MOs with guess_mo." />
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@@ -80,7 +80,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
</span>
</div>
@@ -93,12 +93,65 @@
Home
</a>
</li>
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-question-circle"></span>
Get Started
How to
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
Conduct AMR analysis
</a>
</li>
<li>
<a href="../articles/Predict.html">
<span class="fa fa-dice"></span>
Predict antimicrobial resistance
</a>
</li>
<li>
<a href="../articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span>
Apply EUCAST rules
</a>
</li>
<li>
<a href="../articles/mo_property.html">
<span class="fa fa-bug"></span>
Get properties of a microorganism
</a>
</li>
<li>
<a href="../articles/ab_property.html">
<span class="fa fa-capsules"></span>
Get properties of an antibiotic
</a>
</li>
<li>
<a href="../articles/freq.html">
<span class="fa fa-sort-amount-down"></span>
Create frequency tables
</a>
</li>
<li>
<a href="../articles/G_test.html">
<span class="fa fa-clipboard-check"></span>
Use the G-test
</a>
</li>
</ul>
</li>
<li>
<a href="../reference/">
@@ -121,17 +174,17 @@
Changelog
</a>
</li>
<li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://gitlab.com/msberends/AMR">
<span class="fab fa fab fa-gitlab"></span>
Source Code
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<li>
<a href="../LICENSE-text.html">
<span class="fa fa-book"></span>
@@ -176,6 +229,12 @@
<dt><code>mo</code></dt><dd><p>Code of microorganism in <code><a href='microorganisms.html'>microorganisms</a></code></p></dd>
</dl>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p><code><a href='as.mo.html'>as.mo</a></code> <code><a href='microorganisms.html'>microorganisms</a></code></p></div>
@@ -188,6 +247,8 @@
<li><a href="#format">Format</a></li>
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
<li><a href="#see-also">See also</a></li>
</ul>

View File

@@ -49,7 +49,7 @@
<meta property="og:description" content="A data set containing the complete microbial taxonomy of the kingdoms Bacteria, Fungi and Protozoa. MO codes can be looked up using as.mo." />
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@@ -80,7 +80,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
</span>
</div>
@@ -93,12 +93,65 @@
Home
</a>
</li>
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-question-circle"></span>
Get Started
How to
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
Conduct AMR analysis
</a>
</li>
<li>
<a href="../articles/Predict.html">
<span class="fa fa-dice"></span>
Predict antimicrobial resistance
</a>
</li>
<li>
<a href="../articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span>
Apply EUCAST rules
</a>
</li>
<li>
<a href="../articles/mo_property.html">
<span class="fa fa-bug"></span>
Get properties of a microorganism
</a>
</li>
<li>
<a href="../articles/ab_property.html">
<span class="fa fa-capsules"></span>
Get properties of an antibiotic
</a>
</li>
<li>
<a href="../articles/freq.html">
<span class="fa fa-sort-amount-down"></span>
Create frequency tables
</a>
</li>
<li>
<a href="../articles/G_test.html">
<span class="fa fa-clipboard-check"></span>
Use the G-test
</a>
</li>
</ul>
</li>
<li>
<a href="../reference/">
@@ -121,17 +174,17 @@
Changelog
</a>
</li>
<li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://gitlab.com/msberends/AMR">
<span class="fab fa fab fa-gitlab"></span>
Source Code
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<li>
<a href="../LICENSE-text.html">
<span class="fa fa-book"></span>
@@ -201,6 +254,12 @@ This package contains the <strong>complete microbial taxonomic data</strong> (wi
<p>All (sub)species from <strong>the taxonomic kingdoms Bacteria, Fungi and Protozoa are included in this package</strong>, as well as all previously accepted names known to ITIS. Furthermore, the responsible authors and year of publication are available. This allows users to use authoritative taxonomic information for their data analysis on any microorganism, not only human pathogens. It also helps to quickly determine the Gram stain of bacteria, since all bacteria are classified into subkingdom Negibacteria or Posibacteria.</p>
<p>ITIS is a partnership of U.S., Canadian, and Mexican agencies and taxonomic specialists [3].</p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p><code><a href='as.mo.html'>as.mo</a></code> <code><a href='mo_property.html'>mo_property</a></code> <code><a href='microorganisms.umcg.html'>microorganisms.umcg</a></code></p></div>
@@ -217,6 +276,8 @@ This package contains the <strong>complete microbial taxonomic data</strong> (wi
<li><a href="#itis">ITIS</a></li>
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
<li><a href="#see-also">See also</a></li>
</ul>

View File

@@ -49,7 +49,7 @@
<meta property="og:description" content="A data set containing old (previously valid or accepted) taxonomic names according to ITIS. This data set is used internally by as.mo." />
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@@ -80,7 +80,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
</span>
</div>
@@ -93,12 +93,65 @@
Home
</a>
</li>
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-question-circle"></span>
Get Started
How to
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
Conduct AMR analysis
</a>
</li>
<li>
<a href="../articles/Predict.html">
<span class="fa fa-dice"></span>
Predict antimicrobial resistance
</a>
</li>
<li>
<a href="../articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span>
Apply EUCAST rules
</a>
</li>
<li>
<a href="../articles/mo_property.html">
<span class="fa fa-bug"></span>
Get properties of a microorganism
</a>
</li>
<li>
<a href="../articles/ab_property.html">
<span class="fa fa-capsules"></span>
Get properties of an antibiotic
</a>
</li>
<li>
<a href="../articles/freq.html">
<span class="fa fa-sort-amount-down"></span>
Create frequency tables
</a>
</li>
<li>
<a href="../articles/G_test.html">
<span class="fa fa-clipboard-check"></span>
Use the G-test
</a>
</li>
</ul>
</li>
<li>
<a href="../reference/">
@@ -121,17 +174,17 @@
Changelog
</a>
</li>
<li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://gitlab.com/msberends/AMR">
<span class="fab fa fab fa-gitlab"></span>
Source Code
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<li>
<a href="../LICENSE-text.html">
<span class="fa fa-book"></span>
@@ -190,6 +243,12 @@ This package contains the <strong>complete microbial taxonomic data</strong> (wi
<p>All (sub)species from <strong>the taxonomic kingdoms Bacteria, Fungi and Protozoa are included in this package</strong>, as well as all previously accepted names known to ITIS. Furthermore, the responsible authors and year of publication are available. This allows users to use authoritative taxonomic information for their data analysis on any microorganism, not only human pathogens. It also helps to quickly determine the Gram stain of bacteria, since all bacteria are classified into subkingdom Negibacteria or Posibacteria.</p>
<p>ITIS is a partnership of U.S., Canadian, and Mexican agencies and taxonomic specialists [3].</p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p><code><a href='as.mo.html'>as.mo</a></code> <code><a href='mo_property.html'>mo_property</a></code> <code><a href='microorganisms.html'>microorganisms</a></code></p></div>
@@ -206,6 +265,8 @@ This package contains the <strong>complete microbial taxonomic data</strong> (wi
<li><a href="#itis">ITIS</a></li>
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
<li><a href="#see-also">See also</a></li>
</ul>

View File

@@ -49,7 +49,7 @@
<meta property="og:description" content="A data set containing all bacteria codes of UMCG MMB. These codes can be joined to data with an ID from microorganisms$mo (using left_join_microorganisms). GLIMS codes can also be translated to valid MOs with guess_mo." />
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@@ -80,7 +80,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
</span>
</div>
@@ -93,12 +93,65 @@
Home
</a>
</li>
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-question-circle"></span>
Get Started
How to
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
Conduct AMR analysis
</a>
</li>
<li>
<a href="../articles/Predict.html">
<span class="fa fa-dice"></span>
Predict antimicrobial resistance
</a>
</li>
<li>
<a href="../articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span>
Apply EUCAST rules
</a>
</li>
<li>
<a href="../articles/mo_property.html">
<span class="fa fa-bug"></span>
Get properties of a microorganism
</a>
</li>
<li>
<a href="../articles/ab_property.html">
<span class="fa fa-capsules"></span>
Get properties of an antibiotic
</a>
</li>
<li>
<a href="../articles/freq.html">
<span class="fa fa-sort-amount-down"></span>
Create frequency tables
</a>
</li>
<li>
<a href="../articles/G_test.html">
<span class="fa fa-clipboard-check"></span>
Use the G-test
</a>
</li>
</ul>
</li>
<li>
<a href="../reference/">
@@ -121,17 +174,17 @@
Changelog
</a>
</li>
<li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://gitlab.com/msberends/AMR">
<span class="fab fa fab fa-gitlab"></span>
Source Code
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<li>
<a href="../LICENSE-text.html">
<span class="fa fa-book"></span>
@@ -176,6 +229,12 @@
<dt><code>certe</code></dt><dd><p>Code of microorganism according to Certe MMB</p></dd>
</dl>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p><code><a href='as.mo.html'>as.mo</a></code> <code><a href='microorganisms.certe.html'>microorganisms.certe</a></code> <code><a href='microorganisms.html'>microorganisms</a></code></p></div>
@@ -188,6 +247,8 @@
<li><a href="#format">Format</a></li>
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
<li><a href="#see-also">See also</a></li>
</ul>

View File

@@ -49,7 +49,7 @@
<meta property="og:description" content="Returns a vector of all failed attempts to coerce values to a valid MO code with as.mo." />
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@@ -80,7 +80,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
</span>
</div>
@@ -93,12 +93,65 @@
Home
</a>
</li>
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-question-circle"></span>
Get Started
How to
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
Conduct AMR analysis
</a>
</li>
<li>
<a href="../articles/Predict.html">
<span class="fa fa-dice"></span>
Predict antimicrobial resistance
</a>
</li>
<li>
<a href="../articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span>
Apply EUCAST rules
</a>
</li>
<li>
<a href="../articles/mo_property.html">
<span class="fa fa-bug"></span>
Get properties of a microorganism
</a>
</li>
<li>
<a href="../articles/ab_property.html">
<span class="fa fa-capsules"></span>
Get properties of an antibiotic
</a>
</li>
<li>
<a href="../articles/freq.html">
<span class="fa fa-sort-amount-down"></span>
Create frequency tables
</a>
</li>
<li>
<a href="../articles/G_test.html">
<span class="fa fa-clipboard-check"></span>
Use the G-test
</a>
</li>
</ul>
</li>
<li>
<a href="../reference/">
@@ -121,17 +174,17 @@
Changelog
</a>
</li>
<li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://gitlab.com/msberends/AMR">
<span class="fab fa fab fa-gitlab"></span>
Source Code
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<li>
<a href="../LICENSE-text.html">
<span class="fa fa-book"></span>

View File

@@ -49,7 +49,7 @@
<meta property="og:description" content="Use these functions to return a specific property of a microorganism from the microorganisms data set. All input values will be evaluated internally with as.mo." />
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@@ -80,7 +80,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
</span>
</div>
@@ -93,12 +93,65 @@
Home
</a>
</li>
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-question-circle"></span>
Get Started
How to
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
Conduct AMR analysis
</a>
</li>
<li>
<a href="../articles/Predict.html">
<span class="fa fa-dice"></span>
Predict antimicrobial resistance
</a>
</li>
<li>
<a href="../articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span>
Apply EUCAST rules
</a>
</li>
<li>
<a href="../articles/mo_property.html">
<span class="fa fa-bug"></span>
Get properties of a microorganism
</a>
</li>
<li>
<a href="../articles/ab_property.html">
<span class="fa fa-capsules"></span>
Get properties of an antibiotic
</a>
</li>
<li>
<a href="../articles/freq.html">
<span class="fa fa-sort-amount-down"></span>
Create frequency tables
</a>
</li>
<li>
<a href="../articles/G_test.html">
<span class="fa fa-clipboard-check"></span>
Use the G-test
</a>
</li>
</ul>
</li>
<li>
<a href="../reference/">
@@ -121,17 +174,17 @@
Changelog
</a>
</li>
<li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://gitlab.com/msberends/AMR">
<span class="fab fa fab fa-gitlab"></span>
Source Code
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<li>
<a href="../LICENSE-text.html">
<span class="fa fa-book"></span>
@@ -264,73 +317,99 @@ This package contains the <strong>complete microbial taxonomic data</strong> (wi
<p>[2] Lancefield RC <strong>A serological differentiation of human and other groups of hemolytic streptococci</strong>. 1933. J Exp Med. 57(4): 57195. <a href='https://dx.doi.org/10.1084/jem.57.4.571'>https://dx.doi.org/10.1084/jem.57.4.571</a></p>
<p>[3] Integrated Taxonomic Information System (ITIS). Retrieved September 2018. <a href='http://www.itis.gov'>http://www.itis.gov</a></p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p><code><a href='microorganisms.html'>microorganisms</a></code></p></div>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='co'># All properties of Escherichia coli</span>
<pre class="examples"><span class='co'># NOT RUN {</span>
<span class='co'># All properties of Escherichia coli</span>
<span class='co'>## taxonomic properties</span>
<span class='fu'>mo_kingdom</span>(<span class='st'>"E. coli"</span>) <span class='co'># "Bacteria"</span></div><div class='output co'>#&gt; [1] "Bacteria"</div><div class='input'><span class='fu'>mo_subkingdom</span>(<span class='st'>"E. coli"</span>) <span class='co'># "Negibacteria"</span></div><div class='output co'>#&gt; [1] "Negibacteria"</div><div class='input'><span class='fu'>mo_phylum</span>(<span class='st'>"E. coli"</span>) <span class='co'># "Proteobacteria"</span></div><div class='output co'>#&gt; [1] "Proteobacteria"</div><div class='input'><span class='fu'>mo_class</span>(<span class='st'>"E. coli"</span>) <span class='co'># "Gammaproteobacteria"</span></div><div class='output co'>#&gt; [1] "Gammaproteobacteria"</div><div class='input'><span class='fu'>mo_order</span>(<span class='st'>"E. coli"</span>) <span class='co'># "Enterobacteriales"</span></div><div class='output co'>#&gt; [1] "Enterobacteriales"</div><div class='input'><span class='fu'>mo_family</span>(<span class='st'>"E. coli"</span>) <span class='co'># "Enterobacteriaceae"</span></div><div class='output co'>#&gt; [1] "Enterobacteriaceae"</div><div class='input'><span class='fu'>mo_genus</span>(<span class='st'>"E. coli"</span>) <span class='co'># "Escherichia"</span></div><div class='output co'>#&gt; [1] "Escherichia"</div><div class='input'><span class='fu'>mo_species</span>(<span class='st'>"E. coli"</span>) <span class='co'># "coli"</span></div><div class='output co'>#&gt; [1] "coli"</div><div class='input'><span class='fu'>mo_subspecies</span>(<span class='st'>"E. coli"</span>) <span class='co'># NA</span></div><div class='output co'>#&gt; [1] NA</div><div class='input'><span class='fu'>mo_TSN</span>(<span class='st'>"E. coli"</span>) <span class='co'># 285 (Taxonomic Serial Number)</span></div><div class='output co'>#&gt; [1] 285</div><div class='input'>
<span class='fu'>mo_kingdom</span>(<span class='st'>"E. coli"</span>) <span class='co'># "Bacteria"</span>
<span class='fu'>mo_subkingdom</span>(<span class='st'>"E. coli"</span>) <span class='co'># "Negibacteria"</span>
<span class='fu'>mo_phylum</span>(<span class='st'>"E. coli"</span>) <span class='co'># "Proteobacteria"</span>
<span class='fu'>mo_class</span>(<span class='st'>"E. coli"</span>) <span class='co'># "Gammaproteobacteria"</span>
<span class='fu'>mo_order</span>(<span class='st'>"E. coli"</span>) <span class='co'># "Enterobacteriales"</span>
<span class='fu'>mo_family</span>(<span class='st'>"E. coli"</span>) <span class='co'># "Enterobacteriaceae"</span>
<span class='fu'>mo_genus</span>(<span class='st'>"E. coli"</span>) <span class='co'># "Escherichia"</span>
<span class='fu'>mo_species</span>(<span class='st'>"E. coli"</span>) <span class='co'># "coli"</span>
<span class='fu'>mo_subspecies</span>(<span class='st'>"E. coli"</span>) <span class='co'># NA</span>
<span class='fu'>mo_TSN</span>(<span class='st'>"E. coli"</span>) <span class='co'># 285 (Taxonomic Serial Number)</span>
<span class='co'>## colloquial properties</span>
<span class='fu'>mo_fullname</span>(<span class='st'>"E. coli"</span>) <span class='co'># "Escherichia coli"</span></div><div class='output co'>#&gt; [1] "Escherichia coli"</div><div class='input'><span class='fu'>mo_shortname</span>(<span class='st'>"E. coli"</span>) <span class='co'># "E. coli"</span></div><div class='output co'>#&gt; [1] "E. coli"</div><div class='input'>
<span class='fu'>mo_fullname</span>(<span class='st'>"E. coli"</span>) <span class='co'># "Escherichia coli"</span>
<span class='fu'>mo_shortname</span>(<span class='st'>"E. coli"</span>) <span class='co'># "E. coli"</span>
<span class='co'>## other properties</span>
<span class='fu'>mo_gramstain</span>(<span class='st'>"E. coli"</span>) <span class='co'># "Gram negative"</span></div><div class='output co'>#&gt; [1] "Gram-negatief"</div><div class='input'><span class='fu'>mo_type</span>(<span class='st'>"E. coli"</span>) <span class='co'># "Bacteria" (equal to kingdom)</span></div><div class='output co'>#&gt; [1] "Bacteriën"</div><div class='input'>
<span class='fu'>mo_gramstain</span>(<span class='st'>"E. coli"</span>) <span class='co'># "Gram negative"</span>
<span class='fu'>mo_type</span>(<span class='st'>"E. coli"</span>) <span class='co'># "Bacteria" (equal to kingdom)</span>
<span class='co'>## scientific reference</span>
<span class='fu'>mo_ref</span>(<span class='st'>"E. coli"</span>) <span class='co'># "Castellani and Chalmers, 1919"</span></div><div class='output co'>#&gt; [1] "Castellani and Chalmers, 1919"</div><div class='input'><span class='fu'>mo_authors</span>(<span class='st'>"E. coli"</span>) <span class='co'># "Castellani and Chalmers"</span></div><div class='output co'>#&gt; [1] "Castellani and Chalmers"</div><div class='input'><span class='fu'>mo_year</span>(<span class='st'>"E. coli"</span>) <span class='co'># 1919</span></div><div class='output co'>#&gt; [1] 1919</div><div class='input'>
<span class='fu'>mo_ref</span>(<span class='st'>"E. coli"</span>) <span class='co'># "Castellani and Chalmers, 1919"</span>
<span class='fu'>mo_authors</span>(<span class='st'>"E. coli"</span>) <span class='co'># "Castellani and Chalmers"</span>
<span class='fu'>mo_year</span>(<span class='st'>"E. coli"</span>) <span class='co'># 1919</span>
<span class='co'># Abbreviations known in the field</span>
<span class='fu'>mo_genus</span>(<span class='st'>"MRSA"</span>) <span class='co'># "Staphylococcus"</span></div><div class='output co'>#&gt; [1] "Staphylococcus"</div><div class='input'><span class='fu'>mo_species</span>(<span class='st'>"MRSA"</span>) <span class='co'># "aureus"</span></div><div class='output co'>#&gt; [1] "aureus"</div><div class='input'><span class='fu'>mo_shortname</span>(<span class='st'>"MRSA"</span>) <span class='co'># "S. aureus"</span></div><div class='output co'>#&gt; [1] "S. aureus"</div><div class='input'><span class='fu'>mo_gramstain</span>(<span class='st'>"MRSA"</span>) <span class='co'># "Gram positive"</span></div><div class='output co'>#&gt; [1] "Gram-positief"</div><div class='input'>
<span class='fu'>mo_genus</span>(<span class='st'>"VISA"</span>) <span class='co'># "Staphylococcus"</span></div><div class='output co'>#&gt; [1] "Staphylococcus"</div><div class='input'><span class='fu'>mo_species</span>(<span class='st'>"VISA"</span>) <span class='co'># "aureus"</span></div><div class='output co'>#&gt; [1] "aureus"</div><div class='input'>
<span class='fu'>mo_genus</span>(<span class='st'>"MRSA"</span>) <span class='co'># "Staphylococcus"</span>
<span class='fu'>mo_species</span>(<span class='st'>"MRSA"</span>) <span class='co'># "aureus"</span>
<span class='fu'>mo_shortname</span>(<span class='st'>"MRSA"</span>) <span class='co'># "S. aureus"</span>
<span class='fu'>mo_gramstain</span>(<span class='st'>"MRSA"</span>) <span class='co'># "Gram positive"</span>
<span class='fu'>mo_genus</span>(<span class='st'>"VISA"</span>) <span class='co'># "Staphylococcus"</span>
<span class='fu'>mo_species</span>(<span class='st'>"VISA"</span>) <span class='co'># "aureus"</span>
<span class='co'># Known subspecies</span>
<span class='fu'>mo_genus</span>(<span class='st'>"doylei"</span>) <span class='co'># "Campylobacter"</span></div><div class='output co'>#&gt; <span class='warning'>Warning: <span style='color: #BB0000;'>These 1 values could not be coerced to a valid MO code: "doylei". See mo_failures() to review them.</span><span></span></div><div class='output co'>#&gt; [1] NA</div><div class='input'><span class='fu'>mo_species</span>(<span class='st'>"doylei"</span>) <span class='co'># "jejuni"</span></div><div class='output co'>#&gt; <span class='warning'>Warning: </span><span style='color: #BB0000;'>These 1 values could not be coerced to a valid MO code: "doylei". See mo_failures() to review them.</span><span></span></div><div class='output co'>#&gt; [1] NA</div><div class='input'><span class='fu'>mo_fullname</span>(<span class='st'>"doylei"</span>) <span class='co'># "Campylobacter jejuni doylei"</span></div><div class='output co'>#&gt; <span class='warning'>Warning: </span><span style='color: #BB0000;'>These 1 values could not be coerced to a valid MO code: "doylei". See mo_failures() to review them.</span><span></span></div><div class='output co'>#&gt; [1] NA</div><div class='input'>
<span class='fu'>mo_fullname</span>(<span class='st'>"K. pneu rh"</span>) <span class='co'># "Klebsiella pneumoniae rhinoscleromatis"</span></div><div class='output co'>#&gt; [1] "Klebsiella pneumoniae rhinoscleromatis"</div><div class='input'><span class='fu'>mo_shortname</span>(<span class='st'>"K. pneu rh"</span>) <span class='co'># "K. pneumoniae"</span></div><div class='output co'>#&gt; [1] "K. pneumoniae"</div><div class='input'>
<span class='fu'>mo_genus</span>(<span class='st'>"doylei"</span>) <span class='co'># "Campylobacter"</span>
<span class='fu'>mo_species</span>(<span class='st'>"doylei"</span>) <span class='co'># "jejuni"</span>
<span class='fu'>mo_fullname</span>(<span class='st'>"doylei"</span>) <span class='co'># "Campylobacter jejuni doylei"</span>
<span class='fu'>mo_fullname</span>(<span class='st'>"K. pneu rh"</span>) <span class='co'># "Klebsiella pneumoniae rhinoscleromatis"</span>
<span class='fu'>mo_shortname</span>(<span class='st'>"K. pneu rh"</span>) <span class='co'># "K. pneumoniae"</span>
<span class='co'># Becker classification, see ?as.mo</span>
<span class='fu'>mo_fullname</span>(<span class='st'>"S. epi"</span>) <span class='co'># "Staphylococcus epidermidis"</span></div><div class='output co'>#&gt; [1] "Staphylococcus epidermidis"</div><div class='input'><span class='fu'>mo_fullname</span>(<span class='st'>"S. epi"</span>, <span class='kw'>Becker</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) <span class='co'># "Coagulase Negative Staphylococcus (CoNS)"</span></div><div class='output co'>#&gt; [1] "Coagulase-negatieve Staphylococcus (CNS)"</div><div class='input'><span class='fu'>mo_shortname</span>(<span class='st'>"S. epi"</span>) <span class='co'># "S. epidermidis"</span></div><div class='output co'>#&gt; [1] "S. epidermidis"</div><div class='input'><span class='fu'>mo_shortname</span>(<span class='st'>"S. epi"</span>, <span class='kw'>Becker</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) <span class='co'># "CoNS"</span></div><div class='output co'>#&gt; [1] "CNS"</div><div class='input'>
<span class='fu'>mo_fullname</span>(<span class='st'>"S. epi"</span>) <span class='co'># "Staphylococcus epidermidis"</span>
<span class='fu'>mo_fullname</span>(<span class='st'>"S. epi"</span>, <span class='kw'>Becker</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) <span class='co'># "Coagulase Negative Staphylococcus (CoNS)"</span>
<span class='fu'>mo_shortname</span>(<span class='st'>"S. epi"</span>) <span class='co'># "S. epidermidis"</span>
<span class='fu'>mo_shortname</span>(<span class='st'>"S. epi"</span>, <span class='kw'>Becker</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) <span class='co'># "CoNS"</span>
<span class='co'># Lancefield classification, see ?as.mo</span>
<span class='fu'>mo_fullname</span>(<span class='st'>"S. pyo"</span>) <span class='co'># "Streptococcus pyogenes"</span></div><div class='output co'>#&gt; [1] "Streptococcus pyogenes"</div><div class='input'><span class='fu'>mo_fullname</span>(<span class='st'>"S. pyo"</span>, <span class='kw'>Lancefield</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) <span class='co'># "Streptococcus group A"</span></div><div class='output co'>#&gt; [1] "Streptococcus groep A"</div><div class='input'><span class='fu'>mo_shortname</span>(<span class='st'>"S. pyo"</span>) <span class='co'># "S. pyogenes"</span></div><div class='output co'>#&gt; [1] "S. pyogenes"</div><div class='input'><span class='fu'>mo_shortname</span>(<span class='st'>"S. pyo"</span>, <span class='kw'>Lancefield</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) <span class='co'># "GAS" ('Group A streptococci')</span></div><div class='output co'>#&gt; [1] "GAS"</div><div class='input'>
<span class='fu'>mo_fullname</span>(<span class='st'>"S. pyo"</span>) <span class='co'># "Streptococcus pyogenes"</span>
<span class='fu'>mo_fullname</span>(<span class='st'>"S. pyo"</span>, <span class='kw'>Lancefield</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) <span class='co'># "Streptococcus group A"</span>
<span class='fu'>mo_shortname</span>(<span class='st'>"S. pyo"</span>) <span class='co'># "S. pyogenes"</span>
<span class='fu'>mo_shortname</span>(<span class='st'>"S. pyo"</span>, <span class='kw'>Lancefield</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) <span class='co'># "GAS" ('Group A streptococci')</span>
<span class='co'># Language support for German, Dutch, Spanish, Portuguese, Italian and French</span>
<span class='fu'>mo_gramstain</span>(<span class='st'>"E. coli"</span>, <span class='kw'>language</span> <span class='kw'>=</span> <span class='st'>"de"</span>) <span class='co'># "Gramnegativ"</span></div><div class='output co'>#&gt; [1] "Gramnegativ"</div><div class='input'><span class='fu'>mo_gramstain</span>(<span class='st'>"E. coli"</span>, <span class='kw'>language</span> <span class='kw'>=</span> <span class='st'>"nl"</span>) <span class='co'># "Gram-negatief"</span></div><div class='output co'>#&gt; [1] "Gram-negatief"</div><div class='input'><span class='fu'>mo_gramstain</span>(<span class='st'>"E. coli"</span>, <span class='kw'>language</span> <span class='kw'>=</span> <span class='st'>"es"</span>) <span class='co'># "Gram negativo"</span></div><div class='output co'>#&gt; [1] "Gram negativo"</div><div class='input'>
<span class='fu'>mo_gramstain</span>(<span class='st'>"E. coli"</span>, <span class='kw'>language</span> <span class='kw'>=</span> <span class='st'>"de"</span>) <span class='co'># "Gramnegativ"</span>
<span class='fu'>mo_gramstain</span>(<span class='st'>"E. coli"</span>, <span class='kw'>language</span> <span class='kw'>=</span> <span class='st'>"nl"</span>) <span class='co'># "Gram-negatief"</span>
<span class='fu'>mo_gramstain</span>(<span class='st'>"E. coli"</span>, <span class='kw'>language</span> <span class='kw'>=</span> <span class='st'>"es"</span>) <span class='co'># "Gram negativo"</span>
<span class='co'># mo_type is equal to mo_kingdom, but mo_kingdom will remain official</span>
<span class='fu'>mo_kingdom</span>(<span class='st'>"E. coli"</span>) <span class='co'># "Bacteria" on a German system</span></div><div class='output co'>#&gt; [1] "Bacteria"</div><div class='input'><span class='fu'>mo_type</span>(<span class='st'>"E. coli"</span>) <span class='co'># "Bakterien" on a German system</span></div><div class='output co'>#&gt; [1] "Bacteriën"</div><div class='input'><span class='fu'>mo_type</span>(<span class='st'>"E. coli"</span>) <span class='co'># "Bacteria" on an English system</span></div><div class='output co'>#&gt; [1] "Bacteriën"</div><div class='input'>
<span class='fu'>mo_kingdom</span>(<span class='st'>"E. coli"</span>) <span class='co'># "Bacteria" on a German system</span>
<span class='fu'>mo_type</span>(<span class='st'>"E. coli"</span>) <span class='co'># "Bakterien" on a German system</span>
<span class='fu'>mo_type</span>(<span class='st'>"E. coli"</span>) <span class='co'># "Bacteria" on an English system</span>
<span class='fu'>mo_fullname</span>(<span class='st'>"S. pyogenes"</span>,
<span class='kw'>Lancefield</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>language</span> <span class='kw'>=</span> <span class='st'>"de"</span>) <span class='co'># "Streptococcus Gruppe A"</span></div><div class='output co'>#&gt; [1] "Streptococcus Gruppe A"</div><div class='input'><span class='fu'>mo_fullname</span>(<span class='st'>"S. pyogenes"</span>,
<span class='kw'>language</span> <span class='kw'>=</span> <span class='st'>"de"</span>) <span class='co'># "Streptococcus Gruppe A"</span>
<span class='fu'>mo_fullname</span>(<span class='st'>"S. pyogenes"</span>,
<span class='kw'>Lancefield</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>language</span> <span class='kw'>=</span> <span class='st'>"nl"</span>) <span class='co'># "Streptococcus groep A"</span></div><div class='output co'>#&gt; [1] "Streptococcus groep A"</div><div class='input'>
<span class='kw'>language</span> <span class='kw'>=</span> <span class='st'>"nl"</span>) <span class='co'># "Streptococcus groep A"</span>
<span class='co'># Get a list with the complete taxonomy (subkingdom to subspecies)</span>
<span class='fu'>mo_taxonomy</span>(<span class='st'>"E. coli"</span>)</div><div class='output co'>#&gt; $kingdom
#&gt; [1] "Bacteria"
#&gt;
#&gt; $subkingdom
#&gt; [1] "Negibacteria"
#&gt;
#&gt; $phylum
#&gt; [1] "Proteobacteria"
#&gt;
#&gt; $class
#&gt; [1] "Gammaproteobacteria"
#&gt;
#&gt; $order
#&gt; [1] "Enterobacteriales"
#&gt;
#&gt; $family
#&gt; [1] "Enterobacteriaceae"
#&gt;
#&gt; $genus
#&gt; [1] "Escherichia"
#&gt;
#&gt; $species
#&gt; [1] "coli"
#&gt;
#&gt; $subspecies
#&gt; [1] NA
#&gt; </div></span></pre>
<span class='fu'>mo_taxonomy</span>(<span class='st'>"E. coli"</span>)
<span class='co'># }</span></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
@@ -347,6 +426,8 @@ This package contains the <strong>complete microbial taxonomic data</strong> (wi
<li><a href="#source">Source</a></li>
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
<li><a href="#see-also">See also</a></li>
<li><a href="#examples">Examples</a></li>

View File

@@ -49,7 +49,7 @@
<meta property="og:description" content="Returns a vector of all renamed items of the last coercion to valid MO codes with as.mo." />
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@@ -80,7 +80,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
</span>
</div>
@@ -93,12 +93,65 @@
Home
</a>
</li>
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-question-circle"></span>
Get Started
How to
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
Conduct AMR analysis
</a>
</li>
<li>
<a href="../articles/Predict.html">
<span class="fa fa-dice"></span>
Predict antimicrobial resistance
</a>
</li>
<li>
<a href="../articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span>
Apply EUCAST rules
</a>
</li>
<li>
<a href="../articles/mo_property.html">
<span class="fa fa-bug"></span>
Get properties of a microorganism
</a>
</li>
<li>
<a href="../articles/ab_property.html">
<span class="fa fa-capsules"></span>
Get properties of an antibiotic
</a>
</li>
<li>
<a href="../articles/freq.html">
<span class="fa fa-sort-amount-down"></span>
Create frequency tables
</a>
</li>
<li>
<a href="../articles/G_test.html">
<span class="fa fa-clipboard-check"></span>
Use the G-test
</a>
</li>
</ul>
</li>
<li>
<a href="../reference/">
@@ -121,17 +174,17 @@
Changelog
</a>
</li>
<li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://gitlab.com/msberends/AMR">
<span class="fab fa fab fa-gitlab"></span>
Source Code
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<li>
<a href="../LICENSE-text.html">
<span class="fa fa-book"></span>

View File

@@ -49,7 +49,7 @@
<meta property="og:description" content="Return the symbol related to the p value: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1. Values above p = 1 will return NA." />
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@@ -80,7 +80,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
</span>
</div>
@@ -93,12 +93,65 @@
Home
</a>
</li>
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-question-circle"></span>
Get Started
How to
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
Conduct AMR analysis
</a>
</li>
<li>
<a href="../articles/Predict.html">
<span class="fa fa-dice"></span>
Predict antimicrobial resistance
</a>
</li>
<li>
<a href="../articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span>
Apply EUCAST rules
</a>
</li>
<li>
<a href="../articles/mo_property.html">
<span class="fa fa-bug"></span>
Get properties of a microorganism
</a>
</li>
<li>
<a href="../articles/ab_property.html">
<span class="fa fa-capsules"></span>
Get properties of an antibiotic
</a>
</li>
<li>
<a href="../articles/freq.html">
<span class="fa fa-sort-amount-down"></span>
Create frequency tables
</a>
</li>
<li>
<a href="../articles/G_test.html">
<span class="fa fa-clipboard-check"></span>
Use the G-test
</a>
</li>
</ul>
</li>
<li>
<a href="../reference/">
@@ -121,17 +174,17 @@
Changelog
</a>
</li>
<li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://gitlab.com/msberends/AMR">
<span class="fab fa fab fa-gitlab"></span>
Source Code
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<li>
<a href="../LICENSE-text.html">
<span class="fa fa-book"></span>
@@ -186,6 +239,12 @@
<p>Text</p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
@@ -194,6 +253,8 @@
<li><a href="#arguments">Arguments</a></li>
<li><a href="#value">Value</a></li>
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
</ul>
</div>

View File

@@ -50,7 +50,7 @@
<meta property="og:description" content="These functions can be used to calculate the (co-)resistance of microbial isolates (i.e. percentage S, SI, I, IR or R). All functions support quasiquotation with pipes, can be used in dplyrs summarise and support grouped variables, see Examples.
portion_R and portion_IR can be used to calculate resistance, portion_S and portion_SI can be used to calculate susceptibility." />
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@@ -81,7 +81,7 @@ portion_R and portion_IR can be used to calculate resistance, portion_S and port
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
</span>
</div>
@@ -94,12 +94,65 @@ portion_R and portion_IR can be used to calculate resistance, portion_S and port
Home
</a>
</li>
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-question-circle"></span>
Get Started
How to
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
Conduct AMR analysis
</a>
</li>
<li>
<a href="../articles/Predict.html">
<span class="fa fa-dice"></span>
Predict antimicrobial resistance
</a>
</li>
<li>
<a href="../articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span>
Apply EUCAST rules
</a>
</li>
<li>
<a href="../articles/mo_property.html">
<span class="fa fa-bug"></span>
Get properties of a microorganism
</a>
</li>
<li>
<a href="../articles/ab_property.html">
<span class="fa fa-capsules"></span>
Get properties of an antibiotic
</a>
</li>
<li>
<a href="../articles/freq.html">
<span class="fa fa-sort-amount-down"></span>
Create frequency tables
</a>
</li>
<li>
<a href="../articles/G_test.html">
<span class="fa fa-clipboard-check"></span>
Use the G-test
</a>
</li>
</ul>
</li>
<li>
<a href="../reference/">
@@ -122,17 +175,17 @@ portion_R and portion_IR can be used to calculate resistance, portion_S and port
Changelog
</a>
</li>
<li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://gitlab.com/msberends/AMR">
<span class="fab fa fab fa-gitlab"></span>
Source Code
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<li>
<a href="../LICENSE-text.html">
<span class="fa fa-book"></span>
@@ -248,99 +301,89 @@ portion_R and portion_IR can be used to calculate resistance, portion_S and port
<br />
And so on.</p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p><code><a href='count.html'>count</a>_*</code> to count resistant and susceptible isolates.</p></div>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='co'># septic_patients is a data set available in the AMR package. It is true, genuine data.</span>
?<span class='no'>septic_patients</span></div><div class='output co'>#&gt; <span class='message'>Rendering development documentation for 'septic_patients'</span></div><div class='input'>
<pre class="examples"><span class='co'># NOT RUN {</span>
<span class='co'># septic_patients is a data set available in the AMR package. It is true, genuine data.</span>
?<span class='no'>septic_patients</span>
<span class='co'># Calculate resistance</span>
<span class='fu'>portion_R</span>(<span class='no'>septic_patients</span>$<span class='no'>amox</span>)</div><div class='output co'>#&gt; [1] 0.5827645</div><div class='input'><span class='fu'>portion_IR</span>(<span class='no'>septic_patients</span>$<span class='no'>amox</span>)</div><div class='output co'>#&gt; [1] 0.5853242</div><div class='input'>
<span class='fu'>portion_R</span>(<span class='no'>septic_patients</span>$<span class='no'>amox</span>)
<span class='fu'>portion_IR</span>(<span class='no'>septic_patients</span>$<span class='no'>amox</span>)
<span class='co'># Or susceptibility</span>
<span class='fu'>portion_S</span>(<span class='no'>septic_patients</span>$<span class='no'>amox</span>)</div><div class='output co'>#&gt; [1] 0.4146758</div><div class='input'><span class='fu'>portion_SI</span>(<span class='no'>septic_patients</span>$<span class='no'>amox</span>)</div><div class='output co'>#&gt; [1] 0.4172355</div><div class='input'>
<span class='fu'>portion_S</span>(<span class='no'>septic_patients</span>$<span class='no'>amox</span>)
<span class='fu'>portion_SI</span>(<span class='no'>septic_patients</span>$<span class='no'>amox</span>)
<span class='co'># Do the above with pipes:</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/library'>library</a></span>(<span class='no'>dplyr</span>)
<span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span> <span class='fu'>portion_R</span>(<span class='no'>amox</span>)</div><div class='output co'>#&gt; [1] 0.5827645</div><div class='input'><span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span> <span class='fu'>portion_IR</span>(<span class='no'>amox</span>)</div><div class='output co'>#&gt; [1] 0.5853242</div><div class='input'><span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span> <span class='fu'>portion_S</span>(<span class='no'>amox</span>)</div><div class='output co'>#&gt; [1] 0.4146758</div><div class='input'><span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span> <span class='fu'>portion_SI</span>(<span class='no'>amox</span>)</div><div class='output co'>#&gt; [1] 0.4172355</div><div class='input'>
<span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span> <span class='fu'>portion_R</span>(<span class='no'>amox</span>)
<span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span> <span class='fu'>portion_IR</span>(<span class='no'>amox</span>)
<span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span> <span class='fu'>portion_S</span>(<span class='no'>amox</span>)
<span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span> <span class='fu'>portion_SI</span>(<span class='no'>amox</span>)
<span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/group_by.html'>group_by</a></span>(<span class='no'>hospital_id</span>) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/summarise.html'>summarise</a></span>(<span class='kw'>p</span> <span class='kw'>=</span> <span class='fu'>portion_S</span>(<span class='no'>cipr</span>),
<span class='kw'>n</span> <span class='kw'>=</span> <span class='fu'><a href='count.html'>n_rsi</a></span>(<span class='no'>cipr</span>)) <span class='co'># n_rsi works like n_distinct in dplyr</span></div><div class='output co'>#&gt; <span style='color: #949494;'># A tibble: 4 x 3</span><span>
#&gt; hospital_id p n
#&gt; </span><span style='color: #949494;font-style: italic;'>&lt;fct&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;dbl&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;int&gt;</span><span>
#&gt; </span><span style='color: #BCBCBC;'>1</span><span> A 0.860 207
#&gt; </span><span style='color: #BCBCBC;'>2</span><span> B 0.760 499
#&gt; </span><span style='color: #BCBCBC;'>3</span><span> C 0.688 202
#&gt; </span><span style='color: #BCBCBC;'>4</span><span> D 0.830 501</div><div class='input'>
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/group_by'>group_by</a></span>(<span class='no'>hospital_id</span>) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/summarise'>summarise</a></span>(<span class='kw'>p</span> <span class='kw'>=</span> <span class='fu'>portion_S</span>(<span class='no'>cipr</span>),
<span class='kw'>n</span> <span class='kw'>=</span> <span class='fu'><a href='count.html'>n_rsi</a></span>(<span class='no'>cipr</span>)) <span class='co'># n_rsi works like n_distinct in dplyr</span>
<span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/group_by.html'>group_by</a></span>(<span class='no'>hospital_id</span>) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/summarise.html'>summarise</a></span>(<span class='kw'>R</span> <span class='kw'>=</span> <span class='fu'>portion_R</span>(<span class='no'>cipr</span>, <span class='kw'>as_percent</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>),
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/group_by'>group_by</a></span>(<span class='no'>hospital_id</span>) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/summarise'>summarise</a></span>(<span class='kw'>R</span> <span class='kw'>=</span> <span class='fu'>portion_R</span>(<span class='no'>cipr</span>, <span class='kw'>as_percent</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>),
<span class='kw'>I</span> <span class='kw'>=</span> <span class='fu'>portion_I</span>(<span class='no'>cipr</span>, <span class='kw'>as_percent</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>),
<span class='kw'>S</span> <span class='kw'>=</span> <span class='fu'>portion_S</span>(<span class='no'>cipr</span>, <span class='kw'>as_percent</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>),
<span class='kw'>n</span> <span class='kw'>=</span> <span class='fu'><a href='count.html'>n_rsi</a></span>(<span class='no'>cipr</span>), <span class='co'># works like n_distinct in dplyr</span>
<span class='kw'>total</span> <span class='kw'>=</span> <span class='fu'><a href='http://dplyr.tidyverse.org/reference/n.html'>n</a></span>()) <span class='co'># NOT the amount of tested isolates!</span></div><div class='output co'>#&gt; </span><span style='color: #949494;'># A tibble: 4 x 6</span><span>
#&gt; hospital_id R I S n total
#&gt; </span><span style='color: #949494;font-style: italic;'>&lt;fct&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;chr&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;chr&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;chr&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;int&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;int&gt;</span><span>
#&gt; </span><span style='color: #BCBCBC;'>1</span><span> A 12.6% 1.4% 86.0% 207 321
#&gt; </span><span style='color: #BCBCBC;'>2</span><span> B 17.0% 7.0% 76.0% 499 663
#&gt; </span><span style='color: #BCBCBC;'>3</span><span> C 20.3% 10.9% 68.8% 202 254
#&gt; </span><span style='color: #BCBCBC;'>4</span><span> D 15.2% 1.8% 83.0% 501 762</div><div class='input'>
<span class='kw'>total</span> <span class='kw'>=</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/n'>n</a></span>()) <span class='co'># NOT the amount of tested isolates!</span>
<span class='co'># Calculate co-resistance between amoxicillin/clav acid and gentamicin,</span>
<span class='co'># so we can see that combination therapy does a lot more than mono therapy:</span>
<span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span> <span class='fu'>portion_S</span>(<span class='no'>amcl</span>) <span class='co'># S = 67.1%</span></div><div class='output co'>#&gt; [1] 0.7062363</div><div class='input'><span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span> <span class='fu'><a href='count.html'>count_all</a></span>(<span class='no'>amcl</span>) <span class='co'># n = 1576</span></div><div class='output co'>#&gt; [1] 1828</div><div class='input'>
<span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span> <span class='fu'>portion_S</span>(<span class='no'>gent</span>) <span class='co'># S = 74.0%</span></div><div class='output co'>#&gt; [1] 0.7396226</div><div class='input'><span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span> <span class='fu'><a href='count.html'>count_all</a></span>(<span class='no'>gent</span>) <span class='co'># n = 1855</span></div><div class='output co'>#&gt; [1] 1855</div><div class='input'>
<span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span> <span class='fu'>portion_S</span>(<span class='no'>amcl</span>, <span class='no'>gent</span>) <span class='co'># S = 92.0%</span></div><div class='output co'>#&gt; [1] 0.9210074</div><div class='input'><span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span> <span class='fu'><a href='count.html'>count_all</a></span>(<span class='no'>amcl</span>, <span class='no'>gent</span>) <span class='co'># n = 1517</span></div><div class='output co'>#&gt; [1] 1747</div><div class='input'>
<span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span> <span class='fu'>portion_S</span>(<span class='no'>amcl</span>) <span class='co'># S = 67.1%</span>
<span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span> <span class='fu'><a href='count.html'>count_all</a></span>(<span class='no'>amcl</span>) <span class='co'># n = 1576</span>
<span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span> <span class='fu'>portion_S</span>(<span class='no'>gent</span>) <span class='co'># S = 74.0%</span>
<span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span> <span class='fu'><a href='count.html'>count_all</a></span>(<span class='no'>gent</span>) <span class='co'># n = 1855</span>
<span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span> <span class='fu'>portion_S</span>(<span class='no'>amcl</span>, <span class='no'>gent</span>) <span class='co'># S = 92.0%</span>
<span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span> <span class='fu'><a href='count.html'>count_all</a></span>(<span class='no'>amcl</span>, <span class='no'>gent</span>) <span class='co'># n = 1517</span>
<span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/group_by.html'>group_by</a></span>(<span class='no'>hospital_id</span>) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/summarise.html'>summarise</a></span>(<span class='kw'>cipro_p</span> <span class='kw'>=</span> <span class='fu'>portion_S</span>(<span class='no'>cipr</span>, <span class='kw'>as_percent</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>),
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/group_by'>group_by</a></span>(<span class='no'>hospital_id</span>) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/summarise'>summarise</a></span>(<span class='kw'>cipro_p</span> <span class='kw'>=</span> <span class='fu'>portion_S</span>(<span class='no'>cipr</span>, <span class='kw'>as_percent</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>),
<span class='kw'>cipro_n</span> <span class='kw'>=</span> <span class='fu'><a href='count.html'>count_all</a></span>(<span class='no'>cipr</span>),
<span class='kw'>genta_p</span> <span class='kw'>=</span> <span class='fu'>portion_S</span>(<span class='no'>gent</span>, <span class='kw'>as_percent</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>),
<span class='kw'>genta_n</span> <span class='kw'>=</span> <span class='fu'><a href='count.html'>count_all</a></span>(<span class='no'>gent</span>),
<span class='kw'>combination_p</span> <span class='kw'>=</span> <span class='fu'>portion_S</span>(<span class='no'>cipr</span>, <span class='no'>gent</span>, <span class='kw'>as_percent</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>),
<span class='kw'>combination_n</span> <span class='kw'>=</span> <span class='fu'><a href='count.html'>count_all</a></span>(<span class='no'>cipr</span>, <span class='no'>gent</span>))</div><div class='output co'>#&gt; </span><span style='color: #949494;'># A tibble: 4 x 7</span><span>
#&gt; hospital_id cipro_p cipro_n genta_p genta_n combination_p combination_n
#&gt; </span><span style='color: #949494;font-style: italic;'>&lt;fct&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;chr&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;int&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;chr&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;int&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;chr&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;int&gt;</span><span>
#&gt; </span><span style='color: #BCBCBC;'>1</span><span> A 86.0% 207 76.0% 300 95.0% 202
#&gt; </span><span style='color: #BCBCBC;'>2</span><span> B 76.0% 499 71.5% 606 91.4% 488
#&gt; </span><span style='color: #BCBCBC;'>3</span><span> C 68.8% 202 75.8% 240 91.5% 201
#&gt; </span><span style='color: #BCBCBC;'>4</span><span> D 83.0% 501 74.6% 709 95.0% 499</div><div class='input'>
<span class='kw'>combination_n</span> <span class='kw'>=</span> <span class='fu'><a href='count.html'>count_all</a></span>(<span class='no'>cipr</span>, <span class='no'>gent</span>))
<span class='co'># Get portions S/I/R immediately of all rsi columns</span>
<span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/select.html'>select</a></span>(<span class='no'>amox</span>, <span class='no'>cipr</span>) <span class='kw'>%&gt;%</span>
<span class='fu'>portion_df</span>(<span class='kw'>translate</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</div><div class='output co'>#&gt; Interpretation Antibiotic Value
#&gt; 1 S amox 0.414675768
#&gt; 2 I amox 0.002559727
#&gt; 3 R amox 0.582764505
#&gt; 4 S cipr 0.789212207
#&gt; 5 I cipr 0.048970901
#&gt; 6 R cipr 0.161816891</div><div class='input'>
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/select'>select</a></span>(<span class='no'>amox</span>, <span class='no'>cipr</span>) <span class='kw'>%&gt;%</span>
<span class='fu'>portion_df</span>(<span class='kw'>translate</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)
<span class='co'># It also supports grouping variables</span>
<span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/select.html'>select</a></span>(<span class='no'>hospital_id</span>, <span class='no'>amox</span>, <span class='no'>cipr</span>) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/group_by.html'>group_by</a></span>(<span class='no'>hospital_id</span>) <span class='kw'>%&gt;%</span>
<span class='fu'>portion_df</span>(<span class='kw'>translate</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</div><div class='output co'>#&gt; </span><span style='color: #949494;'># A tibble: 24 x 4</span><span>
#&gt; Interpretation hospital_id Antibiotic Value
#&gt; </span><span style='color: #949494;font-style: italic;'>&lt;ord&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;fct&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;chr&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;dbl&gt;</span><span>
#&gt; </span><span style='color: #BCBCBC;'> 1</span><span> S A amox 0.42
#&gt; </span><span style='color: #BCBCBC;'> 2</span><span> S B amox 0.378
#&gt; </span><span style='color: #BCBCBC;'> 3</span><span> S C amox 0.373
#&gt; </span><span style='color: #BCBCBC;'> 4</span><span> S D amox 0.454
#&gt; </span><span style='color: #BCBCBC;'> 5</span><span> I A amox 0
#&gt; </span><span style='color: #BCBCBC;'> 6</span><span> I B amox 0.002</span><span style='text-decoration: underline;'>68</span><span>
#&gt; </span><span style='color: #BCBCBC;'> 7</span><span> I C amox 0
#&gt; </span><span style='color: #BCBCBC;'> 8</span><span> I D amox 0.004</span><span style='text-decoration: underline;'>07</span><span>
#&gt; </span><span style='color: #BCBCBC;'> 9</span><span> R A amox 0.580
#&gt; </span><span style='color: #BCBCBC;'>10</span><span> R B amox 0.619
#&gt; </span><span style='color: #949494;'># ... with 14 more rows</span><span></div><div class='input'>
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/select'>select</a></span>(<span class='no'>hospital_id</span>, <span class='no'>amox</span>, <span class='no'>cipr</span>) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/group_by'>group_by</a></span>(<span class='no'>hospital_id</span>) <span class='kw'>%&gt;%</span>
<span class='fu'>portion_df</span>(<span class='kw'>translate</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)
</div></span><span class='co'># NOT RUN {</span>
<span class='co'># }</span><span class='co'># NOT RUN {</span>
<span class='co'># calculate current empiric combination therapy of Helicobacter gastritis:</span>
<span class='no'>my_table</span> <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/filter.html'>filter</a></span>(<span class='no'>first_isolate</span> <span class='kw'>==</span> <span class='fl'>TRUE</span>,
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/filter'>filter</a></span>(<span class='no'>first_isolate</span> <span class='kw'>==</span> <span class='fl'>TRUE</span>,
<span class='no'>genus</span> <span class='kw'>==</span> <span class='st'>"Helicobacter"</span>) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/summarise.html'>summarise</a></span>(<span class='kw'>p</span> <span class='kw'>=</span> <span class='fu'>portion_S</span>(<span class='no'>amox</span>, <span class='no'>metr</span>), <span class='co'># amoxicillin with metronidazole</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/summarise'>summarise</a></span>(<span class='kw'>p</span> <span class='kw'>=</span> <span class='fu'>portion_S</span>(<span class='no'>amox</span>, <span class='no'>metr</span>), <span class='co'># amoxicillin with metronidazole</span>
<span class='kw'>n</span> <span class='kw'>=</span> <span class='fu'><a href='count.html'>count_all</a></span>(<span class='no'>amox</span>, <span class='no'>metr</span>))
<span class='co'># }</span></pre>
</div>
@@ -355,6 +398,8 @@ portion_R and portion_IR can be used to calculate resistance, portion_S and port
<li><a href="#details">Details</a></li>
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
<li><a href="#see-also">See also</a></li>
<li><a href="#examples">Examples</a></li>

View File

@@ -49,7 +49,7 @@
<meta property="og:description" content="This function is only useful for the MMB department of the UMCG. Use this function to import data by just defining the file parameter. It will automatically transform birth dates and calculate patients age, translate the column names to English, transform the MO codes with as.mo and transform all antimicrobial columns with as.rsi." />
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@@ -80,7 +80,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
</span>
</div>
@@ -93,12 +93,65 @@
Home
</a>
</li>
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-question-circle"></span>
Get Started
How to
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
Conduct AMR analysis
</a>
</li>
<li>
<a href="../articles/Predict.html">
<span class="fa fa-dice"></span>
Predict antimicrobial resistance
</a>
</li>
<li>
<a href="../articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span>
Apply EUCAST rules
</a>
</li>
<li>
<a href="../articles/mo_property.html">
<span class="fa fa-bug"></span>
Get properties of a microorganism
</a>
</li>
<li>
<a href="../articles/ab_property.html">
<span class="fa fa-capsules"></span>
Get properties of an antibiotic
</a>
</li>
<li>
<a href="../articles/freq.html">
<span class="fa fa-sort-amount-down"></span>
Create frequency tables
</a>
</li>
<li>
<a href="../articles/G_test.html">
<span class="fa fa-clipboard-check"></span>
Use the G-test
</a>
</li>
</ul>
</li>
<li>
<a href="../reference/">
@@ -121,17 +174,17 @@
Changelog
</a>
</li>
<li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://gitlab.com/msberends/AMR">
<span class="fab fa fab fa-gitlab"></span>
Source Code
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<li>
<a href="../LICENSE-text.html">
<span class="fa fa-book"></span>
@@ -311,6 +364,12 @@
<p>Column names will be transformed, but the original column names are set as a "label" attribute and can be seen in e.g. RStudio Viewer.</p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
@@ -319,6 +378,8 @@
<li><a href="#arguments">Arguments</a></li>
<li><a href="#details">Details</a></li>
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
</ul>
</div>

View File

@@ -49,7 +49,7 @@
<meta property="og:description" content="Create a prediction model to predict antimicrobial resistance for the next years on statistical solid ground. Standard errors (SE) will be returned as columns se_min and se_max. See Examples for a real live example." />
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@@ -80,7 +80,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
</span>
</div>
@@ -93,12 +93,65 @@
Home
</a>
</li>
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-question-circle"></span>
Get Started
How to
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
Conduct AMR analysis
</a>
</li>
<li>
<a href="../articles/Predict.html">
<span class="fa fa-dice"></span>
Predict antimicrobial resistance
</a>
</li>
<li>
<a href="../articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span>
Apply EUCAST rules
</a>
</li>
<li>
<a href="../articles/mo_property.html">
<span class="fa fa-bug"></span>
Get properties of a microorganism
</a>
</li>
<li>
<a href="../articles/ab_property.html">
<span class="fa fa-capsules"></span>
Get properties of an antibiotic
</a>
</li>
<li>
<a href="../articles/freq.html">
<span class="fa fa-sort-amount-down"></span>
Create frequency tables
</a>
</li>
<li>
<a href="../articles/G_test.html">
<span class="fa fa-clipboard-check"></span>
Use the G-test
</a>
</li>
</ul>
</li>
<li>
<a href="../reference/">
@@ -121,17 +174,17 @@
Changelog
</a>
</li>
<li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://gitlab.com/msberends/AMR">
<span class="fab fa fab fa-gitlab"></span>
Source Code
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<li>
<a href="../LICENSE-text.html">
<span class="fa fa-book"></span>
@@ -238,6 +291,12 @@
</ul>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p>The <code><a href='portion.html'>portion</a></code> function to calculate resistance, <br /> <code><a href='https://www.rdocumentation.org/packages/stats/topics/lm'>lm</a></code> <code><a href='https://www.rdocumentation.org/packages/stats/topics/glm'>glm</a></code></p></div>
@@ -252,10 +311,10 @@
<span class='co'># or use dplyr so you can actually read it:</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/library'>library</a></span>(<span class='no'>dplyr</span>)
<span class='no'>tbl</span> <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/filter.html'>filter</a></span>(<span class='no'>first_isolate</span> <span class='kw'>==</span> <span class='fl'>TRUE</span>,
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/filter'>filter</a></span>(<span class='no'>first_isolate</span> <span class='kw'>==</span> <span class='fl'>TRUE</span>,
<span class='no'>genus</span> <span class='kw'>==</span> <span class='st'>"Haemophilus"</span>) <span class='kw'>%&gt;%</span>
<span class='fu'>resistance_predict</span>(<span class='no'>amcl</span>, <span class='no'>date</span>)
<span class='co'># }</span><div class='input'>
<span class='co'># }</span><span class='co'># NOT RUN {</span>
<span class='co'># real live example:</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/library'>library</a></span>(<span class='no'>dplyr</span>)
@@ -263,9 +322,9 @@
<span class='co'># get bacteria properties like genus and species</span>
<span class='fu'><a href='join.html'>left_join_microorganisms</a></span>(<span class='st'>"mo"</span>) <span class='kw'>%&gt;%</span>
<span class='co'># calculate first isolates</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/mutate.html'>mutate</a></span>(<span class='kw'>first_isolate</span> <span class='kw'>=</span> <span class='fu'><a href='first_isolate.html'>first_isolate</a></span>(<span class='no'>.</span>)) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/mutate'>mutate</a></span>(<span class='kw'>first_isolate</span> <span class='kw'>=</span> <span class='fu'><a href='first_isolate.html'>first_isolate</a></span>(<span class='no'>.</span>)) <span class='kw'>%&gt;%</span>
<span class='co'># filter on first E. coli isolates</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/filter.html'>filter</a></span>(<span class='no'>genus</span> <span class='kw'>==</span> <span class='st'>"Escherichia"</span>,
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/filter'>filter</a></span>(<span class='no'>genus</span> <span class='kw'>==</span> <span class='st'>"Escherichia"</span>,
<span class='no'>species</span> <span class='kw'>==</span> <span class='st'>"coli"</span>,
<span class='no'>first_isolate</span> <span class='kw'>==</span> <span class='fl'>TRUE</span>) <span class='kw'>%&gt;%</span>
<span class='co'># predict resistance of cefotaxime for next years</span>
@@ -273,82 +332,35 @@
<span class='kw'>col_date</span> <span class='kw'>=</span> <span class='st'>"date"</span>,
<span class='kw'>year_max</span> <span class='kw'>=</span> <span class='fl'>2025</span>,
<span class='kw'>preserve_measurements</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>minimum</span> <span class='kw'>=</span> <span class='fl'>0</span>)</div><div class='output co'>#&gt; <span class='message'><span style='color: #0000BB;'>NOTE: Using column `</span><span style='color: #0000BB;font-weight: bold;'>mo</span><span style='color: #0000BB;'>` as input for `col_mo`.</span><span></span></div><div class='output co'>#&gt; <span class='message'></span><span style='color: #0000BB;'>NOTE: Using column `</span><span style='color: #0000BB;font-weight: bold;'>date</span><span style='color: #0000BB;'>` as input for `col_date`.</span><span></span></div><div class='output co'>#&gt; <span class='message'></span><span style='color: #0000BB;'>NOTE: Using column `</span><span style='color: #0000BB;font-weight: bold;'>patient_id</span><span style='color: #0000BB;'>` as input for `col_patient_id`.</span><span></span></div><div class='output co'>#&gt; <span class='message'>=&gt; Found </span><span style='font-weight: bold;'>1,317 first isolates</span><span> (65.9% of total)</span></div><div class='output co'>#&gt;
#&gt; Logistic regression model (logit) with binomial distribution
#&gt; ------------------------------------------------------------
#&gt;
#&gt; Call:
#&gt; glm(formula = cbind(R, S) ~ year, family = binomial)
#&gt;
#&gt; Deviance Residuals:
#&gt; Min 1Q Median 3Q Max
#&gt; -1.0751 -0.4675 -0.2840 -0.1530 1.5028
#&gt;
#&gt; Coefficients:
#&gt; Estimate Std. Error z value Pr(&gt;|z|)
#&gt; (Intercept) -686.7518 342.1219 -2.007 0.0447 *
#&gt; year 0.3393 0.1698 1.998 0.0457 *
#&gt; ---
#&gt; Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1 1
#&gt;
#&gt; (Dispersion parameter for binomial family taken to be 1)
#&gt;
#&gt; Null deviance: 13.5547 on 15 degrees of freedom
#&gt; Residual deviance: 6.8145 on 14 degrees of freedom
#&gt; AIC: 19.128
#&gt;
#&gt; Number of Fisher Scoring iterations: 6
#&gt; </div><div class='output co'>#&gt; year value se_min se_max observations observed estimated
#&gt; 1 2002 0.00000000 NA NA 12 0.00000000 0.0005265096
#&gt; 2 2003 0.00000000 NA NA 13 0.00000000 0.0007390158
#&gt; 3 2004 0.00000000 NA NA 12 0.00000000 0.0010372031
#&gt; 4 2005 0.00000000 NA NA 15 0.00000000 0.0014555316
#&gt; 5 2006 0.00000000 NA NA 16 0.00000000 0.0020422369
#&gt; 6 2007 0.00000000 NA NA 17 0.00000000 0.0028647568
#&gt; 7 2008 0.00000000 NA NA 17 0.00000000 0.0040172166
#&gt; 8 2009 0.00000000 NA NA 18 0.00000000 0.0056306802
#&gt; 9 2010 0.00000000 NA NA 13 0.00000000 0.0078870391
#&gt; 10 2011 0.04761905 NA NA 21 0.04761905 0.0110375429
#&gt; 11 2012 0.00000000 NA NA 10 0.00000000 0.0154269569
#&gt; 12 2013 0.00000000 NA NA 13 0.00000000 0.0215239636
#&gt; 13 2014 0.00000000 NA NA 19 0.00000000 0.0299572977
#&gt; 14 2015 0.14285714 NA NA 14 0.14285714 0.0415545799
#&gt; 15 2016 0.04761905 NA NA 21 0.04761905 0.0573759332
#&gt; 16 2017 0.05000000 NA NA 20 0.05000000 0.0787262663
#&gt; 17 2018 0.10711851 0.03829468 0.1759423 NA NA 0.1071185079
#&gt; 18 2019 0.14414813 0.03838570 0.2499106 NA NA 0.1441481336
#&gt; 19 2020 0.19123682 0.03582031 0.3466533 NA NA 0.1912368226
#&gt; 20 2021 0.24922848 0.03244999 0.4660070 NA NA 0.2492284792
#&gt; 21 2022 0.31789357 0.03249431 0.6032928 NA NA 0.3178935725
#&gt; 22 2023 0.39551054 0.04249603 0.7485251 NA NA 0.3955105423
#&gt; 23 2024 0.47877663 0.06981495 0.8877383 NA NA 0.4787766284
#&gt; 24 2025 0.56323896 0.11983506 1.0000000 NA NA 0.5632389556</div><div class='input'>
<span class='kw'>minimum</span> <span class='kw'>=</span> <span class='fl'>0</span>)
<span class='co'># create nice plots with ggplot</span>
<span class='kw'>if</span> (!<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/library'>require</a></span>(<span class='no'>ggplot2</span>)) {
<span class='no'>data</span> <span class='kw'>&lt;-</span> <span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/filter.html'>filter</a></span>(<span class='no'>mo</span> <span class='kw'>==</span> <span class='fu'><a href='as.mo.html'>as.mo</a></span>(<span class='st'>"E. coli"</span>)) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/filter'>filter</a></span>(<span class='no'>mo</span> <span class='kw'>==</span> <span class='fu'><a href='as.mo.html'>as.mo</a></span>(<span class='st'>"E. coli"</span>)) <span class='kw'>%&gt;%</span>
<span class='fu'>resistance_predict</span>(<span class='kw'>col_ab</span> <span class='kw'>=</span> <span class='st'>"amox"</span>,
<span class='kw'>col_date</span> <span class='kw'>=</span> <span class='st'>"date"</span>,
<span class='kw'>info</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
<span class='kw'>minimum</span> <span class='kw'>=</span> <span class='fl'>15</span>)
<span class='fu'><a href='https://ggplot2.tidyverse.org/reference/ggplot.html'>ggplot</a></span>(<span class='no'>data</span>,
<span class='fu'><a href='https://ggplot2.tidyverse.org/reference/aes.html'>aes</a></span>(<span class='kw'>x</span> <span class='kw'>=</span> <span class='no'>year</span>)) +
<span class='fu'><a href='https://ggplot2.tidyverse.org/reference/geom_bar.html'>geom_col</a></span>(<span class='fu'><a href='https://ggplot2.tidyverse.org/reference/aes.html'>aes</a></span>(<span class='kw'>y</span> <span class='kw'>=</span> <span class='no'>value</span>),
<span class='fu'><a href='https://www.rdocumentation.org/packages/ggplot2/topics/ggplot'>ggplot</a></span>(<span class='no'>data</span>,
<span class='fu'><a href='https://www.rdocumentation.org/packages/ggplot2/topics/aes'>aes</a></span>(<span class='kw'>x</span> <span class='kw'>=</span> <span class='no'>year</span>)) +
<span class='fu'><a href='https://www.rdocumentation.org/packages/ggplot2/topics/geom_bar'>geom_col</a></span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/ggplot2/topics/aes'>aes</a></span>(<span class='kw'>y</span> <span class='kw'>=</span> <span class='no'>value</span>),
<span class='kw'>fill</span> <span class='kw'>=</span> <span class='st'>"grey75"</span>) +
<span class='fu'><a href='https://ggplot2.tidyverse.org/reference/geom_linerange.html'>geom_errorbar</a></span>(<span class='fu'><a href='https://ggplot2.tidyverse.org/reference/aes.html'>aes</a></span>(<span class='kw'>ymin</span> <span class='kw'>=</span> <span class='no'>se_min</span>,
<span class='fu'><a href='https://www.rdocumentation.org/packages/ggplot2/topics/geom_linerange'>geom_errorbar</a></span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/ggplot2/topics/aes'>aes</a></span>(<span class='kw'>ymin</span> <span class='kw'>=</span> <span class='no'>se_min</span>,
<span class='kw'>ymax</span> <span class='kw'>=</span> <span class='no'>se_max</span>),
<span class='kw'>colour</span> <span class='kw'>=</span> <span class='st'>"grey50"</span>) +
<span class='fu'><a href='https://ggplot2.tidyverse.org/reference/scale_continuous.html'>scale_y_continuous</a></span>(<span class='kw'>limits</span> <span class='kw'>=</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='fl'>0</span>, <span class='fl'>1</span>),
<span class='fu'><a href='https://www.rdocumentation.org/packages/ggplot2/topics/scale_continuous'>scale_y_continuous</a></span>(<span class='kw'>limits</span> <span class='kw'>=</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='fl'>0</span>, <span class='fl'>1</span>),
<span class='kw'>breaks</span> <span class='kw'>=</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/seq'>seq</a></span>(<span class='fl'>0</span>, <span class='fl'>1</span>, <span class='fl'>0.1</span>),
<span class='kw'>labels</span> <span class='kw'>=</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/paste'>paste0</a></span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/seq'>seq</a></span>(<span class='fl'>0</span>, <span class='fl'>100</span>, <span class='fl'>10</span>), <span class='st'>"%"</span>)) +
<span class='fu'><a href='https://ggplot2.tidyverse.org/reference/labs.html'>labs</a></span>(<span class='kw'>title</span> <span class='kw'>=</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/expression'>expression</a></span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/paste'>paste</a></span>(<span class='st'>"Forecast of amoxicillin resistance in "</span>,
<span class='fu'><a href='https://www.rdocumentation.org/packages/ggplot2/topics/labs'>labs</a></span>(<span class='kw'>title</span> <span class='kw'>=</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/expression'>expression</a></span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/paste'>paste</a></span>(<span class='st'>"Forecast of amoxicillin resistance in "</span>,
<span class='fu'><a href='https://www.rdocumentation.org/packages/grDevices/topics/plotmath'>italic</a></span>(<span class='st'>"E. coli"</span>))),
<span class='kw'>y</span> <span class='kw'>=</span> <span class='st'>"%IR"</span>,
<span class='kw'>x</span> <span class='kw'>=</span> <span class='st'>"Year"</span>) +
<span class='fu'><a href='https://ggplot2.tidyverse.org/reference/ggtheme.html'>theme_minimal</a></span>(<span class='kw'>base_size</span> <span class='kw'>=</span> <span class='fl'>13</span>)
}</div></span></pre>
<span class='fu'><a href='https://www.rdocumentation.org/packages/ggplot2/topics/ggtheme'>theme_minimal</a></span>(<span class='kw'>base_size</span> <span class='kw'>=</span> <span class='fl'>13</span>)
}
<span class='co'># }</span></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
@@ -357,6 +369,8 @@
<li><a href="#value">Value</a></li>
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
<li><a href="#see-also">See also</a></li>
<li><a href="#examples">Examples</a></li>

View File

@@ -49,7 +49,7 @@
<meta property="og:description" content="This function is deprecated. Use the portion functions instead." />
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@@ -80,7 +80,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
</span>
</div>
@@ -93,12 +93,65 @@
Home
</a>
</li>
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-question-circle"></span>
Get Started
How to
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
Conduct AMR analysis
</a>
</li>
<li>
<a href="../articles/Predict.html">
<span class="fa fa-dice"></span>
Predict antimicrobial resistance
</a>
</li>
<li>
<a href="../articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span>
Apply EUCAST rules
</a>
</li>
<li>
<a href="../articles/mo_property.html">
<span class="fa fa-bug"></span>
Get properties of a microorganism
</a>
</li>
<li>
<a href="../articles/ab_property.html">
<span class="fa fa-capsules"></span>
Get properties of an antibiotic
</a>
</li>
<li>
<a href="../articles/freq.html">
<span class="fa fa-sort-amount-down"></span>
Create frequency tables
</a>
</li>
<li>
<a href="../articles/G_test.html">
<span class="fa fa-clipboard-check"></span>
Use the G-test
</a>
</li>
</ul>
</li>
<li>
<a href="../reference/">
@@ -121,17 +174,17 @@
Changelog
</a>
</li>
<li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://gitlab.com/msberends/AMR">
<span class="fab fa fab fa-gitlab"></span>
Source Code
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<li>
<a href="../LICENSE-text.html">
<span class="fa fa-book"></span>

View File

@@ -47,9 +47,9 @@
<script src="../extra.js"></script>
<meta property="og:title" content="Data set with 2000 blood culture isolates of septic patients — septic_patients" />
<meta property="og:description" content="An anonymised data set containing 2,000 microbial blood culture isolates with their full antibiograms found in septic patients in 4 different hospitals in the Netherlands, between 2001 and 2017. It is true, genuine data. This data.frame can be used to practice AMR analysis. For examples, press F1." />
<meta property="og:description" content="An anonymised data set containing 2,000 microbial blood culture isolates with their full antibiograms found in septic patients in 4 different hospitals in the Netherlands, between 2001 and 2017. It is true, genuine data. This data.frame can be used to practice AMR analysis. For examples, please read the tutorial on our website." />
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@@ -80,7 +80,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
</span>
</div>
@@ -93,12 +93,65 @@
Home
</a>
</li>
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-question-circle"></span>
Get Started
How to
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
Conduct AMR analysis
</a>
</li>
<li>
<a href="../articles/Predict.html">
<span class="fa fa-dice"></span>
Predict antimicrobial resistance
</a>
</li>
<li>
<a href="../articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span>
Apply EUCAST rules
</a>
</li>
<li>
<a href="../articles/mo_property.html">
<span class="fa fa-bug"></span>
Get properties of a microorganism
</a>
</li>
<li>
<a href="../articles/ab_property.html">
<span class="fa fa-capsules"></span>
Get properties of an antibiotic
</a>
</li>
<li>
<a href="../articles/freq.html">
<span class="fa fa-sort-amount-down"></span>
Create frequency tables
</a>
</li>
<li>
<a href="../articles/G_test.html">
<span class="fa fa-clipboard-check"></span>
Use the G-test
</a>
</li>
</ul>
</li>
<li>
<a href="../reference/">
@@ -121,17 +174,17 @@
Changelog
</a>
</li>
<li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://gitlab.com/msberends/AMR">
<span class="fab fa fab fa-gitlab"></span>
Source Code
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<li>
<a href="../LICENSE-text.html">
<span class="fa fa-book"></span>
@@ -163,7 +216,7 @@
<div class="ref-description">
<p>An anonymised data set containing 2,000 microbial blood culture isolates with their full antibiograms found in septic patients in 4 different hospitals in the Netherlands, between 2001 and 2017. It is true, genuine data. This <code>data.frame</code> can be used to practice AMR analysis. For examples, press F1.</p>
<p>An anonymised data set containing 2,000 microbial blood culture isolates with their full antibiograms found in septic patients in 4 different hospitals in the Netherlands, between 2001 and 2017. It is true, genuine data. This <code>data.frame</code> can be used to practice AMR analysis. For examples, please read <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>the tutorial on our website</a>.</p>
</div>
@@ -184,77 +237,22 @@
<dt><code>peni:rifa</code></dt><dd><p>40 different antibiotics with class <code>rsi</code> (see <code><a href='as.rsi.html'>as.rsi</a></code>); these column names occur in <code><a href='antibiotics.html'>antibiotics</a></code> data set and can be translated with <code><a href='abname.html'>abname</a></code></p></dd>
</dl>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='co'># ----------- #</span>
<span class='co'># PREPARATION #</span>
<span class='co'># ----------- #</span>
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
<span class='co'># Save this example data set to an object, so we can edit it:</span>
<span class='no'>my_data</span> <span class='kw'>&lt;-</span> <span class='no'>septic_patients</span>
<span class='co'># load the dplyr package to make data science A LOT easier</span>
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/library'>library</a></span>(<span class='no'>dplyr</span>)
<span class='co'># Add first isolates to our data set:</span>
<span class='no'>my_data</span> <span class='kw'>&lt;-</span> <span class='no'>my_data</span> <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/mutate.html'>mutate</a></span>(<span class='kw'>first_isolates</span> <span class='kw'>=</span> <span class='fu'><a href='first_isolate.html'>first_isolate</a></span>(<span class='no'>my_data</span>, <span class='st'>"date"</span>, <span class='st'>"patient_id"</span>, <span class='st'>"mo"</span>))</div><div class='output co'>#&gt; <span class='message'>=&gt; Found <span style='font-weight: bold;'>1,317 first isolates</span><span> (65.9% of total)</span></div><div class='input'>
<span class='co'># -------- #</span>
<span class='co'># ANALYSIS #</span>
<span class='co'># -------- #</span>
<span class='co'># 1. Get the amoxicillin resistance percentages (p)</span>
<span class='co'># and numbers (n) of E. coli, divided by hospital:</span>
<span class='no'>my_data</span> <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/filter.html'>filter</a></span>(<span class='no'>mo</span> <span class='kw'>==</span> <span class='fu'><a href='as.mo.html'>guess_mo</a></span>(<span class='st'>"E. coli"</span>),
<span class='no'>first_isolates</span> <span class='kw'>==</span> <span class='fl'>TRUE</span>) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/group_by.html'>group_by</a></span>(<span class='no'>hospital_id</span>) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/summarise.html'>summarise</a></span>(<span class='kw'>n</span> <span class='kw'>=</span> <span class='fu'><a href='count.html'>n_rsi</a></span>(<span class='no'>amox</span>),
<span class='kw'>p</span> <span class='kw'>=</span> <span class='fu'><a href='portion.html'>portion_IR</a></span>(<span class='no'>amox</span>))</div><div class='output co'>#&gt; <span class='warning'>Warning: Introducing NA: only 19 results available (minimum set to 30).</span></div><div class='output co'>#&gt; </span><span style='color: #949494;'># A tibble: 4 x 3</span><span>
#&gt; hospital_id n p
#&gt; </span><span style='color: #949494;font-style: italic;'>&lt;fct&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;int&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;dbl&gt;</span><span>
#&gt; </span><span style='color: #BCBCBC;'>1</span><span> A 19 </span><span style='color: #BB0000;'>NA</span><span>
#&gt; </span><span style='color: #BCBCBC;'>2</span><span> B 65 0.477
#&gt; </span><span style='color: #BCBCBC;'>3</span><span> C 35 0.543
#&gt; </span><span style='color: #BCBCBC;'>4</span><span> D 94 0.5 </div><div class='input'>
<span class='co'># 2. Get the amoxicillin/clavulanic acid resistance</span>
<span class='co'># percentages of E. coli, trend over the years:</span>
<span class='no'>my_data</span> <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/filter.html'>filter</a></span>(<span class='no'>mo</span> <span class='kw'>==</span> <span class='fu'><a href='as.mo.html'>guess_mo</a></span>(<span class='st'>"E. coli"</span>),
<span class='no'>first_isolates</span> <span class='kw'>==</span> <span class='fl'>TRUE</span>) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/group_by.html'>group_by</a></span>(<span class='kw'>year</span> <span class='kw'>=</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/format'>format</a></span>(<span class='no'>date</span>, <span class='st'>"%Y"</span>)) <span class='kw'>%&gt;%</span>
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/summarise.html'>summarise</a></span>(<span class='kw'>n</span> <span class='kw'>=</span> <span class='fu'><a href='count.html'>n_rsi</a></span>(<span class='no'>amcl</span>),
<span class='kw'>p</span> <span class='kw'>=</span> <span class='fu'><a href='portion.html'>portion_IR</a></span>(<span class='no'>amcl</span>, <span class='kw'>minimum</span> <span class='kw'>=</span> <span class='fl'>20</span>))</div><div class='output co'>#&gt; <span class='warning'>Warning: Introducing NA: only 13 results available (minimum set to 20).</span></div><div class='output co'>#&gt; <span class='warning'>Warning: Introducing NA: only 14 results available (minimum set to 20).</span></div><div class='output co'>#&gt; <span class='warning'>Warning: Introducing NA: only 13 results available (minimum set to 20).</span></div><div class='output co'>#&gt; <span class='warning'>Warning: Introducing NA: only 15 results available (minimum set to 20).</span></div><div class='output co'>#&gt; <span class='warning'>Warning: Introducing NA: only 16 results available (minimum set to 20).</span></div><div class='output co'>#&gt; <span class='warning'>Warning: Introducing NA: only 17 results available (minimum set to 20).</span></div><div class='output co'>#&gt; <span class='warning'>Warning: Introducing NA: only 17 results available (minimum set to 20).</span></div><div class='output co'>#&gt; <span class='warning'>Warning: Introducing NA: only 18 results available (minimum set to 20).</span></div><div class='output co'>#&gt; <span class='warning'>Warning: Introducing NA: only 13 results available (minimum set to 20).</span></div><div class='output co'>#&gt; <span class='warning'>Warning: Introducing NA: only 10 results available (minimum set to 20).</span></div><div class='output co'>#&gt; <span class='warning'>Warning: Introducing NA: only 13 results available (minimum set to 20).</span></div><div class='output co'>#&gt; <span class='warning'>Warning: Introducing NA: only 14 results available (minimum set to 20).</span></div><div class='output co'>#&gt; </span><span style='color: #949494;'># A tibble: 16 x 3</span><span>
#&gt; year n p
#&gt; </span><span style='color: #949494;font-style: italic;'>&lt;chr&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;int&gt;</span><span> </span><span style='color: #949494;font-style: italic;'>&lt;dbl&gt;</span><span>
#&gt; </span><span style='color: #BCBCBC;'> 1</span><span> 2002 13 </span><span style='color: #BB0000;'>NA</span><span>
#&gt; </span><span style='color: #BCBCBC;'> 2</span><span> 2003 14 </span><span style='color: #BB0000;'>NA</span><span>
#&gt; </span><span style='color: #BCBCBC;'> 3</span><span> 2004 13 </span><span style='color: #BB0000;'>NA</span><span>
#&gt; </span><span style='color: #BCBCBC;'> 4</span><span> 2005 15 </span><span style='color: #BB0000;'>NA</span><span>
#&gt; </span><span style='color: #BCBCBC;'> 5</span><span> 2006 16 </span><span style='color: #BB0000;'>NA</span><span>
#&gt; </span><span style='color: #BCBCBC;'> 6</span><span> 2007 17 </span><span style='color: #BB0000;'>NA</span><span>
#&gt; </span><span style='color: #BCBCBC;'> 7</span><span> 2008 17 </span><span style='color: #BB0000;'>NA</span><span>
#&gt; </span><span style='color: #BCBCBC;'> 8</span><span> 2009 18 </span><span style='color: #BB0000;'>NA</span><span>
#&gt; </span><span style='color: #BCBCBC;'> 9</span><span> 2010 13 </span><span style='color: #BB0000;'>NA</span><span>
#&gt; </span><span style='color: #BCBCBC;'>10</span><span> 2011 21 0.095</span><span style='text-decoration: underline;'>2</span><span>
#&gt; </span><span style='color: #BCBCBC;'>11</span><span> 2012 10 </span><span style='color: #BB0000;'>NA</span><span>
#&gt; </span><span style='color: #BCBCBC;'>12</span><span> 2013 13 </span><span style='color: #BB0000;'>NA</span><span>
#&gt; </span><span style='color: #BCBCBC;'>13</span><span> 2014 20 0.2
#&gt; </span><span style='color: #BCBCBC;'>14</span><span> 2015 14 </span><span style='color: #BB0000;'>NA</span><span>
#&gt; </span><span style='color: #BCBCBC;'>15</span><span> 2016 21 0.190
#&gt; </span><span style='color: #BCBCBC;'>16</span><span> 2017 20 0.4 </div></span></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#format">Format</a></li>
<li><a href="#examples">Examples</a></li>
</ul>
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
</ul>
</div>
</div>

View File

@@ -50,7 +50,7 @@
<meta property="og:description" content="Skewness is a measure of the asymmetry of the probability distribution of a real-valued random variable about its mean.
When negative: the left tail is longer; the mass of the distribution is concentrated on the right of the figure. When positive: the right tail is longer; the mass of the distribution is concentrated on the left of the figure." />
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@@ -81,7 +81,7 @@ When negative: the left tail is longer; the mass of the distribution is concentr
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
</span>
</div>
@@ -94,12 +94,65 @@ When negative: the left tail is longer; the mass of the distribution is concentr
Home
</a>
</li>
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-question-circle"></span>
Get Started
How to
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
Conduct AMR analysis
</a>
</li>
<li>
<a href="../articles/Predict.html">
<span class="fa fa-dice"></span>
Predict antimicrobial resistance
</a>
</li>
<li>
<a href="../articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span>
Apply EUCAST rules
</a>
</li>
<li>
<a href="../articles/mo_property.html">
<span class="fa fa-bug"></span>
Get properties of a microorganism
</a>
</li>
<li>
<a href="../articles/ab_property.html">
<span class="fa fa-capsules"></span>
Get properties of an antibiotic
</a>
</li>
<li>
<a href="../articles/freq.html">
<span class="fa fa-sort-amount-down"></span>
Create frequency tables
</a>
</li>
<li>
<a href="../articles/G_test.html">
<span class="fa fa-clipboard-check"></span>
Use the G-test
</a>
</li>
</ul>
</li>
<li>
<a href="../reference/">
@@ -122,17 +175,17 @@ When negative: the left tail is longer; the mass of the distribution is concentr
Changelog
</a>
</li>
<li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://gitlab.com/msberends/AMR">
<span class="fab fa fab fa-gitlab"></span>
Source Code
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<li>
<a href="../LICENSE-text.html">
<span class="fa fa-book"></span>
@@ -193,6 +246,12 @@ When negative: the left tail is longer; the mass of the distribution is concentr
</tr>
</table>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p><code><a href='kurtosis.html'>kurtosis</a></code></p></div>
@@ -204,6 +263,8 @@ When negative: the left tail is longer; the mass of the distribution is concentr
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
<li><a href="#see-also">See also</a></li>
</ul>

View File

@@ -49,7 +49,7 @@
<meta property="og:description" content="These data.tables are transformed from the microorganisms and microorganisms data sets to improve speed of as.mo. They are meant for internal use only, and are only mentioned here for reference." />
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" />
@@ -80,7 +80,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
</span>
</div>
@@ -93,12 +93,65 @@
Home
</a>
</li>
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-question-circle"></span>
Get Started
How to
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
Conduct AMR analysis
</a>
</li>
<li>
<a href="../articles/Predict.html">
<span class="fa fa-dice"></span>
Predict antimicrobial resistance
</a>
</li>
<li>
<a href="../articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span>
Apply EUCAST rules
</a>
</li>
<li>
<a href="../articles/mo_property.html">
<span class="fa fa-bug"></span>
Get properties of a microorganism
</a>
</li>
<li>
<a href="../articles/ab_property.html">
<span class="fa fa-capsules"></span>
Get properties of an antibiotic
</a>
</li>
<li>
<a href="../articles/freq.html">
<span class="fa fa-sort-amount-down"></span>
Create frequency tables
</a>
</li>
<li>
<a href="../articles/G_test.html">
<span class="fa fa-clipboard-check"></span>
Use the G-test
</a>
</li>
</ul>
</li>
<li>
<a href="../reference/">
@@ -121,17 +174,17 @@
Changelog
</a>
</li>
<li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://gitlab.com/msberends/AMR">
<span class="fab fa fab fa-gitlab"></span>
Source Code
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<li>
<a href="../LICENSE-text.html">
<span class="fa fa-book"></span>
@@ -179,6 +232,12 @@
<p>An object of class <code>data.table</code> (inherits from <code>data.frame</code>) with 18833 rows and 15 columns.</p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
@@ -186,6 +245,8 @@
<ul class="nav nav-pills nav-stacked">
<li><a href="#format">Format</a></li>
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
</ul>
</div>