mirror of
				https://github.com/msberends/AMR.git
				synced 2025-11-04 15:35:28 +01:00 
			
		
		
		
	(v2.1.1.9237) clean-up
This commit is contained in:
		
							
								
								
									
										2
									
								
								.github/ISSUE_TEMPLATE/config.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/ISSUE_TEMPLATE/config.yml
									
									
									
									
										vendored
									
									
								
							@@ -1,7 +1,7 @@
 | 
			
		||||
blank_issues_enabled: false
 | 
			
		||||
contact_links:
 | 
			
		||||
  - name: I Have a Question - Ask Our AMR for R Assistant
 | 
			
		||||
    url: https://chatgpt.com/g/g-M4UNLwFi5-amr-for-r-assistant
 | 
			
		||||
    url: https://chat.amr-for-r.org
 | 
			
		||||
    about: Ask questions or code suggestions to our AMR for R Assistant, a ChatGPT manually-trained model able to answer any question about the AMR package.
 | 
			
		||||
  - name: I Have a Question - AMR Community Support
 | 
			
		||||
    url: https://github.com/msberends/AMR/discussions
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								.github/prehooks/pre-commit
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/prehooks/pre-commit
									
									
									
									
										vendored
									
									
								
							@@ -111,7 +111,7 @@ echo ""
 | 
			
		||||
# Save the version number for use in the commit-msg hook
 | 
			
		||||
echo "${currentversion}" > .git/commit_version.tmp
 | 
			
		||||
 | 
			
		||||
# Generate GPT knowledge info for our Assistant (https://chatgpt.com/g/g-M4UNLwFi5-amr-for-r-assistant)
 | 
			
		||||
# Generate GPT knowledge info for our Assistant (https://chat.amr-for-r.org)
 | 
			
		||||
bash data-raw/_generate_GPT_knowledge_input.sh "${currentversion}"
 | 
			
		||||
git add data-raw/*
 | 
			
		||||
git add -u
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
Package: AMR
 | 
			
		||||
Version: 2.1.1.9236
 | 
			
		||||
Date: 2025-04-12
 | 
			
		||||
Version: 2.1.1.9237
 | 
			
		||||
Date: 2025-04-13
 | 
			
		||||
Title: Antimicrobial Resistance Data Analysis
 | 
			
		||||
Description: Functions to simplify and standardise antimicrobial resistance (AMR)
 | 
			
		||||
  data analysis and to work with microbial and antimicrobial properties by
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										6
									
								
								NEWS.md
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								NEWS.md
									
									
									
									
									
								
							@@ -1,4 +1,4 @@
 | 
			
		||||
# AMR 2.1.1.9236
 | 
			
		||||
# AMR 2.1.1.9237
 | 
			
		||||
 | 
			
		||||
*(this beta version will eventually become v3.0. We're happy to reach a new major milestone soon, which will be all about the new One Health support! Install this beta using [the instructions here](https://amr-for-r.org/#get-this-package).)*
 | 
			
		||||
 | 
			
		||||
@@ -8,7 +8,7 @@ This package now supports not only tools for AMR data analysis in clinical setti
 | 
			
		||||
## Breaking
 | 
			
		||||
* Dataset `antibiotics` has been renamed to `antimicrobials` as the data set contains more than just antibiotics. Using `antibiotics` will still work, but now returns a warning.
 | 
			
		||||
* Removed all functions and references that used the deprecated `rsi` class, which were all replaced with their `sir` equivalents over two years ago.
 | 
			
		||||
* Function `resistance_predict()` is now deprecated and will be removed in a future version. Use the `tidymodels` framework instead, for which we [wrote a basic introduction](https://amr-for-r.org/articles/AMR_with_tidymodels.html).
 | 
			
		||||
* Functions `resistance_predict()` and `sir_predict()` is now deprecated and will be removed in a future version. Use the `tidymodels` framework instead, for which we [wrote a basic introduction](https://amr-for-r.org/articles/AMR_with_tidymodels.html).
 | 
			
		||||
 | 
			
		||||
## New
 | 
			
		||||
* **One Health implementation**
 | 
			
		||||
@@ -49,6 +49,7 @@ This package now supports not only tools for AMR data analysis in clinical setti
 | 
			
		||||
  * It is now possible to use column names for argument `ab`, `mo`, and `uti`: `as.sir(..., ab = "column1", mo = "column2", uti = "column3")`. This greatly improves the flexibility for users.
 | 
			
		||||
  * Users can now set their own criteria (using regular expressions) as to what should be considered S, I, R, SDD, and NI.
 | 
			
		||||
  * To get quantitative values, `as.double()` on a `sir` object will return 1 for S, 2 for SDD/I, and 3 for R (NI will become `NA`). Other functions using `sir` classes (e.g., `summary()`) are updated to reflect the change to contain NI and SDD.
 | 
			
		||||
  * Following CLSI interpretation rules, values outside the log2-dilution range will be rounded upwards to the nearest log2-level before interpretation. Only if using a CLSI guideline.
 | 
			
		||||
  * Combined MIC values (e.g., from CLSI) are now supported
 | 
			
		||||
  * The argument `conserve_capped_values` in `as.sir()` has been replaced with `capped_mic_handling`, which allows greater flexibility in handling capped MIC values (`<`, `<=`, `>`, `>=`). The four available options (`"standard"`, `"strict"`, `"relaxed"`, `"inverse"`) provide full control over whether these values should be interpreted conservatively or ignored. Using `conserve_capped_values` is now deprecated and returns a warning.
 | 
			
		||||
  * Added argument `info` so silence all console messages
 | 
			
		||||
@@ -105,6 +106,7 @@ This package now supports not only tools for AMR data analysis in clinical setti
 | 
			
		||||
* Added console colours support of `sir` class for Positron
 | 
			
		||||
 | 
			
		||||
## Other
 | 
			
		||||
* New website domain: <https://amr-for-r.org>! The old links (all based on <http://amr-for-r.org>) will remain to work.
 | 
			
		||||
* Added Dr. Larisse Bolton and Aislinn Cook as contributors for their fantastic implementation of WISCA in a mathematically solid way
 | 
			
		||||
* Added Matthew Saab, Dr. Jordan Stull, and Prof. Javier Sanchez as contributors for their tremendous input on veterinary breakpoints and interpretations
 | 
			
		||||
* Added Prof. Kat Holt, Dr. Jane Hawkey, and Dr. Natacha Couto as contributors for their many suggestions, ideas and bugfixes
 | 
			
		||||
 
 | 
			
		||||
@@ -29,7 +29,9 @@
 | 
			
		||||
 | 
			
		||||
#' Predict Antimicrobial Resistance
 | 
			
		||||
#'
 | 
			
		||||
#' Create a prediction model to predict antimicrobial resistance for the next years on statistical solid ground. Standard errors (SE) will be returned as columns `se_min` and `se_max`. See *Examples* for a real live example.
 | 
			
		||||
#' @description Create a prediction model to predict antimicrobial resistance for the next years. Standard errors (SE) will be returned as columns `se_min` and `se_max`. See *Examples* for a real live example.
 | 
			
		||||
#'
 | 
			
		||||
#' **NOTE:** These functions are [deprecated][AMR-deprecated] and will be removed in a future version. Use the AMR package combined with the tidymodels framework instead, for which we have written a [basic and short introduction on our website](https://amr-for-r.org/articles/AMR_with_tidymodels.html).
 | 
			
		||||
#' @param object Model data to be plotted.
 | 
			
		||||
#' @param col_ab Column name of `x` containing antimicrobial interpretations (`"R"`, `"I"` and `"S"`).
 | 
			
		||||
#' @param col_date Column name of the date, will be used to calculate years if this column doesn't consist of years already - the default is the first column of with a date class.
 | 
			
		||||
 
 | 
			
		||||
@@ -27,7 +27,7 @@
 | 
			
		||||
# how to conduct AMR data analysis: https://amr-for-r.org              #
 | 
			
		||||
# ==================================================================== #
 | 
			
		||||
 | 
			
		||||
#' Deprecated Functions
 | 
			
		||||
#' Deprecated Functions, Arguments, or Datasets
 | 
			
		||||
#'
 | 
			
		||||
#' These objects are so-called '[Deprecated]'. **They will be removed in a future version of this package.** Using these will give a warning with the name of the alternative object it has been replaced by (if there is one).
 | 
			
		||||
#' @keywords internal
 | 
			
		||||
@@ -40,8 +40,10 @@ NULL
 | 
			
		||||
#' @export
 | 
			
		||||
"antibiotics"
 | 
			
		||||
 | 
			
		||||
# REMEMBER to also remove the deprecated `antibiotics` argument in `antibiogram()`
 | 
			
		||||
# REMEMBER to also remove the deprecated `converse_capped_values` argument in `as.sir()`
 | 
			
		||||
# REMEMBER to search for `deprecation_warning` in the package code to find all instances.
 | 
			
		||||
# currently deprecated arguments at least:
 | 
			
		||||
# - `antibiotics` in `antibiogram()`
 | 
			
		||||
# - `converse_capped_values` in `as.sir()`
 | 
			
		||||
 | 
			
		||||
#' @rdname AMR-deprecated
 | 
			
		||||
#' @export
 | 
			
		||||
 
 | 
			
		||||
@@ -38,12 +38,11 @@ template:
 | 
			
		||||
      <script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.js" integrity="sha384-7zkQWkzuo3B5mTepMUcHkMB5jZaolc2xDwL6VFqjFALcbeS9Ggm/Yr2r3Dy4lfFg" crossorigin="anonymous"></script>
 | 
			
		||||
      <script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/contrib/auto-render.min.js" integrity="sha384-43gviWU0YVjaDtb/GhzOouOXtZMP/7XUzwPTstBeZFe/+rCMvRwr4yROQP43s0Xk" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script>
 | 
			
		||||
  bootswatch: "flatly"
 | 
			
		||||
  assets: "pkgdown/logos" # use logos in this folder
 | 
			
		||||
  bslib:
 | 
			
		||||
    base_font: {google: "Lato"}
 | 
			
		||||
    heading_font: {google: "Lato"}
 | 
			
		||||
    code_font: {google: "Fira Code"}
 | 
			
		||||
    # body-text-align: "justify"
 | 
			
		||||
    # body-text-align: "justify" # this is now only in `p {}` in extra.css
 | 
			
		||||
    line-height-base: 1.75
 | 
			
		||||
    # make top bar a bit wider
 | 
			
		||||
    navbar-padding-y: "0.5rem"
 | 
			
		||||
@@ -58,7 +57,7 @@ footer:
 | 
			
		||||
    right: [logo]
 | 
			
		||||
  components:
 | 
			
		||||
    devtext: '<code>AMR</code> (for R). Free and open-source, licenced under the <a target="_blank" href="https://github.com/msberends/AMR/blob/main/LICENSE">GNU General Public License version 2.0 (GPL-2)</a>.<br>Developed at the <a target="_blank" href="https://www.rug.nl">University of Groningen</a> and <a target="_blank" href="https://www.umcg.nl">University Medical Center Groningen</a> in The Netherlands.'
 | 
			
		||||
    logo: '<a target="_blank" href="https://www.rug.nl"><img src="https://github.com/msberends/AMR/raw/main/pkgdown/assets/logo_rug.svg" style="max-width: 150px;"></a><a target="_blank" href="https://www.umcg.nl"><img src="https://github.com/msberends/AMR/raw/main/pkgdown/assets/logo_umcg.svg" style="max-width: 150px;"></a>'
 | 
			
		||||
    logo: '<a target="_blank" href="https://www.rug.nl"><img src="https://amr-for-r.org/logo_rug.svg" style="max-width: 150px;"></a><a target="_blank" href="https://www.umcg.nl"><img src="https://amr-for-r.org/logo_umcg.svg" style="max-width: 150px;"></a>'
 | 
			
		||||
 | 
			
		||||
home:
 | 
			
		||||
  sidebar:
 | 
			
		||||
@@ -268,9 +267,9 @@ reference:
 | 
			
		||||
    - "`kurtosis`"
 | 
			
		||||
    - "`skewness`"
 | 
			
		||||
 | 
			
		||||
  - title: "Other: deprecated functions"
 | 
			
		||||
  - title: "Other: deprecated functions/arguments/datasets"
 | 
			
		||||
    desc: >
 | 
			
		||||
      These functions are deprecated, meaning that they will still
 | 
			
		||||
      These objects are deprecated, meaning that they will still
 | 
			
		||||
      work but show a warning that they will be removed
 | 
			
		||||
      in a future version.
 | 
			
		||||
    contents:
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
This knowledge base contains all context you must know about the AMR package for R. You are a GPT trained to be an assistant for the AMR package in R. You are an incredible R specialist, especially trained in this package and in the tidyverse.
 | 
			
		||||
 | 
			
		||||
First and foremost, you are trained on version 2.1.1.9236. Remember this whenever someone asks which AMR package version you’re at.
 | 
			
		||||
First and foremost, you are trained on version 2.1.1.9237. Remember this whenever someone asks which AMR package version you’re at.
 | 
			
		||||
 | 
			
		||||
Below are the contents of the NAMESPACE file, the index.md file, and all the man/*.Rd files (documentation) in the package. Every file content is split using 100 hypens.
 | 
			
		||||
----------------------------------------------------------------------------------------------------
 | 
			
		||||
@@ -559,7 +559,7 @@ ggplot(data.frame(mic = some_mic_values,
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
<a href="./reference/plotting.html" title="Plotting Helpers for AMR Data Analysis">
 | 
			
		||||
  <img src="./plot_readme.png" style="width: 600px; max-width: 100%;">
 | 
			
		||||
  <img src="./plot_readme.png" style="width: 1400px; max-width: 100%;">
 | 
			
		||||
</a>
 | 
			
		||||
 | 
			
		||||
#### Calculating resistance per group
 | 
			
		||||
@@ -736,7 +736,7 @@ THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/AMR-deprecated.Rd':
 | 
			
		||||
\alias{antibiotics}
 | 
			
		||||
\alias{ab_class}
 | 
			
		||||
\alias{ab_selector}
 | 
			
		||||
\title{Deprecated Functions}
 | 
			
		||||
\title{Deprecated Functions, Arguments, or Datasets}
 | 
			
		||||
\format{
 | 
			
		||||
An object of class \code{tbl_df} (inherits from \code{tbl}, \code{data.frame}) with 496 rows and 14 columns.
 | 
			
		||||
}
 | 
			
		||||
@@ -8317,7 +8317,9 @@ A \link{data.frame} with extra class \code{\link{resistance_predict}} with colum
 | 
			
		||||
Furthermore, the model itself is available as an attribute: \code{attributes(x)$model}, see \emph{Examples}.
 | 
			
		||||
}
 | 
			
		||||
\description{
 | 
			
		||||
Create a prediction model to predict antimicrobial resistance for the next years on statistical solid ground. Standard errors (SE) will be returned as columns \code{se_min} and \code{se_max}. See \emph{Examples} for a real live example.
 | 
			
		||||
Create a prediction model to predict antimicrobial resistance for the next years. Standard errors (SE) will be returned as columns \code{se_min} and \code{se_max}. See \emph{Examples} for a real live example.
 | 
			
		||||
 | 
			
		||||
\strong{NOTE:} These functions are \link[=AMR-deprecated]{deprecated} and will be removed in a future version. Use the AMR package combined with the tidymodels framework instead, for which we have written a \href{https://amr-for-r.org/articles/AMR_with_tidymodels.html}{basic and short introduction on our website}.
 | 
			
		||||
}
 | 
			
		||||
\details{
 | 
			
		||||
Valid options for the statistical model (argument \code{model}) are:
 | 
			
		||||
@@ -9222,7 +9224,7 @@ knitr::opts_chunk$set(
 | 
			
		||||
)
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
> This page was entirely written by our [AMR for R Assistant](https://chatgpt.com/g/g-M4UNLwFi5-amr-for-r-assistant), a ChatGPT manually-trained model able to answer any question about the AMR package.
 | 
			
		||||
> This page was entirely written by our [AMR for R Assistant](https://chat.amr-for-r.org), a ChatGPT manually-trained model able to answer any question about the AMR package.
 | 
			
		||||
 | 
			
		||||
Antimicrobial resistance (AMR) is a global health crisis, and understanding resistance patterns is crucial for managing effective treatments. The `AMR` R package provides robust tools for analysing AMR data, including convenient antimicrobial selector functions like `aminoglycosides()` and `betalactams()`. 
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										2
									
								
								index.md
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								index.md
									
									
									
									
									
								
							@@ -162,7 +162,7 @@ ggplot(data.frame(mic = some_mic_values,
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
<a href="./reference/plotting.html" title="Plotting Helpers for AMR Data Analysis">
 | 
			
		||||
  <img src="./plot_readme.png" style="width: 600px; max-width: 100%;">
 | 
			
		||||
  <img src="./plot_readme.png" style="width: 1400px; max-width: 100%;">
 | 
			
		||||
</a>
 | 
			
		||||
 | 
			
		||||
#### Calculating resistance per group
 | 
			
		||||
 
 | 
			
		||||
@@ -6,7 +6,7 @@
 | 
			
		||||
\alias{antibiotics}
 | 
			
		||||
\alias{ab_class}
 | 
			
		||||
\alias{ab_selector}
 | 
			
		||||
\title{Deprecated Functions}
 | 
			
		||||
\title{Deprecated Functions, Arguments, or Datasets}
 | 
			
		||||
\format{
 | 
			
		||||
An object of class \code{tbl_df} (inherits from \code{tbl}, \code{data.frame}) with 496 rows and 14 columns.
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -71,7 +71,9 @@ A \link{data.frame} with extra class \code{\link{resistance_predict}} with colum
 | 
			
		||||
Furthermore, the model itself is available as an attribute: \code{attributes(x)$model}, see \emph{Examples}.
 | 
			
		||||
}
 | 
			
		||||
\description{
 | 
			
		||||
Create a prediction model to predict antimicrobial resistance for the next years on statistical solid ground. Standard errors (SE) will be returned as columns \code{se_min} and \code{se_max}. See \emph{Examples} for a real live example.
 | 
			
		||||
Create a prediction model to predict antimicrobial resistance for the next years. Standard errors (SE) will be returned as columns \code{se_min} and \code{se_max}. See \emph{Examples} for a real live example.
 | 
			
		||||
 | 
			
		||||
\strong{NOTE:} These functions are \link[=AMR-deprecated]{deprecated} and will be removed in a future version. Use the AMR package combined with the tidymodels framework instead, for which we have written a \href{https://amr-for-r.org/articles/AMR_with_tidymodels.html}{basic and short introduction on our website}.
 | 
			
		||||
}
 | 
			
		||||
\details{
 | 
			
		||||
Valid options for the statistical model (argument \code{model}) are:
 | 
			
		||||
 
 | 
			
		||||
@@ -131,9 +131,13 @@ input[type="search"] {
 | 
			
		||||
  width: 150px;
 | 
			
		||||
}
 | 
			
		||||
blockquote {
 | 
			
		||||
  font-style: italic;
 | 
			
		||||
  padding: 1.25rem 1.25rem;
 | 
			
		||||
  border-left: 1rem solid var(--amr-green-dark);
 | 
			
		||||
}
 | 
			
		||||
p {
 | 
			
		||||
  text-align: justify;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* 
 | 
			
		||||
this shows on top of every sidebar to the right
 | 
			
		||||
 
 | 
			
		||||
@@ -31,7 +31,7 @@
 | 
			
		||||
 | 
			
		||||
$(document).ready(function() {
 | 
			
		||||
  // add GPT assistant info
 | 
			
		||||
  $('aside').prepend('<div class="amr-gpt-assistant"><a target="_blank" href="https://chatgpt.com/g/g-M4UNLwFi5-amr-for-r-assistant"><img src="https://github.com/msberends/AMR/raw/main/pkgdown/assets/AMRforRGPT.svg"></a></div>');
 | 
			
		||||
  $('aside').prepend('<div class="amr-gpt-assistant"><a target="_blank" href="https://chat.amr-for-r.org"><img src="https://amr-for-r.org/AMRforRGPT.svg"></a></div>');
 | 
			
		||||
 | 
			
		||||
  // replace 'Developers' with 'Maintainers' on the main page, and "Contributors" on the Authors page
 | 
			
		||||
  $(".developers h2").text("Maintainers");
 | 
			
		||||
@@ -62,7 +62,7 @@ $(document).ready(function() {
 | 
			
		||||
  if (window.location.href.includes('AMR_for_Python')) {
 | 
			
		||||
    $('body').addClass('amr-for-python'); /* to set colours in CSS */
 | 
			
		||||
    $('img[src="../logo.svg"]').attr('src', '../logo_python.svg'); /* replace base logo */
 | 
			
		||||
    $('img[src="https://github.com/msberends/AMR/raw/main/pkgdown/assets/AMRforRGPT.svg"]').attr('src', 'https://github.com/msberends/AMR/raw/main/pkgdown/assets/AMRforRGPT_python.svg'); /* replace GPT logo */
 | 
			
		||||
    $('img[src="https://amr-for-r.org/AMRforRGPT.svg"]').attr('src', 'https://amr-for-r.org/AMRforRGPT_python.svg'); /* replace GPT logo */
 | 
			
		||||
  }
 | 
			
		||||
  
 | 
			
		||||
  // add country flags
 | 
			
		||||
 
 | 
			
		||||
@@ -22,7 +22,7 @@ knitr::opts_chunk$set(
 | 
			
		||||
)
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
> This page was entirely written by our [AMR for R Assistant](https://chatgpt.com/g/g-M4UNLwFi5-amr-for-r-assistant), a ChatGPT manually-trained model able to answer any question about the AMR package.
 | 
			
		||||
> This page was entirely written by our [AMR for R Assistant](https://chat.amr-for-r.org), a ChatGPT manually-trained model able to answer any question about the AMR package.
 | 
			
		||||
 | 
			
		||||
Antimicrobial resistance (AMR) is a global health crisis, and understanding resistance patterns is crucial for managing effective treatments. The `AMR` R package provides robust tools for analysing AMR data, including convenient antimicrobial selector functions like `aminoglycosides()` and `betalactams()`. 
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user