mirror of
https://github.com/msberends/AMR.git
synced 2025-07-09 00:02:38 +02:00
misc
This commit is contained in:
@ -45,10 +45,10 @@
|
||||
#' stringsAsFactors = FALSE)
|
||||
#' a
|
||||
#'
|
||||
#' b <- EUCAST_rules(a)
|
||||
#' b <- EUCAST_rules(a, "bactid")
|
||||
#' b
|
||||
EUCAST_rules <- function(tbl,
|
||||
col_bactcode = 'bactid',
|
||||
col_bactcode,
|
||||
info = TRUE,
|
||||
amcl = 'amcl',
|
||||
amik = 'amik',
|
||||
|
6
R/atc.R
6
R/atc.R
@ -128,7 +128,7 @@ atc_property <- function(atc_code,
|
||||
#' Name of an antibiotic
|
||||
#'
|
||||
#' Convert antibiotic codes (from a laboratory information system like MOLIS or GLIMS) to a (trivial) antibiotic name or ATC code, or vice versa. This uses the data from \code{\link{ablist}}.
|
||||
#' @param abcode a code or name, like \code{"amox"}, \code{"cftr"} or \code{"J01CA04"}
|
||||
#' @param abcode a code or name, like \code{"AMOX"}, \code{"AMCL"} or \code{"J01CA04"}
|
||||
#' @param from,to type to transform from and to. See \code{\link{ablist}} for its column names.
|
||||
#' @param textbetween text to put between multiple returned texts
|
||||
#' @param tolower return output as lower case with function \code{\link{tolower}}.
|
||||
@ -146,7 +146,7 @@ atc_property <- function(atc_code,
|
||||
#' abname(c("AMCL", "GENT"))
|
||||
#' # "amoxicillin and enzyme inhibitor" "gentamicin"
|
||||
#'
|
||||
#' abname("AMCL", to = "trivial")
|
||||
#' abname("AMCL", to = "trivial_nl")
|
||||
#' # "Amoxicilline/clavulaanzuur"
|
||||
#'
|
||||
#' abname("AMCL", to = "atc")
|
||||
@ -210,7 +210,7 @@ abname <- function(abcode, from = 'umcg', to = 'official', textbetween = ' + ',
|
||||
select(to) %>%
|
||||
slice(1) %>%
|
||||
as.character()
|
||||
if (j > 1 & to %in% c('official', 'trivial')) {
|
||||
if (j > 1 & to %in% c('official', 'trivial_nl')) {
|
||||
drug.group[j] <- drug.group[j] %>% tolower()
|
||||
}
|
||||
}
|
||||
|
2
R/data.R
2
R/data.R
@ -26,7 +26,7 @@
|
||||
#' \item{\code{umcg}}{UMCG code, like \code{AMCL}}
|
||||
#' \item{\code{official}}{Official name by the WHO, like \code{"amoxicillin and enzyme inhibitor"}}
|
||||
#' \item{\code{official_nl}}{Official name in the Netherlands, like \code{"Amoxicilline met enzymremmer"}}
|
||||
#' \item{\code{trivial}}{Trivial name in Dutch, like \code{"Amoxicilline/clavulaanzuur"}}
|
||||
#' \item{\code{trivial_nl}}{Trivial name in Dutch, like \code{"Amoxicilline/clavulaanzuur"}}
|
||||
#' \item{\code{oral_ddd}}{Daily Defined Dose (DDD) according to the WHO, oral treatment}
|
||||
#' \item{\code{oral_units}}{Units of \code{ddd_units}}
|
||||
#' \item{\code{iv_ddd}}{Daily Defined Dose (DDD) according to the WHO, parenteral treatment}
|
||||
|
@ -254,7 +254,8 @@ rsi <- function(ab1, ab2 = NA, interpretation = 'IR', minimum = 30, percent = FA
|
||||
#' @examples
|
||||
#' \dontrun{
|
||||
#' # use it directly:
|
||||
#' rsi_predict(tbl[which(first_isolate == TRUE & genus == "Haemophilus"),], col_ab = "amcl", coldate = "date")
|
||||
#' rsi_predict(tbl = tbl[which(first_isolate == TRUE & genus == "Haemophilus"),],
|
||||
#' col_ab = "amcl", coldate = "date")
|
||||
#'
|
||||
#' # or with dplyr so you can actually read it:
|
||||
#' library(dplyr)
|
||||
|
Reference in New Issue
Block a user