rename columns

This commit is contained in:
dr. M.S. (Matthijs) Berends 2018-02-26 10:53:54 +01:00
parent 3f859210d5
commit be51a95448
No known key found for this signature in database
GPG Key ID: AE86720DBCDA4567
5 changed files with 9 additions and 8 deletions

View File

@ -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(

2
NEWS
View File

@ -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

View File

@ -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}
#' }

View File

@ -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',

View File

@ -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',