mirror of
https://github.com/msberends/AMR.git
synced 2025-07-09 08:52:15 +02:00
(v0.8.0.9021) update vignettes
This commit is contained in:
2
R/ab.R
2
R/ab.R
@ -75,7 +75,7 @@ as.ab <- function(x, ...) {
|
||||
# remove suffices
|
||||
x_bak_clean <- gsub("_(mic|rsi|dis[ck])$", "", x, ignore.case = TRUE)
|
||||
# remove disk concentrations, like LVX_NM -> LVX
|
||||
x_bak_clean <- gsub("_[A-Z]{2}[0-9_]{0,3}$", "", x_bak_clean, ignore.case = TRUE)
|
||||
x_bak_clean <- gsub("_[A-Z]{2}[0-9_.]{0,3}$", "", x_bak_clean, ignore.case = TRUE)
|
||||
# remove part between brackets if that's followed by another string
|
||||
x_bak_clean <- gsub("(.*)+ [(].*[)]", "\\1", x_bak_clean)
|
||||
# keep only max 1 space
|
||||
|
@ -241,11 +241,11 @@ eucast_rules <- function(x,
|
||||
warned <- FALSE
|
||||
|
||||
txt_error <- function() {
|
||||
cat("", bgRed(white(" ERROR ")), "\n\n")
|
||||
if (info == TRUE) cat("", bgRed(white(" ERROR ")), "\n\n")
|
||||
}
|
||||
txt_warning <- function() {
|
||||
if (warned == FALSE) {
|
||||
cat("", bgYellow(black(" WARNING ")))
|
||||
if (info == TRUE) cat("", bgYellow(black(" WARNING ")))
|
||||
}
|
||||
warned <<- TRUE
|
||||
}
|
||||
|
Reference in New Issue
Block a user