1
0
mirror of https://github.com/msberends/AMR.git synced 2025-12-13 23:50:20 +01:00

Implement extensive support for antiviral agents support (#77)

This commit is contained in:
Dr. Matthijs Berends
2022-11-13 08:46:10 +01:00
committed by GitHub
parent d2edcf51ad
commit 496c08d851
46 changed files with 1966 additions and 1563 deletions

View File

@@ -192,7 +192,7 @@ abx2$abbr <- lapply(as.list(abx2$abbr), function(x) unlist(strsplit(x, "|", fixe
# vector with official names, returns vector with CIDs
get_CID <- function(ab) {
CID <- rep(NA_integer_, length(ab))
p <- progress_ticker(n = length(ab), min_time = 0)
p <- AMR:::progress_ticker(n = length(ab), min_time = 0)
for (i in 1:length(ab)) {
p$tick()
@@ -248,7 +248,7 @@ antibiotics[is.na(CIDs), ] %>% View()
# returns list with synonyms (brand names), with CIDs as names
get_synonyms <- function(CID, clean = TRUE) {
synonyms <- rep(NA_character_, length(CID))
p <- progress_ticker(n = length(CID), min_time = 0)
p <- AMR:::progress_ticker(n = length(CID), min_time = 0)
for (i in 1:length(CID)) {
p$tick()