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

(v1.6.0.9008) unlike, bugfix for col_mo naming

This commit is contained in:
2021-04-23 09:59:36 +02:00
parent c6289c3fc3
commit 70b803dbb6
33 changed files with 269 additions and 137 deletions

Binary file not shown.

View File

@ -136,8 +136,8 @@ read_EUCAST <- function(sheet, file, guideline_name) {
disk_R = ifelse(has_zone_diameters, G, NA_character_)) %>%
filter(!is.na(drug),
!(is.na(MIC_S) & is.na(MIC_R) & is.na(disk_S) & is.na(disk_R)),
!MIC_S %like% "(MIC|S ≤|note)",
!MIC_S %like% "^[-]",
MIC_S %unlike% "(MIC|S ≤|note)",
MIC_S %unlike% "^[-]",
drug != MIC_S,) %>%
mutate(administration = case_when(drug %like% "[( ]oral" ~ "oral",
drug %like% "[( ]iv" ~ "iv",

View File

@ -114,8 +114,8 @@ abx_atc2 <- ab_old %>%
filter(!atc %in% abx_atc1$atc,
is.na(ears_net),
!is.na(atc_group1),
!atc_group1 %like% ("virus|vaccin|viral|immun"),
!official %like% "(combinations| with )") %>%
atc_group1 %unlike% ("virus|vaccin|viral|immun"),
official %unlike% "(combinations| with )") %>%
mutate(ab = NA_character_) %>%
as.data.frame(stringsAsFactors = FALSE) %>%
select(ab, atc, name = official)

View File

@ -382,7 +382,7 @@ MOs <- MOs %>%
# what characters are in the fullnames?
table(sort(unlist(strsplit(x = paste(MOs$fullname, collapse = ""), split = ""))))
MOs %>% filter(!fullname %like% "^[a-z ]+$") %>% arrange(fullname) %>% View()
MOs %>% filter(fullname %unlike% "^[a-z ]+$") %>% arrange(fullname) %>% View()
table(MOs$kingdom, MOs$rank)
table(AMR::microorganisms$kingdom, AMR::microorganisms$rank)

View File

@ -9,9 +9,9 @@ files <- xml2::read_html(paste0("https://github.com/nathaneastwood/poorman/tree/
# get full URLs of all raw R files
files <- sort(paste0("https://raw.githubusercontent.com", gsub("blob/", "", files[files %like% "/R/.*.R$"])))
# remove files with only pkg specific code
files <- files[!files %like% "(zzz|init)[.]R$"]
files <- files[files %unlike% "(zzz|init)[.]R$"]
# also, there's a lot of functions we don't use
files <- files[!files %like% "(slice|glimpse|recode|replace_na|coalesce)[.]R$"]
files <- files[files %unlike% "(slice|glimpse|recode|replace_na|coalesce)[.]R$"]
# add our prepend file, containing info about the source of the data
intro <- readLines("data-raw/poorman_prepend.R")