Compare commits

..

No commits in common. "ed732da6a081f3f3061f0762f8f7ba21d7e30096" and "c7bfc475027f76b56707f202798b9dc36ef0578d" have entirely different histories.

9 changed files with 1326 additions and 10 deletions

View File

@ -1,6 +1,6 @@
Package: AMR
Version: 1.8.2.9049
Date: 2022-11-13
Date: 2022-11-12
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

1312
NEWS.md

File diff suppressed because it is too large Load Diff

2
R/av.R
View File

@ -52,7 +52,7 @@
#' World Health Organization (WHO) Collaborating Centre for Drug Statistics Methodology: \url{https://www.whocc.no/atc_ddd_index/}
#'
#' European Commission Public Health PHARMACEUTICALS - COMMUNITY REGISTER: \url{https://ec.europa.eu/health/documents/community-register/html/reg_hum_atc.htm}
#' @aliases av
#' @aliases ab
#' @return A [character] [vector] with additional class [`ab`]
#' @seealso
#' * [antivirals] for the [data.frame] that is being used to determine ATCs

View File

@ -248,6 +248,11 @@ mdro <- function(x = NULL,
pct_required_classes <- pct_required_classes / 100
}
if (!is.null(list(...)$country)) {
warning_("in `mdro()`: using `country` is deprecated, use `guideline` instead. See ?mdro")
guideline <- list(...)$country
}
guideline.bak <- guideline
if (is.list(guideline)) {
# Custom MDRO guideline ---------------------------------------------------

View File

@ -45,8 +45,10 @@ expect_identical(ab_name(21319, language = NULL), "Flucloxacillin")
expect_identical(ab_name("J01CF05", language = NULL), "Flucloxacillin")
expect_identical(ab_ddd("AMX", "oral"), 1.5)
expect_warning(ab_ddd("AMX", "oral", units = TRUE)) # old behaviour
expect_identical(ab_ddd_units("AMX", "iv"), "g")
expect_identical(ab_ddd("AMX", "iv"), 3)
expect_identical(ab_ddd_units("AMX", "iv"), "g")
expect_identical(ab_name(x = c("AMC", "PLB"), language = NULL), c("Amoxicillin/clavulanic acid", "Polymyxin B"))
expect_identical(

View File

@ -40,6 +40,7 @@ expect_identical(av_name(135398513, language = NULL), "Aciclovir")
expect_identical(av_name("J05AB01", language = NULL), "Aciclovir")
expect_identical(av_ddd("ACI", "oral"), 4)
expect_warning(av_ddd("ACI", "oral", units = TRUE)) # old behaviour
expect_identical(av_ddd_units("ACI", "iv"), "g")
expect_identical(av_ddd("ACI", "iv"), 4)

View File

@ -27,6 +27,8 @@
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
# ==================================================================== #
expect_error(suppressWarnings(mdro(example_isolates, country = "invalid", col_mo = "mo", info = TRUE)))
expect_error(suppressWarnings(mdro(example_isolates, country = "fr", info = TRUE)))
expect_error(mdro(example_isolates, guideline = c("BRMO", "MRGN"), info = TRUE))
expect_error(mdro(example_isolates, col_mo = "invalid", info = TRUE))

View File

@ -2,7 +2,7 @@
% Please edit documentation in R/av.R
\name{as.av}
\alias{as.av}
\alias{av}
\alias{ab}
\alias{is.av}
\title{Transform Input to an Antiviral Agent ID}
\usage{

View File

@ -156,7 +156,7 @@ microorganisms %>%
```
## `antibiotics`: Antibiotic (+Antifungal) Drugs
## `antibiotics`: Antibiotic Agents
`r structure_txt(antibiotics)`
@ -173,7 +173,6 @@ This data set contains all EARS-Net and ATC codes gathered from WHO and WHONET,
* [ATC/DDD index from WHO Collaborating Centre for Drug Statistics Methodology](https://www.whocc.no/atc_ddd_index/) (note: this may not be used for commercial purposes, but is freely available from the WHO CC website for personal use)
* [PubChem by the US National Library of Medicine](https://pubchem.ncbi.nlm.nih.gov)
* [WHONET software 2019](https://whonet.org)
* [LOINC (Logical Observation Identifiers Names and Codes)](https://loinc.org)
### Example content
@ -184,7 +183,7 @@ antibiotics %>%
```
## `antivirals`: Antiviral Drugs
## `antivirals`: Antiviral Agents
`r structure_txt(antivirals)`
@ -192,7 +191,7 @@ This data set is in R available as `antivirals`, after you load the `AMR` packag
`r download_txt("antivirals")`
The tab-separated text file and Microsoft Excel workbook, and SAS, SPSS and Stata files all contain the trade names and LOINC codes as comma separated values.
The tab-separated text file and Microsoft Excel workbook, and SAS, SPSS and Stata files all contain the trade names as comma separated values.
### Source
@ -200,7 +199,6 @@ This data set contains all ATC codes gathered from WHO and all compound IDs from
* [ATC/DDD index from WHO Collaborating Centre for Drug Statistics Methodology](https://www.whocc.no/atc_ddd_index/) (note: this may not be used for commercial purposes, but is freely available from the WHO CC website for personal use)
* [PubChem by the US National Library of Medicine](https://pubchem.ncbi.nlm.nih.gov)
* [LOINC (Logical Observation Identifiers Names and Codes)](https://loinc.org)
### Example content