mirror of
https://github.com/msberends/AMR.git
synced 2024-12-25 18:06:12 +01:00
(v1.7.1.9060) bugfix set_ab_names
This commit is contained in:
parent
b747036deb
commit
75965124ef
@ -1,5 +1,5 @@
|
|||||||
Package: AMR
|
Package: AMR
|
||||||
Version: 1.7.1.9059
|
Version: 1.7.1.9060
|
||||||
Date: 2021-12-05
|
Date: 2021-12-05
|
||||||
Title: Antimicrobial Resistance Data Analysis
|
Title: Antimicrobial Resistance Data Analysis
|
||||||
Description: Functions to simplify and standardise antimicrobial resistance (AMR)
|
Description: Functions to simplify and standardise antimicrobial resistance (AMR)
|
||||||
|
2
NEWS.md
2
NEWS.md
@ -1,4 +1,4 @@
|
|||||||
# `AMR` 1.7.1.9059
|
# `AMR` 1.7.1.9060
|
||||||
## <small>Last updated: 5 December 2021</small>
|
## <small>Last updated: 5 December 2021</small>
|
||||||
|
|
||||||
### Breaking changes
|
### Breaking changes
|
||||||
|
@ -57,7 +57,7 @@ pm_left_join <- function(x, y, by = NULL, suffix = c(".x", ".y")) {
|
|||||||
# adapted from https://github.com/nathaneastwood/poorman/blob/52eb6947e0b4430cd588976ed8820013eddf955f/R/where.R#L17-L32
|
# adapted from https://github.com/nathaneastwood/poorman/blob/52eb6947e0b4430cd588976ed8820013eddf955f/R/where.R#L17-L32
|
||||||
where <- function(fn) {
|
where <- function(fn) {
|
||||||
if (!is.function(fn)) {
|
if (!is.function(fn)) {
|
||||||
stop(deparse_var(fn), " is not a valid predicate function.")
|
stop(pm_deparse_var(fn), " is not a valid predicate function.")
|
||||||
}
|
}
|
||||||
preds <- unlist(lapply(
|
preds <- unlist(lapply(
|
||||||
pm_select_env$.data,
|
pm_select_env$.data,
|
||||||
|
@ -354,7 +354,7 @@ set_ab_names <- function(data, ..., property = "name", language = get_locale(),
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (is.data.frame(data)) {
|
if (is.data.frame(data)) {
|
||||||
if (length(list(...)) > 0) {
|
if (tryCatch(length(list(...)) > 0, error = function(e) TRUE)) {
|
||||||
df <- pm_select(data, ...)
|
df <- pm_select(data, ...)
|
||||||
} else {
|
} else {
|
||||||
df <- data
|
df <- data
|
||||||
|
6
R/rsi.R
6
R/rsi.R
@ -604,7 +604,11 @@ as.rsi.data.frame <- function(x,
|
|||||||
}
|
}
|
||||||
|
|
||||||
i <- 0
|
i <- 0
|
||||||
sel <- colnames(pm_select(x, ...))
|
if (tryCatch(length(list(...)) > 0, error = function(e) TRUE)) {
|
||||||
|
sel <- colnames(pm_select(x, ...))
|
||||||
|
} else {
|
||||||
|
sel <- colnames(x)
|
||||||
|
}
|
||||||
if (!is.null(col_mo)) {
|
if (!is.null(col_mo)) {
|
||||||
sel <- sel[sel != col_mo]
|
sel <- sel[sel != col_mo]
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
@ -78,4 +78,4 @@ writeLines(contents, "R/aa_helper_pm_functions.R")
|
|||||||
|
|
||||||
# after this, comment out:
|
# after this, comment out:
|
||||||
# pm_left_join() since we use a faster version
|
# pm_left_join() since we use a faster version
|
||||||
# pm_group_split() since we don't use it and it relies on R 3.5.0 for the use of ...length(), which is hard to support with C++ code
|
# pm_group_split() since we don't use it and it relies on R 3.5.0 for the use of ...length(), which is hard to support without C++ code
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.7.1.9059</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.7.1.9060</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.7.1.9059</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.7.1.9060</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -157,19 +157,19 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="section level2">
|
<div class="section level2">
|
||||||
<h2 class="page-header" data-toc-text="1.7.1.9059" id="amr-1719059">
|
<h2 class="page-header" data-toc-text="1.7.1.9060" id="amr-1719060">
|
||||||
<code>AMR</code> 1.7.1.9059<a class="anchor" aria-label="anchor" href="#amr-1719059"></a></h2>
|
<code>AMR</code> 1.7.1.9060<a class="anchor" aria-label="anchor" href="#amr-1719060"></a></h2>
|
||||||
<div class="section level3">
|
<div class="section level3">
|
||||||
<h3 id="last-updated-december-1-7-1-9059"><small>Last updated: 5 December 2021</small><a class="anchor" aria-label="anchor" href="#last-updated-december-1-7-1-9059"></a></h3>
|
<h3 id="last-updated-december-1-7-1-9060"><small>Last updated: 5 December 2021</small><a class="anchor" aria-label="anchor" href="#last-updated-december-1-7-1-9060"></a></h3>
|
||||||
<div class="section level4">
|
<div class="section level4">
|
||||||
<h4 id="breaking-changes-1-7-1-9059">Breaking changes<a class="anchor" aria-label="anchor" href="#breaking-changes-1-7-1-9059"></a></h4>
|
<h4 id="breaking-changes-1-7-1-9060">Breaking changes<a class="anchor" aria-label="anchor" href="#breaking-changes-1-7-1-9060"></a></h4>
|
||||||
<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>
|
<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>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>
|
||||||
<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><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><a href="https://ggplot2.tidyverse.org/reference/autoplot.html" class="external-link">ggplot2::autoplot()</a></code> generics.</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><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><a href="https://ggplot2.tidyverse.org/reference/autoplot.html" class="external-link">ggplot2::autoplot()</a></code> generics.</li>
|
||||||
</ul></div>
|
</ul></div>
|
||||||
<div class="section level4">
|
<div class="section level4">
|
||||||
<h4 id="new-1-7-1-9059">New<a class="anchor" aria-label="anchor" href="#new-1-7-1-9059"></a></h4>
|
<h4 id="new-1-7-1-9060">New<a class="anchor" aria-label="anchor" href="#new-1-7-1-9060"></a></h4>
|
||||||
<ul><li><p>Support for EUCAST Intrinsic Resistance and Unusual Phenotypes v3.3 (October 2021), effective in the <code><a href="../reference/eucast_rules.html">eucast_rules()</a></code> function. This is now the default guideline (all other guidelines are still available).</p></li>
|
<ul><li><p>Support for EUCAST Intrinsic Resistance and Unusual Phenotypes v3.3 (October 2021), effective in the <code><a href="../reference/eucast_rules.html">eucast_rules()</a></code> function. This is now the default guideline (all other guidelines are still available).</p></li>
|
||||||
<li>
|
<li>
|
||||||
<p>Function <code><a href="../reference/ab_property.html">set_ab_names()</a></code> to rename data set columns that resemble antimicrobial drugs. This allows for quickly renaming columns to official names, ATC codes, etc. Its second argument can be a tidyverse way of selecting:</p>
|
<p>Function <code><a href="../reference/ab_property.html">set_ab_names()</a></code> to rename data set columns that resemble antimicrobial drugs. This allows for quickly renaming columns to official names, ATC codes, etc. Its second argument can be a tidyverse way of selecting:</p>
|
||||||
@ -181,7 +181,7 @@
|
|||||||
<li><p>Support for Danish, and also added missing translations of all antimicrobial drugs in Italian, French and Portuguese</p></li>
|
<li><p>Support for Danish, and also added missing translations of all antimicrobial drugs in Italian, French and Portuguese</p></li>
|
||||||
</ul></div>
|
</ul></div>
|
||||||
<div class="section level4">
|
<div class="section level4">
|
||||||
<h4 id="changed-1-7-1-9059">Changed<a class="anchor" aria-label="anchor" href="#changed-1-7-1-9059"></a></h4>
|
<h4 id="changed-1-7-1-9060">Changed<a class="anchor" aria-label="anchor" href="#changed-1-7-1-9060"></a></h4>
|
||||||
<ul><li>Updated the bacterial taxonomy to 5 October 2021 (according to <a href="https://lpsn.dsmz.de" class="external-link">LPSN</a>), including all 11 new staphylococcal species named since 1 January last year</li>
|
<ul><li>Updated the bacterial taxonomy to 5 October 2021 (according to <a href="https://lpsn.dsmz.de" class="external-link">LPSN</a>), including all 11 new staphylococcal species named since 1 January last year</li>
|
||||||
<li>The <code>antibiotics</code> data set now contains <strong>all ATC codes</strong> that are available through the <a href="https://www.whocc.no" class="external-link">WHOCC website</a>, regardless of drugs being present in more than one ATC group. This means that:
|
<li>The <code>antibiotics</code> data set now contains <strong>all ATC codes</strong> that are available through the <a href="https://www.whocc.no" class="external-link">WHOCC website</a>, regardless of drugs being present in more than one ATC group. This means that:
|
||||||
<ul><li>Some drugs now contain multiple ATC codes (e.g., metronidazole contains 5)</li>
|
<ul><li>Some drugs now contain multiple ATC codes (e.g., metronidazole contains 5)</li>
|
||||||
@ -247,7 +247,7 @@
|
|||||||
<code><a href="../reference/get_episode.html">get_episode()</a></code> and <code><a href="../reference/get_episode.html">is_new_episode()</a></code> can now cope with <code>NA</code>s</li>
|
<code><a href="../reference/get_episode.html">get_episode()</a></code> and <code><a href="../reference/get_episode.html">is_new_episode()</a></code> can now cope with <code>NA</code>s</li>
|
||||||
</ul></div>
|
</ul></div>
|
||||||
<div class="section level4">
|
<div class="section level4">
|
||||||
<h4 id="other-1-7-1-9059">Other<a class="anchor" aria-label="anchor" href="#other-1-7-1-9059"></a></h4>
|
<h4 id="other-1-7-1-9060">Other<a class="anchor" aria-label="anchor" href="#other-1-7-1-9060"></a></h4>
|
||||||
<ul><li>This package is now being maintained by two epidemiologists and a data scientist from two different non-profit healthcare organisations. All functions in this package are now all considered to be stable. Updates to the AMR interpretation rules (such as by EUCAST and CLSI), the microbial taxonomy, and the antibiotic dosages will all be updated every 6 to 12 months from now on.</li>
|
<ul><li>This package is now being maintained by two epidemiologists and a data scientist from two different non-profit healthcare organisations. All functions in this package are now all considered to be stable. Updates to the AMR interpretation rules (such as by EUCAST and CLSI), the microbial taxonomy, and the antibiotic dosages will all be updated every 6 to 12 months from now on.</li>
|
||||||
</ul></div>
|
</ul></div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user