1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-11 17:02:00 +02:00

(v1.3.0.9026) eucast expert rules 3.2

This commit is contained in:
2020-09-24 00:30:11 +02:00
parent a1411ddafc
commit c19095a3d5
107 changed files with 48638 additions and 3953 deletions

View File

@ -64,7 +64,7 @@
#' }
like <- function(x, pattern, ignore.case = TRUE) {
# set to fixed if no regex found
fixed <- all(!grepl("[\\[$.^*?+-}{|)(]", pattern))
fixed <- !any(is_possibly_regex(pattern))
if (ignore.case == TRUE) {
# set here, otherwise if fixed = TRUE, this warning will be thrown: argument 'ignore.case = TRUE' will be ignored
x <- tolower(x)
@ -140,3 +140,13 @@ like <- function(x, pattern, ignore.case = TRUE) {
"%like_case%" <- function(x, pattern) {
like(x, pattern, ignore.case = FALSE)
}
# don't export his one, it's just for convenience in eucast_rules()
# match all Klebsiella and Raoultella, but not K. aerogenes: fullname %like_perl% "^(Klebsiella(?! aerogenes)|Raoultella)"
"%like_perl%" <- function(x, pattern) {
grepl(x = tolower(x),
pattern = tolower(pattern),
perl = TRUE,
fixed = FALSE,
ignore.case = TRUE)
}