mirror of
https://github.com/msberends/AMR.git
synced 2025-07-08 10:31:53 +02:00
(v1.3.0.9009) documentation update
This commit is contained in:
@ -49,7 +49,7 @@
|
||||
<script src="../extra.js"></script>
|
||||
|
||||
<meta property="og:title" content="Antibiotic class selectors — antibiotic_class_selectors" />
|
||||
<meta property="og:description" content="Use these selection helpers inside any function that allows Tidyverse selections, like dplyr::select() or tidyr::pivot_longer(). They help to select the columns of antibiotics that are of a specific antibiotic class, without the need to define the columns or antibiotic abbreviations." />
|
||||
<meta property="og:description" content="Use these selection helpers inside any function that allows Tidyverse selection helpers, like dplyr::select() or tidyr::pivot_longer(). They help to select the columns of antibiotics that are of a specific antibiotic class, without the need to define the columns or antibiotic abbreviations." />
|
||||
<meta property="og:image" content="https://msberends.github.io/AMR/logo.svg" />
|
||||
|
||||
|
||||
@ -82,7 +82,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="Latest development version">1.3.0.9007</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.3.0.9009</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -239,7 +239,7 @@
|
||||
</div>
|
||||
|
||||
<div class="ref-description">
|
||||
<p>Use these selection helpers inside any function that allows <a href='https://tidyselect.r-lib.org/reference/language.html'>Tidyverse selections</a>, like <code><a href='https://dplyr.tidyverse.org/reference/select.html'>dplyr::select()</a></code> or <code><a href='https://tidyr.tidyverse.org/reference/pivot_longer.html'>tidyr::pivot_longer()</a></code>. They help to select the columns of antibiotics that are of a specific antibiotic class, without the need to define the columns or antibiotic abbreviations.</p>
|
||||
<p>Use these selection helpers inside any function that allows <a href='https://tidyselect.r-lib.org/reference/language.html'>Tidyverse selection helpers</a>, like <code><a href='https://dplyr.tidyverse.org/reference/select.html'>dplyr::select()</a></code> or <code><a href='https://tidyr.tidyverse.org/reference/pivot_longer.html'>tidyr::pivot_longer()</a></code>. They help to select the columns of antibiotics that are of a specific antibiotic class, without the need to define the columns or antibiotic abbreviations.</p>
|
||||
</div>
|
||||
|
||||
<pre class="usage"><span class='fu'>ab_class</span>(<span class='kw'>ab_class</span>)
|
||||
@ -281,8 +281,13 @@
|
||||
|
||||
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
|
||||
|
||||
<p>All columns will be searched for known antibiotic names, abbreviations, brand names and codes (ATC, EARS-Net, WHO, etc.). This means that a selector like e.g. <code>aminoglycosides()</code> will pick up column names like 'gen', 'genta', 'J01GB03', 'tobra', 'Tobracin', etc.</p>
|
||||
<p>These functions only work if the <code>tidyselect</code> package is installed, that comes with the <code>dplyr</code> package. An error will be thrown if <code>tidyselect</code> package is not installed, or if the functions are used outside a function that allows Tidyverse selections like <code><a href='https://dplyr.tidyverse.org/reference/select.html'>select()</a></code> or <code>pivot_longer()</code>.</p>
|
||||
<p>All columns will be searched for known antibiotic names, abbreviations, brand names and codes (ATC, EARS-Net, WHO, etc.) in the <a href='antibiotics.html'>antibiotics</a> data set. This means that a selector like e.g. <code>aminoglycosides()</code> will pick up column names like 'gen', 'genta', 'J01GB03', 'tobra', 'Tobracin', etc.</p>
|
||||
<p><strong>N.B. These functions only work if the <code>tidyselect</code> package is installed</strong>, that comes with the <code>dplyr</code> package. An error will be thrown if the <code>tidyselect</code> package is not installed, or if the functions are used outside a function that allows Tidyverse selections like <code><a href='https://dplyr.tidyverse.org/reference/select.html'>select()</a></code> or <code>pivot_longer()</code>.</p>
|
||||
<h2 class="hasAnchor" id="reference-data-publicly-available"><a class="anchor" href="#reference-data-publicly-available"></a>Reference data publicly available</h2>
|
||||
|
||||
|
||||
|
||||
<p>All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this <code>AMR</code> package are publicly and freely available. We continually export our data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also supply flat files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please find <a href='https://msberends.github.io/AMR/articles/datasets.html'>all download links on our website</a>, which is automatically updated with every code change.</p>
|
||||
<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>
|
||||
|
||||
|
||||
@ -319,7 +324,7 @@
|
||||
|
||||
<span class='fu'><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></span>(irrelevant = <span class='st'>"value"</span>,
|
||||
J01CA01 = <span class='st'>"S"</span>) <span class='op'>%>%</span> <span class='co'># ATC code of ampicillin</span>
|
||||
<span class='fu'><a href='https://dplyr.tidyverse.org/reference/select.html'>select</a></span>(<span class='fu'>penicillins</span>()) <span class='co'># so the 'J01CA01' column is selected</span>
|
||||
<span class='fu'><a href='https://dplyr.tidyverse.org/reference/select.html'>select</a></span>(<span class='fu'>penicillins</span>()) <span class='co'># the 'J01CA01' column will be selected</span>
|
||||
|
||||
}</pre>
|
||||
</div>
|
||||
|
@ -82,7 +82,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="Latest development version">1.3.0.9006</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.3.0.9009</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -353,7 +353,7 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
|
||||
FUN = <span class='kw'>mo_gramstain</span>)
|
||||
|
||||
<span class='kw'>x</span> <span class='op'><-</span> <span class='fu'>bug_drug_combinations</span>(<span class='kw'>example_isolates</span>,
|
||||
FUN = <span class='fu'>function</span>(<span class='kw'>x</span>) <span class='fu'><a href='https://rdrr.io/r/base/ifelse.html'>ifelse</a></span>(<span class='kw'>x</span> <span class='op'>==</span> <span class='st'>"B_ESCHR_COLI"</span>,
|
||||
FUN = <span class='fu'>function</span>(<span class='kw'>x</span>) <span class='fu'><a href='https://rdrr.io/r/base/ifelse.html'>ifelse</a></span>(<span class='kw'>x</span> <span class='op'>==</span> <span class='fu'><a href='as.mo.html'>as.mo</a></span>(<span class='st'>"E. coli"</span>),
|
||||
<span class='st'>"E. coli"</span>,
|
||||
<span class='st'>"Others"</span>))
|
||||
<span class='co'># }</span></pre>
|
||||
|
@ -81,7 +81,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="Latest development version">1.3.0.9008</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.3.0.9009</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
Reference in New Issue
Block a user