diff --git a/DESCRIPTION b/DESCRIPTION index 787648ad..f29d3eaf 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: AMR Version: 0.6.1.9003 -Date: 2019-05-10 +Date: 2019-05-11 Title: Antimicrobial Resistance Analysis Authors@R: c( person( diff --git a/R/get_locale.R b/R/get_locale.R index 991ddb9b..653e9822 100755 --- a/R/get_locale.R +++ b/R/get_locale.R @@ -26,7 +26,7 @@ #' #' \code{system.file("translations.tsv", package = "AMR")} #' -#' This file will be read by all functions where a translated output can be desired, like all \code{\link{mo_property}} functions (\code{\link{mo_fullname}}, \code{\link{mo_type}}, etc.). Please suggest your own translations \href{https://gitlab.com/msberends/AMR/issues/new?issue[title]=Translation suggestion}{by creating a new issue on our repository}. +#' This file will be read by all functions where a translated output can be desired, like all \code{\link{mo_property}} functions (\code{\link{mo_fullname}}, \code{\link{mo_type}}, etc.). Please suggest your own translations \href{https://gitlab.com/msberends/AMR/issues/new?issue[title]=Translation\%20suggestion}{by creating a new issue on our repository}. #' #' The system language will be used at default, if supported, using \code{\link{get_locale}}. The system language can be overwritten with \code{\link{getOption}("AMR_locale")}. #' @inheritSection AMR Read more on our website! diff --git a/R/mdro.R b/R/mdro.R index d244422b..bf6b009e 100755 --- a/R/mdro.R +++ b/R/mdro.R @@ -321,15 +321,12 @@ mdro <- function(x, & !ab_missing(CIP) & !ab_missing(CAZ) & !ab_missing(TZP) ) { - tbl_ <- tbl_ %>% mutate( - psae = 0, - psae = ifelse(MEM == "R" | IPM == "R", psae + 1, psae), - psae = ifelse(GEN == "R" & TOB == "R", psae + 1, psae), - psae = ifelse(CIP == "R", psae + 1, psae), - psae = ifelse(CAZ == "R", psae + 1, psae), - psae = ifelse(TZP == "R", psae + 1, psae), - psae = ifelse(is.na(psae), 0, psae) - ) + tbl_$psae <- 0 + tbl_[which(tbl_[, MEM] == "R" | tbl_[, IPM] == "R"), "psae"] <- 1 + tbl_[which(tbl_[, MEM] == "R" | tbl_[, IPM] == "R"), "psae"] + tbl_[which(tbl_[, GEN] == "R" & tbl_[, TOB] == "R"), "psae"] <- 1 + tbl_[which(tbl_[, GEN] == "R" & tbl_[, TOB] == "R"), "psae"] + tbl_[which(tbl_[, CIP] == "R"), "psae"] <- 1 + tbl_[which(tbl_[, CIP] == "R"), "psae"] + tbl_[which(tbl_[, CAZ] == "R"), "psae"] <- 1 + tbl_[which(tbl_[, CAZ] == "R"), "psae"] + tbl_[which(tbl_[, TZP] == "R"), "psae"] <- 1 + tbl_[which(tbl_[, TZP] == "R"), "psae"] } else { tbl_$psae <- 0 } diff --git a/R/whocc.R b/R/whocc.R index 61ac3808..c49552fb 100755 --- a/R/whocc.R +++ b/R/whocc.R @@ -33,8 +33,8 @@ #' @name WHOCC #' @rdname WHOCC #' @examples -#' as.atc("meropenem") -#' atc_name("J01DH02") +#' as.ab("meropenem") +#' ab_name("J01DH02") #' -#' atc_tradenames("flucloxacillin") +#' ab_tradenames("flucloxacillin") NULL diff --git a/data/antibiotics.rda b/data/antibiotics.rda index 43b0f66b..6aa57c28 100755 Binary files a/data/antibiotics.rda and b/data/antibiotics.rda differ diff --git a/docs/reference/WHOCC.html b/docs/reference/WHOCC.html index 5ee388ca..7e8d22da 100644 --- a/docs/reference/WHOCC.html +++ b/docs/reference/WHOCC.html @@ -80,7 +80,7 @@ AMR (for R) - 0.6.0 + 0.6.1.9003 @@ -145,7 +145,7 @@
  • - + Get properties of an antibiotic @@ -258,10 +258,10 @@ This package contains all ~500 antimicrobial drugs and their An

    Examples

    # NOT RUN {
    -as.atc("meropenem")
    -atc_name("J01DH02")
    +as.ab("meropenem")
    +ab_name("J01DH02")
     
    -atc_tradenames("flucloxacillin")
    +ab_tradenames("flucloxacillin")
     # }