From 2667fff8a74bf487e6eda37681e8b8225e34acea Mon Sep 17 00:00:00 2001 From: "Matthijs S. Berends" Date: Sat, 1 Jun 2019 20:40:49 +0200 Subject: [PATCH] (v0.6.1.9050) support staged install --- .Rbuildignore | 2 +- DESCRIPTION | 5 +- NAMESPACE | 1 - NEWS.md | 13 +- R/eucast_rules.R | 23 +- R/get_locale.R | 6 +- R/misc.R | 18 +- R/mo.R | 4 +- R/mo_property.R | 2 +- R/sysdata.rda | Bin 0 -> 7327 bytes {inst/eucast => data-raw}/eucast_rules.tsv | 0 data-raw/internals.R | 40 +++ .../reproduction_of_antibiotics.R | 0 .../reproduction_of_microorganisms.R | 0 .../reproduction_of_rsi_translation.R | 0 {inst => data-raw}/translations.tsv | 0 docs/LICENSE-text.html | 2 +- docs/articles/index.html | 2 +- docs/authors.html | 2 +- docs/index.html | 2 +- docs/news/index.html | 256 +++++++++--------- docs/reference/AMR-deprecated.html | 2 +- docs/reference/AMR.html | 2 +- docs/reference/WHOCC.html | 2 +- docs/reference/WHONET.html | 2 +- docs/reference/ab_property.html | 2 +- docs/reference/age.html | 2 +- docs/reference/age_groups.html | 2 +- docs/reference/antibiotics.html | 2 +- docs/reference/as.ab.html | 2 +- docs/reference/as.atc.html | 2 +- docs/reference/as.disk.html | 2 +- docs/reference/as.mic.html | 2 +- docs/reference/as.mo.html | 2 +- docs/reference/as.rsi.html | 2 +- docs/reference/atc_online.html | 2 +- docs/reference/availability.html | 2 +- docs/reference/catalogue_of_life.html | 2 +- docs/reference/catalogue_of_life_version.html | 2 +- docs/reference/count.html | 2 +- docs/reference/eucast_rules.html | 11 +- docs/reference/first_isolate.html | 2 +- docs/reference/freq.html | 2 +- docs/reference/g.test.html | 2 +- docs/reference/ggplot_rsi.html | 2 +- docs/reference/guess_ab_col.html | 2 +- docs/reference/index.html | 4 +- docs/reference/join.html | 2 +- docs/reference/key_antibiotics.html | 2 +- docs/reference/kurtosis.html | 2 +- docs/reference/like.html | 2 +- docs/reference/mdro.html | 2 +- docs/reference/microorganisms.codes.html | 2 +- docs/reference/microorganisms.html | 2 +- docs/reference/microorganisms.old.html | 2 +- docs/reference/mo_property.html | 2 +- docs/reference/mo_source.html | 2 +- docs/reference/p.symbol.html | 2 +- docs/reference/portion.html | 2 +- docs/reference/read.4D.html | 2 +- docs/reference/resistance_predict.html | 2 +- docs/reference/rsi_translation.html | 2 +- docs/reference/septic_patients.html | 2 +- docs/reference/skewness.html | 2 +- docs/reference/translate.html | 8 +- git_merge.sh | 8 +- git_premaster.sh | 8 +- man/eucast_rules.Rd | 10 +- man/translate.Rd | 6 +- 69 files changed, 256 insertions(+), 259 deletions(-) create mode 100644 R/sysdata.rda rename {inst/eucast => data-raw}/eucast_rules.tsv (100%) create mode 100644 data-raw/internals.R rename reproduction_of_antibiotics.R => data-raw/reproduction_of_antibiotics.R (100%) rename reproduction_of_microorganisms.R => data-raw/reproduction_of_microorganisms.R (100%) rename reproduction_of_rsi_translation.R => data-raw/reproduction_of_rsi_translation.R (100%) rename {inst => data-raw}/translations.tsv (100%) diff --git a/.Rbuildignore b/.Rbuildignore index 722e91de..87240fb2 100755 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -20,4 +20,4 @@ ^Meta$ ^pkgdown$ ^public$ -^reproduction.*R$ +^data-raw$ diff --git a/DESCRIPTION b/DESCRIPTION index c19186df..7c391754 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: AMR -Version: 0.6.1.9049 -Date: 2019-05-31 +Version: 0.6.1.9050 +Date: 2019-06-01 Title: Antimicrobial Resistance Analysis Authors@R: c( person( @@ -70,5 +70,4 @@ BugReports: https://gitlab.com/msberends/AMR/issues License: GPL-2 | file LICENSE Encoding: UTF-8 LazyData: true -StagedInstall: false RoxygenNote: 6.1.1 diff --git a/NAMESPACE b/NAMESPACE index 4387f6f2..9493fb50 100755 --- a/NAMESPACE +++ b/NAMESPACE @@ -92,7 +92,6 @@ export(count_all) export(count_df) export(eucast_exceptional_phenotypes) export(eucast_rules) -export(eucast_rules_file) export(facet_rsi) export(filter_1st_cephalosporins) export(filter_2nd_cephalosporins) diff --git a/NEWS.md b/NEWS.md index 3a7081d0..a6d6e248 100755 --- a/NEWS.md +++ b/NEWS.md @@ -17,11 +17,8 @@ * All references to antibiotics in our package now use EARS-Net codes, like `AMX` for amoxicillin * Functions `atc_certe`, `ab_umcg` and `atc_trivial_nl` have been removed * All `atc_*` functions are superceded by `ab_*` functions - * All output will be translated by using an included, local translation file that can be found after install with: - ```r - system.file("translations.tsv", package = "AMR") - ``` - Please create an issue in one of our repositories if you want additions in this file. + * All output will be translated by using an included translation file which [can be viewed here](https://gitlab.com/msberends/AMR/blob/master/data-raw/translations.tsv) + Please [create an issue in one of our repositories](https://gitlab.com/msberends/AMR/issues/new?issue[title]=Translation%20suggestion) if you want additions in this file. * Improvements to plotting AMR results with `ggplot_rsi()`: * New parameter `colours` to set the bar colours * New parameters `title`, `subtitle`, `caption`, `x.title` and `y.title` to set titles and axis descriptions @@ -44,7 +41,8 @@ freq(age) %>% boxplot() ``` -* Removed all hardcoded EUCAST rules and replaced them with a new reference file: `./inst/eucast/eucast.tsv` +* Removed all hardcoded EUCAST rules and replaced them with a new reference file which [can be viewed here](https://gitlab.com/msberends/AMR/blob/master/data-raw/eucast_rules.tsv) + Please [create an issue in one of our repositories](https://gitlab.com/msberends/AMR/issues/new?issue[title]=EUCAST%20edit) if you want changes in this file. * Added ceftazidim intrinsic resistance to *Streptococci* * Changed default settings for `age_groups()`, to let groups of fives and tens end with 100+ instead of 120+ * Fix for `freq()` for when all values are `NA` @@ -56,8 +54,7 @@ * Fix for `mo_shortname()` where species would not be determined correctly #### Other -* Support for R 3.6.0 -* Prevented [staged install](https://developer.r-project.org/Blog/public/2019/02/14/staged-install/index.html) in R 3.6.0 and later by adding `StagedInstall: false` to the DESCRIPTION file +* Support for R 3.6.0 and later by providing support for [staged install](https://developer.r-project.org/Blog/public/2019/02/14/staged-install/index.html) # AMR 0.6.1 diff --git a/R/eucast_rules.R b/R/eucast_rules.R index 1bb224f9..9b7b82c6 100755 --- a/R/eucast_rules.R +++ b/R/eucast_rules.R @@ -20,7 +20,6 @@ # ==================================================================== # # global variables -EUCAST_RULES_FILE_LOCATION <- system.file("eucast/eucast_rules.tsv", package = "AMR") EUCAST_VERSION_BREAKPOINTS <- "9.0, 2019" EUCAST_VERSION_EXPERT_RULES <- "3.1, 2016" @@ -37,10 +36,7 @@ EUCAST_VERSION_EXPERT_RULES <- "3.1, 2016" #' \strong{Note:} This function does not translate MIC values to RSI values. Use \code{\link{as.rsi}} for that. \cr #' \strong{Note:} When ampicillin (AMP, J01CA01) is not available but amoxicillin (AMX, J01CA04) is, the latter will be used for all rules where there is a dependency on ampicillin. These drugs are interchangeable when it comes to expression of antimicrobial resistance. #' -#' The file used for applying all EUCAST rules can be retrieved with \code{\link{eucast_rules_file}()}. It returns an easily readable data set containing all rules. The original TSV file (tab separated file) that is being read by \code{eucast_rules()} can be found by running this command: \cr -#' \code{AMR::EUCAST_RULES_FILE_LOCATION} (without brackets). -#' -#' In the source code the file containing all rules is located \href{https://gitlab.com/msberends/AMR/blob/master/inst/eucast/eucast_rules.tsv}{here}. +#' The file containing all EUCAST rules is located here: \url{https://gitlab.com/msberends/AMR/blob/master/data-raw/eucast_rules.tsv}. #' #' @section Antibiotics: #' To define antibiotics column names, leave as it is to determine it automatically with \code{\link{guess_ab_col}} or input a text (case-insensitive), or use \code{NULL} to skip a column (e.g. \code{TIC = NULL} to skip ticarcillin). Manually defined but non-existing columns will be skipped with a warning. @@ -141,8 +137,6 @@ EUCAST_VERSION_EXPERT_RULES <- "3.1, 2016" #' \url{http://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Breakpoint_tables/v_9.0_Breakpoint_Tables.xlsx} #' } #' } -#' -#' For editing the reference file (which is available with \code{\link{eucast_rules_file}}), these values can all be used for target antibiotics: aminoglycosides, tetracyclines, polymyxins, macrolides, glycopeptides, streptogramins, cephalosporins, cephalosporins_without_cfta, carbapenems, aminopenicillins, ureidopenicillins, fluoroquinolones, all_betalactams, and all separate four letter codes like AMC. They can be separated by comma: \code{"AMC, fluoroquinolones"}. The mo_property can be any column name from the \code{\link{microorganisms}} data set, or \code{genus_species} or \code{gramstain}. This file contains references to the 'Burkholderia cepacia complex'. The species in this group can be found in: LiPuma JJ, 2015 (PMID 16217180). #' @inheritSection AMR Read more on our website! #' @examples #' a <- eucast_rules(septic_patients) @@ -499,7 +493,7 @@ eucast_rules <- function(x, y[y != "" & y %in% colnames(df)] } - eucast_rules_df <- eucast_rules_file() + eucast_rules_df <- eucast_rules_file # internal data file no_of_changes <- 0 for (i in 1:nrow(eucast_rules_df)) { @@ -754,16 +748,3 @@ eucast_rules <- function(x, } } -#' @rdname eucast_rules -#' @importFrom dplyr %>% arrange -#' @export -eucast_rules_file <- function() { - utils::read.delim(file = EUCAST_RULES_FILE_LOCATION, - sep = "\t", - stringsAsFactors = FALSE, - header = TRUE, - strip.white = TRUE, - na = c(NA, "", NULL)) %>% - arrange(reference.rule_group, - reference.rule) -} diff --git a/R/get_locale.R b/R/get_locale.R index 653e9822..a81a4c1a 100755 --- a/R/get_locale.R +++ b/R/get_locale.R @@ -22,11 +22,11 @@ #' Translate strings from AMR package #' #' For language-dependent output of AMR functions, like \code{\link{mo_fullname}} and \code{\link{mo_type}}. -#' @details Strings will be translated to foreign languages if they are defined in a local translation file. This file comes with this package and can be found when running: +#' @details Strings will be translated to foreign languages if they are defined in a local translation file. Additions to this file can be suggested at our repository. The file can be found here: \url{https://gitlab.com/msberends/AMR/blob/master/data-raw/translations.tsv}. #' -#' \code{system.file("translations.tsv", package = "AMR")} +#' 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}. #' -#' 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}. +#' 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.). #' #' 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/misc.R b/R/misc.R index 9c1236aa..20e64d18 100755 --- a/R/misc.R +++ b/R/misc.R @@ -243,9 +243,10 @@ generate_warning_abs_missing <- function(missing, any = FALSE) { stopifnot_installed_package <- function(package) { - if (!package %in% base::rownames(utils::installed.packages())) { - stop("this function requires the ", package, " package.", call. = FALSE) - } + # no "utils::installed.packages()" since it requires non-staged install since R 3.6.0 + # https://developer.r-project.org/Blog/public/2019/02/14/staged-install/index.html + get(".packageName", envir = asNamespace(package)) + return(invisible()) } # translate strings based on inst/translations.tsv @@ -262,16 +263,7 @@ t <- function(from, language = get_locale()) { return(from) } - df_trans <- utils::read.table(file = system.file("translations.tsv", package = "AMR"), - sep = "\t", - stringsAsFactors = FALSE, - header = TRUE, - blank.lines.skip = TRUE, - fill = TRUE, - strip.white = TRUE, - encoding = "UTF-8", - fileEncoding = "UTF-8", - na.strings = c(NA, "", NULL)) + df_trans <- translations_file # internal data file if (!language %in% df_trans$lang) { stop("Unsupported language: '", language, "' - use one of: ", diff --git a/R/mo.R b/R/mo.R index c70b0cc3..b5ff422b 100755 --- a/R/mo.R +++ b/R/mo.R @@ -191,7 +191,7 @@ #' } as.mo <- function(x, Becker = FALSE, Lancefield = FALSE, allow_uncertain = TRUE, reference_df = get_mo_source(), ...) { if (!"AMR" %in% base::.packages()) { - library("AMR") + require("AMR") # check onLoad() in R/zzz.R: data tables are created there. } @@ -295,7 +295,7 @@ exec_as.mo <- function(x, debug = FALSE) { if (!"AMR" %in% base::.packages()) { - library("AMR") + require("AMR") # check onLoad() in R/zzz.R: data tables are created there. } diff --git a/R/mo_property.R b/R/mo_property.R index 947f3ef7..3d0c6024 100755 --- a/R/mo_property.R +++ b/R/mo_property.R @@ -364,7 +364,7 @@ mo_validate <- function(x, property, ...) { } if (!"AMR" %in% base::.packages()) { - library("AMR") + require("AMR") # check onLoad() in R/zzz.R: data tables are created there. } diff --git a/R/sysdata.rda b/R/sysdata.rda new file mode 100644 index 0000000000000000000000000000000000000000..ee6d78c553cb1a6973c9bbdad1ceec3e1433a978 GIT binary patch literal 7327 zcmV;Q9AM)@T4*^jL0KkKS+h&$NdPz4fBgUd|Ns8~{CmIu|9`*#|MWlrpa5+83IGTI z014nFz8^kqjm#Zbnrnh8g4Q}%d)aguJtA8hZs%7`fNtPyD>bQCM1U){&0utOid#a! zQFOL8%R^ga=GLLC4QsCKz^DPOQP*obw#}Dtl1&H*WC8}Ki5pWm ziK9RspfuBI4AN$x02&mdQ`0G?6B9<6Fh&R(VKA5kWH1Slkiu;tiIV^$0GeQdlL>$m zCIA630{{R3CIrAE000vJ001P?Niq?VN#bgr(ofYrN0bJissIBJ02%<%pay^d8fX9j zi6TuT@}7VuRQ*%+Oo95Rl+oZ&)6-MbY35XUPf+qkn|p>;GU$El3$1 zf*KS=H1wzi0M;M?nW85v8c|ZJlwRj=5JmB3!9Yh(j)YYu6WhkRKHf-MXT?`hRm~(( zBoK@pkx&_-3qGDdk0EdzffPhGOj#%+JJmKu{wO@u)R)mZZ^rDWafGK5~^jT<<6RiRGo89a_NTXZLXdp z@oU@_VIw&EGJJ`;K2B#V5PdOHK`l1VJC)2`$sO1*HIeyt!OuJ~XZOtr&}I}O&gIrt zFCv*cVoDL;2%5L-rjL=HnQ0a8d<=|Hyey_>!qJz_2(vA%m7SS{$1wC|9rc*U$(CU5 z@zvk6+urZb<8?ZAMxKKmlA5+1orC-?!{MS-Tu%wDV-+_YxYl($cxhDaIOKHkyB|-f z0GA>gT4!ovv)AUh`C9>bNXzHxac45#epI{b1@d)sZoIciSZjJh1-stp`l^YJ8|MO=88re-UbXEowemwk+m_tU|QBrz0- zULA23+KxuU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b%-#w{QfLK+OLSx?Sz+3gzX>LH#5eBe{A%Z{+_oRj5Ow5N4 zKCgPoeSR=O`@c6$)74Zy$m(?+=i}@F4*umA1!i5z(seeZhS-L6MB$l?DZtDZOE^vY z90VYSFS#8{TTx6Xz2X1NpKvxfkg#qX`enDI0Re>-Bq~pMPNO8BU?irhOi@BbdvWVC zR9H|9cZ-rN3_hDG7lH3_YI}$Y_*RKv<%Y77Tm}Qzs((xlgfodq@O8 z-VuQU=J^SAELaKxz)(<8WE4=5NDBqM3515}H3N=a3z{`aMNO*!WGOmj;fFysF%5EC zCb%gLIVQ_Kr!G3RRauapkPy8510Yz~C@EQxih4*1m?-L(5Wtb?EH!{LXv$nAA}A)J z6b5UlnlD+vipwdkgag995dxH#x!h)98FOMND3oclm$fG9Ksc&QQ(UMwC4 zdqgf-k5FWIdoyioHC>(f|6|u=A!Nl5O`8#he3c5>MfjGYUPW8*>u#@bL=xIxd%&FB!Fc2qhU_B zT1@=~57=TXAaETL9}r;&z|jqaLI80rC_^?fcsDw-WadjbaIwM-Ls!KBgArr|G)*LQ zbDyx)?Z3J1M6t`g@^yAQLlz&MAF2;q1T7uLmuWFiPGzP{69MKSlQU%P)Y)y0k)lw9R55QUIg7sBh z+nY8aB!nAG8y5&Ti|S&AzT}|Qo|HdS|1r4NVbFkYZNy%~&Z&;U52(;kl=oHhfr2I^ znqXE!vP8n0Y2`~=QfNu^usL#|p;8+_LZDPML(+$#3$l3&nR{Y^40_th; z4g&ry^MXu+h{f~f!MFp~fP literal 0 HcmV?d00001 diff --git a/inst/eucast/eucast_rules.tsv b/data-raw/eucast_rules.tsv similarity index 100% rename from inst/eucast/eucast_rules.tsv rename to data-raw/eucast_rules.tsv diff --git a/data-raw/internals.R b/data-raw/internals.R new file mode 100644 index 00000000..0c55d4aa --- /dev/null +++ b/data-raw/internals.R @@ -0,0 +1,40 @@ +# EUCAST rules ---- +# For editing the reference file, these values can all be used for target antibiotics: +# "aminoglycosides", "tetracyclines", "polymyxins", "macrolides", "glycopeptides", +# "streptogramins", "cephalosporins", "cephalosporins_without_CAZ", "carbapenems", +# "minopenicillins", "ureidopenicillins", "fluoroquinolones", "all_betalactams", +# and all separate EARS-Net letter codes like "AMC". They can be separated by comma: "AMC, fluoroquinolones". +# The mo_property can be any column name from the AMR::microorganisms data set, or "genus_species" or "gramstain". +# This file contains references to the 'Burkholderia cepacia complex'. The species in this group can be found in: +# LiPuma JJ, 2015 (PMID 16217180). +eucast_rules_file <- dplyr::arrange( + .data = utils::read.delim(file = "data-raw/eucast_rules.tsv", + sep = "\t", + stringsAsFactors = FALSE, + header = TRUE, + strip.white = TRUE, + na = c(NA, "", NULL)), + reference.rule_group, + reference.rule) + +# Translations ----- +translations_file <- utils::read.table(file = "data-raw/translations.tsv", + sep = "\t", + stringsAsFactors = FALSE, + header = TRUE, + blank.lines.skip = TRUE, + fill = TRUE, + strip.white = TRUE, + encoding = "UTF-8", + fileEncoding = "UTF-8", + na.strings = c(NA, "", NULL)) + +# Export to package as internal data ---- +usethis::use_data(eucast_rules_file, translations_file, + internal = TRUE, + overwrite = TRUE, + version = 2) + +# Remove from global environment ---- +rm(eucast_rules_file) +rm(translations_file) diff --git a/reproduction_of_antibiotics.R b/data-raw/reproduction_of_antibiotics.R similarity index 100% rename from reproduction_of_antibiotics.R rename to data-raw/reproduction_of_antibiotics.R diff --git a/reproduction_of_microorganisms.R b/data-raw/reproduction_of_microorganisms.R similarity index 100% rename from reproduction_of_microorganisms.R rename to data-raw/reproduction_of_microorganisms.R diff --git a/reproduction_of_rsi_translation.R b/data-raw/reproduction_of_rsi_translation.R similarity index 100% rename from reproduction_of_rsi_translation.R rename to data-raw/reproduction_of_rsi_translation.R diff --git a/inst/translations.tsv b/data-raw/translations.tsv similarity index 100% rename from inst/translations.tsv rename to data-raw/translations.tsv diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index bd2d07c0..236e0ffb 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -78,7 +78,7 @@ AMR (for R) - 0.6.1.9049 + 0.6.1.9050 diff --git a/docs/articles/index.html b/docs/articles/index.html index bdc1bf1a..d564e645 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -78,7 +78,7 @@ AMR (for R) - 0.6.1.9049 + 0.6.1.9050 diff --git a/docs/authors.html b/docs/authors.html index 6445876c..dbb80836 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -78,7 +78,7 @@ AMR (for R) - 0.6.1.9049 + 0.6.1.9050 diff --git a/docs/index.html b/docs/index.html index aab57201..dd4f82b9 100644 --- a/docs/index.html +++ b/docs/index.html @@ -42,7 +42,7 @@ AMR (for R) - 0.6.1.9049 + 0.6.1.9050 diff --git a/docs/news/index.html b/docs/news/index.html index efa99712..aeaa4bc1 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -78,7 +78,7 @@ AMR (for R) - 0.6.1.9049 + 0.6.1.9050 @@ -272,10 +272,7 @@
  • All references to antibiotics in our package now use EARS-Net codes, like AMX for amoxicillin
  • Functions atc_certe, ab_umcg and atc_trivial_nl have been removed
  • All atc_* functions are superceded by ab_* functions
  • -
  • -

    All output will be translated by using an included, local translation file that can be found after install with:

    -
    system.file("translations.tsv", package = "AMR")
    -Please create an issue in one of our repositories if you want additions in this file.
  • +
  • All output will be translated by using an included translation file which can be viewed here Please create an issue in one of our repositories if you want additions in this file.
  • Improvements to plotting AMR results with ggplot_rsi(): @@ -297,19 +294,18 @@ Please create an issue in one of our repositories if you want additions in this
  • fixed level names in markdown
  • support for boxplots:

    - +
  • -
  • Removed all hardcoded EUCAST rules and replaced them with a new reference file: ./inst/eucast/eucast.tsv -
  • +
  • Removed all hardcoded EUCAST rules and replaced them with a new reference file which can be viewed here Please create an issue in one of our repositories if you want changes in this file.
  • Added ceftazidim intrinsic resistance to Streptococci
  • Changed default settings for age_groups(), to let groups of fives and tens end with 100+ instead of 120+
  • @@ -329,8 +325,8 @@ Please create an issue in one of our repositories if you want additions in this

    Other

      -
    • Support for R 3.6.0
    • -
    • Prevented staged install in R 3.6.0 and later by adding StagedInstall: false to the DESCRIPTION file
    • +
    • Support for R 3.6.0 and later by providing support for staged install +
    @@ -387,32 +383,32 @@ This data is updated annually - check the included version with the new function
  • New filters for antimicrobial classes. Use these functions to filter isolates on results in one of more antibiotics from a specific class:

    - +

    The antibiotics data set will be searched, after which the input data will be checked for column names with a value in any abbreviations, codes or official names found in the antibiotics data set. For example:

    - +
  • All ab_* functions are deprecated and replaced by atc_* functions:

    - + These functions use as.atc() internally. The old atc_property has been renamed atc_online_property(). This is done for two reasons: firstly, not all ATC codes are of antibiotics (ab) but can also be of antivirals or antifungals. Secondly, the input must have class atc or must be coerable to this class. Properties of these classes should start with the same class name, analogous to as.mo() and e.g. mo_genus.
  • New functions set_mo_source() and get_mo_source() to use your own predefined MO codes as input for as.mo() and consequently all mo_* functions
  • Support for the upcoming dplyr version 0.8.0
  • @@ -424,20 +420,20 @@ These functions use as.atc()
  • New 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.
  • New function ggplot_rsi_predict() as well as the base R plot() function can now be used for resistance prediction calculated with resistance_predict():

    -
    x <- resistance_predict(septic_patients, col_ab = "amox")
    -plot(x)
    -ggplot_rsi_predict(x)
    +
    x <- resistance_predict(septic_patients, col_ab = "amox")
    +plot(x)
    +ggplot_rsi_predict(x)
  • Functions filter_first_isolate() and filter_first_weighted_isolate() to shorten and fasten filtering on data sets with antimicrobial results, e.g.:

    - +

    is equal to:

    -
    septic_patients %>%
    -  mutate(only_firsts = first_isolate(septic_patients, ...)) %>%
    -  filter(only_firsts == TRUE) %>%
    -  select(-only_firsts)
    +
    septic_patients %>%
    +  mutate(only_firsts = first_isolate(septic_patients, ...)) %>%
    +  filter(only_firsts == TRUE) %>%
    +  select(-only_firsts)
  • New function availability() to check the number of available (non-empty) results in a data.frame
  • @@ -466,33 +462,33 @@ These functions use as.atc()

    They also come with support for German, Dutch, French, Italian, Spanish and Portuguese:

    -
    mo_gramstain("E. coli")
    -# [1] "Gram negative"
    -mo_gramstain("E. coli", language = "de") # German
    -# [1] "Gramnegativ"
    -mo_gramstain("E. coli", language = "es") # Spanish
    -# [1] "Gram negativo"
    -mo_fullname("S. group A", language = "pt") # Portuguese
    -# [1] "Streptococcus grupo A"
    +
    mo_gramstain("E. coli")
    +# [1] "Gram negative"
    +mo_gramstain("E. coli", language = "de") # German
    +# [1] "Gramnegativ"
    +mo_gramstain("E. coli", language = "es") # Spanish
    +# [1] "Gram negativo"
    +mo_fullname("S. group A", language = "pt") # Portuguese
    +# [1] "Streptococcus grupo A"

    Furthermore, former taxonomic names will give a note about the current taxonomic name:

    - +
  • Functions count_R, count_IR, count_I, count_SI and count_S to selectively count resistant or susceptible isolates diff --git a/docs/reference/AMR-deprecated.html b/docs/reference/AMR-deprecated.html index d39cbb8b..fb83bfed 100644 --- a/docs/reference/AMR-deprecated.html +++ b/docs/reference/AMR-deprecated.html @@ -80,7 +80,7 @@ AMR (for R) - 0.6.1.9044 + 0.6.1.9050 diff --git a/docs/reference/AMR.html b/docs/reference/AMR.html index 78e4e329..b015e709 100644 --- a/docs/reference/AMR.html +++ b/docs/reference/AMR.html @@ -80,7 +80,7 @@ AMR (for R) - 0.6.1.9044 + 0.6.1.9050 diff --git a/docs/reference/WHOCC.html b/docs/reference/WHOCC.html index 81d032a7..fb3ea3fb 100644 --- a/docs/reference/WHOCC.html +++ b/docs/reference/WHOCC.html @@ -80,7 +80,7 @@ AMR (for R) - 0.6.1.9044 + 0.6.1.9050 diff --git a/docs/reference/WHONET.html b/docs/reference/WHONET.html index f4d8a303..e6ecfb22 100644 --- a/docs/reference/WHONET.html +++ b/docs/reference/WHONET.html @@ -80,7 +80,7 @@ AMR (for R) - 0.6.1.9044 + 0.6.1.9050 diff --git a/docs/reference/ab_property.html b/docs/reference/ab_property.html index ae6daa27..a14e414b 100644 --- a/docs/reference/ab_property.html +++ b/docs/reference/ab_property.html @@ -80,7 +80,7 @@ AMR (for R) - 0.6.1.9044 + 0.6.1.9050 diff --git a/docs/reference/age.html b/docs/reference/age.html index b2b0e004..8abf0658 100644 --- a/docs/reference/age.html +++ b/docs/reference/age.html @@ -80,7 +80,7 @@ AMR (for R) - 0.6.1.9044 + 0.6.1.9050 diff --git a/docs/reference/age_groups.html b/docs/reference/age_groups.html index 0581e674..a7795c7d 100644 --- a/docs/reference/age_groups.html +++ b/docs/reference/age_groups.html @@ -80,7 +80,7 @@ AMR (for R) - 0.6.1.9044 + 0.6.1.9050 diff --git a/docs/reference/antibiotics.html b/docs/reference/antibiotics.html index c6477803..232ef610 100644 --- a/docs/reference/antibiotics.html +++ b/docs/reference/antibiotics.html @@ -80,7 +80,7 @@ AMR (for R) - 0.6.1.9044 + 0.6.1.9050 diff --git a/docs/reference/as.ab.html b/docs/reference/as.ab.html index 0d0bee60..828c73a6 100644 --- a/docs/reference/as.ab.html +++ b/docs/reference/as.ab.html @@ -80,7 +80,7 @@ AMR (for R) - 0.6.1.9044 + 0.6.1.9050 diff --git a/docs/reference/as.atc.html b/docs/reference/as.atc.html index f4d27286..9a9cbeb1 100644 --- a/docs/reference/as.atc.html +++ b/docs/reference/as.atc.html @@ -80,7 +80,7 @@ AMR (for R) - 0.6.1.9044 + 0.6.1.9050 diff --git a/docs/reference/as.disk.html b/docs/reference/as.disk.html index d2f3f49c..e21d6ff7 100644 --- a/docs/reference/as.disk.html +++ b/docs/reference/as.disk.html @@ -80,7 +80,7 @@ AMR (for R) - 0.6.1.9044 + 0.6.1.9050 diff --git a/docs/reference/as.mic.html b/docs/reference/as.mic.html index a145e657..449947d2 100644 --- a/docs/reference/as.mic.html +++ b/docs/reference/as.mic.html @@ -80,7 +80,7 @@ AMR (for R) - 0.6.1.9044 + 0.6.1.9050 diff --git a/docs/reference/as.mo.html b/docs/reference/as.mo.html index 0c1b325e..5fbd9bc4 100644 --- a/docs/reference/as.mo.html +++ b/docs/reference/as.mo.html @@ -80,7 +80,7 @@ AMR (for R) - 0.6.1.9044 + 0.6.1.9050 diff --git a/docs/reference/as.rsi.html b/docs/reference/as.rsi.html index 650dbccb..976e414a 100644 --- a/docs/reference/as.rsi.html +++ b/docs/reference/as.rsi.html @@ -80,7 +80,7 @@ AMR (for R) - 0.6.1.9044 + 0.6.1.9050 diff --git a/docs/reference/atc_online.html b/docs/reference/atc_online.html index b9ac6c7b..9fec3870 100644 --- a/docs/reference/atc_online.html +++ b/docs/reference/atc_online.html @@ -80,7 +80,7 @@ AMR (for R) - 0.6.1.9044 + 0.6.1.9050 diff --git a/docs/reference/availability.html b/docs/reference/availability.html index da8d04c0..1319356b 100644 --- a/docs/reference/availability.html +++ b/docs/reference/availability.html @@ -80,7 +80,7 @@ AMR (for R) - 0.6.1.9044 + 0.6.1.9050 diff --git a/docs/reference/catalogue_of_life.html b/docs/reference/catalogue_of_life.html index 98f7d411..04e19062 100644 --- a/docs/reference/catalogue_of_life.html +++ b/docs/reference/catalogue_of_life.html @@ -80,7 +80,7 @@ AMR (for R) - 0.6.1.9044 + 0.6.1.9050 diff --git a/docs/reference/catalogue_of_life_version.html b/docs/reference/catalogue_of_life_version.html index 19b09d95..714d13e7 100644 --- a/docs/reference/catalogue_of_life_version.html +++ b/docs/reference/catalogue_of_life_version.html @@ -80,7 +80,7 @@ AMR (for R) - 0.6.1.9044 + 0.6.1.9050 diff --git a/docs/reference/count.html b/docs/reference/count.html index d1cbbb64..8f7a81b9 100644 --- a/docs/reference/count.html +++ b/docs/reference/count.html @@ -81,7 +81,7 @@ count_R and count_IR can be used to count resistant isolates, count_S and count_ AMR (for R) - 0.6.1.9044 + 0.6.1.9050 diff --git a/docs/reference/eucast_rules.html b/docs/reference/eucast_rules.html index 9c659d22..b94e6b51 100644 --- a/docs/reference/eucast_rules.html +++ b/docs/reference/eucast_rules.html @@ -80,7 +80,7 @@ AMR (for R) - 0.6.1.9044 + 0.6.1.9050 @@ -249,9 +249,7 @@
    eucast_rules(x, col_mo = NULL, info = TRUE, rules = c("breakpoints",
    -  "expert", "other", "all"), verbose = FALSE, ...)
    -
    -eucast_rules_file()
    + "expert", "other", "all"), verbose = FALSE, ...)

    Arguments

    @@ -293,7 +291,6 @@
  • EUCAST Breakpoint tables for interpretation of MICs and zone diameters. Version 9.0, 2019.
    http://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Breakpoint_tables/v_9.0_Breakpoint_Tables.xlsx

  • -

    For editing the reference file (which is available with eucast_rules_file), these values can all be used for target antibiotics: aminoglycosides, tetracyclines, polymyxins, macrolides, glycopeptides, streptogramins, cephalosporins, cephalosporins_without_cfta, carbapenems, aminopenicillins, ureidopenicillins, fluoroquinolones, all_betalactams, and all separate four letter codes like AMC. They can be separated by comma: "AMC, fluoroquinolones". The mo_property can be any column name from the microorganisms data set, or genus_species or gramstain. This file contains references to the 'Burkholderia cepacia complex'. The species in this group can be found in: LiPuma JJ, 2015 (PMID 16217180).

    Value

    @@ -303,9 +300,7 @@

    Note: This function does not translate MIC values to RSI values. Use as.rsi for that.
    Note: When ampicillin (AMP, J01CA01) is not available but amoxicillin (AMX, J01CA04) is, the latter will be used for all rules where there is a dependency on ampicillin. These drugs are interchangeable when it comes to expression of antimicrobial resistance.

    -

    The file used for applying all EUCAST rules can be retrieved with eucast_rules_file(). It returns an easily readable data set containing all rules. The original TSV file (tab separated file) that is being read by eucast_rules() can be found by running this command:
    -AMR::EUCAST_RULES_FILE_LOCATION (without brackets).

    -

    In the source code the file containing all rules is located here.

    +

    The file containing all EUCAST rules is located here: https://gitlab.com/msberends/AMR/blob/master/data-raw/eucast_rules.tsv.

    Antibiotics

    diff --git a/docs/reference/first_isolate.html b/docs/reference/first_isolate.html index 1533a7dd..6ea8c805 100644 --- a/docs/reference/first_isolate.html +++ b/docs/reference/first_isolate.html @@ -80,7 +80,7 @@ AMR (for R) - 0.6.1.9044 + 0.6.1.9050 diff --git a/docs/reference/freq.html b/docs/reference/freq.html index 0b79a5c1..59cb060a 100644 --- a/docs/reference/freq.html +++ b/docs/reference/freq.html @@ -81,7 +81,7 @@ top_freq can be used to get the top/bottom n items of a frequency table, with co AMR (for R) - 0.6.1.9044 + 0.6.1.9050 diff --git a/docs/reference/g.test.html b/docs/reference/g.test.html index 9b2120b2..1e3105f3 100644 --- a/docs/reference/g.test.html +++ b/docs/reference/g.test.html @@ -80,7 +80,7 @@ AMR (for R) - 0.6.1.9044 + 0.6.1.9050 diff --git a/docs/reference/ggplot_rsi.html b/docs/reference/ggplot_rsi.html index e062e36d..a320dbdb 100644 --- a/docs/reference/ggplot_rsi.html +++ b/docs/reference/ggplot_rsi.html @@ -80,7 +80,7 @@ AMR (for R) - 0.6.1.9049 + 0.6.1.9050 diff --git a/docs/reference/guess_ab_col.html b/docs/reference/guess_ab_col.html index fe134088..ecb432d4 100644 --- a/docs/reference/guess_ab_col.html +++ b/docs/reference/guess_ab_col.html @@ -80,7 +80,7 @@ AMR (for R) - 0.6.1.9045 + 0.6.1.9050 diff --git a/docs/reference/index.html b/docs/reference/index.html index 60a5339f..8a898c26 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -78,7 +78,7 @@ AMR (for R) - 0.6.1.9049 + 0.6.1.9050 @@ -330,7 +330,7 @@ diff --git a/docs/reference/join.html b/docs/reference/join.html index 8617257a..aef9f25a 100644 --- a/docs/reference/join.html +++ b/docs/reference/join.html @@ -80,7 +80,7 @@ AMR (for R) - 0.6.1.9044 + 0.6.1.9050 diff --git a/docs/reference/key_antibiotics.html b/docs/reference/key_antibiotics.html index b48490c3..7ed6e9bc 100644 --- a/docs/reference/key_antibiotics.html +++ b/docs/reference/key_antibiotics.html @@ -80,7 +80,7 @@ AMR (for R) - 0.6.1.9044 + 0.6.1.9050 diff --git a/docs/reference/kurtosis.html b/docs/reference/kurtosis.html index 5078c32b..913a3536 100644 --- a/docs/reference/kurtosis.html +++ b/docs/reference/kurtosis.html @@ -80,7 +80,7 @@ AMR (for R) - 0.6.1.9044 + 0.6.1.9050 diff --git a/docs/reference/like.html b/docs/reference/like.html index 11709b36..7cb6b125 100644 --- a/docs/reference/like.html +++ b/docs/reference/like.html @@ -80,7 +80,7 @@ AMR (for R) - 0.6.1.9044 + 0.6.1.9050 diff --git a/docs/reference/mdro.html b/docs/reference/mdro.html index 9559d387..e8e68474 100644 --- a/docs/reference/mdro.html +++ b/docs/reference/mdro.html @@ -80,7 +80,7 @@ AMR (for R) - 0.6.1.9044 + 0.6.1.9050 diff --git a/docs/reference/microorganisms.codes.html b/docs/reference/microorganisms.codes.html index b3f1136b..35362ad6 100644 --- a/docs/reference/microorganisms.codes.html +++ b/docs/reference/microorganisms.codes.html @@ -80,7 +80,7 @@ AMR (for R) - 0.6.1.9044 + 0.6.1.9050 diff --git a/docs/reference/microorganisms.html b/docs/reference/microorganisms.html index 533e2882..189cc177 100644 --- a/docs/reference/microorganisms.html +++ b/docs/reference/microorganisms.html @@ -80,7 +80,7 @@ AMR (for R) - 0.6.1.9044 + 0.6.1.9050 diff --git a/docs/reference/microorganisms.old.html b/docs/reference/microorganisms.old.html index 84186a1c..bac80be8 100644 --- a/docs/reference/microorganisms.old.html +++ b/docs/reference/microorganisms.old.html @@ -80,7 +80,7 @@ AMR (for R) - 0.6.1.9044 + 0.6.1.9050 diff --git a/docs/reference/mo_property.html b/docs/reference/mo_property.html index 534eff3e..9f510772 100644 --- a/docs/reference/mo_property.html +++ b/docs/reference/mo_property.html @@ -80,7 +80,7 @@ AMR (for R) - 0.6.1.9044 + 0.6.1.9050 diff --git a/docs/reference/mo_source.html b/docs/reference/mo_source.html index f0ba8837..56c4c077 100644 --- a/docs/reference/mo_source.html +++ b/docs/reference/mo_source.html @@ -81,7 +81,7 @@ This is the fastest way to have your organisation (or analysis) specific codes p AMR (for R) - 0.6.1.9044 + 0.6.1.9050 diff --git a/docs/reference/p.symbol.html b/docs/reference/p.symbol.html index b07608f5..a1131a91 100644 --- a/docs/reference/p.symbol.html +++ b/docs/reference/p.symbol.html @@ -80,7 +80,7 @@ AMR (for R) - 0.6.1.9044 + 0.6.1.9050 diff --git a/docs/reference/portion.html b/docs/reference/portion.html index 49c508a8..d8f51166 100644 --- a/docs/reference/portion.html +++ b/docs/reference/portion.html @@ -81,7 +81,7 @@ portion_R and portion_IR can be used to calculate resistance, portion_S and port AMR (for R) - 0.6.1.9044 + 0.6.1.9050 diff --git a/docs/reference/read.4D.html b/docs/reference/read.4D.html index 924325bc..7cd9d989 100644 --- a/docs/reference/read.4D.html +++ b/docs/reference/read.4D.html @@ -80,7 +80,7 @@ AMR (for R) - 0.6.1.9044 + 0.6.1.9050 diff --git a/docs/reference/resistance_predict.html b/docs/reference/resistance_predict.html index 644e6694..3ddec5a5 100644 --- a/docs/reference/resistance_predict.html +++ b/docs/reference/resistance_predict.html @@ -80,7 +80,7 @@ AMR (for R) - 0.6.1.9044 + 0.6.1.9050 diff --git a/docs/reference/rsi_translation.html b/docs/reference/rsi_translation.html index 5663398d..770638b3 100644 --- a/docs/reference/rsi_translation.html +++ b/docs/reference/rsi_translation.html @@ -80,7 +80,7 @@ AMR (for R) - 0.6.1.9044 + 0.6.1.9050 diff --git a/docs/reference/septic_patients.html b/docs/reference/septic_patients.html index 7f005bbf..e1fe762e 100644 --- a/docs/reference/septic_patients.html +++ b/docs/reference/septic_patients.html @@ -80,7 +80,7 @@ AMR (for R) - 0.6.1.9044 + 0.6.1.9050 diff --git a/docs/reference/skewness.html b/docs/reference/skewness.html index f781b940..d49f811e 100644 --- a/docs/reference/skewness.html +++ b/docs/reference/skewness.html @@ -81,7 +81,7 @@ When negative: the left tail is longer; the mass of the distribution is concentr AMR (for R) - 0.6.1.9044 + 0.6.1.9050 diff --git a/docs/reference/translate.html b/docs/reference/translate.html index 52dc26ff..3453a276 100644 --- a/docs/reference/translate.html +++ b/docs/reference/translate.html @@ -80,7 +80,7 @@ AMR (for R) - 0.6.1.9044 + 0.6.1.9050 @@ -252,9 +252,9 @@

    Details

    -

    Strings will be translated to foreign languages if they are defined in a local translation file. This file comes with this package and can be found when running:

    -

    system.file("translations.tsv", package = "AMR")

    -

    This file will be read by all functions where a translated output can be desired, like all mo_property functions (mo_fullname, mo_type, etc.). Please suggest your own translations by creating a new issue on our repository.

    +

    Strings will be translated to foreign languages if they are defined in a local translation file. Additions to this file can be suggested at our repository. The file can be found here: https://gitlab.com/msberends/AMR/blob/master/data-raw/translations.tsv.

    +

    Please suggest your own translations 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 mo_property functions (mo_fullname, mo_type, etc.).

    The system language will be used at default, if supported, using get_locale. The system language can be overwritten with getOption("AMR_locale").

    Read more on our website!

    diff --git a/git_merge.sh b/git_merge.sh index 0e088a54..08e4828a 100755 --- a/git_merge.sh +++ b/git_merge.sh @@ -13,13 +13,15 @@ git checkout master --quiet echo "changed branch to master" # import everything from premaster -git merge premaster +git merge premaster --quiet # and send it to git -git push -# echo "pushed changes to master" +git push --quiet +echo "pushed changes to master" # return to premaster git checkout premaster --quiet echo "changed branch back to premaster" +git status --short + # and get stashed changes back # git stash apply --quiet diff --git a/git_premaster.sh b/git_premaster.sh index 5495d187..8d82a8e5 100755 --- a/git_premaster.sh +++ b/git_premaster.sh @@ -31,17 +31,21 @@ echo "First 3 lines of DESCRIPTION:" head -3 DESCRIPTION echo echo "•••••••••••••••••••••••••••••••••" -echo "• Reloading/Documenting package •" +echo "• Reloading/documenting package •" echo "•••••••••••••••••••••••••••••••••" Rscript -e "devtools::load_all(quiet = TRUE)" Rscript -e "suppressMessages(devtools::document())" Rscript -e "devtools::install(quiet = TRUE, dependencies = FALSE)" echo +echo "••••••••••••••••••••••••••" +echo "• Updating internal data •" +echo "••••••••••••••••••••••••••" +Rscript -e "source('data-raw/internals.R')" +echo echo "•••••••••••••••••" echo "• Building site •" echo "•••••••••••••••••" Rscript -e "suppressMessages(pkgdown::build_site(lazy = $lazy, examples = FALSE))" - echo echo "•••••••••••••••••••••••••" echo "• List of changed files •" diff --git a/man/eucast_rules.Rd b/man/eucast_rules.Rd index 334daa5e..bf13470f 100644 --- a/man/eucast_rules.Rd +++ b/man/eucast_rules.Rd @@ -2,7 +2,6 @@ % Please edit documentation in R/eucast_rules.R \name{eucast_rules} \alias{eucast_rules} -\alias{eucast_rules_file} \title{EUCAST rules} \source{ \itemize{ @@ -20,14 +19,10 @@ \url{http://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Breakpoint_tables/v_9.0_Breakpoint_Tables.xlsx} } } - - For editing the reference file (which is available with \code{\link{eucast_rules_file}}), these values can all be used for target antibiotics: aminoglycosides, tetracyclines, polymyxins, macrolides, glycopeptides, streptogramins, cephalosporins, cephalosporins_without_cfta, carbapenems, aminopenicillins, ureidopenicillins, fluoroquinolones, all_betalactams, and all separate four letter codes like AMC. They can be separated by comma: \code{"AMC, fluoroquinolones"}. The mo_property can be any column name from the \code{\link{microorganisms}} data set, or \code{genus_species} or \code{gramstain}. This file contains references to the 'Burkholderia cepacia complex'. The species in this group can be found in: LiPuma JJ, 2015 (PMID 16217180). } \usage{ eucast_rules(x, col_mo = NULL, info = TRUE, rules = c("breakpoints", "expert", "other", "all"), verbose = FALSE, ...) - -eucast_rules_file() } \arguments{ \item{x}{data with antibiotic columns, like e.g. \code{AMX} and \code{AMC}} @@ -52,10 +47,7 @@ Apply susceptibility rules as defined by the European Committee on Antimicrobial \strong{Note:} This function does not translate MIC values to RSI values. Use \code{\link{as.rsi}} for that. \cr \strong{Note:} When ampicillin (AMP, J01CA01) is not available but amoxicillin (AMX, J01CA04) is, the latter will be used for all rules where there is a dependency on ampicillin. These drugs are interchangeable when it comes to expression of antimicrobial resistance. -The file used for applying all EUCAST rules can be retrieved with \code{\link{eucast_rules_file}()}. It returns an easily readable data set containing all rules. The original TSV file (tab separated file) that is being read by \code{eucast_rules()} can be found by running this command: \cr -\code{AMR::EUCAST_RULES_FILE_LOCATION} (without brackets). - -In the source code the file containing all rules is located \href{https://gitlab.com/msberends/AMR/blob/master/inst/eucast/eucast_rules.tsv}{here}. +The file containing all EUCAST rules is located here: \url{https://gitlab.com/msberends/AMR/blob/master/data-raw/eucast_rules.tsv}. } \section{Antibiotics}{ diff --git a/man/translate.Rd b/man/translate.Rd index be730069..47945857 100644 --- a/man/translate.Rd +++ b/man/translate.Rd @@ -11,11 +11,11 @@ get_locale() For language-dependent output of AMR functions, like \code{\link{mo_fullname}} and \code{\link{mo_type}}. } \details{ -Strings will be translated to foreign languages if they are defined in a local translation file. This file comes with this package and can be found when running: +Strings will be translated to foreign languages if they are defined in a local translation file. Additions to this file can be suggested at our repository. The file can be found here: \url{https://gitlab.com/msberends/AMR/blob/master/data-raw/translations.tsv}. -\code{system.file("translations.tsv", package = "AMR")} +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}. -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}. +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.). 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")}. }
    -

    eucast_rules() eucast_rules_file()

    +

    eucast_rules()

    EUCAST rules