diff --git a/.Rbuildignore b/.Rbuildignore index 6cda46b4..a78eab45 100755 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -7,3 +7,4 @@ appveyor.yml .zenodo.json _noinclude ^cran-comments\.md$ +git.sh diff --git a/.gitignore b/.gitignore index 9c9ad84a..8f811d0e 100755 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ vignettes/*.R .DS_Store ^cran-comments\.md$ ^CRAN-RELEASE$ +git.sh diff --git a/NEWS.md b/NEWS.md index ded89d9c..6f70e83f 100755 --- a/NEWS.md +++ b/NEWS.md @@ -4,7 +4,7 @@ * Function `mo_failures` to review values that could not be coerced to a valid MO code, using `as.mo`. This latter function will now only show a maximum of 25 uncoerced values. * Function `mo_renamed` to get a list of all returned values from `as.mo` that have had taxonomic renaming * Function `age` to calculate the (patients) age in years -* Function `age_groups` to split ages into custom or predefined groups (like children or elderly). This allows for easier antimicrobial resistance per age group. +* Function `age_groups` to split ages into custom or predefined groups (like children or elderly). This allows for easier demographic antimicrobial resistance analysis (per age group). #### Changed * Improvements for `as.mo`: @@ -29,7 +29,10 @@ * Now honours the `decimal.mark` setting, which just like `format` defaults to `getOption("OutDec")` * The new `big.mark` parameter will at default be `","` when `decimal.mark = "."` and `"."` otherwise * Fix for header text where all observations are `NA` +* Function `scale_y_percent` now has the `limits` parameter +#### Other +* Updated licence text to emphasise GPL 2.0 and that this is an R package. # 0.5.0 (latest stable release) **Published on CRAN: 2018-11-30** diff --git a/R/ab_property.R b/R/ab_property.R index 1005b102..2e27a283 100644 --- a/R/ab_property.R +++ b/R/ab_property.R @@ -6,14 +6,14 @@ # Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # # # # LICENCE # -# This program is free software; you can redistribute it and/or modify # +# This package is free software; you can redistribute it and/or modify # # it under the terms of the GNU General Public License version 2.0, # # as published by the Free Software Foundation. # # # -# This program is distributed in the hope that it will be useful, # +# This R package is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # +# GNU General Public License version 2.0 for more details. # # ==================================================================== # #' Property of an antibiotic diff --git a/R/abname.R b/R/abname.R index 333a0e63..f25b2cd0 100644 --- a/R/abname.R +++ b/R/abname.R @@ -6,14 +6,14 @@ # Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # # # # LICENCE # -# This program is free software; you can redistribute it and/or modify # +# This package is free software; you can redistribute it and/or modify # # it under the terms of the GNU General Public License version 2.0, # # as published by the Free Software Foundation. # # # -# This program is distributed in the hope that it will be useful, # +# This R package is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # +# GNU General Public License version 2.0 for more details. # # ==================================================================== # #' Name of an antibiotic diff --git a/R/age.R b/R/age.R index 2bad6437..b1268344 100644 --- a/R/age.R +++ b/R/age.R @@ -6,14 +6,14 @@ # Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # # # # LICENCE # -# This program is free software; you can redistribute it and/or modify # +# This package is free software; you can redistribute it and/or modify # # it under the terms of the GNU General Public License version 2.0, # # as published by the Free Software Foundation. # # # -# This program is distributed in the hope that it will be useful, # +# This R package is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # +# GNU General Public License version 2.0 for more details. # # ==================================================================== # #' Age in years of individuals @@ -49,7 +49,7 @@ age <- function(x, y = Sys.Date()) { ages } -#' Split ages in age groups +#' Split ages into age groups #' #' Splits ages into groups defined by the \code{split} parameter. #' @param x age, e.g. calculated with \code{\link{age}} @@ -61,33 +61,36 @@ age <- function(x, y = Sys.Date()) { #' \item{A character:} #' \itemize{ #' \item{\code{"children"}, equivalent of: \code{c(0, 1, 2, 4, 6, 13, 18)}. This will split on 0, 1, 2-3, 4-5, 6-12, 13-17 and 18+.} -#' \item{\code{"elderly"} or \code{"seniors"}, equivalent: of \code{c(65, 75, 85, 95)}. This will split on 0-64, 65-74, 75-84, 85-94 and 95+.} -#' \item{\code{"fives"}, equivalent: of \code{1:20 * 5}. This will split on 0-4, 5-9, 10-14, 15-19 and so forth.} -#' \item{\code{"tens"}, equivalent: of \code{1:10 * 10}. This will split on 0-9, 10-19, 20-29 and so forth.} +#' \item{\code{"elderly"} or \code{"seniors"}, equivalent of: \code{c(65, 75, 85, 95)}. This will split on 0-64, 65-74, 75-84, 85-94 and 95+.} +#' \item{\code{"fives"}, equivalent of: \code{1:20 * 5}. This will split on 0-4, 5-9, 10-14, 15-19 and so forth.} +#' \item{\code{"tens"}, equivalent of: \code{1:10 * 10}. This will split on 0-9, 10-19, 20-29 and so forth.} #' } #' } +#' @keywords age_group age #' @return Ordered \code{\link{factor}} #' @seealso age #' @export #' @examples #' ages <- c(3, 8, 16, 54, 31, 76, 101, 43, 21) #' -#' # split on 0-49 and 50+ +#' # split into 0-49 and 50+ #' age_groups(ages, 50) #' -#' # split on 0-20, 21-49 and 50+ -#' age_groups(ages, c(21, 50)) +#' # split into 0-19, 20-49 and 50+ +#' age_groups(ages, c(20, 50)) #' -#' # split on every ten years +#' # split into groups of ten years #' age_groups(ages, 1:10 * 10) -#' age_groups(ages, "tens") +#' age_groups(ages, split_at = "tens") #' -#' # split on every five years +#' # split into groups of five years #' age_groups(ages, 1:20 * 5) -#' age_groups(ages, "fives") +#' age_groups(ages, split_at = "fives") #' -#' # split on children +#' # split specifically for children #' age_groups(ages, "children") +#' # same: +#' age_groups(ages, c(1, 2, 4, 6, 13, 17)) #' #' # resistance of ciprofloxacine per age group #' library(dplyr) @@ -101,20 +104,18 @@ age <- function(x, y = Sys.Date()) { #' ggplot_rsi(x = "age_group") age_groups <- function(x, split_at = c(12, 25, 55, 75)) { if (is.character(split_at)) { - split_at <- split_at[1] + split_at <- split_at[1L] if (split_at %like% "^child") { split_at <- c(0, 1, 2, 4, 6, 13, 18) - } - if (split_at %like% "^elder" | split_at %like% "^senior") { + } else if (split_at %like% "^(elder|senior)") { split_at <- c(65, 75, 85, 95) - } - if (split_at %like% "fives") { + } else if (split_at %like% "^five") { split_at <- 1:20 * 5 - } - if (split_at %like% "^tens") { + } else if (split_at %like% "^ten") { split_at <- 1:10 * 10 } } + split_at <- as.integer(split_at) if (!is.numeric(x) | !is.numeric(split_at)) { stop("`x` and `split_at` must both be numeric.") } @@ -129,19 +130,14 @@ age_groups <- function(x, split_at = c(12, 25, 55, 75)) { # turn input values to 'split_at' indices y <- x + labs <- split_at for (i in 1:length(split_at)) { y[x >= split_at[i]] <- i + # create labels + # when age group consists of only one age + labs[i - 1] <- paste0(unique(c(split_at[i - 1], split_at[i] - 1)), collapse = "-") } - # create labels - labs <- split_at - for (i in 2:length(labs)) { - if (split_at[i - 1] == split_at[i] - 1) { - labs[i - 1] <- split_at[i - 1] - } else { - labs[i - 1] <- paste0(split_at[i - 1], "-", split_at[i] - 1) - } - } # last category labs[length(labs)] <- paste0(split_at[length(split_at)], "+") diff --git a/R/atc.R b/R/atc.R index 562b6b2c..4c768fda 100755 --- a/R/atc.R +++ b/R/atc.R @@ -6,14 +6,14 @@ # Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # # # # LICENCE # -# This program is free software; you can redistribute it and/or modify # +# This package is free software; you can redistribute it and/or modify # # it under the terms of the GNU General Public License version 2.0, # # as published by the Free Software Foundation. # # # -# This program is distributed in the hope that it will be useful, # +# This R package is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # +# GNU General Public License version 2.0 for more details. # # ==================================================================== # diff --git a/R/count.R b/R/count.R index 7a0fdb1c..1cba10f3 100644 --- a/R/count.R +++ b/R/count.R @@ -6,14 +6,14 @@ # Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # # # # LICENCE # -# This program is free software; you can redistribute it and/or modify # +# This package is free software; you can redistribute it and/or modify # # it under the terms of the GNU General Public License version 2.0, # # as published by the Free Software Foundation. # # # -# This program is distributed in the hope that it will be useful, # +# This R package is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # +# GNU General Public License version 2.0 for more details. # # ==================================================================== # #' Count isolates diff --git a/R/data.R b/R/data.R index 9c747577..52565791 100755 --- a/R/data.R +++ b/R/data.R @@ -6,14 +6,14 @@ # Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # # # # LICENCE # -# This program is free software; you can redistribute it and/or modify # +# This package is free software; you can redistribute it and/or modify # # it under the terms of the GNU General Public License version 2.0, # # as published by the Free Software Foundation. # # # -# This program is distributed in the hope that it will be useful, # +# This R package is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # +# GNU General Public License version 2.0 for more details. # # ==================================================================== # #' Data set with 423 antibiotics diff --git a/R/deprecated.R b/R/deprecated.R index bdc940d3..88e0b91f 100644 --- a/R/deprecated.R +++ b/R/deprecated.R @@ -6,14 +6,14 @@ # Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # # # # LICENCE # -# This program is free software; you can redistribute it and/or modify # +# This package is free software; you can redistribute it and/or modify # # it under the terms of the GNU General Public License version 2.0, # # as published by the Free Software Foundation. # # # -# This program is distributed in the hope that it will be useful, # +# This R package is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # +# GNU General Public License version 2.0 for more details. # # ==================================================================== # #' Deprecated functions diff --git a/R/eucast_rules.R b/R/eucast_rules.R index 754e3e0c..8040bd2f 100755 --- a/R/eucast_rules.R +++ b/R/eucast_rules.R @@ -6,14 +6,14 @@ # Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # # # # LICENCE # -# This program is free software; you can redistribute it and/or modify # +# This package is free software; you can redistribute it and/or modify # # it under the terms of the GNU General Public License version 2.0, # # as published by the Free Software Foundation. # # # -# This program is distributed in the hope that it will be useful, # +# This R package is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # +# GNU General Public License version 2.0 for more details. # # ==================================================================== # #' EUCAST rules diff --git a/R/first_isolate.R b/R/first_isolate.R index 9aa36aee..9866b733 100755 --- a/R/first_isolate.R +++ b/R/first_isolate.R @@ -6,14 +6,14 @@ # Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # # # # LICENCE # -# This program is free software; you can redistribute it and/or modify # +# This package is free software; you can redistribute it and/or modify # # it under the terms of the GNU General Public License version 2.0, # # as published by the Free Software Foundation. # # # -# This program is distributed in the hope that it will be useful, # +# This R package is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # +# GNU General Public License version 2.0 for more details. # # ==================================================================== # #' Determine first (weighted) isolates diff --git a/R/freq.R b/R/freq.R index 418a1ffd..9d8e2819 100755 --- a/R/freq.R +++ b/R/freq.R @@ -6,14 +6,14 @@ # Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # # # # LICENCE # -# This program is free software; you can redistribute it and/or modify # +# This package is free software; you can redistribute it and/or modify # # it under the terms of the GNU General Public License version 2.0, # # as published by the Free Software Foundation. # # # -# This program is distributed in the hope that it will be useful, # +# This R package is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # +# GNU General Public License version 2.0 for more details. # # ==================================================================== # #' Frequency table diff --git a/R/g.test.R b/R/g.test.R index cb14f987..2cd14bf8 100644 --- a/R/g.test.R +++ b/R/g.test.R @@ -6,14 +6,14 @@ # Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # # # # LICENCE # -# This program is free software; you can redistribute it and/or modify # +# This package is free software; you can redistribute it and/or modify # # it under the terms of the GNU General Public License version 2.0, # # as published by the Free Software Foundation. # # # -# This program is distributed in the hope that it will be useful, # +# This R package is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # +# GNU General Public License version 2.0 for more details. # # ==================================================================== # #' \emph{G}-test for Count Data diff --git a/R/get_locale.R b/R/get_locale.R index 18a4e6db..566d27bb 100644 --- a/R/get_locale.R +++ b/R/get_locale.R @@ -6,14 +6,14 @@ # Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # # # # LICENCE # -# This program is free software; you can redistribute it and/or modify # +# This package is free software; you can redistribute it and/or modify # # it under the terms of the GNU General Public License version 2.0, # # as published by the Free Software Foundation. # # # -# This program is distributed in the hope that it will be useful, # +# This R package is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # +# GNU General Public License version 2.0 for more details. # # ==================================================================== # #' Get language for AMR diff --git a/R/ggplot_rsi.R b/R/ggplot_rsi.R index 62732ebf..a8b1017b 100644 --- a/R/ggplot_rsi.R +++ b/R/ggplot_rsi.R @@ -6,14 +6,14 @@ # Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # # # # LICENCE # -# This program is free software; you can redistribute it and/or modify # +# This package is free software; you can redistribute it and/or modify # # it under the terms of the GNU General Public License version 2.0, # # as published by the Free Software Foundation. # # # -# This program is distributed in the hope that it will be useful, # +# This R package is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # +# GNU General Public License version 2.0 for more details. # # ==================================================================== # #' AMR bar plots with \code{ggplot} @@ -24,6 +24,7 @@ #' @param x variable to show on x axis, either \code{"Antibiotic"} (default) or \code{"Interpretation"} or a grouping variable #' @param fill variable to categorise using the plots legend, either \code{"Antibiotic"} (default) or \code{"Interpretation"} or a grouping variable #' @param breaks numeric vector of positions +#' @param limits numeric vector of length two providing limits of the scale, use \code{NA} to refer to the existing minimum or maximum #' @param facet variable to split plots by, either \code{"Interpretation"} (default) or \code{"Antibiotic"} or a grouping variable #' @param translate_ab a column name of the \code{\link{antibiotics}} data set to translate the antibiotic abbreviations into, using \code{\link{abname}}. Default behaviour is to translate to official names according to the WHO. Use \code{translate_ab = FALSE} to disable translation. #' @param fun function to transform \code{data}, either \code{\link{count_df}} (default) or \code{\link{portion_df}} @@ -150,6 +151,7 @@ ggplot_rsi <- function(data, # params = list(), facet = NULL, breaks = seq(0, 1, 0.1), + limits = NULL, translate_ab = "official", fun = count_df, nrow = NULL, @@ -203,7 +205,7 @@ ggplot_rsi <- function(data, if (fun_name == "portion_df" | (fun_name == "count_df" & position == "fill")) { # portions, so use y scale with percentage - p <- p + scale_y_percent(breaks = breaks) + p <- p + scale_y_percent(breaks = breaks, limits = limits) } if (fun_name == "count_df" & datalabels == TRUE) { @@ -295,9 +297,10 @@ facet_rsi <- function(facet = c("Interpretation", "Antibiotic"), nrow = NULL) { #' @rdname ggplot_rsi #' @export -scale_y_percent <- function(breaks = seq(0, 1, 0.1)) { +scale_y_percent <- function(breaks = seq(0, 1, 0.1), limits = NULL) { ggplot2::scale_y_continuous(breaks = breaks, - labels = percent(breaks)) + labels = percent(breaks), + limits = limits) } #' @rdname ggplot_rsi diff --git a/R/globals.R b/R/globals.R index 0360affe..531db931 100755 --- a/R/globals.R +++ b/R/globals.R @@ -6,14 +6,14 @@ # Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # # # # LICENCE # -# This program is free software; you can redistribute it and/or modify # +# This package is free software; you can redistribute it and/or modify # # it under the terms of the GNU General Public License version 2.0, # # as published by the Free Software Foundation. # # # -# This program is distributed in the hope that it will be useful, # +# This R package is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # +# GNU General Public License version 2.0 for more details. # # ==================================================================== # globalVariables(c(".", diff --git a/R/join_microorganisms.R b/R/join_microorganisms.R index 35081092..db877bb9 100755 --- a/R/join_microorganisms.R +++ b/R/join_microorganisms.R @@ -1,3 +1,21 @@ +# ==================================================================== # +# TITLE # +# Antimicrobial Resistance (AMR) Analysis # +# # +# AUTHORS # +# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # +# # +# LICENCE # +# This package is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License version 2.0, # +# as published by the Free Software Foundation. # +# # +# This R package is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License version 2.0 for more details. # +# ==================================================================== # + #' Join a table with \code{microorganisms} #' #' Join the dataset \code{\link{microorganisms}} easily to an existing table or character vector. diff --git a/R/key_antibiotics.R b/R/key_antibiotics.R index 5247a988..b23cfe6d 100644 --- a/R/key_antibiotics.R +++ b/R/key_antibiotics.R @@ -6,14 +6,14 @@ # Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # # # # LICENCE # -# This program is free software; you can redistribute it and/or modify # +# This package is free software; you can redistribute it and/or modify # # it under the terms of the GNU General Public License version 2.0, # # as published by the Free Software Foundation. # # # -# This program is distributed in the hope that it will be useful, # +# This R package is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # +# GNU General Public License version 2.0 for more details. # # ==================================================================== # #' Key antibiotics for first \emph{weighted} isolates diff --git a/R/kurtosis.R b/R/kurtosis.R index 1efc469a..03a794b9 100644 --- a/R/kurtosis.R +++ b/R/kurtosis.R @@ -1,3 +1,21 @@ +# ==================================================================== # +# TITLE # +# Antimicrobial Resistance (AMR) Analysis # +# # +# AUTHORS # +# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # +# # +# LICENCE # +# This package is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License version 2.0, # +# as published by the Free Software Foundation. # +# # +# This R package is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License version 2.0 for more details. # +# ==================================================================== # + #' Kurtosis of the sample #' #' @description Kurtosis is a measure of the "tailedness" of the probability distribution of a real-valued random variable. diff --git a/R/like.R b/R/like.R index 4552cfc6..bd67d230 100644 --- a/R/like.R +++ b/R/like.R @@ -6,14 +6,14 @@ # Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # # # # LICENCE # -# This program is free software; you can redistribute it and/or modify # +# This package is free software; you can redistribute it and/or modify # # it under the terms of the GNU General Public License version 2.0, # # as published by the Free Software Foundation. # # # -# This program is distributed in the hope that it will be useful, # +# This R package is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # +# GNU General Public License version 2.0 for more details. # # ==================================================================== # #' Pattern Matching diff --git a/R/mdro.R b/R/mdro.R index 71b82da8..d922a370 100755 --- a/R/mdro.R +++ b/R/mdro.R @@ -6,14 +6,14 @@ # Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # # # # LICENCE # -# This program is free software; you can redistribute it and/or modify # +# This package is free software; you can redistribute it and/or modify # # it under the terms of the GNU General Public License version 2.0, # # as published by the Free Software Foundation. # # # -# This program is distributed in the hope that it will be useful, # +# This R package is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # +# GNU General Public License version 2.0 for more details. # # ==================================================================== # #' Determine multidrug-resistant organisms (MDRO) diff --git a/R/mic.R b/R/mic.R index bccc958d..4860185a 100755 --- a/R/mic.R +++ b/R/mic.R @@ -6,14 +6,14 @@ # Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # # # # LICENCE # -# This program is free software; you can redistribute it and/or modify # +# This package is free software; you can redistribute it and/or modify # # it under the terms of the GNU General Public License version 2.0, # # as published by the Free Software Foundation. # # # -# This program is distributed in the hope that it will be useful, # +# This R package is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # +# GNU General Public License version 2.0 for more details. # # ==================================================================== # #' Class 'mic' diff --git a/R/misc.R b/R/misc.R index 9fea4386..d10c0fd1 100755 --- a/R/misc.R +++ b/R/misc.R @@ -6,14 +6,14 @@ # Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # # # # LICENCE # -# This program is free software; you can redistribute it and/or modify # +# This package is free software; you can redistribute it and/or modify # # it under the terms of the GNU General Public License version 2.0, # # as published by the Free Software Foundation. # # # -# This program is distributed in the hope that it will be useful, # +# This R package is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # +# GNU General Public License version 2.0 for more details. # # ==================================================================== # # No export, no Rd diff --git a/R/mo.R b/R/mo.R index 2d941233..8c6a096c 100644 --- a/R/mo.R +++ b/R/mo.R @@ -6,14 +6,14 @@ # Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # # # # LICENCE # -# This program is free software; you can redistribute it and/or modify # +# This package is free software; you can redistribute it and/or modify # # it under the terms of the GNU General Public License version 2.0, # # as published by the Free Software Foundation. # # # -# This program is distributed in the hope that it will be useful, # +# This R package is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # +# GNU General Public License version 2.0 for more details. # # ==================================================================== # #' Transform to microorganism ID diff --git a/R/mo_property.R b/R/mo_property.R index fd5da451..fc572d32 100644 --- a/R/mo_property.R +++ b/R/mo_property.R @@ -6,14 +6,14 @@ # Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # # # # LICENCE # -# This program is free software; you can redistribute it and/or modify # +# This package is free software; you can redistribute it and/or modify # # it under the terms of the GNU General Public License version 2.0, # # as published by the Free Software Foundation. # # # -# This program is distributed in the hope that it will be useful, # +# This R package is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # +# GNU General Public License version 2.0 for more details. # # ==================================================================== # #' Property of a microorganism diff --git a/R/p.symbol.R b/R/p.symbol.R index 22e0550c..84be541c 100644 --- a/R/p.symbol.R +++ b/R/p.symbol.R @@ -6,14 +6,14 @@ # Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # # # # LICENCE # -# This program is free software; you can redistribute it and/or modify # +# This package is free software; you can redistribute it and/or modify # # it under the terms of the GNU General Public License version 2.0, # # as published by the Free Software Foundation. # # # -# This program is distributed in the hope that it will be useful, # +# This R package is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # +# GNU General Public License version 2.0 for more details. # # ==================================================================== # #' Symbol of a p value diff --git a/R/portion.R b/R/portion.R index b26e764c..414a6026 100755 --- a/R/portion.R +++ b/R/portion.R @@ -6,14 +6,14 @@ # Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # # # # LICENCE # -# This program is free software; you can redistribute it and/or modify # +# This package is free software; you can redistribute it and/or modify # # it under the terms of the GNU General Public License version 2.0, # # as published by the Free Software Foundation. # # # -# This program is distributed in the hope that it will be useful, # +# This R package is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # +# GNU General Public License version 2.0 for more details. # # ==================================================================== # #' Calculate resistance of isolates diff --git a/R/read.4d.R b/R/read.4d.R index ae1538de..cfb9c1af 100644 --- a/R/read.4d.R +++ b/R/read.4d.R @@ -6,19 +6,19 @@ # Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # # # # LICENCE # -# This program is free software; you can redistribute it and/or modify # +# This package is free software; you can redistribute it and/or modify # # it under the terms of the GNU General Public License version 2.0, # # as published by the Free Software Foundation. # # # -# This program is distributed in the hope that it will be useful, # +# This R package is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # +# GNU General Public License version 2.0 for more details. # # ==================================================================== # #' Read data from 4D database #' -#' This function is only useful for the MMB department of the UMCG. Use this function to \strong{import data by just defining the \code{file} parameter}. It will automatically transform birth dates and calculate patients age, translate the column names to English, transform the \code{mo} with \code{\link{as.mo}} and transform all antimicrobial columns with \code{\link{as.rsi}}. +#' This function is only useful for the MMB department of the UMCG. Use this function to \strong{import data by just defining the \code{file} parameter}. It will automatically transform birth dates and calculate patients age, translate the column names to English, transform the MO codes with \code{\link{as.mo}} and transform all antimicrobial columns with \code{\link{as.rsi}}. #' @inheritParams utils::read.table #' @param info a logical to indicate whether info about the import should be printed, defaults to \code{TRUE} in interactive sessions #' @details Column names will be transformed, but the original column names are set as a "label" attribute and can be seen in e.g. RStudio Viewer. @@ -59,7 +59,7 @@ read.4D <- function(file, fileEncoding = fileEncoding, encoding = encoding) - # helper functions + # helper function for dates to_date_4D <- function(x) { date_regular <- as.Date(x, format = "%d-%m-%y") posixlt <- as.POSIXlt(date_regular) @@ -68,16 +68,6 @@ read.4D <- function(file, posixlt[date_regular > Sys.Date() & !is.na(posixlt)]$year <- posixlt[date_regular > Sys.Date() & !is.na(posixlt)]$year - 100 as.Date(posixlt) } - to_age_4D <- function(from, to) { - from_lt = as.POSIXlt(from) - to_lt = as.POSIXlt(to) - - age = to_lt$year - from_lt$year - - ifelse(to_lt$mon < from_lt$mon | - (to_lt$mon == from_lt$mon & to_lt$mday < from_lt$mday), - age - 1, age) - } if (info == TRUE) { message("OK\nTransforming column names... ", appendLF = FALSE) @@ -136,7 +126,7 @@ read.4D <- function(file, data_4D$date_received <- to_date_4D(data_4D$date_received) } if ("age" %in% colnames(data_4D)) { - data_4D$age <- to_age_4D(data_4D$date_birth, data_4D$date_received) + data_4D$age <- age(data_4D$date_birth, data_4D$date_received) } if ("gender" %in% colnames(data_4D)) { data_4D$gender[data_4D$gender == "V"] <- "F" diff --git a/R/resistance_predict.R b/R/resistance_predict.R index da0ce702..7d8933ad 100644 --- a/R/resistance_predict.R +++ b/R/resistance_predict.R @@ -6,14 +6,14 @@ # Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # # # # LICENCE # -# This program is free software; you can redistribute it and/or modify # +# This package is free software; you can redistribute it and/or modify # # it under the terms of the GNU General Public License version 2.0, # # as published by the Free Software Foundation. # # # -# This program is distributed in the hope that it will be useful, # +# This R package is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # +# GNU General Public License version 2.0 for more details. # # ==================================================================== # #' Predict antimicrobial resistance diff --git a/R/rsi.R b/R/rsi.R index 1147a3a5..ddaed247 100644 --- a/R/rsi.R +++ b/R/rsi.R @@ -6,14 +6,14 @@ # Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # # # # LICENCE # -# This program is free software; you can redistribute it and/or modify # +# This package is free software; you can redistribute it and/or modify # # it under the terms of the GNU General Public License version 2.0, # # as published by the Free Software Foundation. # # # -# This program is distributed in the hope that it will be useful, # +# This R package is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # +# GNU General Public License version 2.0 for more details. # # ==================================================================== # #' Class 'rsi' diff --git a/R/rsi_calc.R b/R/rsi_calc.R index 15a1f030..24799870 100644 --- a/R/rsi_calc.R +++ b/R/rsi_calc.R @@ -6,14 +6,14 @@ # Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # # # # LICENCE # -# This program is free software; you can redistribute it and/or modify # +# This package is free software; you can redistribute it and/or modify # # it under the terms of the GNU General Public License version 2.0, # # as published by the Free Software Foundation. # # # -# This program is distributed in the hope that it will be useful, # +# This R package is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # +# GNU General Public License version 2.0 for more details. # # ==================================================================== # #' @importFrom dplyr %>% pull all_vars any_vars filter_all funs mutate_all diff --git a/R/skewness.R b/R/skewness.R index 155c2c26..4b844413 100644 --- a/R/skewness.R +++ b/R/skewness.R @@ -1,3 +1,21 @@ +# ==================================================================== # +# TITLE # +# Antimicrobial Resistance (AMR) Analysis # +# # +# AUTHORS # +# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # +# # +# LICENCE # +# This package is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License version 2.0, # +# as published by the Free Software Foundation. # +# # +# This R package is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License version 2.0 for more details. # +# ==================================================================== # + #' Skewness of the sample #' #' @description Skewness is a measure of the asymmetry of the probability distribution of a real-valued random variable about its mean. diff --git a/R/zzz.R b/R/zzz.R index e3074e56..d68852fe 100755 --- a/R/zzz.R +++ b/R/zzz.R @@ -6,21 +6,21 @@ # Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # # # # LICENCE # -# This program is free software; you can redistribute it and/or modify # +# This package is free software; you can redistribute it and/or modify # # it under the terms of the GNU General Public License version 2.0, # # as published by the Free Software Foundation. # # # -# This program is distributed in the hope that it will be useful, # +# This R package is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # +# GNU General Public License version 2.0 for more details. # # ==================================================================== # #' The \code{AMR} Package #' #' Welcome to the \code{AMR} package. This page gives some additional contact information about the authors. #' @details -#' This package was intended to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and work with antibiotic properties by using evidence-based methods. +#' This package was intended to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and ti work with antibiotic properties by using evidence-based methods. #' #' This package was created for academic research by PhD students of the Faculty of Medical Sciences of the University of Groningen and the Medical Microbiology & Infection Prevention (MMBI) department of the University Medical Center Groningen (UMCG). #' @section Authors: diff --git a/inst/rstudio/addins.dcf b/inst/rstudio/addins.dcf index d43c060a..6709a0a2 100644 --- a/inst/rstudio/addins.dcf +++ b/inst/rstudio/addins.dcf @@ -1,3 +1,21 @@ +# ==================================================================== # +# TITLE # +# Antimicrobial Resistance (AMR) Analysis # +# # +# AUTHORS # +# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # +# # +# LICENCE # +# This package is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License version 2.0, # +# as published by the Free Software Foundation. # +# # +# This R package is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License version 2.0 for more details. # +# ==================================================================== # + Name: Insert %in% Binding: addin_insert_in Interactive: false diff --git a/man/AMR.Rd b/man/AMR.Rd index 920df520..d81dd406 100644 --- a/man/AMR.Rd +++ b/man/AMR.Rd @@ -7,7 +7,7 @@ Welcome to the \code{AMR} package. This page gives some additional contact information about the authors. } \details{ -This package was intended to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and work with antibiotic properties by using evidence-based methods. +This package was intended to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and ti work with antibiotic properties by using evidence-based methods. This package was created for academic research by PhD students of the Faculty of Medical Sciences of the University of Groningen and the Medical Microbiology & Infection Prevention (MMBI) department of the University Medical Center Groningen (UMCG). } diff --git a/man/age_groups.Rd b/man/age_groups.Rd index 6d0c4a24..e00e8c16 100644 --- a/man/age_groups.Rd +++ b/man/age_groups.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/age.R \name{age_groups} \alias{age_groups} -\title{Split ages in age groups} +\title{Split ages into age groups} \usage{ age_groups(x, split_at = c(12, 25, 55, 75)) } @@ -25,31 +25,33 @@ To split ages, the input can be: \item{A character:} \itemize{ \item{\code{"children"}, equivalent of: \code{c(0, 1, 2, 4, 6, 13, 18)}. This will split on 0, 1, 2-3, 4-5, 6-12, 13-17 and 18+.} - \item{\code{"elderly"} or \code{"seniors"}, equivalent: of \code{c(65, 75, 85, 95)}. This will split on 0-64, 65-74, 75-84, 85-94 and 95+.} - \item{\code{"fives"}, equivalent: of \code{1:20 * 5}. This will split on 0-4, 5-9, 10-14, 15-19 and so forth.} - \item{\code{"tens"}, equivalent: of \code{1:10 * 10}. This will split on 0-9, 10-19, 20-29 and so forth.} + \item{\code{"elderly"} or \code{"seniors"}, equivalent of: \code{c(65, 75, 85, 95)}. This will split on 0-64, 65-74, 75-84, 85-94 and 95+.} + \item{\code{"fives"}, equivalent of: \code{1:20 * 5}. This will split on 0-4, 5-9, 10-14, 15-19 and so forth.} + \item{\code{"tens"}, equivalent of: \code{1:10 * 10}. This will split on 0-9, 10-19, 20-29 and so forth.} } } } \examples{ ages <- c(3, 8, 16, 54, 31, 76, 101, 43, 21) -# split on 0-49 and 50+ +# split into 0-49 and 50+ age_groups(ages, 50) -# split on 0-20, 21-49 and 50+ -age_groups(ages, c(21, 50)) +# split into 0-19, 20-49 and 50+ +age_groups(ages, c(20, 50)) -# split on every ten years +# split into groups of ten years age_groups(ages, 1:10 * 10) -age_groups(ages, "tens") +age_groups(ages, split_at = "tens") -# split on every five years +# split into groups of five years age_groups(ages, 1:20 * 5) -age_groups(ages, "fives") +age_groups(ages, split_at = "fives") -# split on children +# split specifically for children age_groups(ages, "children") +# same: +age_groups(ages, c(1, 2, 4, 6, 13, 17)) # resistance of ciprofloxacine per age group library(dplyr) @@ -65,3 +67,5 @@ septic_patients \%>\% \seealso{ age } +\keyword{age} +\keyword{age_group} diff --git a/man/ggplot_rsi.Rd b/man/ggplot_rsi.Rd index ec2b6bb8..966859ce 100644 --- a/man/ggplot_rsi.Rd +++ b/man/ggplot_rsi.Rd @@ -12,8 +12,8 @@ \usage{ ggplot_rsi(data, position = NULL, x = "Antibiotic", fill = "Interpretation", facet = NULL, breaks = seq(0, 1, 0.1), - translate_ab = "official", fun = count_df, nrow = NULL, - datalabels = TRUE, datalabels.size = 3, + limits = NULL, translate_ab = "official", fun = count_df, + nrow = NULL, datalabels = TRUE, datalabels.size = 3, datalabels.colour = "grey15", ...) geom_rsi(position = NULL, x = c("Antibiotic", "Interpretation"), @@ -22,7 +22,7 @@ geom_rsi(position = NULL, x = c("Antibiotic", "Interpretation"), facet_rsi(facet = c("Interpretation", "Antibiotic"), nrow = NULL) -scale_y_percent(breaks = seq(0, 1, 0.1)) +scale_y_percent(breaks = seq(0, 1, 0.1), limits = NULL) scale_rsi_colours() @@ -44,6 +44,8 @@ labels_rsi_count(position = NULL, x = "Antibiotic", \item{breaks}{numeric vector of positions} +\item{limits}{numeric vector of length two providing limits of the scale, use \code{NA} to refer to the existing minimum or maximum} + \item{translate_ab}{a column name of the \code{\link{antibiotics}} data set to translate the antibiotic abbreviations into, using \code{\link{abname}}. Default behaviour is to translate to official names according to the WHO. Use \code{translate_ab = FALSE} to disable translation.} \item{fun}{function to transform \code{data}, either \code{\link{count_df}} (default) or \code{\link{portion_df}}} diff --git a/man/read.4D.Rd b/man/read.4D.Rd index e85e8784..0433c76e 100644 --- a/man/read.4D.Rd +++ b/man/read.4D.Rd @@ -117,7 +117,7 @@ read.4D(file, info = interactive(), header = TRUE, row.names = NULL, } } \description{ -This function is only useful for the MMB department of the UMCG. Use this function to \strong{import data by just defining the \code{file} parameter}. It will automatically transform birth dates and calculate patients age, translate the column names to English, transform the \code{mo} with \code{\link{as.mo}} and transform all antimicrobial columns with \code{\link{as.rsi}}. +This function is only useful for the MMB department of the UMCG. Use this function to \strong{import data by just defining the \code{file} parameter}. It will automatically transform birth dates and calculate patients age, translate the column names to English, transform the MO codes with \code{\link{as.mo}} and transform all antimicrobial columns with \code{\link{as.rsi}}. } \details{ Column names will be transformed, but the original column names are set as a "label" attribute and can be seen in e.g. RStudio Viewer. diff --git a/tests/testthat.R b/tests/testthat.R index 42204d8a..0db3bdb3 100755 --- a/tests/testthat.R +++ b/tests/testthat.R @@ -1,3 +1,21 @@ +# ==================================================================== # +# TITLE # +# Antimicrobial Resistance (AMR) Analysis # +# # +# AUTHORS # +# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # +# # +# LICENCE # +# This package is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License version 2.0, # +# as published by the Free Software Foundation. # +# # +# This R package is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License version 2.0 for more details. # +# ==================================================================== # + library(testthat) library(AMR) diff --git a/tests/testthat/test-ab_property.R b/tests/testthat/test-ab_property.R index 89d7a50f..9191f23c 100644 --- a/tests/testthat/test-ab_property.R +++ b/tests/testthat/test-ab_property.R @@ -1,3 +1,21 @@ +# ==================================================================== # +# TITLE # +# Antimicrobial Resistance (AMR) Analysis # +# # +# AUTHORS # +# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # +# # +# LICENCE # +# This package is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License version 2.0, # +# as published by the Free Software Foundation. # +# # +# This R package is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License version 2.0 for more details. # +# ==================================================================== # + context("ab_property.R") test_that("ab_property works", { diff --git a/tests/testthat/test-abname.R b/tests/testthat/test-abname.R index 547ce4c9..89623ba8 100644 --- a/tests/testthat/test-abname.R +++ b/tests/testthat/test-abname.R @@ -1,3 +1,21 @@ +# ==================================================================== # +# TITLE # +# Antimicrobial Resistance (AMR) Analysis # +# # +# AUTHORS # +# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # +# # +# LICENCE # +# This package is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License version 2.0, # +# as published by the Free Software Foundation. # +# # +# This R package is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License version 2.0 for more details. # +# ==================================================================== # + context("abname.R") test_that("abname works", { diff --git a/tests/testthat/test-age.R b/tests/testthat/test-age.R index fb5a419d..e42311ad 100644 --- a/tests/testthat/test-age.R +++ b/tests/testthat/test-age.R @@ -1,4 +1,22 @@ -context("g.test.R") +# ==================================================================== # +# TITLE # +# Antimicrobial Resistance (AMR) Analysis # +# # +# AUTHORS # +# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # +# # +# LICENCE # +# This package is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License version 2.0, # +# as published by the Free Software Foundation. # +# # +# This R package is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License version 2.0 for more details. # +# ==================================================================== # + +context("age.R") test_that("age works", { expect_equal(age(x = c("1980-01-01", "1985-01-01", "1990-01-01"), @@ -22,8 +40,16 @@ test_that("age_groups works", { 2) expect_equal(length(unique(age_groups(ages, c(50, 60)))), 3) - expect_identical(class(age_groups(ages)), + expect_identical(class(age_groups(ages, "child")), c("ordered", "factor")) + expect_identical(class(age_groups(ages, "elderly")), + c("ordered", "factor")) + + expect_identical(class(age_groups(ages, "tens")), + c("ordered", "factor")) + + expect_identical(class(age_groups(ages, "fives")), + c("ordered", "factor")) }) diff --git a/tests/testthat/test-atc.R b/tests/testthat/test-atc.R index 9809a67f..b6b9fb59 100755 --- a/tests/testthat/test-atc.R +++ b/tests/testthat/test-atc.R @@ -1,3 +1,21 @@ +# ==================================================================== # +# TITLE # +# Antimicrobial Resistance (AMR) Analysis # +# # +# AUTHORS # +# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # +# # +# LICENCE # +# This package is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License version 2.0, # +# as published by the Free Software Foundation. # +# # +# This R package is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License version 2.0 for more details. # +# ==================================================================== # + context("atc.R") # test_that("atc_property works", { diff --git a/tests/testthat/test-count.R b/tests/testthat/test-count.R index ae089e3b..5b7a6731 100644 --- a/tests/testthat/test-count.R +++ b/tests/testthat/test-count.R @@ -1,3 +1,21 @@ +# ==================================================================== # +# TITLE # +# Antimicrobial Resistance (AMR) Analysis # +# # +# AUTHORS # +# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # +# # +# LICENCE # +# This package is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License version 2.0, # +# as published by the Free Software Foundation. # +# # +# This R package is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License version 2.0 for more details. # +# ==================================================================== # + context("count.R") test_that("counts work", { diff --git a/tests/testthat/test-data.R b/tests/testthat/test-data.R index 101e255f..c6631860 100644 --- a/tests/testthat/test-data.R +++ b/tests/testthat/test-data.R @@ -1,3 +1,21 @@ +# ==================================================================== # +# TITLE # +# Antimicrobial Resistance (AMR) Analysis # +# # +# AUTHORS # +# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # +# # +# LICENCE # +# This package is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License version 2.0, # +# as published by the Free Software Foundation. # +# # +# This R package is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License version 2.0 for more details. # +# ==================================================================== # + context("data.R") test_that("data sets are valid", { diff --git a/tests/testthat/test-deprecated.R b/tests/testthat/test-deprecated.R index 12df2550..ef08be81 100644 --- a/tests/testthat/test-deprecated.R +++ b/tests/testthat/test-deprecated.R @@ -1,3 +1,21 @@ +# ==================================================================== # +# TITLE # +# Antimicrobial Resistance (AMR) Analysis # +# # +# AUTHORS # +# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # +# # +# LICENCE # +# This package is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License version 2.0, # +# as published by the Free Software Foundation. # +# # +# This R package is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License version 2.0 for more details. # +# ==================================================================== # + context("deprecated.R") test_that("deprecated functions work", { diff --git a/tests/testthat/test-eucast_rules.R b/tests/testthat/test-eucast_rules.R index 07bea9ca..849157dc 100755 --- a/tests/testthat/test-eucast_rules.R +++ b/tests/testthat/test-eucast_rules.R @@ -1,3 +1,21 @@ +# ==================================================================== # +# TITLE # +# Antimicrobial Resistance (AMR) Analysis # +# # +# AUTHORS # +# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # +# # +# LICENCE # +# This package is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License version 2.0, # +# as published by the Free Software Foundation. # +# # +# This R package is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License version 2.0 for more details. # +# ==================================================================== # + context("eucast_rules.R") test_that("EUCAST rules work", { diff --git a/tests/testthat/test-first_isolate.R b/tests/testthat/test-first_isolate.R index db550b80..f580b61b 100755 --- a/tests/testthat/test-first_isolate.R +++ b/tests/testthat/test-first_isolate.R @@ -1,3 +1,21 @@ +# ==================================================================== # +# TITLE # +# Antimicrobial Resistance (AMR) Analysis # +# # +# AUTHORS # +# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # +# # +# LICENCE # +# This package is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License version 2.0, # +# as published by the Free Software Foundation. # +# # +# This R package is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License version 2.0 for more details. # +# ==================================================================== # + context("first_isolate.R") test_that("first isolates work", { diff --git a/tests/testthat/test-freq.R b/tests/testthat/test-freq.R index 8d7e52a3..b2cd3c39 100755 --- a/tests/testthat/test-freq.R +++ b/tests/testthat/test-freq.R @@ -1,3 +1,21 @@ +# ==================================================================== # +# TITLE # +# Antimicrobial Resistance (AMR) Analysis # +# # +# AUTHORS # +# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # +# # +# LICENCE # +# This package is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License version 2.0, # +# as published by the Free Software Foundation. # +# # +# This R package is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License version 2.0 for more details. # +# ==================================================================== # + context("freq.R") test_that("frequency table works", { diff --git a/tests/testthat/test-g.test.R b/tests/testthat/test-g.test.R index e89ab809..c53a29d6 100644 --- a/tests/testthat/test-g.test.R +++ b/tests/testthat/test-g.test.R @@ -1,3 +1,21 @@ +# ==================================================================== # +# TITLE # +# Antimicrobial Resistance (AMR) Analysis # +# # +# AUTHORS # +# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # +# # +# LICENCE # +# This package is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License version 2.0, # +# as published by the Free Software Foundation. # +# # +# This R package is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License version 2.0 for more details. # +# ==================================================================== # + context("g.test.R") test_that("G-test works", { diff --git a/tests/testthat/test-get_locale.R b/tests/testthat/test-get_locale.R index 0037ff34..2c972024 100644 --- a/tests/testthat/test-get_locale.R +++ b/tests/testthat/test-get_locale.R @@ -1,3 +1,21 @@ +# ==================================================================== # +# TITLE # +# Antimicrobial Resistance (AMR) Analysis # +# # +# AUTHORS # +# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # +# # +# LICENCE # +# This package is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License version 2.0, # +# as published by the Free Software Foundation. # +# # +# This R package is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License version 2.0 for more details. # +# ==================================================================== # + context("get_locale.R") test_that("get_locale works", { diff --git a/tests/testthat/test-ggplot_rsi.R b/tests/testthat/test-ggplot_rsi.R index 631b192c..4557bc4c 100644 --- a/tests/testthat/test-ggplot_rsi.R +++ b/tests/testthat/test-ggplot_rsi.R @@ -1,3 +1,21 @@ +# ==================================================================== # +# TITLE # +# Antimicrobial Resistance (AMR) Analysis # +# # +# AUTHORS # +# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # +# # +# LICENCE # +# This package is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License version 2.0, # +# as published by the Free Software Foundation. # +# # +# This R package is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License version 2.0 for more details. # +# ==================================================================== # + context("ggplot_rsi.R") test_that("ggplot_rsi works", { diff --git a/tests/testthat/test-join_microorganisms.R b/tests/testthat/test-join_microorganisms.R index 1c381d18..8a5dc961 100755 --- a/tests/testthat/test-join_microorganisms.R +++ b/tests/testthat/test-join_microorganisms.R @@ -1,3 +1,21 @@ +# ==================================================================== # +# TITLE # +# Antimicrobial Resistance (AMR) Analysis # +# # +# AUTHORS # +# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # +# # +# LICENCE # +# This package is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License version 2.0, # +# as published by the Free Software Foundation. # +# # +# This R package is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License version 2.0 for more details. # +# ==================================================================== # + context("join_microorganisms.R") test_that("joins work", { diff --git a/tests/testthat/test-key_antibiotics.R b/tests/testthat/test-key_antibiotics.R index 2dd051a7..4dc4ea4f 100644 --- a/tests/testthat/test-key_antibiotics.R +++ b/tests/testthat/test-key_antibiotics.R @@ -1,3 +1,21 @@ +# ==================================================================== # +# TITLE # +# Antimicrobial Resistance (AMR) Analysis # +# # +# AUTHORS # +# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # +# # +# LICENCE # +# This package is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License version 2.0, # +# as published by the Free Software Foundation. # +# # +# This R package is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License version 2.0 for more details. # +# ==================================================================== # + context("key_antibiotics.R") test_that("keyantibiotics work", { diff --git a/tests/testthat/test-kurtosis.R b/tests/testthat/test-kurtosis.R index 80c97427..1aef590a 100644 --- a/tests/testthat/test-kurtosis.R +++ b/tests/testthat/test-kurtosis.R @@ -1,3 +1,21 @@ +# ==================================================================== # +# TITLE # +# Antimicrobial Resistance (AMR) Analysis # +# # +# AUTHORS # +# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # +# # +# LICENCE # +# This package is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License version 2.0, # +# as published by the Free Software Foundation. # +# # +# This R package is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License version 2.0 for more details. # +# ==================================================================== # + context("kurtosis.R") test_that("kurtosis works", { diff --git a/tests/testthat/test-like.R b/tests/testthat/test-like.R index fdceabfb..0667fa82 100644 --- a/tests/testthat/test-like.R +++ b/tests/testthat/test-like.R @@ -1,3 +1,21 @@ +# ==================================================================== # +# TITLE # +# Antimicrobial Resistance (AMR) Analysis # +# # +# AUTHORS # +# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # +# # +# LICENCE # +# This package is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License version 2.0, # +# as published by the Free Software Foundation. # +# # +# This R package is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License version 2.0 for more details. # +# ==================================================================== # + context("like.R") test_that("`like` works", { diff --git a/tests/testthat/test-mdro.R b/tests/testthat/test-mdro.R index d15c2a8b..d53bd301 100755 --- a/tests/testthat/test-mdro.R +++ b/tests/testthat/test-mdro.R @@ -1,5 +1,22 @@ -context("mdro.R") +# ==================================================================== # +# TITLE # +# Antimicrobial Resistance (AMR) Analysis # +# # +# AUTHORS # +# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # +# # +# LICENCE # +# This package is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License version 2.0, # +# as published by the Free Software Foundation. # +# # +# This R package is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License version 2.0 for more details. # +# ==================================================================== # +context("mdro.R") test_that("mdro works", { library(dplyr) diff --git a/tests/testthat/test-mic.R b/tests/testthat/test-mic.R index 032388a5..9ef45f39 100755 --- a/tests/testthat/test-mic.R +++ b/tests/testthat/test-mic.R @@ -1,3 +1,21 @@ +# ==================================================================== # +# TITLE # +# Antimicrobial Resistance (AMR) Analysis # +# # +# AUTHORS # +# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # +# # +# LICENCE # +# This package is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License version 2.0, # +# as published by the Free Software Foundation. # +# # +# This R package is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License version 2.0 for more details. # +# ==================================================================== # + context("mic.R") test_that("mic works", { diff --git a/tests/testthat/test-misc.R b/tests/testthat/test-misc.R index a1052717..44b170f8 100755 --- a/tests/testthat/test-misc.R +++ b/tests/testthat/test-misc.R @@ -1,3 +1,21 @@ +# ==================================================================== # +# TITLE # +# Antimicrobial Resistance (AMR) Analysis # +# # +# AUTHORS # +# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # +# # +# LICENCE # +# This package is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License version 2.0, # +# as published by the Free Software Foundation. # +# # +# This R package is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License version 2.0 for more details. # +# ==================================================================== # + context("misc.R") test_that("percentages works", { diff --git a/tests/testthat/test-mo.R b/tests/testthat/test-mo.R index 759d4f52..a34220eb 100644 --- a/tests/testthat/test-mo.R +++ b/tests/testthat/test-mo.R @@ -1,3 +1,21 @@ +# ==================================================================== # +# TITLE # +# Antimicrobial Resistance (AMR) Analysis # +# # +# AUTHORS # +# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # +# # +# LICENCE # +# This package is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License version 2.0, # +# as published by the Free Software Foundation. # +# # +# This R package is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License version 2.0 for more details. # +# ==================================================================== # + context("mo.R") test_that("as.mo works", { diff --git a/tests/testthat/test-mo_property.R b/tests/testthat/test-mo_property.R index ee96e5a9..540b152c 100644 --- a/tests/testthat/test-mo_property.R +++ b/tests/testthat/test-mo_property.R @@ -1,3 +1,21 @@ +# ==================================================================== # +# TITLE # +# Antimicrobial Resistance (AMR) Analysis # +# # +# AUTHORS # +# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # +# # +# LICENCE # +# This package is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License version 2.0, # +# as published by the Free Software Foundation. # +# # +# This R package is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License version 2.0 for more details. # +# ==================================================================== # + context("mo_property.R") test_that("mo_property works", { diff --git a/tests/testthat/test-p.symbol.R b/tests/testthat/test-p.symbol.R index fce51b3e..de1bd0dc 100644 --- a/tests/testthat/test-p.symbol.R +++ b/tests/testthat/test-p.symbol.R @@ -1,3 +1,21 @@ +# ==================================================================== # +# TITLE # +# Antimicrobial Resistance (AMR) Analysis # +# # +# AUTHORS # +# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # +# # +# LICENCE # +# This package is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License version 2.0, # +# as published by the Free Software Foundation. # +# # +# This R package is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License version 2.0 for more details. # +# ==================================================================== # + context("p.symbol.R") test_that("P symbol works", { diff --git a/tests/testthat/test-portion.R b/tests/testthat/test-portion.R index 60df5fd0..9dfd85a6 100755 --- a/tests/testthat/test-portion.R +++ b/tests/testthat/test-portion.R @@ -1,3 +1,21 @@ +# ==================================================================== # +# TITLE # +# Antimicrobial Resistance (AMR) Analysis # +# # +# AUTHORS # +# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # +# # +# LICENCE # +# This package is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License version 2.0, # +# as published by the Free Software Foundation. # +# # +# This R package is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License version 2.0 for more details. # +# ==================================================================== # + context("portion.R") test_that("portions works", { diff --git a/tests/testthat/test-read.4d.R b/tests/testthat/test-read.4d.R index 25c24d89..8824df31 100644 --- a/tests/testthat/test-read.4d.R +++ b/tests/testthat/test-read.4d.R @@ -1,3 +1,21 @@ +# ==================================================================== # +# TITLE # +# Antimicrobial Resistance (AMR) Analysis # +# # +# AUTHORS # +# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # +# # +# LICENCE # +# This package is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License version 2.0, # +# as published by the Free Software Foundation. # +# # +# This R package is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License version 2.0 for more details. # +# ==================================================================== # + context("read.4d.R") test_that("read 4D works", { diff --git a/tests/testthat/test-rsi.R b/tests/testthat/test-rsi.R index 1def09ce..ca59edad 100644 --- a/tests/testthat/test-rsi.R +++ b/tests/testthat/test-rsi.R @@ -1,3 +1,21 @@ +# ==================================================================== # +# TITLE # +# Antimicrobial Resistance (AMR) Analysis # +# # +# AUTHORS # +# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # +# # +# LICENCE # +# This package is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License version 2.0, # +# as published by the Free Software Foundation. # +# # +# This R package is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License version 2.0 for more details. # +# ==================================================================== # + context("rsi.R") test_that("rsi works", { diff --git a/tests/testthat/test-skewness.R b/tests/testthat/test-skewness.R index 3f953898..b4c75d48 100644 --- a/tests/testthat/test-skewness.R +++ b/tests/testthat/test-skewness.R @@ -1,3 +1,21 @@ +# ==================================================================== # +# TITLE # +# Antimicrobial Resistance (AMR) Analysis # +# # +# AUTHORS # +# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # +# # +# LICENCE # +# This package is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License version 2.0, # +# as published by the Free Software Foundation. # +# # +# This R package is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License version 2.0 for more details. # +# ==================================================================== # + context("skewness.R") test_that("skewness works", {