<p>In the table above, all measurements are shown in milliseconds (thousands of seconds). A value of 5 milliseconds means it can determine 200 input values per second. It case of 100 milliseconds, this is only 10 input values per second. The second input is the only one that has to be looked up thoroughly. All the others are known codes (the first one is a WHONET code) or common laboratory codes, or common full organism names like the last one. Full organism names are always preferred.</p>
<p>To achieve this speed, the <code>as.mo</code> function also takes into account the prevalence of human pathogenic microorganisms. The downside is of course that less prevalent microorganisms will be determined less fast. See this example for the ID of <em>Thermus islandicus</em> (<code>B_THERMS_ISL</code>), a bug probably never found before in humans:</p>
<p>That takes 9.4 times as much time on average. A value of 100 milliseconds means it can only determine ~10 different input values per second. We can conclude that looking up arbitrary codes of less prevalent microorganisms is the worst way to go, in terms of calculation performance. Full names (like <em>Thermus islandicus</em>) are almost fast - these are the most probable input from most data sets.</p>
<p>That takes 8.8 times as much time on average. A value of 100 milliseconds means it can only determine ~10 different input values per second. We can conclude that looking up arbitrary codes of less prevalent microorganisms is the worst way to go, in terms of calculation performance. Full names (like <em>Thermus islandicus</em>) are almost fast - these are the most probable input from most data sets.</p>
<p>In the figure below, we compare <em>Escherichia coli</em> (which is very common) with <em>Prevotella brevis</em> (which is moderately common) and with <em>Thermus islandicus</em> (which is very uncommon):</p>
<divclass="sourceCode"id="cb4"><preclass="sourceCode r"><codeclass="sourceCode r"><aclass="sourceLine"id="cb4-1"data-line-number="1"><spanclass="kw"><ahref="https://www.rdocumentation.org/packages/graphics/topics/par">par</a></span>(<spanclass="dt">mar =</span><spanclass="kw"><ahref="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<spanclass="dv">5</span>, <spanclass="dv">16</span>, <spanclass="dv">4</span>, <spanclass="dv">2</span>)) <spanclass="co"># set more space for left margin text (16)</span></a>
<p>Repetitive results are unique values that are present more than once. Unique values will only be calculated once by <code><ahref="../reference/as.mo.html">as.mo()</a></code>. We will use <code><ahref="../reference/mo_property.html">mo_fullname()</a></code> for this test - a helper function that returns the full microbial name (genus, species and possibly subspecies) which uses <code><ahref="../reference/as.mo.html">as.mo()</a></code> internally.</p>
<p>Repetitive results are unique values that are present more than once. Unique values will only be calculated once by <code><ahref="../reference/as.mo.html">as.mo()</a></code>. We will use <code><ahref="../reference/mo_property.html">mo_name()</a></code> for this test - a helper function that returns the full microbial name (genus, species and possibly subspecies) which uses <code><ahref="../reference/as.mo.html">as.mo()</a></code> internally.</p>
<p>What about precalculated results? If the input is an already precalculated result of a helper function like <code><ahref="../reference/mo_property.html">mo_fullname()</a></code>, it almost doesn’t take any time at all (see ‘C’ below):</p>
<p>What about precalculated results? If the input is an already precalculated result of a helper function like <code><ahref="../reference/mo_property.html">mo_name()</a></code>, it almost doesn’t take any time at all (see ‘C’ below):</p>
<aclass="sourceLine"id="cb6-7"data-line-number="7"><spanclass="co"># expr min lq mean median uq max neval</span></a>
<aclass="sourceLine"id="cb6-8"data-line-number="8"><spanclass="co"># A 6.440 6.65 6.880 6.840 7.15 7.48 10</span></a>
<aclass="sourceLine"id="cb6-9"data-line-number="9"><spanclass="co"># B 22.400 22.90 26.200 23.600 25.20 44.00 10</span></a>
<aclass="sourceLine"id="cb6-10"data-line-number="10"><spanclass="co"># C 0.762 0.81 0.848 0.818 0.87 1.10 10</span></a></code></pre></div>
<p>So going from <code><ahref="../reference/mo_property.html">mo_fullname("Staphylococcus aureus")</a></code> to <code>"Staphylococcus aureus"</code> takes 0.0008 seconds - it doesn’t even start calculating <em>if the result would be the same as the expected resulting value</em>. That goes for all helper functions:</p>
<aclass="sourceLine"id="cb6-7"data-line-number="7"><spanclass="co"># expr min lq mean median uq max neval</span></a>
<aclass="sourceLine"id="cb6-8"data-line-number="8"><spanclass="co"># A 6.290 6.730 7.170 7.010 7.760 8.09 10</span></a>
<aclass="sourceLine"id="cb6-9"data-line-number="9"><spanclass="co"># B 22.600 22.700 26.200 23.000 25.400 44.30 10</span></a>
<aclass="sourceLine"id="cb6-10"data-line-number="10"><spanclass="co"># C 0.798 0.806 0.874 0.844 0.891 1.05 10</span></a></code></pre></div>
<p>So going from <code><ahref="../reference/mo_property.html">mo_name("Staphylococcus aureus")</a></code> to <code>"Staphylococcus aureus"</code> takes 0.0008 seconds - it doesn’t even start calculating <em>if the result would be the same as the expected resulting value</em>. That goes for all helper functions:</p>
<aclass="sourceLine"id="cb7-12"data-line-number="12"><spanclass="co"># expr min lq mean median uq max neval</span></a>
<aclass="sourceLine"id="cb7-13"data-line-number="13"><spanclass="co"># A 0.437 0.456 0.499 0.482 0.560 0.607 10</span></a>
<aclass="sourceLine"id="cb7-14"data-line-number="14"><spanclass="co"># B 0.474 0.484 0.534 0.509 0.588 0.627 10</span></a>
<aclass="sourceLine"id="cb7-15"data-line-number="15"><spanclass="co"># C 0.621 0.712 0.799 0.812 0.829 1.020 10</span></a>
<aclass="sourceLine"id="cb7-16"data-line-number="16"><spanclass="co"># D 0.469 0.482 0.534 0.513 0.595 0.654 10</span></a>
<aclass="sourceLine"id="cb7-17"data-line-number="17"><spanclass="co"># E 0.415 0.434 0.493 0.459 0.557 0.678 10</span></a>
<aclass="sourceLine"id="cb7-18"data-line-number="18"><spanclass="co"># F 0.458 0.523 0.538 0.546 0.554 0.601 10</span></a>
<aclass="sourceLine"id="cb7-19"data-line-number="19"><spanclass="co"># G 0.416 0.438 0.484 0.450 0.563 0.621 10</span></a>
<aclass="sourceLine"id="cb7-20"data-line-number="20"><spanclass="co"># H 0.420 0.434 0.491 0.448 0.577 0.620 10</span></a></code></pre></div>
<aclass="sourceLine"id="cb7-13"data-line-number="13"><spanclass="co"># A 0.455 0.458 0.471 0.465 0.482 0.504 10</span></a>
<aclass="sourceLine"id="cb7-14"data-line-number="14"><spanclass="co"># B 0.480 0.482 0.497 0.491 0.497 0.554 10</span></a>
<aclass="sourceLine"id="cb7-15"data-line-number="15"><spanclass="co"># C 0.662 0.687 0.754 0.750 0.788 0.964 10</span></a>
<aclass="sourceLine"id="cb7-16"data-line-number="16"><spanclass="co"># D 0.484 0.484 0.496 0.488 0.501 0.544 10</span></a>
<aclass="sourceLine"id="cb7-17"data-line-number="17"><spanclass="co"># E 0.442 0.450 0.459 0.456 0.462 0.492 10</span></a>
<aclass="sourceLine"id="cb7-18"data-line-number="18"><spanclass="co"># F 0.440 0.447 0.456 0.452 0.463 0.486 10</span></a>
<aclass="sourceLine"id="cb7-19"data-line-number="19"><spanclass="co"># G 0.450 0.452 0.462 0.459 0.463 0.485 10</span></a>
<aclass="sourceLine"id="cb7-20"data-line-number="20"><spanclass="co"># H 0.455 0.461 0.467 0.467 0.471 0.492 10</span></a></code></pre></div>
<p>Of course, when running <code><ahref="../reference/mo_property.html">mo_phylum("Firmicutes")</a></code> the function has zero knowledge about the actual microorganism, namely <em>S. aureus</em>. But since the result would be <code>"Firmicutes"</code> too, there is no point in calculating the result. And because this package ‘knows’ all phyla of all known bacteria (according to the Catalogue of Life), it can just return the initial value immediately.</p>
<ahref="#results-in-other-languages"class="anchor"></a>Results in other languages</h3>
<p>When the system language is non-English and supported by this <code>AMR</code> package, some functions will have a translated result. This almost does’t take extra time:</p>
<divclass="sourceCode"id="cb8"><preclass="sourceCode r"><codeclass="sourceCode r"><aclass="sourceLine"id="cb8-1"data-line-number="1"><spanclass="kw"><ahref="../reference/mo_property.html">mo_fullname</a></span>(<spanclass="st">"CoNS"</span>, <spanclass="dt">language =</span><spanclass="st">"en"</span>) <spanclass="co"># or just mo_fullname("CoNS") on an English system</span></a>
<divclass="sourceCode"id="cb8"><preclass="sourceCode r"><codeclass="sourceCode r"><aclass="sourceLine"id="cb8-1"data-line-number="1"><spanclass="kw"><ahref="../reference/mo_property.html">mo_name</a></span>(<spanclass="st">"CoNS"</span>, <spanclass="dt">language =</span><spanclass="st">"en"</span>) <spanclass="co"># or just mo_name("CoNS") on an English system</span></a>
<aclass="sourceLine"id="cb8-4"data-line-number="4"><spanclass="kw"><ahref="../reference/mo_property.html">mo_fullname</a></span>(<spanclass="st">"CoNS"</span>, <spanclass="dt">language =</span><spanclass="st">"es"</span>) <spanclass="co"># or just mo_fullname("CoNS") on a Spanish system</span></a>
<aclass="sourceLine"id="cb8-4"data-line-number="4"><spanclass="kw"><ahref="../reference/mo_property.html">mo_name</a></span>(<spanclass="st">"CoNS"</span>, <spanclass="dt">language =</span><spanclass="st">"es"</span>) <spanclass="co"># or just mo_name("CoNS") on a Spanish system</span></a>
<aclass="sourceLine"id="cb8-7"data-line-number="7"><spanclass="kw"><ahref="../reference/mo_property.html">mo_fullname</a></span>(<spanclass="st">"CoNS"</span>, <spanclass="dt">language =</span><spanclass="st">"nl"</span>) <spanclass="co"># or just mo_fullname("CoNS") on a Dutch system</span></a>
<aclass="sourceLine"id="cb8-7"data-line-number="7"><spanclass="kw"><ahref="../reference/mo_property.html">mo_name</a></span>(<spanclass="st">"CoNS"</span>, <spanclass="dt">language =</span><spanclass="st">"nl"</span>) <spanclass="co"># or just mo_name("CoNS") on a Dutch system</span></a>
<spanclass="version label label-default"data-toggle="tooltip"data-placement="bottom"title="Latest development version">0.7.1.9034</span>
<spanclass="version label label-default"data-toggle="tooltip"data-placement="bottom"title="Latest development version">0.7.1.9035</span>
</span>
</div>
@ -302,7 +302,7 @@
<imgsrc="reference/figures/logo_who.png"height="75px"class="logo_img"><pclass="logo_txt">WHO Collaborating Centre for Drug Statistics Methodology</p>
</div>
<p>This package contains <strong>all ~450 antimicrobial drugs</strong> and their Anatomical Therapeutic Chemical (ATC) codes, ATC groups and Defined Daily Dose (DDD, oral and IV) from the World Health Organization Collaborating Centre for Drug Statistics Methodology (WHOCC, <ahref="https://www.whocc.no"class="uri">https://www.whocc.no</a>) and the <ahref="http://ec.europa.eu/health/documents/community-register/html/atc.htm">Pharmaceuticals Community Register of the European Commission</a>.</p>
<p><strong>NOTE: The WHOCC copyright does not allow use for commercial purposes, unlike any other info from this package. See \url{<ahref="https://www.whocc.no/copyright_disclaimer/"class="uri">https://www.whocc.no/copyright_disclaimer/</a>}.</strong></p>
<p><strong>NOTE: The WHOCC copyright does not allow use for commercial purposes, unlike any other info from this package. See <ahref="https://www.whocc.no/copyright_disclaimer/"class="uri">https://www.whocc.no/copyright_disclaimer/</a>.</strong></p>
<p>Read more about the data from WHOCC <ahref="./reference/WHOCC.html">in our manual</a>.</p>
<li>Function <code>freq()</code> has moved to a new package, <ahref="https://github.com/msberends/clean"><code>clean</code></a> (<ahref="https://cran.r-project.org/package=clean">CRAN link</a>). Creating frequency tables is actually not the scope of this package (never was) and this function has matured a lot over the last two years. Therefore, a new package was created for data cleaning and checking and it perfectly fits the <code>freq()</code> function. The <ahref="https://github.com/msberends/clean"><code>clean</code></a> package is available on CRAN and will be installed automatically when updating the <code>AMR</code> package, that now imports it. In a later stage, the <code><ahref="../reference/skewness.html">skewness()</a></code> and <code><ahref="../reference/kurtosis.html">kurtosis()</a></code> functions will be moved to the <code>clean</code> package too.</li>
<li>Determination of first isolates now <strong>excludes</strong> all ‘unknown’ microorganisms at default, i.e.microbial code <code>"UNKNOWN"</code>. They can be included with the new parameter <code>include_unknown</code>: <code>first_isolates(..., include_unknown = TRUE)</code>. For WHONET users, this means that all records with organism code <code>"con"</code> (<em>contamination</em>) will be excluded at default, since <code>as.mo("con") = "UNKNOWN"</code>.</li>
<li>
<p>Determination of first isolates now <strong>excludes</strong> all ‘unknown’ microorganisms at default, i.e.microbial code <code>"UNKNOWN"</code>. They can be included with the new parameter <code>include_unknown</code>:</p>
<p>For WHONET users, this means that all records with organism code <code>"con"</code> (<em>contamination</em>) will be excluded at default, since <code>as.mo("con") = "UNKNOWN"</code>. The function always shows a note with the number of ‘unknown’ microorganisms that were included or excluded.</p>
</li>
</ul>
</div>
<divid="new"class="section level3">
@ -243,29 +247,29 @@
<ul>
<li>
<p>Additional way to calculate co-resistance, i.e.when using multiple antibiotics as input for <code>portion_*</code> functions or <code>count_*</code> functions. This can be used to determine the empiric susceptibily of a combination therapy. A new parameter <code>only_all_tested</code> (<strong>which defaults to <code>FALSE</code></strong>) replaces the old <code>also_single_tested</code> and can be used to select one of the two methods to count isolates and calculate portions. The difference can be seen in this example table (which is also on the <code>portion</code> and <code>count</code> help pages), where the %SI is being determined:</p>
<p>Since this is a major change, usage of the old <code>also_single_tested</code> will throw an informative error that it has been replaced by <code>only_all_tested</code>.</p>
</li>
</ul>
@ -286,14 +290,14 @@
</li>
<li>
<p>Added tibble printing support for classes <code>rsi</code>, <code>mic</code>, <code>ab</code> and <code>mo</code>. When using tibbles containing antibiotic columns, values <code>S</code> will print in green, values <code>I</code> will print in yellow and values <code>R</code> will print in red:</p>
<divclass="sourceCode"id="cb2"><preclass="sourceCode r"><codeclass="sourceCode r"><aclass="sourceLine"id="cb2-1"data-line-number="1">(run this on your own console, as this page does not support colour printing)</a>
<divclass="sourceCode"id="cb3"><preclass="sourceCode r"><codeclass="sourceCode r"><aclass="sourceLine"id="cb3-1"data-line-number="1"><spanclass="co"># (run this on your own console, as this page does not support colour printing)</span></a>
<li>Removed class <code>atc</code> - using <code><ahref="../reference/AMR-deprecated.html">as.atc()</a></code> is now deprecated in favour of <code><ahref="../reference/ab_property.html">ab_atc()</a></code> and this will return a character, not the <code>atc</code> class anymore</li>
<li>Fix for using <code>mo_*</code> functions where the coercion uncertainties and failures would not be available through <code><ahref="../reference/as.mo.html">mo_uncertainties()</a></code> and <code><ahref="../reference/as.mo.html">mo_failures()</a></code> anymore</li>
<li>Deprecated the <code>country</code> parameter of <code><ahref="../reference/mdro.html">mdro()</a></code> in favour of the already existing <code>guideline</code> parameter to support multiple guidelines within one country</li>
<li>The <code>name</code> of <code>RIF</code> is now Rifampicin instead of Rifampin</li>
<li>The <code>antibiotics</code> data set is now sorted by name</li>
<li>The <code>antibiotics</code> data set is now sorted by name and all cephalosporines now have their generation between brackets</li>
<li><p>Speed improvement for <code><ahref="../reference/guess_ab_col.html">guess_ab_col()</a></code> which is now 30 times faster for antibiotic abbreviations</p></li>
</ul>
<divid="other"class="section level4">
@ -334,14 +338,14 @@
<ul>
<li>
<p>Function <code><ahref="../reference/portion.html">rsi_df()</a></code> to transform a <code>data.frame</code> to a data set containing only the microbial interpretation (S, I, R), the antibiotic, the percentage of S/I/R and the number of available isolates. This is a convenient combination of the existing functions <code><ahref="../reference/count.html">count_df()</a></code> and <code><ahref="../reference/portion.html">portion_df()</a></code> to immediately show resistance percentages and number of available isolates:</p>
<li>Function <code><ahref="../reference/mo_property.html">mo_info()</a></code> as an analogy to <code><ahref="../reference/ab_property.html">ab_info()</a></code>. The <code><ahref="../reference/mo_property.html">mo_info()</a></code> prints a list with the full taxonomy, authors, and the URL to the online database of a microorganism</li>
<li><p>Function <code><ahref="../reference/mo_property.html">mo_synonyms()</a></code> to get all previously accepted taxonomic names of a microorganism</p></li>
<p>The <code>antibiotics</code> data set will be searched, after which the input data will be checked for column names with a value in any abbreviations, codes or official names found in the <code>antibiotics</code> data set. For example:</p>
<aclass="sourceLine"id="cb7-4"data-line-number="4"><spanclass="co"># Filtering on glycopeptide antibacterials: all of `vanc` and `teic` is R</span></a></code></pre></div>
<aclass="sourceLine"id="cb8-4"data-line-number="4"><spanclass="co"># Filtering on glycopeptide antibacterials: all of `vanc` and `teic` is R</span></a></code></pre></div>
</li>
<li>
<p>All <code>ab_*</code> functions are deprecated and replaced by <code>atc_*</code> functions:</p>
These functions use <code><ahref="../reference/AMR-deprecated.html">as.atc()</a></code> internally. The old <code>atc_property</code> has been renamed <code><ahref="../reference/atc_online.html">atc_online_property()</a></code>. This is done for two reasons: firstly, not all ATC codes are of antibiotics (ab) but can also be of antivirals or antifungals. Secondly, the input must have class <code>atc</code> or must be coerable to this class. Properties of these classes should start with the same class name, analogous to <code><ahref="../reference/as.mo.html">as.mo()</a></code> and e.g. <code>mo_genus</code>.</li>
<li>New functions <code><ahref="../reference/mo_source.html">set_mo_source()</a></code> and <code><ahref="../reference/mo_source.html">get_mo_source()</a></code> to use your own predefined MO codes as input for <code><ahref="../reference/as.mo.html">as.mo()</a></code> and consequently all <code>mo_*</code> functions</li>
<li>Support for the upcoming <ahref="https://dplyr.tidyverse.org"><code>dplyr</code></a> version 0.8.0</li>
@ -592,20 +596,20 @@ These functions use <code><a href="../reference/AMR-deprecated.html">as.atc()</a
<li>New function <code><ahref="../reference/age_groups.html">age_groups()</a></code> to split ages into custom or predefined groups (like children or elderly). This allows for easier demographic antimicrobial resistance analysis per age group.</li>
<li>
<p>New function <code><ahref="../reference/resistance_predict.html">ggplot_rsi_predict()</a></code> as well as the base R <code><ahref="https://www.rdocumentation.org/packages/graphics/topics/plot">plot()</a></code> function can now be used for resistance prediction calculated with <code><ahref="../reference/resistance_predict.html">resistance_predict()</a></code>:</p>
<p>Functions <code><ahref="../reference/first_isolate.html">filter_first_isolate()</a></code> and <code><ahref="../reference/first_isolate.html">filter_first_weighted_isolate()</a></code> to shorten and fasten filtering on data sets with antimicrobial results, e.g.:</p>
<li>New function <code><ahref="../reference/availability.html">availability()</a></code> to check the number of available (non-empty) results in a <code>data.frame</code>
</li>
@ -634,33 +638,33 @@ These functions use <code><a href="../reference/AMR-deprecated.html">as.atc()</a
<ul>
<li>
<p>Now handles incorrect spelling, like <code>i</code> instead of <code>y</code> and <code>f</code> instead of <code>ph</code>:</p>
<p>Uncertainty of the algorithm is now divided into four levels, 0 to 3, where the default <code>allow_uncertain = TRUE</code> is equal to uncertainty level 2. Run <code><ahref="../reference/as.mo.html">?as.mo</a></code> for more info about these levels.</p>
Using <code><ahref="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a></code> could lead to very unreliable results.</li>
<li>Implemented the latest publication of Becker <em>et al.</em> (2019), for categorising coagulase-negative <em>Staphylococci</em>
</li>
<li>All microbial IDs that found are now saved to a local file <code>~/.Rhistory_mo</code>. Use the new function <code>clean_mo_history()</code> to delete this file, which resets the algorithms.</li>
<li>
<p>Incoercible results will now be considered ‘unknown’, MO code <code>UNKNOWN</code>. On foreign systems, properties of these will be translated to all languages already previously supported: German, Dutch, French, Italian, Spanish and Portuguese:</p>
<aclass="sourceLine"id="cb14-3"data-line-number="3"><spanclass="co"># one unique value (^= 100.0%) could not be coerced and is considered 'unknown': "qwerty". Use mo_failures() to review it.</span></a>
<aclass="sourceLine"id="cb15-3"data-line-number="3"><spanclass="co"># one unique value (^= 100.0%) could not be coerced and is considered 'unknown': "qwerty". Use mo_failures() to review it.</span></a>
<li>Fix for vector containing only empty values</li>
<li>Finds better results when input is in other languages</li>
@ -706,19 +710,19 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
<ul>
<li>
<p>Support for tidyverse quasiquotation! Now you can create frequency tables of function outcomes:</p>
<divclass="sourceCode"id="cb15"><preclass="sourceCode r"><codeclass="sourceCode r"><aclass="sourceLine"id="cb15-1"data-line-number="1"><spanclass="co"># Determine genus of microorganisms (mo) in `septic_patients` data set:</span></a>
<aclass="sourceLine"id="cb15-2"data-line-number="2"><spanclass="co"># OLD WAY</span></a>
<divclass="sourceCode"id="cb16"><preclass="sourceCode r"><codeclass="sourceCode r"><aclass="sourceLine"id="cb16-1"data-line-number="1"><spanclass="co"># Determine genus of microorganisms (mo) in `septic_patients` data set:</span></a>
<aclass="sourceLine"id="cb16-2"data-line-number="2"><spanclass="co"># OLD WAY</span></a>
<li>Added parameter <code>combine_IR</code> (TRUE/FALSE) to functions <code>portion_df</code> and <code>count_df</code>, to indicate that all values of I and R must be merged into one, so the output only consists of S vs.IR (susceptible vs.non-susceptible)</li>
<li>Fix for <code>portion_*(..., as_percent = TRUE)</code> when minimal number of isolates would not be met</li>
@ -809,15 +813,15 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
<aclass="sourceLine"id="cb18-3"data-line-number="3"><spanclass="st"></span><spanclass="kw">select</span>(<spanclass="op">-</span>count, <spanclass="op">-</span>cum_count) <spanclass="co"># only get item, percent, cum_percent</span></a></code></pre></div>
<aclass="sourceLine"id="cb19-3"data-line-number="3"><spanclass="st"></span><spanclass="kw">select</span>(<spanclass="op">-</span>count, <spanclass="op">-</span>cum_count) <spanclass="co"># only get item, percent, cum_percent</span></a></code></pre></div>
</li>
<li>Check for <code><ahref="https://www.rdocumentation.org/packages/hms/topics/Deprecated">hms::is.hms</a></code>
</li>
@ -897,18 +901,18 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
</li>
</ul>
<p>They also come with support for German, Dutch, French, Italian, Spanish and Portuguese:</p>
<li>Functions <code>count_R</code>, <code>count_IR</code>, <code>count_I</code>, <code>count_SI</code> and <code>count_S</code> to selectively count resistant or susceptible isolates
<ul>
@ -919,18 +923,18 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
</li>
<li>
<p>Functions <code>as.mo</code> and <code>is.mo</code> as replacements for <code>as.bactid</code> and <code>is.bactid</code> (since the <code>microoganisms</code> data set not only contains bacteria). These last two functions are deprecated and will be removed in a future release. The <code>as.mo</code> function determines microbial IDs using intelligent rules:</p>
<aclass="sourceLine"id="cb21-5"data-line-number="5"><spanclass="kw"><ahref="../reference/as.mo.html">as.mo</a></span>(<spanclass="st">"S group A"</span>)</a>
<aclass="sourceLine"id="cb22-5"data-line-number="5"><spanclass="kw"><ahref="../reference/as.mo.html">as.mo</a></span>(<spanclass="st">"S group A"</span>)</a>
<li>Added parameter <code>reference_df</code> for <code>as.mo</code>, so users can supply their own microbial IDs, name or codes as a reference table</li>
<li>Renamed all previous references to <code>bactid</code> to <code>mo</code>, like:
@ -958,12 +962,12 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
<li>Added three antimicrobial agents to the <code>antibiotics</code> data set: Terbinafine (D01BA02), Rifaximin (A07AA11) and Isoconazole (D01AC05)</li>
<li>
<p>Added 163 trade names to the <code>antibiotics</code> data set, it now contains 298 different trade names in total, e.g.:</p>
<li>For <code>first_isolate</code>, rows will be ignored when there’s no species available</li>
<li>Function <code>ratio</code> is now deprecated and will be removed in a future release, as it is not really the scope of this package</li>
@ -974,13 +978,13 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
</li>
<li>
<p>Support for quasiquotation in the functions series <code>count_*</code> and <code>portions_*</code>, and <code>n_rsi</code>. This allows to check for more than 2 vectors or columns.</p>
<li>Edited <code>ggplot_rsi</code> and <code>geom_rsi</code> so they can cope with <code>count_df</code>. The new <code>fun</code> parameter has value <code>portion_df</code> at default, but can be set to <code>count_df</code>.</li>
<li>Fix for <code>ggplot_rsi</code> when the <code>ggplot2</code> package was not loaded</li>
@ -994,12 +998,12 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
</li>
<li>
<p>Support for types (classes) list and matrix for <code>freq</code></p>
<p>Run <code><ahref='https://www.rdocumentation.org/packages/base/topics/unique'>unique(AMR::rsi_translation$guideline)</a></code> for a list of all supported guidelines.</p>
<p>After using <code>as.rsi</code>, you can use <code><ahref='eucast_rules.html'>eucast_rules</a></code> to (1) apply inferred susceptibility and resistance based on results of other antibiotics and (2) apply intrinsic resistance based on taxonomic properties of a microorganism.</p>
<p>After using <code>as.rsi</code>, you can use <code><ahref='eucast_rules.html'>eucast_rules</a></code> to (1) apply inferred susceptibility and resistance based on results of other antimicrobials and (2) apply intrinsic resistance based on taxonomic properties of a microorganism.</p>
<p>The function <code>is.rsi.eligible</code> returns <code>TRUE</code> when a columns contains at most 5% invalid antimicrobial interpretations (not S and/or I and/or R), and <code>FALSE</code> otherwise. The threshold of 5% can be set with the <code>threshold</code> parameter.</p>
<h2class="hasAnchor"id="interpretation-of-s-i-and-r"><aclass="anchor"href="#interpretation-of-s-i-and-r"></a>Interpretation of S, I and R</h2>
<p>Idea from the <ahref='https://github.com/Rdatatable/data.table/blob/master/R/like.R'><code>like</code> function from the <code>data.table</code> package</a>, but made it case insensitive at default and let it support multiple patterns.</p>
<p>Idea from the <ahref='https://github.com/Rdatatable/data.table/blob/master/R/like.R'><code>like</code> function from the <code>data.table</code> package</a>, but made it case insensitive at default and let it support multiple patterns. Also, if the regex fails the first time, it tries again with <code>perl = TRUE</code>.</p>
<spanclass="version label label-default"data-toggle="tooltip"data-placement="bottom"title="Latest development version">0.7.1.9029</span>
<spanclass="version label label-default"data-toggle="tooltip"data-placement="bottom"title="Latest development version">0.7.1.9035</span>
</span>
</div>
@ -230,7 +230,7 @@
<divclass="ref-description">
<p>For language-dependent output of AMR functions, like <code><ahref='mo_property.html'>mo_fullname</a></code>and<code><ahref='mo_property.html'>mo_type</a></code>.</p>
<p>For language-dependent output of AMR functions, like <code><ahref='mo_property.html'>mo_name</a></code>,<code><ahref='mo_property.html'>mo_type</a></code> and <code><ahref='ab_property.html'>ab_name</a></code>.</p>
<p>Strings will be translated to foreign languages if they are defined in a local translation file. Additions to this file can be suggested at our repository. The file can be found here: <ahref='https://gitlab.com/msberends/AMR/blob/master/data-raw/translations.tsv'>https://gitlab.com/msberends/AMR/blob/master/data-raw/translations.tsv</a>.</p>
<p>Currently supported languages can be found if running: <code><ahref='https://www.rdocumentation.org/packages/base/topics/unique'>unique(AMR:::translations_file$lang)</a></code>.</p>
<p>Please suggest your own translations <ahref='https://gitlab.com/msberends/AMR/issues/new?issue[title]=Translation%20suggestion'>by creating a new issue on our repository</a>.</p>
<p>This file will be read by all functions where a translated output can be desired, like all <code><ahref='mo_property.html'>mo_property</a></code> functions (<code><ahref='mo_property.html'>mo_fullname</a></code>, <code><ahref='mo_property.html'>mo_type</a></code>, etc.).</p>
<p>The system language will be used at default, if supported, using <code>get_locale</code>. The system language can be overwritten with <code><ahref='https://www.rdocumentation.org/packages/base/topics/options'>getOption</a>("AMR_locale")</code>.</p>
<p>The system language will be used at default, if that language is supported. The system language can be overwritten with <code><ahref='https://www.rdocumentation.org/packages/base/topics/options'>getOption</a>("AMR_locale")</code>.</p>
<h2class="hasAnchor"id="read-more-on-our-website-"><aclass="anchor"href="#read-more-on-our-website-"></a>Read more on our website!</h2>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.