* 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 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.
* 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
* 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 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):
* 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
```r
example_isolates[, penicillins() & administrable_per_os()] # base R
example_isolates[, penicillins() & administrable_per_os()] # base R
* Fix for using selectors multiple times in one call (e.g., using them in `dplyr::filter()` and immediately after in `dplyr::select()`)
* 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)
* 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*.
* 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*.
#' 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).
#' 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()]).
<ul><li>Removed all <code>filter_*()</code> functions (except for <code><ahref="../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><ahref="../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><ahref="../reference/key_antimicrobials.html">key_antimicrobials()</a></code> and <code><ahref="../reference/key_antimicrobials.html">antimicrobials_equal()</a></code>
<li>Removed the <code>key_antibiotics()</code> and <code>key_antibiotics_equal()</code> functions, which were deprecated and superseded by <code><ahref="../reference/key_antimicrobials.html">key_antimicrobials()</a></code> and <code><ahref="../reference/key_antimicrobials.html">antimicrobials_equal()</a></code>
</li>
</li>
<li>Removed all previously implemented <code><ahref="https://ggplot2.tidyverse.org/reference/ggplot.html"class="external-link">ggplot2::ggplot()</a></code> generics for classes <code><mic></code>, <code><disk></code>, <code><rsi></code> and <code><resistance_predict></code> as they did not follow the <code>ggplot2</code> logic. They were replaced with <code><ahref="https://ggplot2.tidyverse.org/reference/autoplot.html"class="external-link">ggplot2::autoplot()</a></code> generics.</li>
<li>Removed all previously implemented <code><ahref="https://ggplot2.tidyverse.org/reference/ggplot.html"class="external-link">ggplot2::ggplot()</a></code> generics for classes <code><mic></code>, <code><disk></code>, <code><rsi></code> and <code><resistance_predict></code> as they did not follow the <code>ggplot2</code> logic. They were replaced with <code><ahref="https://ggplot2.tidyverse.org/reference/autoplot.html"class="external-link">ggplot2::autoplot()</a></code> generics.</li>
@ -278,16 +271,17 @@
<code><ahref="../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>
<code><ahref="../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>
</ul></li>
<li>Antibiotic selectors
<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>
<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>Added more selectors for antibiotic classes: <code><ahref="../reference/antibiotic_class_selectors.html">aminopenicillins()</a></code>, <code><ahref="../reference/antibiotic_class_selectors.html">antifungals()</a></code>, <code><ahref="../reference/antibiotic_class_selectors.html">antimycobacterials()</a></code>, <code><ahref="../reference/antibiotic_class_selectors.html">lincosamides()</a></code>, <code><ahref="../reference/antibiotic_class_selectors.html">lipoglycopeptides()</a></code>, <code><ahref="../reference/antibiotic_class_selectors.html">polymyxins()</a></code>, <code><ahref="../reference/antibiotic_class_selectors.html">quinolones()</a></code>, <code><ahref="../reference/antibiotic_class_selectors.html">streptogramins()</a></code>, <code><ahref="../reference/antibiotic_class_selectors.html">trimethoprims()</a></code> and <code><ahref="../reference/antibiotic_class_selectors.html">ureidopenicillins()</a></code>
<li><p>Added more selectors for antibiotic classes: <code><ahref="../reference/antibiotic_class_selectors.html">aminopenicillins()</a></code>, <code><ahref="../reference/antibiotic_class_selectors.html">antifungals()</a></code>, <code><ahref="../reference/antibiotic_class_selectors.html">antimycobacterials()</a></code>, <code><ahref="../reference/antibiotic_class_selectors.html">lincosamides()</a></code>, <code><ahref="../reference/antibiotic_class_selectors.html">lipoglycopeptides()</a></code>, <code><ahref="../reference/antibiotic_class_selectors.html">polymyxins()</a></code>, <code><ahref="../reference/antibiotic_class_selectors.html">quinolones()</a></code>, <code><ahref="../reference/antibiotic_class_selectors.html">streptogramins()</a></code>, <code><ahref="../reference/antibiotic_class_selectors.html">trimethoprims()</a></code> and <code><ahref="../reference/antibiotic_class_selectors.html">ureidopenicillins()</a></code></p></li>
</li>
<li>
<li>Added specific selectors for certain types for treatment: <code><ahref="../reference/antibiotic_class_selectors.html">administrable_per_os()</a></code> and <code><ahref="../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>
<p>Added specific selectors for certain types for treatment: <code><ahref="../reference/antibiotic_class_selectors.html">administrable_per_os()</a></code> and <code><ahref="../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>
<spanclass="va">example_isolates</span><spanclass="op">[</span>, <spanclass="fu"><ahref="../reference/antibiotic_class_selectors.html">penicillins</a></span><spanclass="op">(</span><spanclass="op">)</span><spanclass="op">&</span><spanclass="fu"><ahref="../reference/antibiotic_class_selectors.html">administrable_per_os</a></span><spanclass="op">(</span><spanclass="op">)</span><spanclass="op">]</span><spanclass="co"># base R</span>
<spanclass="va">example_isolates</span><spanclass="op">[</span>, <spanclass="fu"><ahref="../reference/antibiotic_class_selectors.html">penicillins</a></span><spanclass="op">(</span><spanclass="op">)</span><spanclass="op">&</span><spanclass="fu"><ahref="../reference/antibiotic_class_selectors.html">administrable_per_os</a></span><spanclass="op">(</span><spanclass="op">)</span><spanclass="op">]</span><spanclass="co"># base R</span>
<ul><li>Fix for using selectors multiple times in one call (e.g., using them in <code><ahref="https://dplyr.tidyverse.org/reference/filter.html"class="external-link">dplyr::filter()</a></code> and immediately after in <code><ahref="https://dplyr.tidyverse.org/reference/select.html"class="external-link">dplyr::select()</a></code>)</li>
</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><p>Fix for using selectors multiple times in one call (e.g., using them in <code><ahref="https://dplyr.tidyverse.org/reference/filter.html"class="external-link">dplyr::filter()</a></code> and immediately after in <code><ahref="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>
</ul></li>
<li>Fixed the Gram stain (<code><ahref="../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>Fixed the Gram stain (<code><ahref="../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>
<li>Fix for duplicate ATC codes in the <code>antibiotics</code> data set</li>
@ -355,7 +349,7 @@
<li>The documentation of the <code><ahref="../reference/first_isolate.html">first_isolate()</a></code> and <code><ahref="../reference/key_antimicrobials.html">key_antimicrobials()</a></code> functions has been completely rewritten.</li>
<li>The documentation of the <code><ahref="../reference/first_isolate.html">first_isolate()</a></code> and <code><ahref="../reference/key_antimicrobials.html">key_antimicrobials()</a></code> functions has been completely rewritten.</li>
</ul></li>
</ul></li>
<li>Function <code><ahref="../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>Function <code><ahref="../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><ahref="https://ggplot2.tidyverse.org/reference/ggplot.html"class="external-link">ggplot()</a></code> method for <code><ahref="../reference/resistance_predict.html">resistance_predict()</a></code>
<li>A <code>ggplot()</code> method for <code><ahref="../reference/resistance_predict.html">resistance_predict()</a></code>
</li>
</li>
</ul></div>
</ul></div>
<divid="changed-1"class="section level3">
<divid="changed-1"class="section level3">
@ -442,7 +436,7 @@
<spanclass="co">#> Filtering on oxazolidinones: value in column `LNZ` (linezolid) is either "R", "S" or "I"</span></code></pre></div>
<spanclass="co">#> Filtering on oxazolidinones: value in column `LNZ` (linezolid) is either "R", "S" or "I"</span></code></pre></div>
</li>
</li>
<li><p>Support for custom MDRO guidelines, using the new <code><ahref="../reference/mdro.html">custom_mdro_guideline()</a></code> function, please see <code><ahref="../reference/mdro.html">mdro()</a></code> for additional info</p></li>
<li><p>Support for custom MDRO guidelines, using the new <code><ahref="../reference/mdro.html">custom_mdro_guideline()</a></code> function, please see <code><ahref="../reference/mdro.html">mdro()</a></code> for additional info</p></li>
<li><p><code><ahref="https://ggplot2.tidyverse.org/reference/ggplot.html"class="external-link">ggplot()</a></code> generics for classes <code><mic></code> and <code><disk></code></p></li>
<li><p><code>ggplot()</code> generics for classes <code><mic></code> and <code><disk></code></p></li>
<li>
<li>
<p>Function <code><ahref="../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>
<p>Function <code><ahref="../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>
<ul><li>Plotting of MIC and disk diffusion values now support interpretation colouring if you supply the microorganism and antimicrobial agent</li>
<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>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>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><ahref="../reference/plot.html">plot()</a></code> and with ggplot2 using <code><ahref="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><ahref="../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>
</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>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>
<li>
@ -510,7 +504,7 @@
<code><ahref="../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>
<code><ahref="../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><ahref="../reference/get_episode.html">get_episode()</a></code> and <code><ahref="../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>Functions <code><ahref="../reference/get_episode.html">get_episode()</a></code> and <code><ahref="../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><ahref="../reference/eucast_rules.html">eucast_rules()</a></code> now also applies to value “I” (not only “S”)</li>
<li>Argument <code>ampc_cephalosporin_resistance</code> in <code><ahref="../reference/eucast_rules.html">eucast_rules()</a></code> now also applies to value “I” (not only “S”)</li>
<li>Functions <code><ahref="https://docs.ropensci.org/skimr/reference/print.html" class="external-link">print()</a></code> and <code><ahref="https://rdrr.io/r/base/summary.html"class="external-link">summary()</a></code> on a Principal Components Analysis object (<code><ahref="../reference/pca.html">pca()</a></code>) now print additional group info if the original data was grouped using <code><ahref="https://dplyr.tidyverse.org/reference/group_by.html"class="external-link">dplyr::group_by()</a></code>
<li>Functions <code><ahref="https://rdrr.io/r/base/print.html" class="external-link">print()</a></code> and <code><ahref="https://rdrr.io/r/base/summary.html"class="external-link">summary()</a></code> on a Principal Components Analysis object (<code><ahref="../reference/pca.html">pca()</a></code>) now print additional group info if the original data was grouped using <code><ahref="https://dplyr.tidyverse.org/reference/group_by.html"class="external-link">dplyr::group_by()</a></code>
</li>
</li>
<li>Improved speed and reliability of <code><ahref="../reference/guess_ab_col.html">guess_ab_col()</a></code>. As this also internally improves the reliability of <code><ahref="../reference/first_isolate.html">first_isolate()</a></code> and <code><ahref="../reference/mdro.html">mdro()</a></code>, this might have a slight impact on the results of those functions.</li>
<li>Improved speed and reliability of <code><ahref="../reference/guess_ab_col.html">guess_ab_col()</a></code>. As this also internally improves the reliability of <code><ahref="../reference/first_isolate.html">first_isolate()</a></code> and <code><ahref="../reference/mdro.html">mdro()</a></code>, this might have a slight impact on the results of those functions.</li>
<li>Fix for <code><ahref="../reference/mo_property.html">mo_name()</a></code> when used in other languages than English</li>
<li>Fix for <code><ahref="../reference/mo_property.html">mo_name()</a></code> when used in other languages than English</li>
@ -606,7 +600,7 @@
</li>
</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 <ahref="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>For all function arguments in the code, it is now defined what the exact type of user input should be (inspired by the <ahref="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><ahref="../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>Fix for <code><ahref="../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><ahref="../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 <ahref="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 <ahref="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>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><ahref="../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>Fix for using argument <code>reference_df</code> in <code><ahref="../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><ahref="../reference/as.mo.html">mo_uncertainties()</a></code> would not return the results based on the MO matching score</p></li>
<li><p>Fixed a bug where <code><ahref="../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>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>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>
<p>Negative effects of this change are:</p>
<ul><li>Function <code><ahref="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><ahref="https://rdrr.io/pkg/cleaner/man/freq.html"class="external-link">cleaner::freq()</a></code>, or run <code><ahref="https://github.com/msberends/cleaner"class="external-link">library("cleaner")</a></code> before you use <code><ahref="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><ahref="https://rdrr.io/pkg/cleaner/man/freq.html"class="external-link">cleaner::freq()</a></code>, or run <code><ahref="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><ord></code>, not <code><rsi></code> anymore. This is purely a visual effect.</del></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><ord></code>, not <code><rsi></code> anymore. This is purely a visual effect.</del></li>
<li><del>All functions from the <code>mo_*</code> family (like <code><ahref="../reference/mo_property.html">mo_name()</a></code> and <code><ahref="../reference/mo_property.html">mo_gramstain()</a></code>) are noticeably slower when running on hundreds of thousands of rows.</del></li>
<li><del>All functions from the <code>mo_*</code> family (like <code><ahref="../reference/mo_property.html">mo_name()</a></code> and <code><ahref="../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>
<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/
<ul><li>Removed previously deprecated function <code>p.symbol()</code> - it was replaced with <code><ahref="../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>
<li>Removed function <code>read.4d()</code>, that was only useful for reading data from an old test database.</li>
<li>Removed function <code>read.4d()</code>, that was only useful for reading data from an old test database.</li>
</ul></div>
</ul></div>
@ -1086,7 +1080,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<spanclass="co">#> invalid microorganism code, NA generated</span></code></pre></div>
<spanclass="co">#> 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><ahref="../reference/mo_property.html">mo_name()</a></code>, although the class would suggest a valid microbial code.</p>
<p>This is important, because a value like <code>"testvalue"</code> could never be understood by e.g.<code><ahref="../reference/mo_property.html">mo_name()</a></code>, although the class would suggest a valid microbial code.</p>
</li>
</li>
<li><p>Function <code><ahref="https://rdrr.io/pkg/cleaner/man/freq.html"class="external-link">freq()</a></code> has moved to a new package, <ahref="https://github.com/msberends/clean"class="external-link"><code>clean</code></a> (<ahref="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><ahref="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, <ahref="https://github.com/msberends/clean"class="external-link"><code>clean</code></a> (<ahref="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>
<li><p>Renamed data set <code>septic_patients</code> to <code>example_isolates</code></p></li>
</ul></div>
</ul></div>
<divid="new-9"class="section level3">
<divid="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>Improved <code>filter_ab_class()</code> to be more reliable and to support 5th generation cephalosporins</li>
<li>Function <code><ahref="../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>Function <code><ahref="../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><ahref="../reference/age.html">age()</a></code> and <code><ahref="../reference/age_groups.html">age_groups()</a></code> now have a <code>na.rm</code> argument to remove empty values</li>
<li>Functions <code><ahref="../reference/age.html">age()</a></code> and <code><ahref="../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><ahref="../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><ahref="../reference/age_groups.html">age_groups()</a></code> will now introduce <code>NA</code>s and not return an error anymore</li>
<li>Using negative values for <code>x</code> in <code><ahref="../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 system’s language</li>
<li>Fix for determining the system’s language</li>
<li>Fix for <code>key_antibiotics()</code> on foreign systems</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><ahref="../reference/age.html">age()</a></code> function gained a new argument <code>exact</code> to determine ages with decimals</li>
<li>The <code><ahref="../reference/age.html">age()</a></code> function gained a new argument <code>exact</code> to determine ages with decimals</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>Added ceftazidim intrinsic resistance to <em>Streptococci</em>
</li>
</li>
<li>Changed default settings for <code><ahref="../reference/age_groups.html">age_groups()</a></code>, to let groups of fives and tens end with 100+ instead of 120+</li>
<li>Changed default settings for <code><ahref="../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><ahref="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>
<li>Fix for <code><ahref="../reference/first_isolate.html">first_isolate()</a></code> for when dates are missing</li>
<li>Fix for <code><ahref="../reference/first_isolate.html">first_isolate()</a></code> for when dates are missing</li>
<li>Improved speed of <code><ahref="../reference/guess_ab_col.html">guess_ab_col()</a></code>
<li>Improved speed of <code><ahref="../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>Now accepts high and low resistance: <code>"HIGH S"</code> will return <code>S</code>
<li><p>Header info is now available as a list, with the <code>header</code> function</p></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>
<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>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>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>
<spanclass="fu"><ahref="https://dplyr.tidyverse.org/reference/select.html">select</a></span><spanclass="op">(</span><spanclass="op">-</span><spanclass="va">count</span>, <spanclass="op">-</span><spanclass="va">cum_count</span><spanclass="op">)</span><spanclass="co"># only get item, percent, cum_percent</span></code></pre></div>
<spanclass="fu"><ahref="https://dplyr.tidyverse.org/reference/select.html">select</a></span><spanclass="op">(</span><spanclass="op">-</span><spanclass="va">count</span>, <spanclass="op">-</span><spanclass="va">cum_count</span><spanclass="op">)</span><spanclass="co"># only get item, percent, cum_percent</span></code></pre></div>
</li>
</li>
<li><p>Check for <code><ahref="https://hms.tidyverse.org/reference/Deprecated.html"class="external-link">hms::is.hms</a></code></p></li>
<li><p>Check for <code><ahref="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>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>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>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><ahref="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><code>ggplot_rsi</code> and <code>scale_y_percent</code> have <code>breaks</code> argument</p></li>
<li>
<li>
<p>AI improvements for <code>as.mo</code>:</p>
<p>AI improvements for <code>as.mo</code>:</p>
@ -1839,13 +1833,13 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
@ -1901,13 +1895,13 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<li>New for frequency tables (function <code>freq</code>):
<li>New for frequency tables (function <code>freq</code>):
<ul><li>A vignette to explain its usage</li>
<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>rsi</code> (antimicrobial resistance) to use as input</li>
<li>Support for <code>table</code> to use as input: <code><ahref="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>
<li>Support for existing functions <code>hist</code> and <code>plot</code> to use a frequency table as input: <code><ahref="https://rdrr.io/r/graphics/hist.html"class="external-link">hist(freq(df$age))</a></code>
<li>Support for existing functions <code>hist</code> and <code>plot</code> to use a frequency table as input: <code><ahref="https://rdrr.io/r/graphics/hist.html"class="external-link">hist(freq(df$age))</a></code>
</li>
</li>
<li>Support for <code>as.vector</code>, <code>as.data.frame</code>, <code>as_tibble</code> and <code>format</code>
<li>Support for <code>as.vector</code>, <code>as.data.frame</code>, <code>as_tibble</code> and <code>format</code>
</li>
</li>
<li>Support for quasiquotation: <code><ahref="https://rdrr.io/pkg/cleaner/man/freq.html"class="external-link">freq(mydata, mycolumn)</a></code> is the same as <code>mydata %>% freq(mycolumn)</code>
<li>Support for quasiquotation: <code>freq(mydata, mycolumn)</code> is the same as <code>mydata %>% freq(mycolumn)</code>
</li>
</li>
<li>Function <code>top_freq</code> function to return the top/below <em>n</em> items as vector</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>
<li>Header of frequency tables now also show Mean Absolute Deviaton (MAD) and Interquartile Range (IQR)</li>
<spanclass="version label label-default"data-toggle="tooltip"data-placement="bottom"title="Latest development version">1.7.1.9024</span>
<spanclass="version label label-default"data-toggle="tooltip"data-placement="bottom"title="Latest development version">1.7.1.9025</span>
</span>
</span>
</div>
</div>
@ -223,13 +223,6 @@
Source Code
Source Code
</a>
</a>
</li>
<li>
<ahref="../survey.html">
<spanclass="fa fa-clipboard-list"></span>
Survey
</a>
</li>
</li>
</ul>
</ul>
@ -253,12 +246,8 @@
<p>These functions are so-called '<ahref='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>
<p>These functions are so-called '<ahref='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>
<p>All antibiotic class selectors (such as <code><ahref='antibiotic_class_selectors.html'>carbapenems()</a></code>, <code><ahref='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>
<spanclass="version label label-default"data-toggle="tooltip"data-placement="bottom"title="Latest development version">1.7.1.9024</span>
<spanclass="version label label-default"data-toggle="tooltip"data-placement="bottom"title="Latest development version">1.7.1.9025</span>
</span>
</span>
</div>
</div>
@ -222,13 +222,6 @@
Source Code
Source Code
</a>
</a>
</li>
<li>
<ahref="../survey.html">
<spanclass="fa fa-clipboard-list"></span>
Survey
</a>
</li>
</li>
</ul>
</ul>
@ -255,109 +248,6 @@
</colgroup>
</colgroup>
<tbody>
<tbody>
<tr>
<thcolspan="2">
<h2id="section-background-information-on-included-data"class="hasAnchor"><ahref="#section-background-information-on-included-data"class="anchor"></a>Background information on included data</h2>
<pclass="section-desc"><p>Some pages about our package and its external sources. Be sure to read our <ahref="./../articles/index.html">How To’s</a> for more information about how to work with functions in this package.</p></p>
<h2id="section-background-information-on-included-data"class="hasAnchor"><ahref="#section-background-information-on-included-data"class="anchor"></a>Background information on included data</h2>
<pclass="section-desc"><p>Some pages about our package and its external sources. Be sure to read our <ahref="./../articles/index.html">How To’s</a> for more information about how to work with functions in this package.</p></p>
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).
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()}}).
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.