update NEWS

This commit is contained in:
dr. M.S. (Matthijs) Berends 2023-03-11 14:43:31 +01:00
parent 262598b8d7
commit 45e840c02f
4 changed files with 16 additions and 11 deletions

View File

@ -1,5 +1,5 @@
Package: AMR
Version: 1.8.2.9148
Version: 1.8.2.9149
Date: 2023-03-11
Title: Antimicrobial Resistance Data Analysis
Description: Functions to simplify and standardise antimicrobial resistance (AMR)

13
NEWS.md
View File

@ -1,4 +1,4 @@
# AMR 1.8.2.9148
# AMR 1.8.2.9149
*(this beta version will eventually become v2.0! We're happy to reach a new major milestone soon!)*
@ -48,6 +48,12 @@ We added support for the following ten languages: Chinese (simplified), Czech, F
We are very grateful for the valuable input by our colleagues from other countries. The `AMR` package is now available in 20 languages in total, and according to download stats used in almost all countries in the world!
### Outbreak management
For analysis in outbreak management, we updated the `get_episode()` and `is_new_episode()` functions: they now contain an argument `case_free_days`. This argument can be used to quantify the duration of case-free days (the inter-epidemic interval), after which a new episode will start.
This is common requirement in outbreak management, e.g. when determining the number of norovirus outbreaks in a hospital. The case-free period could then be 14 or 28 days, so that new norovirus cases after that time will be considered a different (or new) episode.
### Microbiological taxonomy
The `microorganisms` data set no longer relies on the Catalogue of Life, but on the List of Prokaryotic names with Standing in Nomenclature (LPSN) and is supplemented with the 'backbone taxonomy' from the Global Biodiversity Information Facility (GBIF). The structure of this data set has changed to include separate LPSN and GBIF identifiers. Almost all previous MO codes were retained. It contains over 1,400 taxonomic names from 2022.
@ -59,6 +65,7 @@ The new function `add_custom_microorganisms()` allows users to add custom microo
We also made the following changes regarding the included taxonomy or microorganisms functions:
* Updated full microbiological taxonomy according to the latest daily LPSN data set (December 2022) and latest yearly GBIF taxonomy backbone (November 2022)
* Added function `mo_current()` to get the currently valid taxonomic name of a microorganism
* Support for all 1,516 city-like serovars of *Salmonella*, such as *Salmonella* Goldcoast. Formally, these are serovars belonging to the *S. enterica* species, but they are reported with only the name of the genus and the city. For this reason, the serovars are in the `subspecies` column of the `microorganisms` data set and "enterica" is in the `species` column, but the full name does not contain the species name (*enterica*).
* All new algorithm for `as.mo()` (and thus all `mo_*()` functions) while still following our original set-up as described in our recently published JSS paper (DOI [10.18637/jss.v104.i03](https://doi.org/10.18637/jss.v104.i03)).
* A new argument `keep_synonyms` allows to *not* correct for updated taxonomy, in favour of the now deleted argument `allow_uncertain`
@ -100,13 +107,11 @@ We now added extensive support for antiviral agents! For the first time, the `AM
* Function `sir_confidence_interval()` to add confidence intervals in AMR calculation. This is now also included in `sir_df()` and `proportion_df()`.
* Function `mean_amr_distance()` to calculate the mean AMR distance. The mean AMR distance is a normalised numeric value to compare AMR test results and can help to identify similar isolates, without comparing antibiograms by hand.
* Function `sir_interpretation_history()` to view the history of previous runs of `as.sir()` (previously `as.rsi()`). This returns a 'logbook' with the selected guideline, reference table and specific interpretation of each row in a data set on which `as.sir()` was run.
* Function `mo_current()` to get the currently valid taxonomic name of a microorganism
* Function `add_custom_antimicrobials()` to add custom antimicrobial codes and names to the `AMR` package
## Changes
* `get_episode()` (and its wrapper `is_new_episode()`):
* Gained an argument `new_after_days` to determine episodes based on epidemic periods
* Fix for working with `NA` values
* Fix for unsorted dates of length 2
* Now returns class `integer` instead of `numeric` since they are always whole numbers

View File

@ -27,7 +27,7 @@
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
# ==================================================================== #
#' Determine (Clinical or Epidemic) Episodes
#' Determine Clinical or Epidemic Episodes
#'
#' These functions determine which items in a vector can be considered (the start of) a new episode. This can be used to determine clinical episodes for any epidemiological analysis. The [get_episode()] function returns the index number of the episode per group, while the [is_new_episode()] function returns `TRUE` for every new [get_episode()] index. Both absolute and relative episode determination are supported.
#' @param x vector of dates (class `Date` or `POSIXt`), will be sorted internally to determine episodes
@ -71,7 +71,7 @@
#'
#' The [get_episode()] function returns the index number of the episode, so all cases/patients/isolates in the first episode will have the number 1, all cases/patients/isolates in the second episode will have the number 2, etc.
#'
#' The [is_new_episode()] function returns `TRUE` for every new [get_episode()] index, and is thus equal to `!duplicated(get_episode(...))`.
#' The [is_new_episode()] function on the other hand, returns `TRUE` for every new [get_episode()] index.
#'
#' To specify, when setting `episode_days = 365` (using method 1 as explained above), this is how the two functions differ:
#'
@ -214,8 +214,8 @@ is_new_episode <- function(x, episode_days = NULL, case_free_days = NULL, ...) {
}
exec_episode <- function(x, episode_days, case_free_days, ...) {
stop_if((is.null(episode_days) && is.null(case_free_days)) || (!is.null(episode_days) && !is.null(case_free_days)),
"either `episode_days` or `case_free_days` must be set.",
stop_if_not(is.null(episode_days) || is.null(case_free_days),
"either argument `episode_days` or argument `case_free_days` must be set.",
call = -2
)

View File

@ -3,7 +3,7 @@
\name{get_episode}
\alias{get_episode}
\alias{is_new_episode}
\title{Determine (Clinical or Epidemic) Episodes}
\title{Determine Clinical or Epidemic Episodes}
\usage{
get_episode(x, episode_days = NULL, case_free_days = NULL, ...)
@ -64,7 +64,7 @@ Either \code{episode_days} or \code{case_free_days} must be provided in the func
The \code{\link[=get_episode]{get_episode()}} function returns the index number of the episode, so all cases/patients/isolates in the first episode will have the number 1, all cases/patients/isolates in the second episode will have the number 2, etc.
The \code{\link[=is_new_episode]{is_new_episode()}} function returns \code{TRUE} for every new \code{\link[=get_episode]{get_episode()}} index, and is thus equal to \code{!duplicated(get_episode(...))}.
The \code{\link[=is_new_episode]{is_new_episode()}} function on the other hand, returns \code{TRUE} for every new \code{\link[=get_episode]{get_episode()}} index.
To specify, when setting \code{episode_days = 365} (using method 1 as explained above), this is how the two functions differ:\tabular{cccc}{
patient \tab date \tab \code{get_episode()} \tab \code{is_new_episode()} \cr