1
0
mirror of https://github.com/msberends/AMR.git synced 2024-12-24 18:46:14 +01:00

(v1.7.1.9025) unit tests

This commit is contained in:
dr. M.S. (Matthijs) Berends 2021-08-18 23:19:38 +02:00
parent a44283f998
commit 1b62bab007
17 changed files with 191 additions and 302 deletions

View File

@ -1,6 +1,6 @@
Package: AMR
Version: 1.7.1.9024
Date: 2021-08-17
Version: 1.7.1.9025
Date: 2021-08-18
Title: Antimicrobial Resistance Data Analysis
Description: Functions to simplify and standardise antimicrobial resistance (AMR)
data analysis and to work with microbial and antimicrobial properties by

View File

@ -290,7 +290,6 @@ export(mo_year)
export(mrgn)
export(n_rsi)
export(oxazolidinones)
export(p_symbol)
export(pca)
export(penicillins)
export(polymyxins)

14
NEWS.md
View File

@ -1,8 +1,8 @@
# `AMR` 1.7.1.9024
## <small>Last updated: 17 August 2021</small>
# `AMR` 1.7.1.9025
## <small>Last updated: 18 August 2021</small>
### Breaking changes
* Removed all `filter_*()` functions (except for `filter_first_isolate()`), which were all deprecated in a previous package version
* Removed `p_symbol()` and all `filter_*()` functions (except for `filter_first_isolate()`), which were all deprecated in a previous package version
* Removed the `key_antibiotics()` and `key_antibiotics_equal()` functions, which were deprecated and superseded by `key_antimicrobials()` and `antimicrobials_equal()`
* Removed all previously implemented `ggplot2::ggplot()` generics for classes `<mic>`, `<disk>`, `<rsi>` and `<resistance_predict>` as they did not follow the `ggplot2` logic. They were replaced with `ggplot2::autoplot()` generics.
@ -18,10 +18,10 @@
* They now also work in R-3.0 and R-3.1, supporting every version of R since 2013
* Added more selectors for antibiotic classes: `aminopenicillins()`, `antifungals()`, `antimycobacterials()`, `lincosamides()`, `lipoglycopeptides()`, `polymyxins()`, `quinolones()`, `streptogramins()`, `trimethoprims()` and `ureidopenicillins()`
* Added specific selectors for certain types for treatment: `administrable_per_os()` and `administrable_iv()`, which are based on available Defined Daily Doses (DDDs), as defined by the WHOCC. These are ideal for e.g. analysing pathogens in primary care where IV treatment is not an option. They can be combined with other AB selectors, e.g. to select penicillins that are only administrable per os (i.e., orally):
```r
example_isolates[, penicillins() & administrable_per_os()] # base R
example_isolates %>% select(penicillins() & administrable_per_os()) # dplyr
```
```r
example_isolates[, penicillins() & administrable_per_os()] # base R
example_isolates %>% select(penicillins() & administrable_per_os()) # dplyr
```
* Fix for using selectors multiple times in one call (e.g., using them in `dplyr::filter()` and immediately after in `dplyr::select()`)
* Added argument `only_treatable`, which defaults to `TRUE` and will exclude drugs that are only for laboratory tests and not for treating patients (such as imipenem/EDTA and gentamicin-high)
* Fixed the Gram stain (`mo_gramstain()`) determination of the class Negativicutes within the phylum of Firmicutes - they were considered Gram-positives because of their phylum but are actually Gram-negative. This impacts 137 taxonomic species, genera and families, such as *Negativicoccus* and *Veillonella*.

View File

@ -26,23 +26,9 @@
#' Deprecated Functions
#'
#' These functions are so-called '[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 (if there is one).
#' @details All antibiotic class selectors (such as [carbapenems()], [aminoglycosides()]) can now be used for filtering as well, making all their accompanying `filter_*()` functions redundant (such as [filter_carbapenems()], [filter_aminoglycosides()]).
#' @inheritSection lifecycle Retired Lifecycle
#' @inheritSection AMR Read more on Our Website!
#' @keywords internal
#' @name AMR-deprecated
#' @export
p_symbol <- function(p, emptychar = " ") {
.Deprecated(package = "AMR", new = "cleaner::p_symbol")
p <- as.double(p)
s <- rep(NA_character_, length(p))
s[p <= 1] <- emptychar
s[p <= 0.100] <- "."
s[p <= 0.050] <- "*"
s[p <= 0.010] <- "**"
s[p <= 0.001] <- "***"
s
}
# @export
NULL

View File

@ -89,32 +89,11 @@ navbar:
- text: "Source Code"
icon: "fab fa-github"
href: "https://github.com/msberends/AMR"
- text: "Survey"
icon: "fa-clipboard-list"
href: "survey.html"
# - text: "Survey"
# icon: "fa-clipboard-list"
# href: "survey.html"
reference:
- title: "Background information on included data"
desc: >
Some pages about our package and its external sources. Be sure to read our [How To's](./../articles/index.html)
for more information about how to work with functions in this package.
contents:
- "`AMR`"
- "`example_isolates`"
- "`microorganisms`"
- "`microorganisms.codes`"
- "`microorganisms.old`"
- "`antibiotics`"
- "`intrinsic_resistant`"
- "`dosage`"
- "`catalogue_of_life`"
- "`catalogue_of_life_version`"
- "`WHOCC`"
- "`lifecycle`"
- "`example_isolates_unclean`"
- "`rsi_translation`"
- "`WHONET`"
- title: "Preparing data: microorganisms"
desc: >
These functions are meant to get taxonomically valid properties of microorganisms from any input.
@ -165,6 +144,27 @@ reference:
- "`antibiotic_class_selectors`"
- "`resistance_predict`"
- "`guess_ab_col`"
- title: "Background information on included data"
desc: >
Some pages about our package and its external sources. Be sure to read our [How To's](./../articles/index.html)
for more information about how to work with functions in this package.
contents:
- "`AMR`"
- "`example_isolates`"
- "`microorganisms`"
- "`microorganisms.codes`"
- "`microorganisms.old`"
- "`antibiotics`"
- "`intrinsic_resistant`"
- "`dosage`"
- "`catalogue_of_life`"
- "`catalogue_of_life_version`"
- "`WHOCC`"
- "`lifecycle`"
- "`example_isolates_unclean`"
- "`rsi_translation`"
- "`WHONET`"
- title: "Other: miscellaneous functions"
desc: >
@ -215,6 +215,7 @@ authors:
href: https://www.rug.nl/staff/c.glasner/
template:
bootstrap: 3
opengraph:
twitter:
creator: "@msberends"

Binary file not shown.

View File

@ -92,7 +92,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.7.1.9024</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9025</span>
</span>
</div>
@ -222,13 +222,6 @@
Source Code
</a>
</li>
<li>
<a href="survey.html">
<span class="fa fa-clipboard-list"></span>
Survey
</a>
</li>
</ul>

View File

@ -44,7 +44,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.7.1.9024</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9025</span>
</span>
</div>
@ -174,13 +174,6 @@
Source Code
</a>
</li>
<li>
<a href="../survey.html">
<span class="fa fa-clipboard-list"></span>
Survey
</a>
</li>
</ul>
</div>
@ -197,7 +190,7 @@
<div class="page-header toc-ignore">
<h1 data-toc-skip>Data sets for download / own use</h1>
<h4 data-toc-skip class="date">17 August 2021</h4>
<h4 data-toc-skip class="date">18 August 2021</h4>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/master/vignettes/datasets.Rmd" class="external-link"><code>vignettes/datasets.Rmd</code></a></small>
<div class="hidden name"><code>datasets.Rmd</code></div>

View File

@ -92,7 +92,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.7.1.9024</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9025</span>
</span>
</div>
@ -222,13 +222,6 @@
Source Code
</a>
</li>
<li>
<a href="survey.html">
<span class="fa fa-clipboard-list"></span>
Survey
</a>
</li>
</ul>

View File

@ -47,7 +47,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.7.1.9024</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9025</span>
</span>
</div>
@ -177,13 +177,6 @@
Source Code
</a>
</li>
<li>
<a href="survey.html">
<span class="fa fa-clipboard-list"></span>
Survey
</a>
</li>
</ul>
</div>

View File

@ -92,7 +92,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.7.1.9024</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9025</span>
</span>
</div>
@ -222,13 +222,6 @@
Source Code
</a>
</li>
<li>
<a href="../survey.html">
<span class="fa fa-clipboard-list"></span>
Survey
</a>
</li>
</ul>
@ -247,17 +240,17 @@
<small>Source: <a href='https://github.com/msberends/AMR/blob/master/NEWS.md'><code>NEWS.md</code></a></small>
</div>
<div id="amr-1719024" class="section level1">
<h1 class="page-header" data-toc-text="1.7.1.9024">
<a href="#amr-1719024" class="anchor" aria-hidden="true"></a><small> Unreleased </small><code>AMR</code> 1.7.1.9024</h1>
<div id="last-updated-17-august-2021" class="section level2">
<div id="amr-1719025" class="section level1">
<h1 class="page-header" data-toc-text="1.7.1.9025">
<a href="#amr-1719025" class="anchor" aria-hidden="true"></a><small> Unreleased </small><code>AMR</code> 1.7.1.9025</h1>
<div id="last-updated-18-august-2021" class="section level2">
<h2 class="hasAnchor">
<a href="#last-updated-17-august-2021" class="anchor" aria-hidden="true"></a><small>Last updated: 17 August 2021</small>
<a href="#last-updated-18-august-2021" class="anchor" aria-hidden="true"></a><small>Last updated: 18 August 2021</small>
</h2>
<div id="breaking-changes" class="section level3">
<h3 class="hasAnchor">
<a href="#breaking-changes" class="anchor" aria-hidden="true"></a>Breaking changes</h3>
<ul><li>Removed all <code>filter_*()</code> functions (except for <code><a href="../reference/first_isolate.html">filter_first_isolate()</a></code>), which were all deprecated in a previous package version</li>
<ul><li>Removed <code>p_symbol()</code> and all <code>filter_*()</code> functions (except for <code><a href="../reference/first_isolate.html">filter_first_isolate()</a></code>), which were all deprecated in a previous package version</li>
<li>Removed the <code>key_antibiotics()</code> and <code>key_antibiotics_equal()</code> functions, which were deprecated and superseded by <code><a href="../reference/key_antimicrobials.html">key_antimicrobials()</a></code> and <code><a href="../reference/key_antimicrobials.html">antimicrobials_equal()</a></code>
</li>
<li>Removed all previously implemented <code><a href="https://ggplot2.tidyverse.org/reference/ggplot.html" class="external-link">ggplot2::ggplot()</a></code> generics for classes <code>&lt;mic&gt;</code>, <code>&lt;disk&gt;</code>, <code>&lt;rsi&gt;</code> and <code>&lt;resistance_predict&gt;</code> as they did not follow the <code>ggplot2</code> logic. They were replaced with <code><a href="https://ggplot2.tidyverse.org/reference/autoplot.html" class="external-link">ggplot2::autoplot()</a></code> generics.</li>
@ -278,16 +271,17 @@
<code><a href="../reference/ab_property.html">ab_atc()</a></code> does not always return a character vector with length 1, and returns a <code>list</code> if the input is larger than length 1</li>
</ul></li>
<li>Antibiotic selectors
<ul><li>They now also work in R-3.0 and R-3.1, supporting every version of R since 2013</li>
<li>Added more selectors for antibiotic classes: <code><a href="../reference/antibiotic_class_selectors.html">aminopenicillins()</a></code>, <code><a href="../reference/antibiotic_class_selectors.html">antifungals()</a></code>, <code><a href="../reference/antibiotic_class_selectors.html">antimycobacterials()</a></code>, <code><a href="../reference/antibiotic_class_selectors.html">lincosamides()</a></code>, <code><a href="../reference/antibiotic_class_selectors.html">lipoglycopeptides()</a></code>, <code><a href="../reference/antibiotic_class_selectors.html">polymyxins()</a></code>, <code><a href="../reference/antibiotic_class_selectors.html">quinolones()</a></code>, <code><a href="../reference/antibiotic_class_selectors.html">streptogramins()</a></code>, <code><a href="../reference/antibiotic_class_selectors.html">trimethoprims()</a></code> and <code><a href="../reference/antibiotic_class_selectors.html">ureidopenicillins()</a></code>
</li>
<li>Added specific selectors for certain types for treatment: <code><a href="../reference/antibiotic_class_selectors.html">administrable_per_os()</a></code> and <code><a href="../reference/antibiotic_class_selectors.html">administrable_iv()</a></code>, which are based on available Defined Daily Doses (DDDs), as defined by the WHOCC. These are ideal for e.g. analysing pathogens in primary care where IV treatment is not an option. They can be combined with other AB selectors, e.g. to select penicillins that are only administrable per os (i.e., orally):</li>
</ul><div class="sourceCode" id="cb1"><pre class="downlit sourceCode r">
<ul><li><p>They now also work in R-3.0 and R-3.1, supporting every version of R since 2013</p></li>
<li><p>Added more selectors for antibiotic classes: <code><a href="../reference/antibiotic_class_selectors.html">aminopenicillins()</a></code>, <code><a href="../reference/antibiotic_class_selectors.html">antifungals()</a></code>, <code><a href="../reference/antibiotic_class_selectors.html">antimycobacterials()</a></code>, <code><a href="../reference/antibiotic_class_selectors.html">lincosamides()</a></code>, <code><a href="../reference/antibiotic_class_selectors.html">lipoglycopeptides()</a></code>, <code><a href="../reference/antibiotic_class_selectors.html">polymyxins()</a></code>, <code><a href="../reference/antibiotic_class_selectors.html">quinolones()</a></code>, <code><a href="../reference/antibiotic_class_selectors.html">streptogramins()</a></code>, <code><a href="../reference/antibiotic_class_selectors.html">trimethoprims()</a></code> and <code><a href="../reference/antibiotic_class_selectors.html">ureidopenicillins()</a></code></p></li>
<li>
<p>Added specific selectors for certain types for treatment: <code><a href="../reference/antibiotic_class_selectors.html">administrable_per_os()</a></code> and <code><a href="../reference/antibiotic_class_selectors.html">administrable_iv()</a></code>, which are based on available Defined Daily Doses (DDDs), as defined by the WHOCC. These are ideal for e.g. analysing pathogens in primary care where IV treatment is not an option. They can be combined with other AB selectors, e.g. to select penicillins that are only administrable per os (i.e., orally):</p>
<div class="sourceCode" id="cb1"><pre class="downlit sourceCode r">
<code class="sourceCode R">
<span class="va">example_isolates</span><span class="op">[</span>, <span class="fu"><a href="../reference/antibiotic_class_selectors.html">penicillins</a></span><span class="op">(</span><span class="op">)</span> <span class="op">&amp;</span> <span class="fu"><a href="../reference/antibiotic_class_selectors.html">administrable_per_os</a></span><span class="op">(</span><span class="op">)</span><span class="op">]</span> <span class="co"># base R</span>
<span class="va">example_isolates</span> <span class="op">%&gt;%</span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op">(</span><span class="fu"><a href="../reference/antibiotic_class_selectors.html">penicillins</a></span><span class="op">(</span><span class="op">)</span> <span class="op">&amp;</span> <span class="fu"><a href="../reference/antibiotic_class_selectors.html">administrable_per_os</a></span><span class="op">(</span><span class="op">)</span><span class="op">)</span> <span class="co"># dplyr</span></code></pre></div>
<ul><li>Fix for using selectors multiple times in one call (e.g., using them in <code><a href="https://dplyr.tidyverse.org/reference/filter.html" class="external-link">dplyr::filter()</a></code> and immediately after in <code><a href="https://dplyr.tidyverse.org/reference/select.html" class="external-link">dplyr::select()</a></code>)</li>
<li>Added argument <code>only_treatable</code>, which defaults to <code>TRUE</code> and will exclude drugs that are only for laboratory tests and not for treating patients (such as imipenem/EDTA and gentamicin-high)</li>
</li>
<li><p>Fix for using selectors multiple times in one call (e.g., using them in <code><a href="https://dplyr.tidyverse.org/reference/filter.html" class="external-link">dplyr::filter()</a></code> and immediately after in <code><a href="https://dplyr.tidyverse.org/reference/select.html" class="external-link">dplyr::select()</a></code>)</p></li>
<li><p>Added argument <code>only_treatable</code>, which defaults to <code>TRUE</code> and will exclude drugs that are only for laboratory tests and not for treating patients (such as imipenem/EDTA and gentamicin-high)</p></li>
</ul></li>
<li>Fixed the Gram stain (<code><a href="../reference/mo_property.html">mo_gramstain()</a></code>) determination of the class Negativicutes within the phylum of Firmicutes - they were considered Gram-positives because of their phylum but are actually Gram-negative. This impacts 137 taxonomic species, genera and families, such as <em>Negativicoccus</em> and <em>Veillonella</em>.</li>
<li>Fix for duplicate ATC codes in the <code>antibiotics</code> data set</li>
@ -355,7 +349,7 @@
<li>The documentation of the <code><a href="../reference/first_isolate.html">first_isolate()</a></code> and <code><a href="../reference/key_antimicrobials.html">key_antimicrobials()</a></code> functions has been completely rewritten.</li>
</ul></li>
<li>Function <code><a href="../reference/antibiotic_class_selectors.html">betalactams()</a></code> as additional antbiotic column selector and function <code>filter_betalactams()</code> as additional antbiotic column filter. The group of betalactams consists of all carbapenems, cephalosporins and penicillins.</li>
<li>A <code><a href="https://ggplot2.tidyverse.org/reference/ggplot.html" class="external-link">ggplot()</a></code> method for <code><a href="../reference/resistance_predict.html">resistance_predict()</a></code>
<li>A <code>ggplot()</code> method for <code><a href="../reference/resistance_predict.html">resistance_predict()</a></code>
</li>
</ul></div>
<div id="changed-1" class="section level3">
@ -442,7 +436,7 @@
<span class="co">#&gt; Filtering on oxazolidinones: value in column `LNZ` (linezolid) is either "R", "S" or "I"</span></code></pre></div>
</li>
<li><p>Support for custom MDRO guidelines, using the new <code><a href="../reference/mdro.html">custom_mdro_guideline()</a></code> function, please see <code><a href="../reference/mdro.html">mdro()</a></code> for additional info</p></li>
<li><p><code><a href="https://ggplot2.tidyverse.org/reference/ggplot.html" class="external-link">ggplot()</a></code> generics for classes <code>&lt;mic&gt;</code> and <code>&lt;disk&gt;</code></p></li>
<li><p><code>ggplot()</code> generics for classes <code>&lt;mic&gt;</code> and <code>&lt;disk&gt;</code></p></li>
<li>
<p>Function <code><a href="../reference/mo_property.html">mo_is_yeast()</a></code>, which determines whether a microorganism is a member of the taxonomic class Saccharomycetes or the taxonomic order Saccharomycetales:</p>
<div class="sourceCode" id="cb5"><pre class="downlit sourceCode r">
@ -494,7 +488,7 @@
<ul><li>Plotting of MIC and disk diffusion values now support interpretation colouring if you supply the microorganism and antimicrobial agent</li>
<li>All colours were updated to colour-blind friendly versions for values R, S and I for all plot methods (also applies to tibble printing)</li>
<li>Interpretation of MIC and disk diffusion values to R/SI will now be translated if the system language is German, Dutch or Spanish (see <code>translate</code>)</li>
<li>Plotting is now possible with base R using <code><a href="../reference/plot.html">plot()</a></code> and with ggplot2 using <code><a href="https://ggplot2.tidyverse.org/reference/ggplot.html" class="external-link">ggplot()</a></code> on any vector of MIC and disk diffusion values</li>
<li>Plotting is now possible with base R using <code><a href="../reference/plot.html">plot()</a></code> and with ggplot2 using <code>ggplot()</code> on any vector of MIC and disk diffusion values</li>
</ul></li>
<li>Updated SNOMED codes to US Edition of SNOMED CT from 1 September 2020 and added the source to the help page of the <code>microorganisms</code> data set</li>
<li>
@ -510,7 +504,7 @@
<code><a href="../reference/as.rsi.html">is.rsi.eligible()</a></code> now detects if the column name resembles an antibiotic name or code and now returns <code>TRUE</code> immediately if the input contains any of the values “R”, “S” or “I”. This drastically improves speed, also for a lot of other functions that rely on automatic determination of antibiotic columns.</li>
<li>Functions <code><a href="../reference/get_episode.html">get_episode()</a></code> and <code><a href="../reference/get_episode.html">is_new_episode()</a></code> now support less than a day as value for argument <code>episode_days</code> (e.g., to include one patient/test per hour)</li>
<li>Argument <code>ampc_cephalosporin_resistance</code> in <code><a href="../reference/eucast_rules.html">eucast_rules()</a></code> now also applies to value “I” (not only “S”)</li>
<li>Functions <code><a href="https://docs.ropensci.org/skimr/reference/print.html" class="external-link">print()</a></code> and <code><a href="https://rdrr.io/r/base/summary.html" class="external-link">summary()</a></code> on a Principal Components Analysis object (<code><a href="../reference/pca.html">pca()</a></code>) now print additional group info if the original data was grouped using <code><a href="https://dplyr.tidyverse.org/reference/group_by.html" class="external-link">dplyr::group_by()</a></code>
<li>Functions <code><a href="https://rdrr.io/r/base/print.html" class="external-link">print()</a></code> and <code><a href="https://rdrr.io/r/base/summary.html" class="external-link">summary()</a></code> on a Principal Components Analysis object (<code><a href="../reference/pca.html">pca()</a></code>) now print additional group info if the original data was grouped using <code><a href="https://dplyr.tidyverse.org/reference/group_by.html" class="external-link">dplyr::group_by()</a></code>
</li>
<li>Improved speed and reliability of <code><a href="../reference/guess_ab_col.html">guess_ab_col()</a></code>. As this also internally improves the reliability of <code><a href="../reference/first_isolate.html">first_isolate()</a></code> and <code><a href="../reference/mdro.html">mdro()</a></code>, this might have a slight impact on the results of those functions.</li>
<li>Fix for <code><a href="../reference/mo_property.html">mo_name()</a></code> when used in other languages than English</li>
@ -606,7 +600,7 @@
</li>
<li><p>For all function arguments in the code, it is now defined what the exact type of user input should be (inspired by the <a href="https://github.com/moodymudskipper/typed" class="external-link"><code>typed</code></a> package). If the user input for a certain function does not meet the requirements for a specific argument (such as the class or length), an informative error will be thrown. This makes the package more robust and the use of it more reproducible and reliable. In total, more than 420 arguments were defined.</p></li>
<li><p>Fix for <code><a href="../reference/mo_source.html">set_mo_source()</a></code>, that previously would not remember the file location of the original file</p></li>
<li><p>Deprecated function <code><a href="../reference/AMR-deprecated.html">p_symbol()</a></code> that not really fits the scope of this package. It will be removed in a future version. See <a href="https://github.com/msberends/AMR/blob/v1.4.0/R/p_symbol.R" class="external-link">here</a> for the source code to preserve it.</p></li>
<li><p>Deprecated function <code>p_symbol()</code> that not really fits the scope of this package. It will be removed in a future version. See <a href="https://github.com/msberends/AMR/blob/v1.4.0/R/p_symbol.R" class="external-link">here</a> for the source code to preserve it.</p></li>
<li><p>Updated coagulase-negative staphylococci determination with Becker <em>et al.</em> 2020 (PMID 32056452), meaning that the species <em>S. argensis</em>, <em>S. caeli</em>, <em>S. debuckii</em>, <em>S. edaphicus</em> and <em>S. pseudoxylosus</em> are now all considered CoNS</p></li>
<li><p>Fix for using argument <code>reference_df</code> in <code><a href="../reference/as.mo.html">as.mo()</a></code> and <code>mo_*()</code> functions that contain old microbial codes (from previous package versions)</p></li>
<li><p>Fixed a bug where <code><a href="../reference/as.mo.html">mo_uncertainties()</a></code> would not return the results based on the MO matching score</p></li>
@ -804,7 +798,7 @@
<p>Removed code dependency on all other R packages, making this package fully independent of the development process of others. This is a major code change, but will probably not be noticeable by most users.</p>
<p>Making this package independent of especially the tidyverse (e.g. packages <code>dplyr</code> and <code>tidyr</code>) tremendously increases sustainability on the long term, since tidyverse functions change quite often. Good for users, but hard for package maintainers. Most of our functions are replaced with versions that only rely on base R, which keeps this package fully functional for many years to come, without requiring a lot of maintenance to keep up with other packages anymore. Another upside it that this package can now be used with all versions of R since R-3.0.0 (April 2013). Our package is being used in settings where the resources are very limited. Fewer dependencies on newer software is helpful for such settings.</p>
<p>Negative effects of this change are:</p>
<ul><li>Function <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq()</a></code> that was borrowed from the <code>cleaner</code> package was removed. Use <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">cleaner::freq()</a></code>, or run <code><a href="https://github.com/msberends/cleaner" class="external-link">library("cleaner")</a></code> before you use <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq()</a></code>.</li>
<ul><li>Function <code>freq()</code> that was borrowed from the <code>cleaner</code> package was removed. Use <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">cleaner::freq()</a></code>, or run <code><a href="https://github.com/msberends/cleaner" class="external-link">library("cleaner")</a></code> before you use <code>freq()</code>.</li>
<li><del>Printing values of class <code>mo</code> or <code>rsi</code> in a tibble will no longer be in colour and printing <code>rsi</code> in a tibble will show the class <code>&lt;ord&gt;</code>, not <code>&lt;rsi&gt;</code> anymore. This is purely a visual effect.</del></li>
<li><del>All functions from the <code>mo_*</code> family (like <code><a href="../reference/mo_property.html">mo_name()</a></code> and <code><a href="../reference/mo_property.html">mo_gramstain()</a></code>) are noticeably slower when running on hundreds of thousands of rows.</del></li>
<li>For developers: classes <code>mo</code> and <code>ab</code> now both also inherit class <code>character</code>, to support any data transformation. This change invalidates code that checks for class length == 1.</li>
@ -839,7 +833,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<div id="other-5" class="section level3">
<h3 class="hasAnchor">
<a href="#other-5" class="anchor" aria-hidden="true"></a>Other</h3>
<ul><li>Removed previously deprecated function <code>p.symbol()</code> - it was replaced with <code><a href="../reference/AMR-deprecated.html">p_symbol()</a></code>
<ul><li>Removed previously deprecated function <code>p.symbol()</code> - it was replaced with <code>p_symbol()</code>
</li>
<li>Removed function <code>read.4d()</code>, that was only useful for reading data from an old test database.</li>
</ul></div>
@ -1086,7 +1080,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<span class="co">#&gt; invalid microorganism code, NA generated</span></code></pre></div>
<p>This is important, because a value like <code>"testvalue"</code> could never be understood by e.g. <code><a href="../reference/mo_property.html">mo_name()</a></code>, although the class would suggest a valid microbial code.</p>
</li>
<li><p>Function <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq()</a></code> has moved to a new package, <a href="https://github.com/msberends/clean" class="external-link"><code>clean</code></a> (<a href="https://cran.r-project.org/package=clean" class="external-link">CRAN link</a>), since creating frequency tables actually does not fit the scope of this package. The <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq()</a></code> function still works, since it is re-exported from the <code>clean</code> package (which will be installed automatically upon updating this <code>AMR</code> package).</p></li>
<li><p>Function <code>freq()</code> has moved to a new package, <a href="https://github.com/msberends/clean" class="external-link"><code>clean</code></a> (<a href="https://cran.r-project.org/package=clean" class="external-link">CRAN link</a>), since creating frequency tables actually does not fit the scope of this package. The <code>freq()</code> function still works, since it is re-exported from the <code>clean</code> package (which will be installed automatically upon updating this <code>AMR</code> package).</p></li>
<li><p>Renamed data set <code>septic_patients</code> to <code>example_isolates</code></p></li>
</ul></div>
<div id="new-9" class="section level3">
@ -1193,7 +1187,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<li>Improved <code>filter_ab_class()</code> to be more reliable and to support 5th generation cephalosporins</li>
<li>Function <code><a href="../reference/availability.html">availability()</a></code> now uses <code>portion_R()</code> instead of <code>portion_IR()</code>, to comply with EUCAST insights</li>
<li>Functions <code><a href="../reference/age.html">age()</a></code> and <code><a href="../reference/age_groups.html">age_groups()</a></code> now have a <code>na.rm</code> argument to remove empty values</li>
<li>Renamed function <code>p.symbol()</code> to <code><a href="../reference/AMR-deprecated.html">p_symbol()</a></code> (the former is now deprecated and will be removed in a future version)</li>
<li>Renamed function <code>p.symbol()</code> to <code>p_symbol()</code> (the former is now deprecated and will be removed in a future version)</li>
<li>Using negative values for <code>x</code> in <code><a href="../reference/age_groups.html">age_groups()</a></code> will now introduce <code>NA</code>s and not return an error anymore</li>
<li>Fix for determining the systems language</li>
<li>Fix for <code>key_antibiotics()</code> on foreign systems</li>
@ -1325,7 +1319,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<li>The <code><a href="../reference/age.html">age()</a></code> function gained a new argument <code>exact</code> to determine ages with decimals</li>
<li>Removed deprecated functions <code>guess_mo()</code>, <code>guess_atc()</code>, <code>EUCAST_rules()</code>, <code>interpretive_reading()</code>, <code><a href="../reference/as.rsi.html">rsi()</a></code>
</li>
<li>Frequency tables (<code><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq()</a></code>):
<li>Frequency tables (<code>freq()</code>):
<ul><li><p>speed improvement for microbial IDs</p></li>
<li><p>fixed factor level names for R Markdown</p></li>
<li><p>when all values are unique it now shows a message instead of a warning</p></li>
@ -1334,12 +1328,12 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<div class="sourceCode" id="cb30"><pre class="downlit sourceCode r">
<code class="sourceCode R">
<span class="va">septic_patients</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span><span class="op">(</span><span class="va">age</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu">freq</span><span class="op">(</span><span class="va">age</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://rdrr.io/r/graphics/boxplot.html">boxplot</a></span><span class="op">(</span><span class="op">)</span>
<span class="co"># grouped boxplots:</span>
<span class="va">septic_patients</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span><span class="op">(</span><span class="va">hospital_id</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span><span class="op">(</span><span class="va">age</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu">freq</span><span class="op">(</span><span class="va">age</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://rdrr.io/r/graphics/boxplot.html">boxplot</a></span><span class="op">(</span><span class="op">)</span></code></pre></div>
</li>
</ul></li>
@ -1348,7 +1342,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<li>Added ceftazidim intrinsic resistance to <em>Streptococci</em>
</li>
<li>Changed default settings for <code><a href="../reference/age_groups.html">age_groups()</a></code>, to let groups of fives and tens end with 100+ instead of 120+</li>
<li>Fix for <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq()</a></code> for when all values are <code>NA</code>
<li>Fix for <code>freq()</code> for when all values are <code>NA</code>
</li>
<li>Fix for <code><a href="../reference/first_isolate.html">first_isolate()</a></code> for when dates are missing</li>
<li>Improved speed of <code><a href="../reference/guess_ab_col.html">guess_ab_col()</a></code>
@ -1565,7 +1559,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<li>Now accepts high and low resistance: <code>"HIGH S"</code> will return <code>S</code>
</li>
</ul></li>
<li>Frequency tables (<code><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq()</a></code> function):
<li>Frequency tables (<code>freq()</code> function):
<ul><li>
<p>Support for tidyverse quasiquotation! Now you can create frequency tables of function outcomes:</p>
<div class="sourceCode" id="cb40"><pre class="downlit sourceCode r">
@ -1574,15 +1568,15 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<span class="co"># OLD WAY</span>
<span class="va">septic_patients</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op">(</span>genus <span class="op">=</span> <span class="fu"><a href="../reference/mo_property.html">mo_genus</a></span><span class="op">(</span><span class="va">mo</span><span class="op">)</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span><span class="op">(</span><span class="va">genus</span><span class="op">)</span>
<span class="fu">freq</span><span class="op">(</span><span class="va">genus</span><span class="op">)</span>
<span class="co"># NEW WAY</span>
<span class="va">septic_patients</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span><span class="op">(</span><span class="fu"><a href="../reference/mo_property.html">mo_genus</a></span><span class="op">(</span><span class="va">mo</span><span class="op">)</span><span class="op">)</span>
<span class="fu">freq</span><span class="op">(</span><span class="fu"><a href="../reference/mo_property.html">mo_genus</a></span><span class="op">(</span><span class="va">mo</span><span class="op">)</span><span class="op">)</span>
<span class="co"># Even supports grouping variables:</span>
<span class="va">septic_patients</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span><span class="op">(</span><span class="va">gender</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span><span class="op">(</span><span class="fu"><a href="../reference/mo_property.html">mo_genus</a></span><span class="op">(</span><span class="va">mo</span><span class="op">)</span><span class="op">)</span></code></pre></div>
<span class="fu">freq</span><span class="op">(</span><span class="fu"><a href="../reference/mo_property.html">mo_genus</a></span><span class="op">(</span><span class="va">mo</span><span class="op">)</span><span class="op">)</span></code></pre></div>
</li>
<li><p>Header info is now available as a list, with the <code>header</code> function</p></li>
<li><p>The argument <code>header</code> is now set to <code>TRUE</code> at default, even for markdown</p></li>
@ -1655,21 +1649,21 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<li><p>Using <code>portion_*</code> functions now throws a warning when total available isolate is below argument <code>minimum</code></p></li>
<li><p>Functions <code>as.mo</code>, <code>as.rsi</code>, <code>as.mic</code>, <code>as.atc</code> and <code>freq</code> will not set package name as attribute anymore</p></li>
<li>
<p>Frequency tables - <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq()</a></code>:</p>
<p>Frequency tables - <code>freq()</code>:</p>
<ul><li>
<p>Support for grouping variables, test with:</p>
<div class="sourceCode" id="cb42"><pre class="downlit sourceCode r">
<code class="sourceCode R">
<span class="va">septic_patients</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span><span class="op">(</span><span class="va">hospital_id</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span><span class="op">(</span><span class="va">gender</span><span class="op">)</span></code></pre></div>
<span class="fu">freq</span><span class="op">(</span><span class="va">gender</span><span class="op">)</span></code></pre></div>
</li>
<li>
<p>Support for (un)selecting columns:</p>
<div class="sourceCode" id="cb43"><pre class="downlit sourceCode r">
<code class="sourceCode R">
<span class="va">septic_patients</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span><span class="op">(</span><span class="va">hospital_id</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu">freq</span><span class="op">(</span><span class="va">hospital_id</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op">(</span><span class="op">-</span><span class="va">count</span>, <span class="op">-</span><span class="va">cum_count</span><span class="op">)</span> <span class="co"># only get item, percent, cum_percent</span></code></pre></div>
</li>
<li><p>Check for <code><a href="https://hms.tidyverse.org/reference/Deprecated.html" class="external-link">hms::is.hms</a></code></p></li>
@ -1686,7 +1680,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<li><p>Removed diacritics from all authors (columns <code>microorganisms$ref</code> and <code>microorganisms.old$ref</code>) to comply with CRAN policy to only allow ASCII characters</p></li>
<li><p>Fix for <code>mo_property</code> not working properly</p></li>
<li><p>Fix for <code>eucast_rules</code> where some Streptococci would become ceftazidime R in EUCAST rule 4.5</p></li>
<li><p>Support for named vectors of class <code>mo</code>, useful for <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">top_freq()</a></code></p></li>
<li><p>Support for named vectors of class <code>mo</code>, useful for <code>top_freq()</code></p></li>
<li><p><code>ggplot_rsi</code> and <code>scale_y_percent</code> have <code>breaks</code> argument</p></li>
<li>
<p>AI improvements for <code>as.mo</code>:</p>
@ -1839,13 +1833,13 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<div class="sourceCode" id="cb50"><pre class="downlit sourceCode r">
<code class="sourceCode R">
<span class="va">my_matrix</span> <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/with.html">with</a></span><span class="op">(</span><span class="va">septic_patients</span>, <span class="fu"><a href="https://rdrr.io/r/base/matrix.html">matrix</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op">(</span><span class="va">age</span>, <span class="va">gender</span><span class="op">)</span>, ncol <span class="op">=</span> <span class="fl">2</span><span class="op">)</span><span class="op">)</span>
<span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span><span class="op">(</span><span class="va">my_matrix</span><span class="op">)</span></code></pre></div>
<span class="fu">freq</span><span class="op">(</span><span class="va">my_matrix</span><span class="op">)</span></code></pre></div>
<p>For lists, subsetting is possible:</p>
<div class="sourceCode" id="cb51"><pre class="downlit sourceCode r">
<code class="sourceCode R">
<span class="va">my_list</span> <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op">(</span>age <span class="op">=</span> <span class="va">septic_patients</span><span class="op">$</span><span class="va">age</span>, gender <span class="op">=</span> <span class="va">septic_patients</span><span class="op">$</span><span class="va">gender</span><span class="op">)</span>
<span class="va">my_list</span> <span class="op">%&gt;%</span> <span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span><span class="op">(</span><span class="va">age</span><span class="op">)</span>
<span class="va">my_list</span> <span class="op">%&gt;%</span> <span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span><span class="op">(</span><span class="va">gender</span><span class="op">)</span></code></pre></div>
<span class="va">my_list</span> <span class="op">%&gt;%</span> <span class="fu">freq</span><span class="op">(</span><span class="va">age</span><span class="op">)</span>
<span class="va">my_list</span> <span class="op">%&gt;%</span> <span class="fu">freq</span><span class="op">(</span><span class="va">gender</span><span class="op">)</span></code></pre></div>
</li>
</ul></div>
<div id="other-14" class="section level4">
@ -1901,13 +1895,13 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<li>New for frequency tables (function <code>freq</code>):
<ul><li>A vignette to explain its usage</li>
<li>Support for <code>rsi</code> (antimicrobial resistance) to use as input</li>
<li>Support for <code>table</code> to use as input: <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq(table(x, y))</a></code>
<li>Support for <code>table</code> to use as input: <code>freq(table(x, y))</code>
</li>
<li>Support for existing functions <code>hist</code> and <code>plot</code> to use a frequency table as input: <code><a href="https://rdrr.io/r/graphics/hist.html" class="external-link">hist(freq(df$age))</a></code>
</li>
<li>Support for <code>as.vector</code>, <code>as.data.frame</code>, <code>as_tibble</code> and <code>format</code>
</li>
<li>Support for quasiquotation: <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq(mydata, mycolumn)</a></code> is the same as <code>mydata %&gt;% freq(mycolumn)</code>
<li>Support for quasiquotation: <code>freq(mydata, mycolumn)</code> is the same as <code>mydata %&gt;% freq(mycolumn)</code>
</li>
<li>Function <code>top_freq</code> function to return the top/below <em>n</em> items as vector</li>
<li>Header of frequency tables now also show Mean Absolute Deviaton (MAD) and Interquartile Range (IQR)</li>

View File

@ -93,7 +93,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.7.1.9024</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9025</span>
</span>
</div>
@ -223,13 +223,6 @@
Source Code
</a>
</li>
<li>
<a href="../survey.html">
<span class="fa fa-clipboard-list"></span>
Survey
</a>
</li>
</ul>
@ -253,12 +246,8 @@
<p>These functions are so-called '<a href='https://rdrr.io/r/base/Deprecated.html'>Deprecated</a>'. <strong>They will be removed in a future release.</strong> Using the functions will give a warning with the name of the function it has been replaced by (if there is one).</p>
</div>
<div class="ref-usage sourceCode"><pre class='sourceCode r'><code><span class='fu'>p_symbol</span><span class='op'>(</span><span class='va'>p</span>, emptychar <span class='op'>=</span> <span class='st'>" "</span><span class='op'>)</span></code></pre></div>
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
<p>All antibiotic class selectors (such as <code><a href='antibiotic_class_selectors.html'>carbapenems()</a></code>, <code><a href='antibiotic_class_selectors.html'>aminoglycosides()</a></code>) can now be used for filtering as well, making all their accompanying <code>filter_*()</code> functions redundant (such as <code>filter_carbapenems()</code>, <code>filter_aminoglycosides()</code>).</p>
<h2 class="hasAnchor" id="retired-lifecycle"><a class="anchor" href="#retired-lifecycle"></a>Retired Lifecycle</h2>

View File

@ -92,7 +92,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.7.1.9024</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9025</span>
</span>
</div>
@ -222,13 +222,6 @@
Source Code
</a>
</li>
<li>
<a href="../survey.html">
<span class="fa fa-clipboard-list"></span>
Survey
</a>
</li>
</ul>
@ -255,109 +248,6 @@
</colgroup>
<tbody>
<tr>
<th colspan="2">
<h2 id="section-background-information-on-included-data" class="hasAnchor"><a href="#section-background-information-on-included-data" class="anchor"></a>Background information on included data</h2>
<p class="section-desc"><p>Some pages about our package and its external sources. Be sure to read our <a href="./../articles/index.html">How Tos</a> for more information about how to work with functions in this package.</p></p>
</th>
</tr>
</tbody><tbody>
<tr>
<td>
<p><code><a href="AMR.html">AMR</a></code> </p>
</td>
<td><p>The <code>AMR</code> Package</p></td>
</tr><tr>
<td>
<p><code><a href="example_isolates.html">example_isolates</a></code> </p>
</td>
<td><p>Data Set with 2,000 Example Isolates</p></td>
</tr><tr>
<td>
<p><code><a href="microorganisms.html">microorganisms</a></code> </p>
</td>
<td><p>Data Set with 70,026 Microorganisms</p></td>
</tr><tr>
<td>
<p><code><a href="microorganisms.codes.html">microorganisms.codes</a></code> </p>
</td>
<td><p>Data Set with 5,605 Common Microorganism Codes</p></td>
</tr><tr>
<td>
<p><code><a href="microorganisms.old.html">microorganisms.old</a></code> </p>
</td>
<td><p>Data Set with Previously Accepted Taxonomic Names</p></td>
</tr><tr>
<td>
<p><code><a href="antibiotics.html">antibiotics</a></code> <code><a href="antibiotics.html">antivirals</a></code> </p>
</td>
<td><p>Data Sets with 558 Antimicrobials</p></td>
</tr><tr>
<td>
<p><code><a href="intrinsic_resistant.html">intrinsic_resistant</a></code> </p>
</td>
<td><p>Data Set with Bacterial Intrinsic Resistance</p></td>
</tr><tr>
<td>
<p><code><a href="dosage.html">dosage</a></code> </p>
</td>
<td><p>Data Set with Treatment Dosages as Defined by EUCAST</p></td>
</tr><tr>
<td>
<p><code><a href="catalogue_of_life.html">catalogue_of_life</a></code> </p>
</td>
<td><p>The Catalogue of Life</p></td>
</tr><tr>
<td>
<p><code><a href="catalogue_of_life_version.html">catalogue_of_life_version()</a></code> </p>
</td>
<td><p>Version info of included Catalogue of Life</p></td>
</tr><tr>
<td>
<p><code><a href="WHOCC.html">WHOCC</a></code> </p>
</td>
<td><p>WHOCC: WHO Collaborating Centre for Drug Statistics Methodology</p></td>
</tr><tr>
<td>
<p><code><a href="lifecycle.html">lifecycle</a></code> </p>
</td>
<td><p>Lifecycles of Functions in the <code>AMR</code> Package</p></td>
</tr><tr>
<td>
<p><code><a href="example_isolates_unclean.html">example_isolates_unclean</a></code> </p>
</td>
<td><p>Data Set with Unclean Data</p></td>
</tr><tr>
<td>
<p><code><a href="rsi_translation.html">rsi_translation</a></code> </p>
</td>
<td><p>Data Set for R/SI Interpretation</p></td>
</tr><tr>
<td>
<p><code><a href="WHONET.html">WHONET</a></code> </p>
</td>
<td><p>Data Set with 500 Isolates - WHONET Example</p></td>
</tr>
</tbody><tbody>
<tr>
<th colspan="2">
<h2 id="section-preparing-data-microorganisms" class="hasAnchor"><a href="#section-preparing-data-microorganisms" class="anchor"></a>Preparing data: microorganisms</h2>
@ -553,6 +443,109 @@
</td>
<td><p>Guess Antibiotic Column</p></td>
</tr>
</tbody><tbody>
<tr>
<th colspan="2">
<h2 id="section-background-information-on-included-data" class="hasAnchor"><a href="#section-background-information-on-included-data" class="anchor"></a>Background information on included data</h2>
<p class="section-desc"><p>Some pages about our package and its external sources. Be sure to read our <a href="./../articles/index.html">How Tos</a> for more information about how to work with functions in this package.</p></p>
</th>
</tr>
</tbody><tbody>
<tr>
<td>
<p><code><a href="AMR.html">AMR</a></code> </p>
</td>
<td><p>The <code>AMR</code> Package</p></td>
</tr><tr>
<td>
<p><code><a href="example_isolates.html">example_isolates</a></code> </p>
</td>
<td><p>Data Set with 2,000 Example Isolates</p></td>
</tr><tr>
<td>
<p><code><a href="microorganisms.html">microorganisms</a></code> </p>
</td>
<td><p>Data Set with 70,026 Microorganisms</p></td>
</tr><tr>
<td>
<p><code><a href="microorganisms.codes.html">microorganisms.codes</a></code> </p>
</td>
<td><p>Data Set with 5,605 Common Microorganism Codes</p></td>
</tr><tr>
<td>
<p><code><a href="microorganisms.old.html">microorganisms.old</a></code> </p>
</td>
<td><p>Data Set with Previously Accepted Taxonomic Names</p></td>
</tr><tr>
<td>
<p><code><a href="antibiotics.html">antibiotics</a></code> <code><a href="antibiotics.html">antivirals</a></code> </p>
</td>
<td><p>Data Sets with 558 Antimicrobials</p></td>
</tr><tr>
<td>
<p><code><a href="intrinsic_resistant.html">intrinsic_resistant</a></code> </p>
</td>
<td><p>Data Set with Bacterial Intrinsic Resistance</p></td>
</tr><tr>
<td>
<p><code><a href="dosage.html">dosage</a></code> </p>
</td>
<td><p>Data Set with Treatment Dosages as Defined by EUCAST</p></td>
</tr><tr>
<td>
<p><code><a href="catalogue_of_life.html">catalogue_of_life</a></code> </p>
</td>
<td><p>The Catalogue of Life</p></td>
</tr><tr>
<td>
<p><code><a href="catalogue_of_life_version.html">catalogue_of_life_version()</a></code> </p>
</td>
<td><p>Version info of included Catalogue of Life</p></td>
</tr><tr>
<td>
<p><code><a href="WHOCC.html">WHOCC</a></code> </p>
</td>
<td><p>WHOCC: WHO Collaborating Centre for Drug Statistics Methodology</p></td>
</tr><tr>
<td>
<p><code><a href="lifecycle.html">lifecycle</a></code> </p>
</td>
<td><p>Lifecycles of Functions in the <code>AMR</code> Package</p></td>
</tr><tr>
<td>
<p><code><a href="example_isolates_unclean.html">example_isolates_unclean</a></code> </p>
</td>
<td><p>Data Set with Unclean Data</p></td>
</tr><tr>
<td>
<p><code><a href="rsi_translation.html">rsi_translation</a></code> </p>
</td>
<td><p>Data Set for R/SI Interpretation</p></td>
</tr><tr>
<td>
<p><code><a href="WHONET.html">WHONET</a></code> </p>
</td>
<td><p>Data Set with 500 Isolates - WHONET Example</p></td>
</tr>
</tbody><tbody>
<tr>
<th colspan="2">
@ -678,7 +671,7 @@
<tr>
<td>
<p><code><a href="AMR-deprecated.html">p_symbol()</a></code> </p>
<p><code><a href="AMR-deprecated.html">AMR-deprecated</a></code> </p>
</td>
<td><p>Deprecated Functions</p></td>
</tr>

View File

@ -92,7 +92,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.7.1.9024</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9025</span>
</span>
</div>
@ -222,13 +222,6 @@
Source Code
</a>
</li>
<li>
<a href="survey.html">
<span class="fa fa-clipboard-list"></span>
Survey
</a>
</li>
</ul>

View File

@ -138,7 +138,7 @@ echo
echo "•••••••••••••••••"
echo "• Building site •"
echo "•••••••••••••••••"
if $lazy == "FALSE"; then
if [ $lazy == "FALSE" ]; then
Rscript -e "devtools::install(quiet = TRUE, dependencies = FALSE)"
Rscript -e "suppressMessages(pkgdown::build_site(lazy = FALSE, examples = FALSE, install = FALSE))"
else
@ -152,7 +152,7 @@ else
fi
if ! git diff --quiet NEWS.md; then
# news has changed
Rscript -e "pkgdown::build_home()"
Rscript -e "pkgdown::build_news()"
fi
if ! git diff --quiet pkgdown; then
# something has changed in pkgdown files

View File

@ -23,34 +23,3 @@
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
# ==================================================================== #
expect_identical(suppressWarnings(p_symbol(c(0.001, 0.01, 0.05, 0.1, 1, NA, 3))),
c("***", "**", "*", ".", " ", NA, NA))
expect_warning(key_antibiotics(example_isolates))
expect_identical(suppressWarnings(key_antibiotics(example_isolates)),
key_antimicrobials(example_isolates, antifungal = NULL))
expect_warning(key_antibiotics_equal("S", "S"))
expect_identical(suppressWarnings(key_antibiotics_equal("S", "S")),
antimicrobials_equal("S", "S", type = "keyantimicrobials"))
expect_warning(filter_first_weighted_isolate(example_isolates))
expect_identical(suppressWarnings(filter_first_weighted_isolate(example_isolates)),
filter_first_isolate(example_isolates))
expect_warning(filter_ab_class(example_isolates, "mycobact"))
expect_warning(filter_aminoglycosides(example_isolates))
expect_warning(filter_betalactams(example_isolates))
expect_warning(filter_carbapenems(example_isolates))
expect_warning(filter_cephalosporins(example_isolates))
expect_warning(filter_1st_cephalosporins(example_isolates))
expect_warning(filter_2nd_cephalosporins(example_isolates))
expect_warning(filter_3rd_cephalosporins(example_isolates))
expect_warning(filter_4th_cephalosporins(example_isolates))
expect_warning(filter_5th_cephalosporins(example_isolates))
expect_warning(filter_fluoroquinolones(example_isolates))
expect_warning(filter_glycopeptides(example_isolates))
expect_warning(filter_macrolides(example_isolates))
expect_warning(filter_oxazolidinones(example_isolates))
expect_warning(filter_penicillins(example_isolates))
expect_warning(filter_tetracyclines(example_isolates))

View File

@ -2,17 +2,10 @@
% Please edit documentation in R/deprecated.R
\name{AMR-deprecated}
\alias{AMR-deprecated}
\alias{p_symbol}
\title{Deprecated Functions}
\usage{
p_symbol(p, emptychar = " ")
}
\description{
These functions are so-called '\link{Deprecated}'. \strong{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 (if there is one).
}
\details{
All antibiotic class selectors (such as \code{\link[=carbapenems]{carbapenems()}}, \code{\link[=aminoglycosides]{aminoglycosides()}}) can now be used for filtering as well, making all their accompanying \verb{filter_*()} functions redundant (such as \code{\link[=filter_carbapenems]{filter_carbapenems()}}, \code{\link[=filter_aminoglycosides]{filter_aminoglycosides()}}).
}
\section{Retired Lifecycle}{
\if{html}{\figure{lifecycle_retired.svg}{options: style=margin-bottom:5px} \cr}