1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-08 16:02:02 +02:00

(v2.1.1.9236) documentation

This commit is contained in:
2025-04-12 11:46:42 +02:00
parent 36fd99e1f4
commit 40d7a971c3
141 changed files with 181 additions and 172 deletions

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' The `AMR` Package

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
# add new version numbers here, and add the rules themselves to "data-raw/eucast_rules.tsv" and clinical_breakpoints

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
# faster implementation of left_join than using merge() by poorman - we use match():

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
# ------------------------------------------------

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' Options for the AMR package

2
R/ab.R
View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' Transform Input to an Antibiotic ID

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' Retrieve Antimicrobial Drug Names and Doses from Clinical Text

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' Get Properties of an Antibiotic

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' Age in Years of Individuals

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' Antimicrobial Selectors

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' Generate Traditional, Combination, Syndromic, or WISCA Antibiograms

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' Get ATC Properties from WHOCC Website

2
R/av.R
View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' Transform Input to an Antiviral Drug ID

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' Retrieve Antiviral Drug Names and Doses from Clinical Text

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' Get Properties of an Antiviral Drug

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' Check Availability of Columns

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' Determine Bug-Drug Combinations

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' Count Available Isolates

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' Add Custom Antimicrobials

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' Define Custom EUCAST Rules

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' Add Custom Microorganisms

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' Data Sets with `r format(nrow(antimicrobials) + nrow(antivirals), big.mark = " ")` Antimicrobial Drugs

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' Transform Input to Disk Diffusion Diameters

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
# ====================================================== #
@ -219,7 +219,7 @@ eucast_rules <- function(x,
if (interactive() && isTRUE(verbose) && isTRUE(info)) {
txt <- paste0(
"WARNING: In Verbose mode, the eucast_rules() function does not apply rules to the data, but instead returns a data set in logbook form with extensive info about which rows and columns would be effected and in which way.",
"WARNING: In Verbose mode, the eucast_rules() function does not apply rules to the data, but instead returns a data set in logbook form with comprehensive info about which rows and columns would be effected and in which way.",
"\n\nThis may overwrite your existing data if you use e.g.:",
"\ndata <- eucast_rules(data, verbose = TRUE)\n\nDo you want to continue?"
)

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' Export Data Set as NCBI BioSample Antibiogram

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' Determine First Isolates

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' *G*-test for Count Data

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' Determine Clinical or Epidemic Episodes

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' PCA Biplot with `ggplot2`

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' AMR Plots with `ggplot2`

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' Guess Antibiotic Column

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' Italicise Taxonomic Families, Genera, Species, Subspecies

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' Join [microorganisms] to a Data Set

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' (Key) Antimicrobials for First Weighted Isolates

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' Kurtosis of the Sample

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' Vectorised Pattern Matching with Keyboard Shortcut

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' Determine Multidrug-Resistant Organisms (MDRO)

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' Calculate the Mean AMR Distance

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
# these are allowed MIC values and will become factor levels

2
R/mo.R
View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' Transform Arbitrary Input to Valid Microbial Taxonomy

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' Calculate the Matching Score for Microorganisms

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' Get Properties of a Microorganism

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' User-Defined Reference Data Set for Microorganisms

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' Principal Component Analysis (for AMR)

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' Plotting Helpers for AMR Data Analysis

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' Calculate Antimicrobial Resistance

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' Random MIC Values/Disk Zones/SIR Generation

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' Predict Antimicrobial Resistance

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' Interpret MIC and Disk Diffusion as SIR, or Clean Existing SIR Data

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
dots2vars <- function(...) {
@ -217,7 +217,7 @@ sir_calc <- function(...,
}
if (as_percent == TRUE) {
percentage(fraction, digits = 1)
trimws(percentage(fraction, digits = 1))
} else {
fraction
}

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' @rdname proportion

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' Skewness of the Sample

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' Filter Top *n* Microorganisms

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' Translate Strings from the AMR Package

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
# These are all S3 implementations for the vctrs package,

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' WHOCC: WHO Collaborating Centre for Drug Statistics Methodology

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
#' Deprecated Functions

View File

@ -24,7 +24,7 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# #
# Visit our website for the full manual and a complete tutorial about #
# how to conduct AMR data analysis: https://amr-for-r.org/ #
# how to conduct AMR data analysis: https://amr-for-r.org #
# ==================================================================== #
# set up package environment, used by numerous AMR functions