diff --git a/DESCRIPTION b/DESCRIPTION index 76fe0be2..c8fe257f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: AMR Version: 0.1.1 -Date: 2018-02-23 +Date: 2018-02-26 Title: Antimicrobial Resistance Analysis Authors@R: c( person( diff --git a/NEWS b/NEWS index 921aa587..fed21ddb 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,5 @@ ## 0.1.1 -- EUCAST_rules applies for amoxicillin even if ampicillin is missing +- `EUCAST_rules` applies for amoxicillin even if ampicillin is missing - Edited column names to comply with GLIMS, the laboratory information system ## 0.1.0 diff --git a/R/data.R b/R/data.R index 20f36bc3..5b320d35 100644 --- a/R/data.R +++ b/R/data.R @@ -29,7 +29,7 @@ #' \item{\code{trivial}}{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, bij parenteral treatment} +#' \item{\code{iv_ddd}}{Daily Defined Dose (DDD) according to the WHO, parenteral treatment} #' \item{\code{iv_units}}{Units of \code{iv_ddd}} #' \item{\code{atc_group1}}{ATC group in Dutch, like \code{"Macroliden, lincosamiden en streptograminen"}} #' \item{\code{atc_group2}}{Subgroup of \code{atc_group1} in Dutch, like \code{"Macroliden"}} @@ -56,7 +56,7 @@ #' \item{\code{species}}{Species name of microorganism, like \code{"coli"}} #' \item{\code{subspecies}}{Subspecies name of bio-/serovar of microorganism, like \code{"EHEC"}} #' \item{\code{fullname}}{Full name, like \code{"Echerichia coli (EHEC)"}} -#' \item{\code{type}}{Type of microorganism, like \code{"Bacterie"} en \code{"Schimmel/gist"} (these are Dutch)} +#' \item{\code{type}}{Type of microorganism in Dutch, like \code{"Bacterie"} and \code{"Schimmel/gist"}} #' \item{\code{gramstain}}{Gram of microorganism in Dutch, like \code{"Negatieve staven"}} #' \item{\code{aerobic}}{Type aerobe/anaerobe of bacteria} #' } diff --git a/R/first_isolates.R b/R/first_isolates.R index 2b70fbd4..38d7da0c 100644 --- a/R/first_isolates.R +++ b/R/first_isolates.R @@ -364,7 +364,7 @@ first_isolate <- function(tbl, #' tbl$keyab <- key_antibiotics(tbl) #' } key_antibiotics <- function(tbl, - col_bactcode = 'bacteriecode', + col_bactcode = 'bactid', info = TRUE, amcl = 'amcl', amox = 'amox', diff --git a/R/rsi_analysis.R b/R/rsi_analysis.R index e241a7d8..3a39c66e 100644 --- a/R/rsi_analysis.R +++ b/R/rsi_analysis.R @@ -254,26 +254,27 @@ 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"),], "amcl") +#' rsi_predict(tbl[which(first_isolate == TRUE & genus == "Haemophilus"),], col_ab = "amcl", coldate = "date") #' #' # or with dplyr so you can actually read it: #' library(dplyr) #' tbl %>% #' filter(first_isolate == TRUE, #' genus == "Haemophilus") %>% -#' rsi_predict("amcl") +#' rsi_predict(col_ab = "amcl", coldate = "date") #' #' tbl %>% #' filter(first_isolate_weighted == TRUE, #' genus == "Haemophilus") %>% #' rsi_predict(col_ab = "amcl", +#' coldate = "date", #' year_max = 2050, #' year_every = 5) #' #' } rsi_predict <- function(tbl, col_ab, - col_date = 'ontvangstdatum', + col_date, year_max = as.integer(format(as.Date(Sys.Date()), '%Y')) + 15, year_every = 1, model = 'binomial',