mirror of
https://github.com/msberends/AMR.git
synced 2025-07-23 21:43:15 +02:00
(v1.7.1.9022) rely on vctrs for ab selectors
This commit is contained in:
@ -56,6 +56,8 @@ This is the fastest way to have your organisation (or analysis) specific codes p
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- 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>
|
||||
@ -67,9 +69,15 @@ This is the fastest way to have your organisation (or analysis) specific codes p
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body data-spy="scroll" data-target="#toc">
|
||||
|
||||
|
||||
<div class="container template-reference-topic">
|
||||
<header>
|
||||
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
|
||||
@ -83,7 +91,7 @@ This is the fastest way to have your organisation (or analysis) specific codes p
|
||||
</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.7.1</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9022</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -91,14 +99,14 @@ This is the fastest way to have your organisation (or analysis) specific codes p
|
||||
<ul class="nav navbar-nav">
|
||||
<li>
|
||||
<a href="../index.html">
|
||||
<span class="fas fa-home"></span>
|
||||
<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="fas fa-question-circle"></span>
|
||||
<span class="fa fa-question-circle"></span>
|
||||
|
||||
How to
|
||||
|
||||
@ -107,77 +115,77 @@ This is the fastest way to have your organisation (or analysis) specific codes p
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="../articles/AMR.html">
|
||||
<span class="fas fa-directions"></span>
|
||||
<span class="fa fa-directions"></span>
|
||||
|
||||
Conduct AMR analysis
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/resistance_predict.html">
|
||||
<span class="fas fa-dice"></span>
|
||||
<span class="fa fa-dice"></span>
|
||||
|
||||
Predict antimicrobial resistance
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/datasets.html">
|
||||
<span class="fas fa-database"></span>
|
||||
<span class="fa fa-database"></span>
|
||||
|
||||
Data sets for download / own use
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/PCA.html">
|
||||
<span class="fas fa-compress"></span>
|
||||
<span class="fa fa-compress"></span>
|
||||
|
||||
Conduct principal component analysis for AMR
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/MDR.html">
|
||||
<span class="fas fa-skull-crossbones"></span>
|
||||
<span class="fa fa-skull-crossbones"></span>
|
||||
|
||||
Determine multi-drug resistance (MDR)
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/WHONET.html">
|
||||
<span class="fas fa-globe-americas"></span>
|
||||
<span class="fa fa-globe-americas"></span>
|
||||
|
||||
Work with WHONET data
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/SPSS.html">
|
||||
<span class="fas fa-file-upload"></span>
|
||||
<span class="fa fa-file-upload"></span>
|
||||
|
||||
Import data from SPSS/SAS/Stata
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/EUCAST.html">
|
||||
<span class="fas fa-exchange-alt"></span>
|
||||
<span class="fa fa-exchange-alt"></span>
|
||||
|
||||
Apply EUCAST rules
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../reference/mo_property.html">
|
||||
<span class="fas fa-bug"></span>
|
||||
<span class="fa fa-bug"></span>
|
||||
|
||||
Get properties of a microorganism
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../reference/ab_property.html">
|
||||
<span class="fas fa-capsules"></span>
|
||||
<span class="fa fa-capsules"></span>
|
||||
|
||||
Get properties of an antibiotic
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/benchmarks.html">
|
||||
<span class="fas fa-shipping-fast"></span>
|
||||
<span class="fa fa-shipping-fast"></span>
|
||||
|
||||
Other: benchmarks
|
||||
</a>
|
||||
@ -186,14 +194,14 @@ This is the fastest way to have your organisation (or analysis) specific codes p
|
||||
</li>
|
||||
<li>
|
||||
<a href="../reference/index.html">
|
||||
<span class="fas fa-book-open"></span>
|
||||
<span class="fa fa-book-open"></span>
|
||||
|
||||
Manual
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../authors.html">
|
||||
<span class="fas fa-users"></span>
|
||||
<span class="fa fa-users"></span>
|
||||
|
||||
Authors
|
||||
</a>
|
||||
@ -216,7 +224,7 @@ This is the fastest way to have your organisation (or analysis) specific codes p
|
||||
</li>
|
||||
<li>
|
||||
<a href="../survey.html">
|
||||
<span class="fas fa-clipboard-list"></span>
|
||||
<span class="fa fa-clipboard-list"></span>
|
||||
|
||||
Survey
|
||||
</a>
|
||||
@ -244,12 +252,12 @@ This is the fastest way to have your organisation (or analysis) specific codes p
|
||||
<p>This is <strong>the fastest way</strong> to have your organisation (or analysis) specific codes picked up and translated by this package, since you don't have to bother about it again after setting it up once.</p>
|
||||
</div>
|
||||
|
||||
<pre class="usage"><span class='fu'>set_mo_source</span><span class='op'>(</span>
|
||||
<div class="ref-usage sourceCode"><pre class='sourceCode r'><code><span class='fu'>set_mo_source</span><span class='op'>(</span>
|
||||
<span class='va'>path</span>,
|
||||
destination <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/options.html'>getOption</a></span><span class='op'>(</span><span class='st'>"AMR_mo_source"</span>, <span class='st'>"~/mo_source.rds"</span><span class='op'>)</span>
|
||||
<span class='op'>)</span>
|
||||
|
||||
<span class='fu'>get_mo_source</span><span class='op'>(</span>destination <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/options.html'>getOption</a></span><span class='op'>(</span><span class='st'>"AMR_mo_source"</span>, <span class='st'>"~/mo_source.rds"</span><span class='op'>)</span><span class='op'>)</span></pre>
|
||||
<span class='fu'>get_mo_source</span><span class='op'>(</span>destination <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/options.html'>getOption</a></span><span class='op'>(</span><span class='st'>"AMR_mo_source"</span>, <span class='st'>"~/mo_source.rds"</span><span class='op'>)</span><span class='op'>)</span></code></pre></div>
|
||||
|
||||
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
|
||||
<table class="ref-arguments">
|
||||
@ -276,22 +284,22 @@ This is the fastest way to have your organisation (or analysis) specific codes p
|
||||
|
||||
|
||||
|
||||
<p>Imagine this data on a sheet of an Excel file (mo codes were looked up in the <a href='microorganisms.html'>microorganisms</a> data set). The first column contains the organisation specific codes, the second column contains an MO code from this package:</p><pre> | A | B |
|
||||
<p>Imagine this data on a sheet of an Excel file (mo codes were looked up in the <a href='microorganisms.html'>microorganisms</a> data set). The first column contains the organisation specific codes, the second column contains an MO code from this package:</p><pre><code> | A | B |
|
||||
--|--------------------|--------------|
|
||||
1 | Organisation XYZ | mo |
|
||||
2 | lab_mo_ecoli | B_ESCHR_COLI |
|
||||
3 | lab_mo_kpneumoniae | B_KLBSL_PNMN |
|
||||
4 | | |
|
||||
</pre>
|
||||
</code></pre>
|
||||
|
||||
<p>We save it as <code>"home/me/ourcodes.xlsx"</code>. Now we have to set it as a source:</p><pre><span class='fu'>set_mo_source</span><span class='op'>(</span><span class='st'>"home/me/ourcodes.xlsx"</span><span class='op'>)</span>
|
||||
<p>We save it as <code>"home/me/ourcodes.xlsx"</code>. Now we have to set it as a source:</p><pre class='sourceCode r'><code><span class='fu'>set_mo_source</span><span class='op'>(</span><span class='st'>"home/me/ourcodes.xlsx"</span><span class='op'>)</span>
|
||||
<span class='co'>#> NOTE: Created mo_source file '/Users/me/mo_source.rds' (0.3 kB) from</span>
|
||||
<span class='co'>#> '/Users/me/Documents/ourcodes.xlsx' (9 kB), columns </span>
|
||||
<span class='co'>#> "Organisation XYZ" and "mo"</span>
|
||||
</pre>
|
||||
</code></pre>
|
||||
|
||||
<p>It has now created a file <code>"~/mo_source.rds"</code> with the contents of our Excel file. Only the first column with foreign values and the 'mo' column will be kept when creating the RDS file.</p>
|
||||
<p>And now we can use it in our functions:</p><pre><span class='fu'><a href='as.mo.html'>as.mo</a></span><span class='op'>(</span><span class='st'>"lab_mo_ecoli"</span><span class='op'>)</span>
|
||||
<p>And now we can use it in our functions:</p><pre class='sourceCode r'><code><span class='fu'><a href='as.mo.html'>as.mo</a></span><span class='op'>(</span><span class='st'>"lab_mo_ecoli"</span><span class='op'>)</span>
|
||||
<span class='co'>#> Class <mo></span>
|
||||
<span class='co'>#> [1] B_ESCHR_COLI</span>
|
||||
|
||||
@ -304,18 +312,18 @@ This is the fastest way to have your organisation (or analysis) specific codes p
|
||||
<span class='co'>#> Use mo_uncertainties() to review it.</span>
|
||||
<span class='co'>#> Class <mo></span>
|
||||
<span class='co'>#> [1] B_ESCHR_COLI B_ESCHR_COLI B_ESCHR_COLI</span>
|
||||
</pre>
|
||||
</code></pre>
|
||||
|
||||
<p>If we edit the Excel file by, let's say, adding row 4 like this:</p><pre> | A | B |
|
||||
<p>If we edit the Excel file by, let's say, adding row 4 like this:</p><pre><code> | A | B |
|
||||
--|--------------------|--------------|
|
||||
1 | Organisation XYZ | mo |
|
||||
2 | lab_mo_ecoli | B_ESCHR_COLI |
|
||||
3 | lab_mo_kpneumoniae | B_KLBSL_PNMN |
|
||||
4 | lab_Staph_aureus | B_STPHY_AURS |
|
||||
5 | | |
|
||||
</pre>
|
||||
</code></pre>
|
||||
|
||||
<p>...any new usage of an MO function in this package will update your data file:</p><pre><span class='fu'><a href='as.mo.html'>as.mo</a></span><span class='op'>(</span><span class='st'>"lab_mo_ecoli"</span><span class='op'>)</span>
|
||||
<p>...any new usage of an MO function in this package will update your data file:</p><pre class='sourceCode r'><code><span class='fu'><a href='as.mo.html'>as.mo</a></span><span class='op'>(</span><span class='st'>"lab_mo_ecoli"</span><span class='op'>)</span>
|
||||
<span class='co'>#> NOTE: Updated mo_source file '/Users/me/mo_source.rds' (0.3 kB) from </span>
|
||||
<span class='co'>#> '/Users/me/Documents/ourcodes.xlsx' (9 kB), columns</span>
|
||||
<span class='co'>#> "Organisation XYZ" and "mo"</span>
|
||||
@ -324,11 +332,11 @@ This is the fastest way to have your organisation (or analysis) specific codes p
|
||||
|
||||
<span class='fu'><a href='mo_property.html'>mo_genus</a></span><span class='op'>(</span><span class='st'>"lab_Staph_aureus"</span><span class='op'>)</span>
|
||||
<span class='co'>#> [1] "Staphylococcus"</span>
|
||||
</pre>
|
||||
</code></pre>
|
||||
|
||||
<p>To delete the reference data file, just use <code>""</code>, <code>NULL</code> or <code>FALSE</code> as input for <code>set_mo_source()</code>:</p><pre><span class='fu'>set_mo_source</span><span class='op'>(</span><span class='cn'>NULL</span><span class='op'>)</span>
|
||||
<p>To delete the reference data file, just use <code>""</code>, <code>NULL</code> or <code>FALSE</code> as input for <code>set_mo_source()</code>:</p><pre class='sourceCode r'><code><span class='fu'>set_mo_source</span><span class='op'>(</span><span class='cn'>NULL</span><span class='op'>)</span>
|
||||
<span class='co'>#> Removed mo_source file '/Users/me/mo_source.rds'</span>
|
||||
</pre>
|
||||
</code></pre>
|
||||
|
||||
<p>If the original file (in the previous case an Excel file) is moved or deleted, the <code>mo_source.rds</code> file will be removed upon the next use of <code><a href='as.mo.html'>as.mo()</a></code> or any <code><a href='mo_property.html'>mo_*</a></code> function.</p>
|
||||
<h2 class="hasAnchor" id="stable-lifecycle"><a class="anchor" href="#stable-lifecycle"></a>Stable Lifecycle</h2>
|
||||
@ -355,11 +363,11 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
|
||||
|
||||
<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/a.w.friedrich/'>Alexander W. Friedrich</a>, <a href='https://www.rug.nl/staff/b.sinha/'>Bhanu N. M. Sinha</a>, <a href='https://www.rug.nl/staff/c.j.albers/'>Casper J. Albers</a>, <a href='https://www.rug.nl/staff/c.glasner/'>Corinna Glasner</a>.</p>
|
||||
<p><p>Developed by <a href="https://www.rug.nl/staff/m.s.berends/" class="external-link">Matthijs S. Berends</a>, <a href="https://www.rug.nl/staff/c.f.luz/" class="external-link">Christian F. Luz</a>, <a href="https://www.rug.nl/staff/a.w.friedrich/" class="external-link">Alexander W. Friedrich</a>, <a href="https://www.rug.nl/staff/b.sinha/" class="external-link">Bhanu N. M. Sinha</a>, <a href="https://www.rug.nl/staff/c.j.albers/" class="external-link">Casper J. Albers</a>, <a href="https://www.rug.nl/staff/c.glasner/" class="external-link">Corinna Glasner</a>.</p></p>
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p>
|
||||
<p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 1.6.1.9001.</p></p>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
@ -368,6 +376,8 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
Reference in New Issue
Block a user