diff --git a/DESCRIPTION b/DESCRIPTION index 7996dbf9..471922ee 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: AMR -Version: 1.7.1.9058 +Version: 1.7.1.9059 Date: 2021-12-05 Title: Antimicrobial Resistance Data Analysis Description: Functions to simplify and standardise antimicrobial resistance (AMR) diff --git a/NEWS.md b/NEWS.md index 216a5c00..8a3a6720 100755 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# `AMR` 1.7.1.9058 +# `AMR` 1.7.1.9059 ## Last updated: 5 December 2021 ### Breaking changes diff --git a/R/ab_property.R b/R/ab_property.R index c1e4e22d..d2e73433 100644 --- a/R/ab_property.R +++ b/R/ab_property.R @@ -354,7 +354,11 @@ set_ab_names <- function(data, ..., property = "name", language = get_locale(), } if (is.data.frame(data)) { - df <- pm_select(data, ...) + if (length(list(...)) > 0) { + df <- pm_select(data, ...) + } else { + df <- data + } vars <- get_column_abx(df, info = FALSE, only_rsi_columns = FALSE, sort = FALSE) if (length(vars) == 0) { message_("No columns with antibiotic results found for `set_ab_names()`, leaving names unchanged.") diff --git a/data-raw/AMR_latest.tar.gz b/data-raw/AMR_latest.tar.gz index 8a8daff6..dcd96f44 100644 Binary files a/data-raw/AMR_latest.tar.gz and b/data-raw/AMR_latest.tar.gz differ diff --git a/docs/articles/datasets.html b/docs/articles/datasets.html index 4ae1e41d..e780f5b9 100644 --- a/docs/articles/datasets.html +++ b/docs/articles/datasets.html @@ -44,7 +44,7 @@
diff --git a/docs/news/index.html b/docs/news/index.html index 915a78c4..181ea216 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -17,7 +17,7 @@ @@ -157,19 +157,19 @@AMR
1.7.1.9058AMR
1.7.1.9059p_symbol()
and all filter_*()
functions (except for filter_first_isolate()
), which were all deprecated in a previous package versionkey_antibiotics()
and key_antibiotics_equal()
functions, which were deprecated and superseded by key_antimicrobials()
and antimicrobials_equal()
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.Support for EUCAST Intrinsic Resistance and Unusual Phenotypes v3.3 (October 2021), effective in the eucast_rules()
function. This is now the default guideline (all other guidelines are still available).
Function set_ab_names()
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:
Support for Danish, and also added missing translations of all antimicrobial drugs in Italian, French and Portuguese
antibiotics
data set now contains all ATC codes that are available through the WHOCC website, regardless of drugs being present in more than one ATC group. This means that:
get_episode()
and is_new_episode()
can now cope with NA
s