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

rlang dependency, new fungi

This commit is contained in:
2019-02-28 13:56:28 +01:00
parent cf3bdb54c7
commit 2565b60024
86 changed files with 762 additions and 705 deletions

View File

@ -260,13 +260,17 @@ mo_type <- function(x, language = get_locale(), ...) {
#' @export
mo_gramstain <- function(x, language = get_locale(), ...) {
x.bak <- x
x <- mo_phylum(x, ...)
x[x %in% c("Actinobacteria",
"Chloroflexi",
"Firmicutes",
"Tenericutes")] <- "Gram positive"
x.mo <- as.mo(x, ...)
x.phylum <- mo_phylum(x.mo)
x[x.phylum %in% c("Actinobacteria",
"Chloroflexi",
"Firmicutes",
"Tenericutes")] <- "Gram positive"
x[x != "Gram positive"] <- "Gram negative"
x[mo_kingdom(x.bak) != "Bacteria"] <- NA_character_
x[mo_kingdom(x.mo) != "Bacteria"] <- NA_character_
x[x.mo == "B_GRAMP"] <- "Gram positive"
x[x.mo == "B_GRAMN"] <- "Gram negative"
mo_translate(x, language = language)
}