1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-08 20:41:58 +02:00

(v1.7.1.9016) only_treatable ab selectors

This commit is contained in:
2021-07-08 22:23:28 +02:00
parent 625a6fb304
commit b228eb1536
25 changed files with 112 additions and 79 deletions

View File

@ -81,7 +81,7 @@ bug_drug_combinations <- function(x,
unique_mo <- sort(unique(x[, col_mo, drop = TRUE]))
# select only groups and antibiotics
if (inherits(x.bak, "grouped_df")) {
if (is_null_or_grouped_tbl(x.bak)) {
data_has_groups <- TRUE
groups <- setdiff(names(attributes(x.bak)$groups), ".rows")
x <- x[, c(groups, col_mo, colnames(x)[vapply(FUN.VALUE = logical(1), x, is.rsi)]), drop = FALSE]