(v1.7.1.9059) bugfix set_ab_names

This commit is contained in:
dr. M.S. (Matthijs) Berends committed 2021-12-05 22:59:06 +01:00
1 parent 7965468ccd
commit b747036deb
6 files changed
+16 -12

No files matched your search

+5 -1
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.")