mirror of
https://github.com/msberends/AMR.git
synced 2025-07-08 16:42:10 +02:00
support for portuguese, language determination based on system
This commit is contained in:
7
R/mo.R
7
R/mo.R
@ -125,6 +125,8 @@ as.mo <- function(x, Becker = FALSE, Lancefield = FALSE) {
|
||||
x <- unique(x)
|
||||
|
||||
x_backup <- x
|
||||
# translate to English for supported languages of mo_property
|
||||
x <- gsub("(Gruppe|gruppe|groep|grupo)", "group", x)
|
||||
# remove dots and other non-text in case of "E. coli" except spaces
|
||||
x <- gsub("[^a-zA-Z0-9 ]+", "", x)
|
||||
# but spaces before and after should be omitted
|
||||
@ -170,6 +172,11 @@ as.mo <- function(x, Becker = FALSE, Lancefield = FALSE) {
|
||||
x[i] <- 'HAEINF'
|
||||
next
|
||||
}
|
||||
if (tolower(x[i]) == '^c.*difficile$') {
|
||||
# avoid detection of Clostridium difficile in case of C. difficile
|
||||
x[i] <- 'CLODIF'
|
||||
next
|
||||
}
|
||||
if (tolower(x[i]) == '^st.*au$'
|
||||
| tolower(x[i]) == '^stau$'
|
||||
| tolower(x[i]) == '^staaur$') {
|
||||
|
Reference in New Issue
Block a user