mirror of
https://github.com/msberends/AMR.git
synced 2024-12-26 06:46:11 +01:00
small fix
This commit is contained in:
parent
d15bb2ab3f
commit
ee664f2a4c
@ -155,12 +155,12 @@ first_isolate <- function(tbl,
|
||||
col_mo <- col_bactid
|
||||
warning("Use of `col_bactid` is deprecated. Use `col_mo` instead.")
|
||||
} else if (is.null(col_mo) & "mo" %in% lapply(tbl, class)) {
|
||||
col_mo <- colnames(tbl)[lapply(tbl, class) == "mo"]
|
||||
col_mo <- colnames(tbl)[lapply(tbl, class) == "mo"][1]
|
||||
message("NOTE: Using column `", col_mo, "` as input for `col_mo`.")
|
||||
}
|
||||
# -- date
|
||||
if (is.null(col_date) & "Date" %in% lapply(tbl, class)) {
|
||||
col_date <- colnames(tbl)[lapply(tbl, class) == "Date"]
|
||||
col_date <- colnames(tbl)[lapply(tbl, class) == "Date"][1]
|
||||
message("NOTE: Using column `", col_date, "` as input for `col_date`.")
|
||||
}
|
||||
# -- patient id
|
||||
|
2
R/mdro.R
2
R/mdro.R
@ -114,7 +114,7 @@ MDRO <- function(tbl,
|
||||
col_mo <- col_bactid
|
||||
warning("Use of `col_bactid` is deprecated. Use `col_mo` instead.")
|
||||
} else if (is.null(col_mo) & "mo" %in% lapply(tbl, class)) {
|
||||
col_mo <- colnames(tbl)[lapply(tbl, class) == "mo"]
|
||||
col_mo <- colnames(tbl)[lapply(tbl, class) == "mo"][1]
|
||||
message("NOTE: Using column `", col_mo, "` as input for `col_mo`.")
|
||||
} else if (!col_mo %in% colnames(tbl)) {
|
||||
stop('Column ', col_mo, ' not found.', call. = FALSE)
|
||||
|
Loading…
Reference in New Issue
Block a user