1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-08 16:42:10 +02:00

(v1.5.0.9029) added missing families and orders

This commit is contained in:
2021-03-05 01:31:46 +01:00
parent ddf88345f1
commit 0e0e3c4ffa
30 changed files with 61003 additions and 60523 deletions

10
R/ab.R
View File

@ -310,10 +310,12 @@ as.ab <- function(x, flag_multiple_results = TRUE, info = TRUE, ...) {
x_translated <- paste(lapply(strsplit(x[i], "[^A-Z0-9]"),
function(y) {
for (i in seq_len(length(y))) {
y[i] <- ifelse(tolower(y[i]) %in% tolower(translations_file$replacement),
translations_file[which(tolower(translations_file$replacement) == tolower(y[i]) &
!isFALSE(translations_file$fixed)), "pattern"],
y[i])
for (lang in LANGUAGES_SUPPORTED[LANGUAGES_SUPPORTED != "en"]) {
y[i] <- ifelse(tolower(y[i]) %in% tolower(translations_file[, lang, drop = TRUE]),
translations_file[which(tolower(translations_file[, lang, drop = TRUE]) == tolower(y[i]) &
!isFALSE(translations_file$fixed)), "pattern"],
y[i])
}
}
generalise_antibiotic_name(y)
})[[1]],