1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-08 16:42:10 +02:00

(v1.7.1.9059) bugfix set_ab_names

This commit is contained in:
2021-12-05 22:59:06 +01:00
parent 7965468ccd
commit b747036deb
6 changed files with 16 additions and 12 deletions

View File

@ -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.")