1
0
mirror of https://github.com/msberends/AMR.git synced 2026-08-29 11:58:56 +02:00

Built site for AMR@3.0.1.9061: 0c1709c

This commit is contained in:
github-actions
2026-06-23 18:00:14 +00:00
parent 9447e0f2c2
commit 2a7bfb9ffb
328 changed files with 5357 additions and 3687 deletions

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Deprecated Functions, Arguments, or Datasets — AMR-deprecated • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Deprecated Functions, Arguments, or Datasets — AMR-deprecated"><meta name="description" content="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)."><meta property="og:description" content="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)."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Deprecated Functions, Arguments, or Datasets — AMR-deprecated • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Deprecated Functions, Arguments, or Datasets — AMR-deprecated"><meta name="description" content="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)."><meta property="og:description" content="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)."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Options for the AMR package — AMR-options • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Options for the AMR package — AMR-options"><meta name="description" content='This is an overview of all the package-specific options you can set in the AMR package. Set them using the options() function, e.g.:
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Options for the AMR package — AMR-options • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Options for the AMR package — AMR-options"><meta name="description" content='This is an overview of all the package-specific options you can set in the AMR package. Set them using the options() function, e.g.:
options(AMR_guideline = "CLSI")'><meta property="og:description" content='This is an overview of all the package-specific options you can set in the AMR package. Set them using the options() function, e.g.:
options(AMR_guideline = "CLSI")'><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -9,7 +9,7 @@ options(AMR_guideline = "CLSI")'><meta property="og:image" content="https://amr-
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@@ -1,18 +1,18 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>The AMR Package — AMR • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="The AMR Package — AMR"><meta name="description" content="Welcome to the AMR package.
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>The AMR Package — AMR • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="The AMR Package — AMR"><meta name="description" content="Welcome to the AMR package.
The AMR package is a peer-reviewed, free and open-source R package with zero dependencies to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial data and properties, by using evidence-based methods. Our aim is to provide a standard for clean and reproducible AMR data analysis, that can therefore empower epidemiological analyses to continuously enable surveillance and treatment evaluation in any setting. We are a team of many different researchers from around the globe to make this a successful and durable project!
This work was published in the Journal of Statistical Software (Volume 104(3); doi:10.18637/jss.v104.i03
) and formed the basis of two PhD theses (doi:10.33612/diss.177417131
and doi:10.33612/diss.192486375
).
After installing this package, R knows ~79 000 distinct microbial species (updated June 2024) and all ~620 antimicrobial and antiviral drugs by name and code (including ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid SIR and MIC values. The integral clinical breakpoint guidelines from CLSI 2011-2026 and EUCAST 2011-2026 are included, even with epidemiological cut-off (ECOFF) values. It supports and can read any data format, including WHONET data. This package works on Windows, macOS and Linux with all versions of R since R-3.0 (April 2013). It was designed to work in any setting, including those with very limited resources. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the University of Groningen and the University Medical Center Groningen.
After installing this package, R knows ~97 000 distinct microbial species (updated June 2024) and all ~620 antimicrobial and antiviral drugs by name and code (including ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid SIR and MIC values. The integral clinical breakpoint guidelines from CLSI 2011-2026 and EUCAST 2011-2026 are included, even with epidemiological cut-off (ECOFF) values. It supports and can read any data format, including WHONET data. This package works on Windows, macOS and Linux with all versions of R since R-3.0 (April 2013). It was designed to work in any setting, including those with very limited resources. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the University of Groningen and the University Medical Center Groningen.
The AMR package is available in English, Arabic, Bengali, Chinese, Czech, Danish, Dutch, Finnish, French, German, Greek, Hindi, Indonesian, Italian, Japanese, Korean, Norwegian, Polish, Portuguese, Romanian, Russian, Spanish, Swahili, Swedish, Turkish, Ukrainian, Urdu, and Vietnamese. Antimicrobial drug (group) names and colloquial microorganism names are provided in these languages."><meta property="og:description" content="Welcome to the AMR package.
The AMR package is a peer-reviewed, free and open-source R package with zero dependencies to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial data and properties, by using evidence-based methods. Our aim is to provide a standard for clean and reproducible AMR data analysis, that can therefore empower epidemiological analyses to continuously enable surveillance and treatment evaluation in any setting. We are a team of many different researchers from around the globe to make this a successful and durable project!
This work was published in the Journal of Statistical Software (Volume 104(3); doi:10.18637/jss.v104.i03
) and formed the basis of two PhD theses (doi:10.33612/diss.177417131
and doi:10.33612/diss.192486375
).
After installing this package, R knows ~79 000 distinct microbial species (updated June 2024) and all ~620 antimicrobial and antiviral drugs by name and code (including ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid SIR and MIC values. The integral clinical breakpoint guidelines from CLSI 2011-2026 and EUCAST 2011-2026 are included, even with epidemiological cut-off (ECOFF) values. It supports and can read any data format, including WHONET data. This package works on Windows, macOS and Linux with all versions of R since R-3.0 (April 2013). It was designed to work in any setting, including those with very limited resources. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the University of Groningen and the University Medical Center Groningen.
After installing this package, R knows ~97 000 distinct microbial species (updated June 2024) and all ~620 antimicrobial and antiviral drugs by name and code (including ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid SIR and MIC values. The integral clinical breakpoint guidelines from CLSI 2011-2026 and EUCAST 2011-2026 are included, even with epidemiological cut-off (ECOFF) values. It supports and can read any data format, including WHONET data. This package works on Windows, macOS and Linux with all versions of R since R-3.0 (April 2013). It was designed to work in any setting, including those with very limited resources. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the University of Groningen and the University Medical Center Groningen.
The AMR package is available in English, Arabic, Bengali, Chinese, Czech, Danish, Dutch, Finnish, French, German, Greek, Hindi, Indonesian, Italian, Japanese, Korean, Norwegian, Polish, Portuguese, Romanian, Russian, Spanish, Swahili, Swedish, Turkish, Ukrainian, Urdu, and Vietnamese. Antimicrobial drug (group) names and colloquial microorganism names are provided in these languages."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -21,7 +21,7 @@ The AMR package is available in English, Arabic, Bengali, Chinese, Czech, Danish
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -70,13 +70,21 @@ The AMR package is available in English, Arabic, Bengali, Chinese, Czech, Danish
) and formed the basis of two PhD theses (<a href="https://doi.org/10.33612/diss.177417131" class="external-link">doi:10.33612/diss.177417131</a>
and <a href="https://doi.org/10.33612/diss.192486375" class="external-link">doi:10.33612/diss.192486375</a>
).</p>
<p>After installing this package, R knows <a href="https://amr-for-r.org/reference/microorganisms.html"><strong>~79 000 distinct microbial species</strong></a> (updated June 2024) and all <a href="https://amr-for-r.org/reference/antimicrobials.html"><strong>~620 antimicrobial and antiviral drugs</strong></a> by name and code (including ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid SIR and MIC values. The integral clinical breakpoint guidelines from CLSI 2011-2026 and EUCAST 2011-2026 are included, even with epidemiological cut-off (ECOFF) values. It supports and can read any data format, including WHONET data. This package works on Windows, macOS and Linux with all versions of R since R-3.0 (April 2013). <strong>It was designed to work in any setting, including those with very limited resources</strong>. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the <a href="https://www.rug.nl" class="external-link">University of Groningen</a> and the <a href="https://www.umcg.nl" class="external-link">University Medical Center Groningen</a>.</p>
<p>After installing this package, R knows <a href="https://amr-for-r.org/reference/microorganisms.html"><strong>~97 000 distinct microbial species</strong></a> (updated June 2024) and all <a href="https://amr-for-r.org/reference/antimicrobials.html"><strong>~620 antimicrobial and antiviral drugs</strong></a> by name and code (including ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid SIR and MIC values. The integral clinical breakpoint guidelines from CLSI 2011-2026 and EUCAST 2011-2026 are included, even with epidemiological cut-off (ECOFF) values. It supports and can read any data format, including WHONET data. This package works on Windows, macOS and Linux with all versions of R since R-3.0 (April 2013). <strong>It was designed to work in any setting, including those with very limited resources</strong>. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the <a href="https://www.rug.nl" class="external-link">University of Groningen</a> and the <a href="https://www.umcg.nl" class="external-link">University Medical Center Groningen</a>.</p>
<p>The <code>AMR</code> package is available in English, Arabic, Bengali, Chinese, Czech, Danish, Dutch, Finnish, French, German, Greek, Hindi, Indonesian, Italian, Japanese, Korean, Norwegian, Polish, Portuguese, Romanian, Russian, Spanish, Swahili, Swedish, Turkish, Ukrainian, Urdu, and Vietnamese. Antimicrobial drug (group) names and colloquial microorganism names are provided in these languages.</p>
</div>
<div class="section level2">
<h2 id="source">Source<a class="anchor" aria-label="anchor" href="#source"></a></h2>
<h2 id="download-our-reference-data">Download Our Reference Data<a class="anchor" aria-label="anchor" href="#download-our-reference-data"></a></h2>
<p>All reference data sets in the AMR package - including information on microorganisms, antimicrobials, and clinical breakpoints - are freely available for download in multiple formats: R, MS Excel, Apache Feather, Apache Parquet, SPSS, and Stata.</p>
<p>For maximum compatibility, we also provide machine-readable, tab-separated plain text files suitable for use in any software, including laboratory information systems.</p>
<p>Visit <a href="https://amr-for-r.org/articles/datasets.html">our website for direct download links</a>, or explore the actual files in <a href="https://github.com/msberends/AMR/tree/main/data-raw/datasets" class="external-link">our GitHub repository</a>.</p>
</div>
<div class="section level2">
<h2 id="references">References<a class="anchor" aria-label="anchor" href="#references"></a></h2>
<p>To cite AMR in publications use:</p>
<p>Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C (2022). "AMR: An R Package for Working with Antimicrobial Resistance Data." <em>Journal of Statistical Software</em>, <em>104</em>(3), 1-31. <a href="https://doi.org/10.18637/jss.v104.i03" class="external-link">doi:10.18637/jss.v104.i03</a></p>
<p>A BibTeX entry for LaTeX users is:</p>
@@ -93,14 +101,6 @@ The AMR package is available in English, Arabic, Bengali, Chinese, Czech, Danish
}
</code></pre></div>
</div>
<div class="section level2">
<h2 id="download-our-reference-data">Download Our Reference Data<a class="anchor" aria-label="anchor" href="#download-our-reference-data"></a></h2>
<p>All reference data sets in the AMR package - including information on microorganisms, antimicrobials, and clinical breakpoints - are freely available for download in multiple formats: R, MS Excel, Apache Feather, Apache Parquet, SPSS, and Stata.</p>
<p>For maximum compatibility, we also provide machine-readable, tab-separated plain text files suitable for use in any software, including laboratory information systems.</p>
<p>Visit <a href="https://amr-for-r.org/articles/datasets.html">our website for direct download links</a>, or explore the actual files in <a href="https://github.com/msberends/AMR/tree/main/data-raw/datasets" class="external-link">our GitHub repository</a>.</p>
</div>
<div class="section level2">
<h2 id="see-also">See also<a class="anchor" aria-label="anchor" href="#see-also"></a></h2>

View File

@@ -23,7 +23,7 @@ and
[doi:10.33612/diss.192486375](https://doi.org/10.33612/diss.192486375)
).
After installing this package, R knows [**~79 000 distinct microbial
After installing this package, R knows [**~97 000 distinct microbial
species**](https://amr-for-r.org/reference/microorganisms.html) (updated
June 2024) and all [**~620 antimicrobial and antiviral
drugs**](https://amr-for-r.org/reference/antimicrobials.html) by name
@@ -46,7 +46,23 @@ Russian, Spanish, Swahili, Swedish, Turkish, Ukrainian, Urdu, and
Vietnamese. Antimicrobial drug (group) names and colloquial
microorganism names are provided in these languages.
## Source
## Download Our Reference Data
All reference data sets in the AMR package - including information on
microorganisms, antimicrobials, and clinical breakpoints - are freely
available for download in multiple formats: R, MS Excel, Apache Feather,
Apache Parquet, SPSS, and Stata.
For maximum compatibility, we also provide machine-readable,
tab-separated plain text files suitable for use in any software,
including laboratory information systems.
Visit [our website for direct download
links](https://amr-for-r.org/articles/datasets.html), or explore the
actual files in [our GitHub
repository](https://github.com/msberends/AMR/tree/main/data-raw/datasets).
## References
To cite AMR in publications use:
@@ -69,22 +85,6 @@ A BibTeX entry for LaTeX users is:
doi = {10.18637/jss.v104.i03},
}
## Download Our Reference Data
All reference data sets in the AMR package - including information on
microorganisms, antimicrobials, and clinical breakpoints - are freely
available for download in multiple formats: R, MS Excel, Apache Feather,
Apache Parquet, SPSS, and Stata.
For maximum compatibility, we also provide machine-readable,
tab-separated plain text files suitable for use in any software,
including laboratory information systems.
Visit [our website for direct download
links](https://amr-for-r.org/articles/datasets.html), or explore the
actual files in [our GitHub
repository](https://github.com/msberends/AMR/tree/main/data-raw/datasets).
## See also
Useful links:

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>WHOCC: WHO Collaborating Centre for Drug Statistics Methodology — WHOCC • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="WHOCC: WHO Collaborating Centre for Drug Statistics Methodology — WHOCC"><meta name="description" content="All antimicrobial drugs and their official names, ATC codes, ATC groups and defined daily dose (DDD) are included in this package, using the WHO Collaborating Centre for Drug Statistics Methodology."><meta property="og:description" content="All antimicrobial drugs and their official names, ATC codes, ATC groups and defined daily dose (DDD) are included in this package, using the WHO Collaborating Centre for Drug Statistics Methodology."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>WHOCC: WHO Collaborating Centre for Drug Statistics Methodology — WHOCC • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="WHOCC: WHO Collaborating Centre for Drug Statistics Methodology — WHOCC"><meta name="description" content="All antimicrobial drugs and their official names, ATC codes, ATC groups and defined daily dose (DDD) are included in this package, using the WHO Collaborating Centre for Drug Statistics Methodology."><meta property="og:description" content="All antimicrobial drugs and their official names, ATC codes, ATC groups and defined daily dose (DDD) are included in this package, using the WHO Collaborating Centre for Drug Statistics Methodology."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -58,7 +58,7 @@
<h2 id="whocc">WHOCC<a class="anchor" aria-label="anchor" href="#whocc"></a></h2>
<p>This package contains <strong>all ~550 antibiotic, antimycotic and antiviral drugs</strong> and their Anatomical Therapeutic Chemical (ATC) codes, ATC groups and Defined Daily Dose (DDD) from the World Health Organization Collaborating Centre for Drug Statistics Methodology (WHOCC, <a href="https://atcddd.fhi.no" class="external-link">https://atcddd.fhi.no</a>) and the Pharmaceuticals Community Register of the European Commission (<a href="https://ec.europa.eu/health/documents/community-register/html/reg_hum_atc.htm" class="external-link">https://ec.europa.eu/health/documents/community-register/html/reg_hum_atc.htm</a>).</p>
<p>This package contains <strong>all ~550 antibiotic, antimycotic and antiviral drugs</strong> and their Anatomical Therapeutic Chemical (ATC) codes, ATC groups and Defined Daily Dose (DDD) from the World Health Organization Collaborating Centre for Drug Statistics Methodology (WHOCC, <a href="https://atcddd.fhi.no" class="external-link">https://atcddd.fhi.no</a>) and the Pharmaceuticals Community Register of the European Commission (<a href="https://ec.europa.eu/health/documents/community-register/html/index_en.htm" class="external-link">https://ec.europa.eu/health/documents/community-register/html/index_en.htm</a>).</p>
<p>These have become the gold standard for international drug utilisation monitoring and research.</p>
<p>The WHOCC is located in Oslo at the Norwegian Institute of Public Health and funded by the Norwegian government. The European Commission is the executive of the European Union and promotes its general interest.</p>
<p><strong>NOTE: The WHOCC copyright does not allow use for commercial purposes, unlike any other info from this package.</strong> See <a href="https://atcddd.fhi.no/copyright_disclaimer/." class="external-link">https://atcddd.fhi.no/copyright_disclaimer/.</a></p>

View File

@@ -12,7 +12,7 @@ groups and Defined Daily Dose (DDD) from the World Health Organization
Collaborating Centre for Drug Statistics Methodology (WHOCC,
<https://atcddd.fhi.no>) and the Pharmaceuticals Community Register of
the European Commission
(<https://ec.europa.eu/health/documents/community-register/html/reg_hum_atc.htm>).
(<https://ec.europa.eu/health/documents/community-register/html/index_en.htm>).
These have become the gold standard for international drug utilisation
monitoring and research.

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Data Set with 500 Isolates - WHONET Example — WHONET • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Data Set with 500 Isolates - WHONET Example — WHONET"><meta name="description" content="This example data set has the exact same structure as an export file from WHONET. Such files can be used with this package, as this example data set shows. The antimicrobial results are from our example_isolates data set. All patient names were created using online surname generators and are only in place for practice purposes."><meta property="og:description" content="This example data set has the exact same structure as an export file from WHONET. Such files can be used with this package, as this example data set shows. The antimicrobial results are from our example_isolates data set. All patient names were created using online surname generators and are only in place for practice purposes."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Data Set with 500 Isolates - WHONET Example — WHONET • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Data Set with 500 Isolates - WHONET Example — WHONET"><meta name="description" content="This example data set has the exact same structure as an export file from WHONET. Such files can be used with this package, as this example data set shows. The antimicrobial results are from our example_isolates data set. All patient names were created using online surname generators and are only in place for practice purposes."><meta property="og:description" content="This example data set has the exact same structure as an export file from WHONET. Such files can be used with this package, as this example data set shows. The antimicrobial results are from our example_isolates data set. All patient names were created using online surname generators and are only in place for practice purposes."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Retrieve Antimicrobial Drug Names and Doses from Clinical Text — ab_from_text • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Retrieve Antimicrobial Drug Names and Doses from Clinical Text — ab_from_text"><meta name="description" content="Use this function on e.g. clinical texts from health care records. It returns a list with all antimicrobial drugs, doses and forms of administration found in the texts."><meta property="og:description" content="Use this function on e.g. clinical texts from health care records. It returns a list with all antimicrobial drugs, doses and forms of administration found in the texts."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Retrieve Antimicrobial Drug Names and Doses from Clinical Text — ab_from_text • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Retrieve Antimicrobial Drug Names and Doses from Clinical Text — ab_from_text"><meta name="description" content="Use this function on e.g. clinical texts from health care records. It returns a list with all antimicrobial drugs, doses and forms of administration found in the texts."><meta property="og:description" content="Use this function on e.g. clinical texts from health care records. It returns a list with all antimicrobial drugs, doses and forms of administration found in the texts."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -55,9 +55,15 @@
<div class="section level2">
<h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">ab_from_text</span><span class="op">(</span><span class="va">text</span>, type <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"drug"</span>, <span class="st">"dose"</span>, <span class="st">"administration"</span><span class="op">)</span>,</span>
<span> collapse <span class="op">=</span> <span class="cn">NULL</span>, translate_ab <span class="op">=</span> <span class="cn">FALSE</span>, thorough_search <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> info <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/interactive.html" class="external-link">interactive</a></span><span class="op">(</span><span class="op">)</span>, <span class="va">...</span><span class="op">)</span></span></code></pre></div>
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">ab_from_text</span><span class="op">(</span></span>
<span> <span class="va">text</span>,</span>
<span> type <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"drug"</span>, <span class="st">"dose"</span>, <span class="st">"administration"</span><span class="op">)</span>,</span>
<span> collapse <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> translate_ab <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> thorough_search <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> info <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/interactive.html" class="external-link">interactive</a></span><span class="op">(</span><span class="op">)</span>,</span>
<span> <span class="va">...</span></span>
<span><span class="op">)</span></span></code></pre></div>
</div>
<div class="section level2">

View File

@@ -8,9 +8,15 @@ texts.
## Usage
``` r
ab_from_text(text, type = c("drug", "dose", "administration"),
collapse = NULL, translate_ab = FALSE, thorough_search = NULL,
info = interactive(), ...)
ab_from_text(
text,
type = c("drug", "dose", "administration"),
collapse = NULL,
translate_ab = FALSE,
thorough_search = NULL,
info = interactive(),
...
)
```
## Arguments

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Get Properties of an Antibiotic — ab_property • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Get Properties of an Antibiotic — ab_property"><meta name="description" content="Use these functions to return a specific property of an antibiotic from the antimicrobials data set. All input values will be evaluated internally with as.ab()."><meta property="og:description" content="Use these functions to return a specific property of an antibiotic from the antimicrobials data set. All input values will be evaluated internally with as.ab()."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Get Properties of an Antibiotic — ab_property • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Get Properties of an Antibiotic — ab_property"><meta name="description" content="Use these functions to return a specific property of an antibiotic from the antimicrobials data set. All input values will be evaluated internally with as.ab()."><meta property="og:description" content="Use these functions to return a specific property of an antibiotic from the antimicrobials data set. All input values will be evaluated internally with as.ab()."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -83,8 +83,13 @@
<span></span>
<span><span class="fu">ab_property</span><span class="op">(</span><span class="va">x</span>, property <span class="op">=</span> <span class="st">"name"</span>, language <span class="op">=</span> <span class="fu"><a href="translate.html">get_AMR_locale</a></span><span class="op">(</span><span class="op">)</span>, <span class="va">...</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">set_ab_names</span><span class="op">(</span><span class="va">data</span>, <span class="va">...</span>, property <span class="op">=</span> <span class="st">"name"</span>, language <span class="op">=</span> <span class="fu"><a href="translate.html">get_AMR_locale</a></span><span class="op">(</span><span class="op">)</span>,</span>
<span> snake_case <span class="op">=</span> <span class="cn">NULL</span><span class="op">)</span></span></code></pre></div>
<span><span class="fu">set_ab_names</span><span class="op">(</span></span>
<span> <span class="va">data</span>,</span>
<span> <span class="va">...</span>,</span>
<span> property <span class="op">=</span> <span class="st">"name"</span>,</span>
<span> language <span class="op">=</span> <span class="fu"><a href="translate.html">get_AMR_locale</a></span><span class="op">(</span><span class="op">)</span>,</span>
<span> snake_case <span class="op">=</span> <span class="cn">NULL</span></span>
<span><span class="op">)</span></span></code></pre></div>
</div>
<div class="section level2">
@@ -155,7 +160,7 @@
<p>World Health Organization (WHO) Collaborating Centre for Drug Statistics Methodology: <a href="https://atcddd.fhi.no/atc_ddd_index/" class="external-link">https://atcddd.fhi.no/atc_ddd_index/</a></p>
<p>European Commission Public Health PHARMACEUTICALS - COMMUNITY REGISTER: <a href="https://health.ec.europa.eu/documents/community-register/html/reg_hum_atc.htm" class="external-link">https://health.ec.europa.eu/documents/community-register/html/reg_hum_atc.htm</a></p>
<p>European Commission Public Health PHARMACEUTICALS - COMMUNITY REGISTER: <a href="https://health.ec.europa.eu/documents/community-register/html/index_en.htm" class="external-link">https://health.ec.europa.eu/documents/community-register/html/index_en.htm</a></p>
</div>
<div class="section level2">
<h2 id="download-our-reference-data">Download Our Reference Data<a class="anchor" aria-label="anchor" href="#download-our-reference-data"></a></h2>

View File

@@ -36,8 +36,13 @@ ab_url(x, open = FALSE, ...)
ab_property(x, property = "name", language = get_AMR_locale(), ...)
set_ab_names(data, ..., property = "name", language = get_AMR_locale(),
snake_case = NULL)
set_ab_names(
data,
...,
property = "name",
language = get_AMR_locale(),
snake_case = NULL
)
```
## Arguments
@@ -157,7 +162,7 @@ World Health Organization (WHO) Collaborating Centre for Drug Statistics
Methodology: <https://atcddd.fhi.no/atc_ddd_index/>
European Commission Public Health PHARMACEUTICALS - COMMUNITY REGISTER:
<https://health.ec.europa.eu/documents/community-register/html/reg_hum_atc.htm>
<https://health.ec.europa.eu/documents/community-register/html/index_en.htm>
## Download Our Reference Data

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Add Custom Antimicrobials — add_custom_antimicrobials • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Add Custom Antimicrobials — add_custom_antimicrobials"><meta name="description" content="With add_custom_antimicrobials() you can add your own custom antimicrobial drug names and codes."><meta property="og:description" content="With add_custom_antimicrobials() you can add your own custom antimicrobial drug names and codes."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Add Custom Antimicrobials — add_custom_antimicrobials • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Add Custom Antimicrobials — add_custom_antimicrobials"><meta name="description" content="With add_custom_antimicrobials() you can add your own custom antimicrobial drug names and codes."><meta property="og:description" content="With add_custom_antimicrobials() you can add your own custom antimicrobial drug names and codes."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Add Custom Microorganisms — add_custom_microorganisms • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Add Custom Microorganisms — add_custom_microorganisms"><meta name="description" content="With add_custom_microorganisms() you can add your own custom microorganisms, such the non-taxonomic outcome of laboratory analysis."><meta property="og:description" content="With add_custom_microorganisms() you can add your own custom microorganisms, such the non-taxonomic outcome of laboratory analysis."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Add Custom Microorganisms — add_custom_microorganisms • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Add Custom Microorganisms — add_custom_microorganisms"><meta name="description" content="With add_custom_microorganisms() you can add your own custom microorganisms, such the non-taxonomic outcome of laboratory analysis."><meta property="og:description" content="With add_custom_microorganisms() you can add your own custom microorganisms, such the non-taxonomic outcome of laboratory analysis."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -132,15 +132,24 @@
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "Gram-negative"</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="fu"><a href="mo_property.html">mo_info</a></span><span class="op">(</span><span class="st">"Enterobacter asburiae/cloacae"</span><span class="op">)</span></span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> <span style="color: #00BBBB;"></span> Since <span style="color: #0000BB;">AMR v3.1.0</span>, `mo_kingdom()` returns the taxonomic kingdom as defined by</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> Göker and Oren (2024), who formally introduced a new kingdom rank into</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> prokaryotic nomenclature (DOI: 10.1099/ijsem.0.006242</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> (<span style="color: #0000BB; font-style: italic;">&lt;https://doi.org/10.1099/ijsem.0.006242&gt;</span>)). <span style="font-weight: bold;">The former kingdom of Bacteria</span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> was divided into four new kingdoms under the <span style="font-weight: bold;">new domain of Bacteria</span>. For the</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> old behaviour, use `mo_domain()`. This note will be shown once per session.</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> $mo</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "CUSTOM1_ENTRB_ASB/"</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> $rank</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "species"</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> $kingdom</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> $domain</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "Bacteria"</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> $kingdom</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "Pseudomonadati"</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> $phylum</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "Pseudomonadota"</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
@@ -171,6 +180,9 @@
<span class="r-out co"><span class="r-pr">#&gt;</span> $gramstain</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "Gram-negative"</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> $morphology</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] NA</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> $oxygen_tolerance</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] NA</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
@@ -226,9 +238,9 @@
<span class="r-msg co"><span class="r-pr">#&gt;</span> <span style="color: #00BBBB;"></span> Added <span style="font-style: italic;">Citrobacter braakii</span> complex and <span style="font-style: italic;">Citrobacter freundii</span> complex to the</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> internal `microorganisms` data set.</span>
<span class="r-in"><span><span class="fu"><a href="mo_property.html">mo_name</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"C. freundii complex"</span>, <span class="st">"C. braakii complex"</span><span class="op">)</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "Citrobacter freundii complex" "Citrobacter braakii complex" </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "Citrobacter freundii" "Citrobacter braakii" </span>
<span class="r-in"><span><span class="fu"><a href="mo_property.html">mo_species</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"C. freundii complex"</span>, <span class="st">"C. braakii complex"</span><span class="op">)</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "freundii complex" "braakii complex" </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "freundii" "braakii" </span>
<span class="r-in"><span><span class="fu"><a href="mo_property.html">mo_gramstain</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"C. freundii complex"</span>, <span class="st">"C. braakii complex"</span><span class="op">)</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "Gram-negative" "Gram-negative"</span>
<span class="r-in"><span><span class="co"># }</span></span></span>

View File

@@ -121,15 +121,24 @@ mo_gramstain("Enterobacter asburiae/cloacae")
#> [1] "Gram-negative"
mo_info("Enterobacter asburiae/cloacae")
#> Since AMR v3.1.0, `mo_kingdom()` returns the taxonomic kingdom as defined by
#> Göker and Oren (2024), who formally introduced a new kingdom rank into
#> prokaryotic nomenclature (DOI: 10.1099/ijsem.0.006242
#> (<https://doi.org/10.1099/ijsem.0.006242>)). The former kingdom of Bacteria
#> was divided into four new kingdoms under the new domain of Bacteria. For the
#> old behaviour, use `mo_domain()`. This note will be shown once per session.
#> $mo
#> [1] "CUSTOM1_ENTRB_ASB/"
#>
#> $rank
#> [1] "species"
#>
#> $kingdom
#> $domain
#> [1] "Bacteria"
#>
#> $kingdom
#> [1] "Pseudomonadati"
#>
#> $phylum
#> [1] "Pseudomonadota"
#>
@@ -160,6 +169,9 @@ mo_info("Enterobacter asburiae/cloacae")
#> $gramstain
#> [1] "Gram-negative"
#>
#> $morphology
#> [1] NA
#>
#> $oxygen_tolerance
#> [1] NA
#>
@@ -215,9 +227,9 @@ add_custom_microorganisms(
#> Added Citrobacter braakii complex and Citrobacter freundii complex to the
#> internal `microorganisms` data set.
mo_name(c("C. freundii complex", "C. braakii complex"))
#> [1] "Citrobacter freundii complex" "Citrobacter braakii complex"
#> [1] "Citrobacter freundii" "Citrobacter braakii"
mo_species(c("C. freundii complex", "C. braakii complex"))
#> [1] "freundii complex" "braakii complex"
#> [1] "freundii" "braakii"
mo_gramstain(c("C. freundii complex", "C. braakii complex"))
#> [1] "Gram-negative" "Gram-negative"
# }

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Age in Years of Individuals — age • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Age in Years of Individuals — age"><meta name="description" content="Calculates age in years based on a reference date, which is the system date at default."><meta property="og:description" content="Calculates age in years based on a reference date, which is the system date at default."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Age in Years of Individuals — age • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Age in Years of Individuals — age"><meta name="description" content="Calculates age in years based on a reference date, which is the system date at default."><meta property="og:description" content="Calculates age in years based on a reference date, which is the system date at default."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -112,16 +112,16 @@
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="va">df</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> birth_date age age_exact age_at_y2k</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 1999-06-30 26 26.83836 0</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 1968-01-29 58 58.25479 31</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 1965-12-05 60 60.40548 34</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 1980-03-01 46 46.16986 19</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 1949-11-01 76 76.49863 50</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 1947-02-14 79 79.21096 52</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 1940-02-19 86 86.19726 59</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 1988-01-10 38 38.30685 11</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 1997-08-27 28 28.67945 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 1978-01-26 48 48.26301 21</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 1999-06-30 26 26.98082 0</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 1968-01-29 58 58.39726 31</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 1965-12-05 60 60.54795 34</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 1980-03-01 46 46.31233 19</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 1949-11-01 76 76.64110 50</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 1947-02-14 79 79.35342 52</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 1940-02-19 86 86.33973 59</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 1988-01-10 38 38.44932 11</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 1997-08-27 28 28.82192 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 1978-01-26 48 48.40548 21</span>
</code></pre></div>
</div>
</main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2>

View File

@@ -81,14 +81,14 @@ df$age_at_y2k <- age(df$birth_date, "2000-01-01")
df
#> birth_date age age_exact age_at_y2k
#> 1 1999-06-30 26 26.83836 0
#> 2 1968-01-29 58 58.25479 31
#> 3 1965-12-05 60 60.40548 34
#> 4 1980-03-01 46 46.16986 19
#> 5 1949-11-01 76 76.49863 50
#> 6 1947-02-14 79 79.21096 52
#> 7 1940-02-19 86 86.19726 59
#> 8 1988-01-10 38 38.30685 11
#> 9 1997-08-27 28 28.67945 2
#> 10 1978-01-26 48 48.26301 21
#> 1 1999-06-30 26 26.98082 0
#> 2 1968-01-29 58 58.39726 31
#> 3 1965-12-05 60 60.54795 34
#> 4 1980-03-01 46 46.31233 19
#> 5 1949-11-01 76 76.64110 50
#> 6 1947-02-14 79 79.35342 52
#> 7 1940-02-19 86 86.33973 59
#> 8 1988-01-10 38 38.44932 11
#> 9 1997-08-27 28 28.82192 2
#> 10 1978-01-26 48 48.40548 21
```

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Split Ages into Age Groups — age_groups • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Split Ages into Age Groups — age_groups"><meta name="description" content="Split ages into age groups defined by the `split` argument. This allows for easier demographic (antimicrobial resistance) analysis. The function returns an ordered [factor]."><meta property="og:description" content="Split ages into age groups defined by the `split` argument. This allows for easier demographic (antimicrobial resistance) analysis. The function returns an ordered [factor]."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Split Ages into Age Groups — age_groups • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Split Ages into Age Groups — age_groups"><meta name="description" content="Split ages into age groups defined by the split argument. This allows for easier demographic (antimicrobial resistance) analysis. The function returns an ordered factor."><meta property="og:description" content="Split ages into age groups defined by the split argument. This allows for easier demographic (antimicrobial resistance) analysis. The function returns an ordered factor."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -50,13 +50,12 @@
</div>
<div class="ref-description section level2">
<p>Split ages into age groups defined by the `split` argument. This allows for easier demographic (antimicrobial resistance) analysis. The function returns an ordered [factor].</p>
<p>Split ages into age groups defined by the <code>split</code> argument. This allows for easier demographic (antimicrobial resistance) analysis. The function returns an ordered <a href="https://rdrr.io/r/base/factor.html" class="external-link">factor</a>.</p>
</div>
<div class="section level2">
<h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">age_groups</span><span class="op">(</span><span class="va">x</span>, split_at <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">0</span>, <span class="fl">12</span>, <span class="fl">25</span>, <span class="fl">55</span>, <span class="fl">75</span><span class="op">)</span>, names <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> na.rm <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></span></code></pre></div>
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">age_groups</span><span class="op">(</span><span class="va">x</span>, split_at <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">0</span>, <span class="fl">12</span>, <span class="fl">25</span>, <span class="fl">55</span>, <span class="fl">75</span><span class="op">)</span>, names <span class="op">=</span> <span class="cn">NULL</span>, na.rm <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></span></code></pre></div>
</div>
<div class="section level2">
@@ -81,7 +80,7 @@
</dl></div>
<div class="section level2">
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
<p>Ordered [factor]</p>
<p>Ordered <a href="https://rdrr.io/r/base/factor.html" class="external-link">factor</a></p>
</div>
<div class="section level2">
<h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2>

View File

@@ -1,14 +1,13 @@
# Split Ages into Age Groups
Split ages into age groups defined by the \`split\` argument. This
allows for easier demographic (antimicrobial resistance) analysis. The
function returns an ordered \[factor\].
Split ages into age groups defined by the `split` argument. This allows
for easier demographic (antimicrobial resistance) analysis. The function
returns an ordered [factor](https://rdrr.io/r/base/factor.html).
## Usage
``` r
age_groups(x, split_at = c(0, 12, 25, 55, 75), names = NULL,
na.rm = FALSE)
age_groups(x, split_at = c(0, 12, 25, 55, 75), names = NULL, na.rm = FALSE)
```
## Arguments
@@ -34,7 +33,7 @@ age_groups(x, split_at = c(0, 12, 25, 55, 75), names = NULL,
## Value
Ordered \[factor\]
Ordered [factor](https://rdrr.io/r/base/factor.html)
## Details

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>AMR Extensions for Tidymodels — amr-tidymodels • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="AMR Extensions for Tidymodels — amr-tidymodels"><meta name="description" content="This family of functions allows using AMR-specific data types such as &amp;lt;sir&amp;gt; and &amp;lt;mic&amp;gt; inside tidymodels pipelines."><meta property="og:description" content="This family of functions allows using AMR-specific data types such as &amp;lt;sir&amp;gt; and &amp;lt;mic&amp;gt; inside tidymodels pipelines."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>AMR Extensions for Tidymodels — amr-tidymodels • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="AMR Extensions for Tidymodels — amr-tidymodels"><meta name="description" content="This family of functions allows using AMR-specific data types such as &amp;lt;sir&amp;gt; and &amp;lt;mic&amp;gt; inside tidymodels pipelines."><meta property="og:description" content="This family of functions allows using AMR-specific data types such as &amp;lt;sir&amp;gt; and &amp;lt;mic&amp;gt; inside tidymodels pipelines."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -67,13 +67,62 @@
<span></span>
<span><span class="fu">all_disk_predictors</span><span class="op">(</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">step_mic_log2</span><span class="op">(</span><span class="va">recipe</span>, <span class="va">...</span>, role <span class="op">=</span> <span class="cn">NA</span>, trained <span class="op">=</span> <span class="cn">FALSE</span>, columns <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> skip <span class="op">=</span> <span class="cn">FALSE</span>, id <span class="op">=</span> <span class="fu">recipes</span><span class="fu">::</span><span class="fu"><a href="https://recipes.tidymodels.org/reference/rand_id.html" class="external-link">rand_id</a></span><span class="op">(</span><span class="st">"mic_log2"</span><span class="op">)</span><span class="op">)</span></span>
<span><span class="fu">step_mic_log2</span><span class="op">(</span></span>
<span> <span class="va">recipe</span>,</span>
<span> <span class="va">...</span>,</span>
<span> role <span class="op">=</span> <span class="cn">NA</span>,</span>
<span> trained <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> columns <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> skip <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> id <span class="op">=</span> <span class="fu">recipes</span><span class="fu">::</span><span class="fu"><a href="https://recipes.tidymodels.org/reference/rand_id.html" class="external-link">rand_id</a></span><span class="op">(</span><span class="st">"mic_log2"</span><span class="op">)</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="fu">step_sir_numeric</span><span class="op">(</span><span class="va">recipe</span>, <span class="va">...</span>, role <span class="op">=</span> <span class="cn">NA</span>, trained <span class="op">=</span> <span class="cn">FALSE</span>, columns <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> skip <span class="op">=</span> <span class="cn">FALSE</span>, id <span class="op">=</span> <span class="fu">recipes</span><span class="fu">::</span><span class="fu"><a href="https://recipes.tidymodels.org/reference/rand_id.html" class="external-link">rand_id</a></span><span class="op">(</span><span class="st">"sir_numeric"</span><span class="op">)</span><span class="op">)</span></span></code></pre></div>
<span><span class="fu">step_sir_numeric</span><span class="op">(</span></span>
<span> <span class="va">recipe</span>,</span>
<span> <span class="va">...</span>,</span>
<span> role <span class="op">=</span> <span class="cn">NA</span>,</span>
<span> trained <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> columns <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> skip <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> id <span class="op">=</span> <span class="fu">recipes</span><span class="fu">::</span><span class="fu"><a href="https://recipes.tidymodels.org/reference/rand_id.html" class="external-link">rand_id</a></span><span class="op">(</span><span class="st">"sir_numeric"</span><span class="op">)</span></span>
<span><span class="op">)</span></span></code></pre></div>
</div>
<div class="section level2">
<h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2>
<dl><dt id="arg-recipe">recipe<a class="anchor" aria-label="anchor" href="#arg-recipe"></a></dt>
<dd><p>A recipe object. The step will be added to the sequence of
operations for this recipe.</p></dd>
<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt>
<dd><p>One or more selector functions to choose variables for this step.
See <code><a href="https://recipes.tidymodels.org/reference/selections.html" class="external-link">selections()</a></code> for more details.</p></dd>
<dt id="arg-role">role<a class="anchor" aria-label="anchor" href="#arg-role"></a></dt>
<dd><p>Not used by this step since no new variables are created.</p></dd>
<dt id="arg-trained">trained<a class="anchor" aria-label="anchor" href="#arg-trained"></a></dt>
<dd><p>A logical to indicate if the quantities for preprocessing have
been estimated.</p></dd>
<dt id="arg-skip">skip<a class="anchor" aria-label="anchor" href="#arg-skip"></a></dt>
<dd><p>A logical. Should the step be skipped when the recipe is baked by
<code><a href="https://recipes.tidymodels.org/reference/bake.html" class="external-link">bake()</a></code>? While all operations are baked when <code><a href="https://recipes.tidymodels.org/reference/prep.html" class="external-link">prep()</a></code> is run, some
operations may not be able to be conducted on new data (e.g. processing the
outcome variable(s)). Care should be taken when using <code>skip = TRUE</code> as it
may affect the computations for subsequent operations.</p></dd>
<dt id="arg-id">id<a class="anchor" aria-label="anchor" href="#arg-id"></a></dt>
<dd><p>A character string that is unique to this step to identify it.</p></dd>
</dl></div>
<div class="section level2">
<h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2>
<p>You can read more in our online <a href="https://amr-for-r.org/articles/AMR_with_tidymodels.html">AMR with tidymodels introduction</a>.</p>
@@ -150,13 +199,13 @@
<span class="r-in"><span><span class="op">}</span></span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> Loading required package: tidymodels</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> ── <span style="font-weight: bold;">Attaching packages</span> ────────────────────────────────────── tidymodels 1.5.0 ──</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> <span style="color: #00BB00;"></span> <span style="color: #0000BB;">broom </span> 1.0.12 <span style="color: #00BB00;"></span> <span style="color: #0000BB;">rsample </span> 1.3.2 </span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> <span style="color: #00BB00;"></span> <span style="color: #0000BB;">dials </span> 1.4.3 <span style="color: #00BB00;"></span> <span style="color: #0000BB;">tailor </span> 0.1.0 </span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> <span style="color: #00BB00;"></span> <span style="color: #0000BB;">broom </span> 1.0.13 <span style="color: #00BB00;"></span> <span style="color: #0000BB;">rsample </span> 1.3.2 </span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> <span style="color: #00BB00;"></span> <span style="color: #0000BB;">dials </span> 1.4.4 <span style="color: #00BB00;"></span> <span style="color: #0000BB;">tailor </span> 0.1.0 </span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> <span style="color: #00BB00;"></span> <span style="color: #0000BB;">infer </span> 1.1.0 <span style="color: #00BB00;"></span> <span style="color: #0000BB;">tidyr </span> 1.3.2 </span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> <span style="color: #00BB00;"></span> <span style="color: #0000BB;">modeldata </span> 1.5.1 <span style="color: #00BB00;"></span> <span style="color: #0000BB;">tune </span> 2.1.0 </span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> <span style="color: #00BB00;"></span> <span style="color: #0000BB;">parsnip </span> 1.5.0 <span style="color: #00BB00;"></span> <span style="color: #0000BB;">workflows </span> 1.3.0 </span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> <span style="color: #00BB00;"></span> <span style="color: #0000BB;">parsnip </span> 1.6.0 <span style="color: #00BB00;"></span> <span style="color: #0000BB;">workflows </span> 1.3.0 </span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> <span style="color: #00BB00;"></span> <span style="color: #0000BB;">purrr </span> 1.2.2 <span style="color: #00BB00;"></span> <span style="color: #0000BB;">workflowsets</span> 1.1.1 </span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> <span style="color: #00BB00;"></span> <span style="color: #0000BB;">recipes </span> 1.3.2 <span style="color: #00BB00;"></span> <span style="color: #0000BB;">yardstick </span> 1.4.0 </span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> <span style="color: #00BB00;"></span> <span style="color: #0000BB;">recipes </span> 1.3.3 <span style="color: #00BB00;"></span> <span style="color: #0000BB;">yardstick </span> 1.4.0 </span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> ── <span style="font-weight: bold;">Conflicts</span> ───────────────────────────────────────── tidymodels_conflicts() ──</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> <span style="color: #BB0000;"></span> <span style="color: #0000BB;">purrr</span>::<span style="color: #00BB00;">discard()</span> masks <span style="color: #0000BB;">scales</span>::discard()</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> <span style="color: #BB0000;"></span> <span style="color: #0000BB;">dplyr</span>::<span style="color: #00BB00;">filter()</span> masks <span style="color: #0000BB;">stats</span>::filter()</span>

View File

@@ -18,13 +18,64 @@ all_disk()
all_disk_predictors()
step_mic_log2(recipe, ..., role = NA, trained = FALSE, columns = NULL,
skip = FALSE, id = recipes::rand_id("mic_log2"))
step_mic_log2(
recipe,
...,
role = NA,
trained = FALSE,
columns = NULL,
skip = FALSE,
id = recipes::rand_id("mic_log2")
)
step_sir_numeric(recipe, ..., role = NA, trained = FALSE, columns = NULL,
skip = FALSE, id = recipes::rand_id("sir_numeric"))
step_sir_numeric(
recipe,
...,
role = NA,
trained = FALSE,
columns = NULL,
skip = FALSE,
id = recipes::rand_id("sir_numeric")
)
```
## Arguments
- recipe:
A recipe object. The step will be added to the sequence of operations
for this recipe.
- ...:
One or more selector functions to choose variables for this step. See
[`selections()`](https://recipes.tidymodels.org/reference/selections.html)
for more details.
- role:
Not used by this step since no new variables are created.
- trained:
A logical to indicate if the quantities for preprocessing have been
estimated.
- skip:
A logical. Should the step be skipped when the recipe is baked by
[`bake()`](https://recipes.tidymodels.org/reference/bake.html)? While
all operations are baked when
[`prep()`](https://recipes.tidymodels.org/reference/prep.html) is run,
some operations may not be able to be conducted on new data (e.g.
processing the outcome variable(s)). Care should be taken when using
`skip = TRUE` as it may affect the computations for subsequent
operations.
- id:
A character string that is unique to this step to identify it.
## Details
You can read more in our online [AMR with tidymodels
@@ -127,13 +178,13 @@ if (require("tidymodels")) {
}
#> Loading required package: tidymodels
#> ── Attaching packages ────────────────────────────────────── tidymodels 1.5.0 ──
#> ✔ broom 1.0.12 ✔ rsample 1.3.2
#> ✔ dials 1.4.3 ✔ tailor 0.1.0
#> ✔ broom 1.0.13 ✔ rsample 1.3.2
#> ✔ dials 1.4.4 ✔ tailor 0.1.0
#> ✔ infer 1.1.0 ✔ tidyr 1.3.2
#> ✔ modeldata 1.5.1 ✔ tune 2.1.0
#> ✔ parsnip 1.5.0 ✔ workflows 1.3.0
#> ✔ parsnip 1.6.0 ✔ workflows 1.3.0
#> ✔ purrr 1.2.2 ✔ workflowsets 1.1.1
#> ✔ recipes 1.3.2 ✔ yardstick 1.4.0
#> ✔ recipes 1.3.3 ✔ yardstick 1.4.0
#> ── Conflicts ───────────────────────────────────────── tidymodels_conflicts() ──
#> ✖ purrr::discard() masks scales::discard()
#> ✖ dplyr::filter() masks stats::filter()

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Download and Unpack an AMR Course Repository — amr_course • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Download and Unpack an AMR Course Repository — amr_course"><meta name="description" content="Downloads and unpacks a GitHub repository containing course materials, using usethis::use_course(). This is a convenience wrapper intended for use in educational settings, such as workshops or tutorials associated with the AMR package."><meta property="og:description" content="Downloads and unpacks a GitHub repository containing course materials, using usethis::use_course(). This is a convenience wrapper intended for use in educational settings, such as workshops or tutorials associated with the AMR package."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Download and Unpack an AMR Course Repository — amr_course • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Download and Unpack an AMR Course Repository — amr_course"><meta name="description" content="Downloads and unpacks a GitHub repository containing course materials, using usethis::use_course(). This is a convenience wrapper intended for use in educational settings, such as workshops or tutorials associated with the AMR package."><meta property="og:description" content="Downloads and unpacks a GitHub repository containing course materials, using usethis::use_course(). This is a convenience wrapper intended for use in educational settings, such as workshops or tutorials associated with the AMR package."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 44 KiB

BIN
reference/antibiogram-5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

BIN
reference/antibiogram-6.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

@@ -1,7 +1,11 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Generate Traditional, Combination, Syndromic, or WISCA Antibiograms — antibiogram • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Generate Traditional, Combination, Syndromic, or WISCA Antibiograms — antibiogram"><meta name="description" content="Create detailed antibiograms with options for traditional, combination, syndromic, and Bayesian WISCA methods.
Adhering to previously described approaches (see Source) and especially the Bayesian WISCA model (Weighted-Incidence Syndromic Combination Antibiogram) by Bielicki et al., these functions provide flexible output formats including plots and tables, ideal for integration with R Markdown and Quarto reports."><meta property="og:description" content="Create detailed antibiograms with options for traditional, combination, syndromic, and Bayesian WISCA methods.
Adhering to previously described approaches (see Source) and especially the Bayesian WISCA model (Weighted-Incidence Syndromic Combination Antibiogram) by Bielicki et al., these functions provide flexible output formats including plots and tables, ideal for integration with R Markdown and Quarto reports."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Generate Antibiograms (WISCA, Traditional, Combination, or Syndromic) — antibiogram • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Generate Antibiograms (WISCA, Traditional, Combination, or Syndromic) — antibiogram"><meta name="description" content='Generate antibiograms from antimicrobial susceptibility data, with support for traditional, combination, syndromic, and WISCA (Weighted-Incidence Syndromic Combination Antibiogram) methods.
For empirical therapy guidance, WISCA is the recommended approach. When initiating empirical treatment, the causative pathogen is unknown, and the clinically relevant question is: "what is the probability that this regimen will cover whatever pathogen turns out to cause the infection?" WISCA answers that question directly by weighting susceptibility by pathogen incidence within a syndrome and providing credible intervals via Bayesian Monte Carlo simulation. Traditional antibiograms remain appropriate for tracking resistance per species for surveillance purposes. See the section Explaining WISCA on this page and the WISCA vignette for details.
All antibiogram types adhere to previously described approaches (see Source), and the WISCA method implements the Bayesian decision model by Bielicki et al. (2016, doi:10.1093/jac/dkv397
). Output formats include plots and tables, ideal for integration with R Markdown and Quarto reports.'><meta property="og:description" content='Generate antibiograms from antimicrobial susceptibility data, with support for traditional, combination, syndromic, and WISCA (Weighted-Incidence Syndromic Combination Antibiogram) methods.
For empirical therapy guidance, WISCA is the recommended approach. When initiating empirical treatment, the causative pathogen is unknown, and the clinically relevant question is: "what is the probability that this regimen will cover whatever pathogen turns out to cause the infection?" WISCA answers that question directly by weighting susceptibility by pathogen incidence within a syndrome and providing credible intervals via Bayesian Monte Carlo simulation. Traditional antibiograms remain appropriate for tracking resistance per species for surveillance purposes. See the section Explaining WISCA on this page and the WISCA vignette for details.
All antibiogram types adhere to previously described approaches (see Source), and the WISCA method implements the Bayesian decision model by Bielicki et al. (2016, doi:10.1093/jac/dkv397
). Output formats include plots and tables, ideal for integration with R Markdown and Quarto reports.'><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -9,7 +13,7 @@ Adhering to previously described approaches (see Source) and especially the Baye
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -46,35 +50,65 @@ Adhering to previously described approaches (see Source) and especially the Baye
</nav><div class="container template-reference-topic">
<div class="row">
<main id="main" class="col-md-9"><div class="page-header">
<img src="../logo.svg" class="logo" alt=""><h1>Generate Traditional, Combination, Syndromic, or WISCA Antibiograms</h1>
<img src="../logo.svg" class="logo" alt=""><h1>Generate Antibiograms (WISCA, Traditional, Combination, or Syndromic)</h1>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/main/R/antibiogram.R" class="external-link"><code>R/antibiogram.R</code></a></small>
<div class="d-none name"><code>antibiogram.Rd</code></div>
</div>
<div class="ref-description section level2">
<p>Create detailed antibiograms with options for traditional, combination, syndromic, and Bayesian WISCA methods.</p>
<p>Adhering to previously described approaches (see <em>Source</em>) and especially the Bayesian WISCA model (Weighted-Incidence Syndromic Combination Antibiogram) by Bielicki <em>et al.</em>, these functions provide flexible output formats including plots and tables, ideal for integration with R Markdown and Quarto reports.</p>
<p>Generate antibiograms from antimicrobial susceptibility data, with support for traditional, combination, syndromic, and WISCA (Weighted-Incidence Syndromic Combination Antibiogram) methods.</p>
<p><strong>For empirical therapy guidance, WISCA is the recommended approach.</strong> When initiating empirical treatment, the causative pathogen is unknown, and the clinically relevant question is: <em>"what is the probability that this regimen will cover whatever pathogen turns out to cause the infection?"</em> WISCA answers that question directly by weighting susceptibility by pathogen incidence within a syndrome and providing credible intervals via Bayesian Monte Carlo simulation. Traditional antibiograms remain appropriate for tracking resistance per species for surveillance purposes. See the section <em>Explaining WISCA</em> on this page and the <a href="https://amr-for-r.org/articles/WISCA.html">WISCA vignette</a> for details.</p>
<p>All antibiogram types adhere to previously described approaches (see <em>Source</em>), and the WISCA method implements the Bayesian decision model by Bielicki <em>et al.</em> (2016, <a href="https://doi.org/10.1093/jac/dkv397" class="external-link">doi:10.1093/jac/dkv397</a>
). Output formats include plots and tables, ideal for integration with R Markdown and Quarto reports.</p>
</div>
<div class="section level2">
<h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">antibiogram</span><span class="op">(</span><span class="va">x</span>, antimicrobials <span class="op">=</span> <span class="fu"><a href="https://tidyselect.r-lib.org/reference/where.html" class="external-link">where</a></span><span class="op">(</span><span class="va">is.sir</span><span class="op">)</span>, mo_transform <span class="op">=</span> <span class="st">"shortname"</span>,</span>
<span> ab_transform <span class="op">=</span> <span class="st">"name"</span>, syndromic_group <span class="op">=</span> <span class="cn">NULL</span>, add_total_n <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> only_all_tested <span class="op">=</span> <span class="cn">FALSE</span>, digits <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/ifelse.html" class="external-link">ifelse</a></span><span class="op">(</span><span class="va">wisca</span>, <span class="fl">1</span>, <span class="fl">0</span><span class="op">)</span>,</span>
<span> formatting_type <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"AMR_antibiogram_formatting_type"</span>,</span>
<span> <span class="fu"><a href="https://rdrr.io/r/base/ifelse.html" class="external-link">ifelse</a></span><span class="op">(</span><span class="va">wisca</span>, <span class="fl">14</span>, <span class="fl">18</span><span class="op">)</span><span class="op">)</span>, col_mo <span class="op">=</span> <span class="cn">NULL</span>, language <span class="op">=</span> <span class="fu"><a href="translate.html">get_AMR_locale</a></span><span class="op">(</span><span class="op">)</span>,</span>
<span> minimum <span class="op">=</span> <span class="fl">30</span>, combine_SI <span class="op">=</span> <span class="cn">TRUE</span>, sep <span class="op">=</span> <span class="st">" + "</span>, sort_columns <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> wisca <span class="op">=</span> <span class="cn">FALSE</span>, simulations <span class="op">=</span> <span class="fl">1000</span>, conf_interval <span class="op">=</span> <span class="fl">0.95</span>,</span>
<span> interval_side <span class="op">=</span> <span class="st">"two-tailed"</span>, info <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/interactive.html" class="external-link">interactive</a></span><span class="op">(</span><span class="op">)</span>, parallel <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> <span class="va">...</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">wisca</span><span class="op">(</span><span class="va">x</span>, antimicrobials <span class="op">=</span> <span class="fu"><a href="https://tidyselect.r-lib.org/reference/where.html" class="external-link">where</a></span><span class="op">(</span><span class="va">is.sir</span><span class="op">)</span>, ab_transform <span class="op">=</span> <span class="st">"name"</span>,</span>
<span> syndromic_group <span class="op">=</span> <span class="cn">NULL</span>, only_all_tested <span class="op">=</span> <span class="cn">FALSE</span>, digits <span class="op">=</span> <span class="fl">1</span>,</span>
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">wisca</span><span class="op">(</span></span>
<span> <span class="va">x</span>,</span>
<span> antimicrobials <span class="op">=</span> <span class="fu"><a href="https://tidyselect.r-lib.org/reference/where.html" class="external-link">where</a></span><span class="op">(</span><span class="va">is.sir</span><span class="op">)</span>,</span>
<span> ab_transform <span class="op">=</span> <span class="st">"name"</span>,</span>
<span> syndromic_group <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> only_all_tested <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> digits <span class="op">=</span> <span class="fl">1</span>,</span>
<span> formatting_type <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"AMR_antibiogram_formatting_type"</span>, <span class="fl">14</span><span class="op">)</span>,</span>
<span> col_mo <span class="op">=</span> <span class="cn">NULL</span>, language <span class="op">=</span> <span class="fu"><a href="translate.html">get_AMR_locale</a></span><span class="op">(</span><span class="op">)</span>, combine_SI <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> sep <span class="op">=</span> <span class="st">" + "</span>, sort_columns <span class="op">=</span> <span class="cn">TRUE</span>, simulations <span class="op">=</span> <span class="fl">1000</span>,</span>
<span> conf_interval <span class="op">=</span> <span class="fl">0.95</span>, interval_side <span class="op">=</span> <span class="st">"two-tailed"</span>,</span>
<span> info <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/interactive.html" class="external-link">interactive</a></span><span class="op">(</span><span class="op">)</span>, parallel <span class="op">=</span> <span class="cn">FALSE</span>, <span class="va">...</span><span class="op">)</span></span>
<span> col_mo <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> language <span class="op">=</span> <span class="fu"><a href="translate.html">get_AMR_locale</a></span><span class="op">(</span><span class="op">)</span>,</span>
<span> combine_SI <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> sep <span class="op">=</span> <span class="st">" + "</span>,</span>
<span> sort_columns <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> simulations <span class="op">=</span> <span class="fl">1000</span>,</span>
<span> conf_interval <span class="op">=</span> <span class="fl">0.95</span>,</span>
<span> interval_side <span class="op">=</span> <span class="st">"two-tailed"</span>,</span>
<span> info <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/interactive.html" class="external-link">interactive</a></span><span class="op">(</span><span class="op">)</span>,</span>
<span> parallel <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> <span class="va">...</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="fu">antibiogram</span><span class="op">(</span></span>
<span> <span class="va">x</span>,</span>
<span> antimicrobials <span class="op">=</span> <span class="fu"><a href="https://tidyselect.r-lib.org/reference/where.html" class="external-link">where</a></span><span class="op">(</span><span class="va">is.sir</span><span class="op">)</span>,</span>
<span> mo_transform <span class="op">=</span> <span class="st">"shortname"</span>,</span>
<span> ab_transform <span class="op">=</span> <span class="st">"name"</span>,</span>
<span> syndromic_group <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> add_total_n <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> only_all_tested <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> digits <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/ifelse.html" class="external-link">ifelse</a></span><span class="op">(</span><span class="va">wisca</span>, <span class="fl">1</span>, <span class="fl">0</span><span class="op">)</span>,</span>
<span> formatting_type <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"AMR_antibiogram_formatting_type"</span>, <span class="fu"><a href="https://rdrr.io/r/base/ifelse.html" class="external-link">ifelse</a></span><span class="op">(</span><span class="va">wisca</span>, <span class="fl">14</span>, <span class="fl">18</span><span class="op">)</span><span class="op">)</span>,</span>
<span> col_mo <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> language <span class="op">=</span> <span class="fu"><a href="translate.html">get_AMR_locale</a></span><span class="op">(</span><span class="op">)</span>,</span>
<span> minimum <span class="op">=</span> <span class="fl">30</span>,</span>
<span> combine_SI <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> sep <span class="op">=</span> <span class="st">" + "</span>,</span>
<span> sort_columns <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> wisca <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> simulations <span class="op">=</span> <span class="fl">1000</span>,</span>
<span> conf_interval <span class="op">=</span> <span class="fl">0.95</span>,</span>
<span> interval_side <span class="op">=</span> <span class="st">"two-tailed"</span>,</span>
<span> info <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/interactive.html" class="external-link">interactive</a></span><span class="op">(</span><span class="op">)</span>,</span>
<span> parallel <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> <span class="va">...</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="fu">retrieve_wisca_parameters</span><span class="op">(</span><span class="va">wisca_model</span>, <span class="va">...</span><span class="op">)</span></span>
<span></span>
@@ -82,22 +116,31 @@ Adhering to previously described approaches (see Source) and especially the Baye
<span><span class="fu"><a href="plot.html">plot</a></span><span class="op">(</span><span class="va">x</span>, <span class="va">...</span><span class="op">)</span></span>
<span></span>
<span><span class="co"># S3 method for class 'antibiogram'</span></span>
<span><span class="fu"><a href="https://ggplot2.tidyverse.org/reference/autoplot.html" class="external-link">autoplot</a></span><span class="op">(</span><span class="va">object</span>, <span class="va">...</span><span class="op">)</span></span>
<span><span class="fu"><a href="https://ggplot2.tidyverse.org/reference/autoplot.html" class="external-link">autoplot</a></span><span class="op">(</span></span>
<span> <span class="va">object</span>,</span>
<span> geom <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"pointrange"</span>, <span class="st">"point"</span>, <span class="st">"col"</span>, <span class="st">"bar"</span>, <span class="st">"errorbar"</span><span class="op">)</span>,</span>
<span> ci <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> sort <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> flip <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> caption <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> <span class="va">...</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="fu">wisca_plot</span><span class="op">(</span></span>
<span> <span class="va">wisca_model</span>,</span>
<span> wisca_plot_type <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"susceptibility_incidence"</span>, <span class="st">"posterior_coverage"</span><span class="op">)</span>,</span>
<span> <span class="va">...</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="co"># S3 method for class 'antibiogram'</span></span>
<span><span class="fu">knit_print</span><span class="op">(</span><span class="va">x</span>, italicise <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> na <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"knitr.kable.NA"</span>, default <span class="op">=</span> <span class="st">""</span><span class="op">)</span>, <span class="va">...</span><span class="op">)</span></span></code></pre></div>
<span><span class="fu">knit_print</span><span class="op">(</span></span>
<span> <span class="va">x</span>,</span>
<span> italicise <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> na <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"knitr.kable.NA"</span>, default <span class="op">=</span> <span class="st">""</span><span class="op">)</span>,</span>
<span> <span class="va">...</span></span>
<span><span class="op">)</span></span></code></pre></div>
</div>
<div class="section level2">
<h2 id="source">Source<a class="anchor" aria-label="anchor" href="#source"></a></h2>
<ul><li><p>Bielicki JA <em>et al.</em> (2016). <strong>Selecting appropriate empirical antibiotic regimens for paediatric bloodstream infections: application of a Bayesian decision model to local and pooled antimicrobial resistance surveillance data</strong> <em>Journal of Antimicrobial Chemotherapy</em> 71(3); <a href="https://doi.org/10.1093/jac/dkv397" class="external-link">doi:10.1093/jac/dkv397</a></p></li>
<li><p>Bielicki JA <em>et al.</em> (2020). <strong>Evaluation of the coverage of 3 antibiotic regimens for neonatal sepsis in the hospital setting across Asian countries</strong> <em>JAMA Netw Open.</em> 3(2):e1921124; <a href="https://doi.org/10.1001/jamanetworkopen.2019.21124" class="external-link">doi:10.1001/jamanetworkopen.2019.21124</a></p></li>
<li><p>Klinker KP <em>et al.</em> (2021). <strong>Antimicrobial stewardship and antibiograms: importance of moving beyond traditional antibiograms</strong>. <em>Therapeutic Advances in Infectious Disease</em>, May 5;8:20499361211011373; <a href="https://doi.org/10.1177/20499361211011373" class="external-link">doi:10.1177/20499361211011373</a></p></li>
<li><p>Barbieri E <em>et al.</em> (2021). <strong>Development of a Weighted-Incidence Syndromic Combination Antibiogram (WISCA) to guide the choice of the empiric antibiotic treatment for urinary tract infection in paediatric patients: a Bayesian approach</strong> <em>Antimicrobial Resistance &amp; Infection Control</em> May 1;10(1):74; <a href="https://doi.org/10.1186/s13756-021-00939-2" class="external-link">doi:10.1186/s13756-021-00939-2</a></p></li>
<li><p><strong>M39 Analysis and Presentation of Cumulative Antimicrobial Susceptibility Test Data, 5th Edition</strong>, 2022, <em>Clinical and Laboratory Standards Institute (CLSI)</em>. <a href="https://clsi.org/standards/products/microbiology/documents/m39/" class="external-link">https://clsi.org/standards/products/microbiology/documents/m39/</a>.</p></li>
</ul></div>
<div class="section level2">
<h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2>
@@ -123,20 +166,12 @@ Adhering to previously described approaches (see Source) and especially the Baye
</ul></dd>
<dt id="arg-mo-transform">mo_transform<a class="anchor" aria-label="anchor" href="#arg-mo-transform"></a></dt>
<dd><p>A character to transform microorganism input - must be <code>"name"</code>, <code>"shortname"</code> (default), <code>"gramstain"</code>, or one of the column names of the <a href="microorganisms.html">microorganisms</a> data set: <code>"mo"</code>, <code>"fullname"</code>, <code>"status"</code>, <code>"kingdom"</code>, <code>"phylum"</code>, <code>"class"</code>, <code>"order"</code>, <code>"family"</code>, <code>"genus"</code>, <code>"species"</code>, <code>"subspecies"</code>, <code>"rank"</code>, <code>"ref"</code>, <code>"oxygen_tolerance"</code>, <code>"source"</code>, <code>"lpsn"</code>, <code>"lpsn_parent"</code>, <code>"lpsn_renamed_to"</code>, <code>"mycobank"</code>, <code>"mycobank_parent"</code>, <code>"mycobank_renamed_to"</code>, <code>"gbif"</code>, <code>"gbif_parent"</code>, <code>"gbif_renamed_to"</code>, <code>"prevalence"</code>, or <code>"snomed"</code>. Can also be <code>NULL</code> to not transform the input or <code>NA</code> to consider all microorganisms 'unknown'.</p></dd>
<dt id="arg-ab-transform">ab_transform<a class="anchor" aria-label="anchor" href="#arg-ab-transform"></a></dt>
<dd><p>A character to transform antimicrobial input - must be one of the column names of the <a href="antimicrobials.html">antimicrobials</a> data set (defaults to <code>"name"</code>): <code>"ab"</code>, <code>"cid"</code>, <code>"name"</code>, <code>"group"</code>, <code>"atc"</code>, <code>"atc_group1"</code>, <code>"atc_group2"</code>, <code>"abbreviations"</code>, <code>"synonyms"</code>, <code>"oral_ddd"</code>, <code>"oral_units"</code>, <code>"iv_ddd"</code>, <code>"iv_units"</code>, or <code>"loinc"</code>. Can also be <code>NULL</code> to not transform the input.</p></dd>
<dt id="arg-syndromic-group">syndromic_group<a class="anchor" aria-label="anchor" href="#arg-syndromic-group"></a></dt>
<dd><p>A column name of `x`, or values calculated to split rows of `x`, e.g. by using [ifelse()] or [`case_when()`][dplyr::case_when()]. See *Examples*.</p></dd>
<dt id="arg-add-total-n">add_total_n<a class="anchor" aria-label="anchor" href="#arg-add-total-n"></a></dt>
<dd><p><em>(deprecated in favour of <code>formatting_type</code>)</em> A <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate whether <code>n_tested</code> available numbers per pathogen should be added to the table (default is <code>TRUE</code>). This will add the lowest and highest number of available isolates per antimicrobial (e.g, if for <em>E. coli</em> 200 isolates are available for ciprofloxacin and 150 for amoxicillin, the returned number will be "150-200"). This option is unavailable when <code>wisca = TRUE</code>; in that case, use <code>retrieve_wisca_parameters()</code> to get the parameters used for WISCA.</p></dd>
<dd><p>A column name of <code>x</code>, or values calculated to split rows of <code>x</code>, e.g. by using <code><a href="https://rdrr.io/r/base/ifelse.html" class="external-link">ifelse()</a></code> or <code><a href="https://dplyr.tidyverse.org/reference/case-and-replace-when.html" class="external-link">case_when()</a></code>. See <em>Examples</em>.</p></dd>
<dt id="arg-only-all-tested">only_all_tested<a class="anchor" aria-label="anchor" href="#arg-only-all-tested"></a></dt>
@@ -159,10 +194,6 @@ Adhering to previously described approaches (see Source) and especially the Baye
<dd><p>Language to translate text, which defaults to the system language (see <code><a href="translate.html">get_AMR_locale()</a></code>).</p></dd>
<dt id="arg-minimum">minimum<a class="anchor" aria-label="anchor" href="#arg-minimum"></a></dt>
<dd><p>The minimum allowed number of available (tested) isolates. Any isolate count lower than <code>minimum</code> will return <code>NA</code> with a warning. The default number of <code>30</code> isolates is advised by the Clinical and Laboratory Standards Institute (CLSI) as best practice, see <em>Source</em>.</p></dd>
<dt id="arg-combine-si">combine_SI<a class="anchor" aria-label="anchor" href="#arg-combine-si"></a></dt>
<dd><p>A <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate whether all susceptibility should be determined by results of either S, SDD, or I, instead of only S (default is <code>TRUE</code>).</p></dd>
@@ -175,10 +206,6 @@ Adhering to previously described approaches (see Source) and especially the Baye
<dd><p>A <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate whether the antimicrobial columns must be sorted on name.</p></dd>
<dt id="arg-wisca">wisca<a class="anchor" aria-label="anchor" href="#arg-wisca"></a></dt>
<dd><p>A <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate whether a Weighted-Incidence Syndromic Combination Antibiogram (WISCA) must be generated (default is <code>FALSE</code>). This will use a Bayesian decision model to estimate regimen coverage probabilities using <a href="https://en.wikipedia.org/wiki/Monte_Carlo_method" class="external-link">Monte Carlo simulations</a>. Set <code>simulations</code>, <code>conf_interval</code>, and <code>interval_side</code> to adjust.</p></dd>
<dt id="arg-simulations">simulations<a class="anchor" aria-label="anchor" href="#arg-simulations"></a></dt>
<dd><p>(for WISCA) a numerical value to set the number of Monte Carlo simulations.</p></dd>
@@ -200,7 +227,25 @@ Adhering to previously described approaches (see Source) and especially the Baye
<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt>
<dd><p>When used in <a href="https://rdrr.io/pkg/knitr/man/kable.html" class="external-link">R Markdown or Quarto</a>: arguments passed on to <code><a href="https://rdrr.io/pkg/knitr/man/kable.html" class="external-link">knitr::kable()</a></code> (otherwise, has no use).</p></dd>
<dd><p>Currently unused.</p></dd>
<dt id="arg-mo-transform">mo_transform<a class="anchor" aria-label="anchor" href="#arg-mo-transform"></a></dt>
<dd><p>A character to transform microorganism input - must be <code>"name"</code>, <code>"shortname"</code> (default), <code>"gramstain"</code>, or one of the column names of the <a href="microorganisms.html">microorganisms</a> data set: <code>"mo"</code>, <code>"fullname"</code>, <code>"status"</code>, <code>"domain"</code>, <code>"kingdom"</code>, <code>"phylum"</code>, <code>"class"</code>, <code>"order"</code>, <code>"family"</code>, <code>"genus"</code>, <code>"species"</code>, <code>"subspecies"</code>, <code>"rank"</code>, <code>"ref"</code>, <code>"oxygen_tolerance"</code>, <code>"morphology"</code>, <code>"source"</code>, <code>"lpsn"</code>, <code>"lpsn_parent"</code>, <code>"lpsn_renamed_to"</code>, <code>"mycobank"</code>, <code>"mycobank_parent"</code>, <code>"mycobank_renamed_to"</code>, <code>"gbif"</code>, <code>"gbif_parent"</code>, <code>"gbif_renamed_to"</code>, <code>"prevalence"</code>, or <code>"snomed"</code>. Can also be <code>NULL</code> to not transform the input or <code>NA</code> to consider all microorganisms 'unknown'.</p></dd>
<dt id="arg-add-total-n">add_total_n<a class="anchor" aria-label="anchor" href="#arg-add-total-n"></a></dt>
<dd><p><em>(deprecated in favour of <code>formatting_type</code>)</em> A <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate whether <code>n_tested</code> available numbers per pathogen should be added to the table (default is <code>TRUE</code>). This will add the lowest and highest number of available isolates per antimicrobial (e.g., if for <em>E. coli</em> 200 isolates are available for ciprofloxacin and 150 for amoxicillin, the returned number will be "150-200"). This option is unavailable when <code>wisca = TRUE</code>; in that case, use <code>retrieve_wisca_parameters()</code> to get the parameters used for WISCA.</p></dd>
<dt id="arg-minimum">minimum<a class="anchor" aria-label="anchor" href="#arg-minimum"></a></dt>
<dd><p>The minimum allowed number of available (tested) isolates. Any isolate count lower than <code>minimum</code> will return <code>NA</code> with a warning. The default number of <code>30</code> isolates is advised by the Clinical and Laboratory Standards Institute (CLSI) as best practice, see <em>Source</em>.</p></dd>
<dt id="arg-wisca">wisca<a class="anchor" aria-label="anchor" href="#arg-wisca"></a></dt>
<dd><p>A <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate whether a Weighted-Incidence Syndromic Combination Antibiogram (WISCA) must be generated (default is <code>FALSE</code>). This will use a Bayesian decision model to estimate regimen coverage probabilities using <a href="https://en.wikipedia.org/wiki/Monte_Carlo_method" class="external-link">Monte Carlo simulations</a>. Per <a href="https://doi.org/10.1093/jac/dkv397" class="external-link">doi:10.1093/jac/dkv397</a>
, susceptibility priors are \(\beta(0.5, 0.5)\) (Jeffreys) and intrinsically resistant pairs (based on <a href="intrinsic_resistant.html">intrinsic_resistant</a>) use \(\beta(1, 9999)\).</p>
<p>Set <code>simulations</code>, <code>conf_interval</code>, and <code>interval_side</code> to adjust.</p></dd>
<dt id="arg-wisca-model">wisca_model<a class="anchor" aria-label="anchor" href="#arg-wisca-model"></a></dt>
@@ -211,6 +256,30 @@ Adhering to previously described approaches (see Source) and especially the Baye
<dd><p>An <code>antibiogram()</code> object.</p></dd>
<dt id="arg-geom">geom<a class="anchor" aria-label="anchor" href="#arg-geom"></a></dt>
<dd><p>The plotting style for the point estimate. One of <code>"pointrange"</code> (default), <code>"point"</code>, <code>"col"</code>/<code>"bar"</code>, or <code>"errorbar"</code>. <code>"pointrange"</code> is recommended for coverage data: bars imply a meaningful baseline at zero, which coverage estimates rarely have.</p></dd>
<dt id="arg-ci">ci<a class="anchor" aria-label="anchor" href="#arg-ci"></a></dt>
<dd><p>Logical, whether to draw the credible/confidence interval. Defaults to <code>TRUE</code>. Ignored (forced <code>TRUE</code>) when <code>geom = "pointrange"</code> or <code>"errorbar"</code>, since the interval is intrinsic to those geoms.</p></dd>
<dt id="arg-sort">sort<a class="anchor" aria-label="anchor" href="#arg-sort"></a></dt>
<dd><p>Logical, whether to order regimens by coverage. Defaults to <code>TRUE</code>. When faceted (per pathogen) or grouped (syndromic), ordering is applied within each panel/group.</p></dd>
<dt id="arg-flip">flip<a class="anchor" aria-label="anchor" href="#arg-flip"></a></dt>
<dd><p>Logical, whether to draw regimens on the y-axis (horizontal). Defaults to <code>NULL</code>, which flips automatically when any regimen label exceeds 20 characters (long combination names read poorly on the x-axis). Set <code>TRUE</code>/<code>FALSE</code> to override.</p></dd>
<dt id="arg-caption">caption<a class="anchor" aria-label="anchor" href="#arg-caption"></a></dt>
<dd><p>Text to show as caption, will explain non-inferiority for WISCA models.</p></dd>
<dt id="arg-wisca-plot-type">wisca_plot_type<a class="anchor" aria-label="anchor" href="#arg-wisca-plot-type"></a></dt>
<dd><p>Either <code>"susceptibility_incidence"</code> (default) or <code>"posterior_coverage"</code>.</p></dd>
<dt id="arg-italicise">italicise<a class="anchor" aria-label="anchor" href="#arg-italicise"></a></dt>
<dd><p>A <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate whether the microorganism names in the <a href="https://rdrr.io/pkg/knitr/man/kable.html" class="external-link">knitr</a> table should be made italic, using <code><a href="italicise_taxonomy.html">italicise_taxonomy()</a></code>.</p></dd>
@@ -255,40 +324,15 @@ Adhering to previously described approaches (see Source) and especially the Baye
</div>
<div class="section">
<h3 id="antibiogram-types">Antibiogram Types<a class="anchor" aria-label="anchor" href="#antibiogram-types"></a></h3>
<h3 id="when-to-use-wisca-vs-traditional-antibiograms">When to Use WISCA vs. Traditional Antibiograms<a class="anchor" aria-label="anchor" href="#when-to-use-wisca-vs-traditional-antibiograms"></a></h3>
<p>There are various antibiogram types, as summarised by Klinker <em>et al.</em> (2021, <a href="https://doi.org/10.1177/20499361211011373" class="external-link">doi:10.1177/20499361211011373</a>
), and they are all supported by <code>antibiogram()</code>.</p>
<p>For clinical coverage estimations, <strong>use WISCA whenever possible</strong>, since it provides more precise coverage estimates by accounting for pathogen incidence and antimicrobial susceptibility, as has been shown by Bielicki <em>et al.</em> (2020, <a href="https://doi.org/10.1001/jamanetworkopen.2019.21124" class="external-link">doi:10.1001/jamanetworkopen.2019.21124</a>
). See the section <em>Explaining WISCA</em> on this page. Do note that WISCA is pathogen-agnostic, meaning that the outcome is not stratied by pathogen, but rather by syndrome.</p><ol><li><p><strong>Traditional Antibiogram</strong></p>
<p>Case example: Susceptibility of <em>Pseudomonas aeruginosa</em> to piperacillin/tazobactam (TZP)</p>
<p>Code example:</p>
<p></p><div class="sourceCode r"><pre><code><span><span class="fu"><a href="../reference/antibiogram.html">antibiogram</a></span><span class="op">(</span><span class="va">your_data</span>,</span>
<span> antimicrobials <span class="op">=</span> <span class="st">"TZP"</span><span class="op">)</span></span></code></pre><p></p></div></li>
<li><p><strong>Combination Antibiogram</strong></p>
<p>Case example: Additional susceptibility of <em>Pseudomonas aeruginosa</em> to TZP + tobramycin versus TZP alone</p>
<p>Code example:</p>
<p></p><div class="sourceCode r"><pre><code><span><span class="fu"><a href="../reference/antibiogram.html">antibiogram</a></span><span class="op">(</span><span class="va">your_data</span>,</span>
<span> antimicrobials <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"TZP"</span>, <span class="st">"TZP+TOB"</span>, <span class="st">"TZP+GEN"</span><span class="op">)</span><span class="op">)</span></span></code></pre><p></p></div></li>
<li><p><strong>Syndromic Antibiogram</strong></p>
<p>Case example: Susceptibility of <em>Pseudomonas aeruginosa</em> to TZP among respiratory specimens (obtained among ICU patients only)</p>
<p>Code example:</p>
<p></p><div class="sourceCode r"><pre><code><span><span class="fu"><a href="../reference/antibiogram.html">antibiogram</a></span><span class="op">(</span><span class="va">your_data</span>,</span>
<span> antimicrobials <span class="op">=</span> <span class="fu"><a href="../reference/antimicrobial_selectors.html">penicillins</a></span><span class="op">(</span><span class="op">)</span>,</span>
<span> syndromic_group <span class="op">=</span> <span class="st">"ward"</span><span class="op">)</span></span></code></pre><p></p></div></li>
<li><p><strong>Weighted-Incidence Syndromic Combination Antibiogram (WISCA)</strong></p>
<p>WISCA can be applied to any antibiogram, see the section <em>Explaining WISCA</em> on this page for more information.</p>
<p>Code example:</p>
<p></p><div class="sourceCode r"><pre><code><span><span class="fu"><a href="../reference/antibiogram.html">antibiogram</a></span><span class="op">(</span><span class="va">your_data</span>,</span>
<span> antimicrobials <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"TZP"</span>, <span class="st">"TZP+TOB"</span>, <span class="st">"TZP+GEN"</span><span class="op">)</span>,</span>
<span> wisca <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span>
<span></span>
<span><span class="co"># this is equal to:</span></span>
<span><span class="fu"><a href="../reference/antibiogram.html">wisca</a></span><span class="op">(</span><span class="va">your_data</span>,</span>
<span> antimicrobials <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"TZP"</span>, <span class="st">"TZP+TOB"</span>, <span class="st">"TZP+GEN"</span><span class="op">)</span><span class="op">)</span></span></code></pre><p></p></div>
<p>WISCA uses a sophisticated Bayesian decision model to combine both local and pooled antimicrobial resistance data. This approach not only evaluates local patterns but can also draw on multi-centre data sets to improve regimen accuracy, even in low-incidence infections like paediatric bloodstream infections (BSIs).</p></li>
</ol></div>
), and they are all supported by <code>antibiogram()</code>: traditional, combination, syndromic, and WISCA.</p>
<p><strong>If your goal is to guide empirical therapy, use WISCA.</strong> Traditional antibiograms fragment susceptibility information by species, but at the point of prescribing, the clinician does not know which species is causing the infection. WISCA shifts the unit of analysis from the isolate to the patient: it estimates the probability that a regimen will cover the infection, given the local distribution of causative pathogens. It evaluates combination regimens, weights by pathogen incidence, and provides credible intervals that honestly communicate uncertainty. Hebert <em>et al.</em> (2012) demonstrated this concretely for the first time: ciprofloxacin showed 84% susceptibility against <em>E. coli</em> in the traditional antibiogram, but WISCA coverage was only 62% for UTI and 37% for abdominal infections, because other species (including intrinsically resistant enterococci) contribute substantially to these syndromes. Note that WISCA is pathogen-agnostic: the outcome is not stratified by species, but by syndrome.</p>
<p><strong>Traditional, combination, and syndromic antibiograms remain appropriate for AMR surveillance</strong>, i.e., tracking resistance trends per species over time. They are the right tool when the question is <em>"how resistant is species X to drug Y in our setting?"</em> rather than <em>"what regimen best covers this syndrome?"</em>.</p>
<p>All four types are demonstrated in the <em>Examples</em> section below.</p>
</div>
<div class="section">
<h3 id="grouped-tibbles">Grouped tibbles<a class="anchor" aria-label="anchor" href="#grouped-tibbles"></a></h3>
@@ -302,38 +346,6 @@ Adhering to previously described approaches (see Source) and especially the Baye
<span> <span class="fu"><a href="../reference/antibiogram.html">wisca</a></span><span class="op">(</span>antimicrobials <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"TZP"</span>, <span class="st">"TZP+TOB"</span>, <span class="st">"TZP+GEN"</span><span class="op">)</span><span class="op">)</span></span></code></pre><p></p></div>
</div>
<div class="section">
<h3 id="stepped-approach-for-clinical-insight">Stepped Approach for Clinical Insight<a class="anchor" aria-label="anchor" href="#stepped-approach-for-clinical-insight"></a></h3>
<p>In clinical practice, antimicrobial coverage decisions evolve as more microbiological data becomes available. This theoretical stepped approach ensures empirical coverage can continuously assessed to improve patient outcomes:</p><ol><li><p><strong>Initial Empirical Therapy (Admission / Pre-Culture Data)</strong></p>
<p>At admission, no pathogen information is available.</p><ul><li><p>Action: broad-spectrum coverage is based on local resistance patterns and syndromic antibiograms. Using the pathogen-agnostic yet incidence-weighted WISCA is preferred.</p></li>
<li><p>Code example:</p>
<p></p><div class="sourceCode r"><pre><code><span><span class="fu"><a href="../reference/antibiogram.html">antibiogram</a></span><span class="op">(</span><span class="va">your_data</span>,</span>
<span> antimicrobials <span class="op">=</span> <span class="va">selected_regimens</span>,</span>
<span> mo_transform <span class="op">=</span> <span class="cn">NA</span><span class="op">)</span> <span class="co"># all pathogens set to `NA`</span></span>
<span></span>
<span><span class="co"># preferred: use WISCA</span></span>
<span><span class="fu"><a href="../reference/antibiogram.html">wisca</a></span><span class="op">(</span><span class="va">your_data</span>,</span>
<span> antimicrobials <span class="op">=</span> <span class="va">selected_regimens</span><span class="op">)</span></span></code></pre><p></p></div></li>
</ul></li>
<li><p><strong>Refinement with Gram Stain Results</strong></p>
<p>When a blood culture becomes positive, the Gram stain provides an initial and crucial first stratification (Gram-positive vs. Gram-negative).</p><ul><li><p>Action: narrow coverage based on Gram stain-specific resistance patterns.</p></li>
<li><p>Code example:</p>
<p></p><div class="sourceCode r"><pre><code><span><span class="fu"><a href="../reference/antibiogram.html">antibiogram</a></span><span class="op">(</span><span class="va">your_data</span>,</span>
<span> antimicrobials <span class="op">=</span> <span class="va">selected_regimens</span>,</span>
<span> mo_transform <span class="op">=</span> <span class="st">"gramstain"</span><span class="op">)</span> <span class="co"># all pathogens set to Gram-pos/Gram-neg</span></span></code></pre><p></p></div></li>
</ul></li>
<li><p><strong>Definitive Therapy Based on Species Identification</strong></p>
<p>After cultivation of the pathogen, full pathogen identification allows precise targeting of therapy.</p><ul><li><p>Action: adjust treatment to pathogen-specific antibiograms, minimizing resistance risks.</p></li>
<li><p>Code example:</p>
<p></p><div class="sourceCode r"><pre><code><span><span class="fu"><a href="../reference/antibiogram.html">antibiogram</a></span><span class="op">(</span><span class="va">your_data</span>,</span>
<span> antimicrobials <span class="op">=</span> <span class="va">selected_regimens</span>,</span>
<span> mo_transform <span class="op">=</span> <span class="st">"shortname"</span><span class="op">)</span> <span class="co"># all pathogens set to 'G. species', e.g., E. coli</span></span></code></pre><p></p></div></li>
</ul></li>
</ol><p>By structuring antibiograms around this stepped approach, clinicians can make data-driven adjustments at each stage, ensuring optimal empirical and targeted therapy while reducing unnecessary broad-spectrum antimicrobial use.</p>
</div>
<div class="section">
<h3 id="inclusion-in-combination-antibiograms">Inclusion in Combination Antibiograms<a class="anchor" aria-label="anchor" href="#inclusion-in-combination-antibiograms"></a></h3>
@@ -372,10 +384,22 @@ Adhering to previously described approaches (see Source) and especially the Baye
<p>WISCA (Weighted-Incidence Syndromic Combination Antibiogram) estimates the probability of empirical coverage for combination regimens.</p>
<p>It weights susceptibility by pathogen prevalence within a clinical syndrome and provides credible intervals around the expected coverage.</p>
<p>For more background, interpretation, and examples, see <a href="https://amr-for-r.org/articles/WISCA.html">the WISCA vignette</a>.</p>
<p>WISCA (Weighted-Incidence Syndromic Combination Antibiogram) estimates the probability that an empirical antimicrobial regimen will provide adequate coverage for a given infection syndrome, before the causative pathogen has been identified.</p>
<p>It does so by combining two quantities: the relative incidence of each pathogen within the syndrome (modelled as a Dirichlet distribution) and the susceptibility of each pathogen to the regimen (modelled as Beta distributions). These are combined via Monte Carlo simulation to produce a coverage estimate with a credible interval.</p>
<p><strong>Prior distributions:</strong> Pathogen incidence uses a non-informative \(Dirichlet(1, 1, \ldots, 1)\) prior. Susceptibility proportions use the Jeffreys prior, \(\beta(0.5, 0.5)\), except for pathogen-drug combinations with known intrinsic resistance, which use a strongly informative \(\beta(1, 9999)\) prior that forces near-zero susceptibility regardless of observed data. Intrinsic resistance is determined using the <a href="intrinsic_resistant.html">intrinsic_resistant</a> data set, which is based on <a href="https://www.eucast.org/bacteria/important-additional-information/expert-rules/" class="external-link">'EUCAST Expected Resistant Phenotypes' v1.2</a> (2023).</p>
<p><strong>Interpreting the output:</strong> Overlapping credible intervals between regimens indicate no significant difference in coverage; if a narrower-spectrum regimen overlaps with a broader one, the narrower-spectrum option may be preferred on stewardship grounds. Non-overlapping intervals indicate a clinically meaningful difference. For small sample sizes, consider pooling data from multiple sites to improve precision, provided pathogen distributions are sufficiently similar (Bielicki <em>et al.</em>, 2016).</p>
<p>For the full mathematical derivation and worked examples, see the <a href="https://amr-for-r.org/articles/WISCA.html">WISCA vignette</a>.</p>
</div>
<div class="section level2">
<h2 id="references">References<a class="anchor" aria-label="anchor" href="#references"></a></h2>
<ul><li><p>Hebert C <em>et al.</em> (2012). <strong>Demonstration of the weighted-incidence syndromic combination antibiogram: an empiric prescribing decision aid.</strong> <em>Infection Control &amp; Hospital Epidemiology</em> 33(4):381-388; <a href="https://doi.org/10.1086/664768" class="external-link">doi:10.1086/664768</a></p></li>
<li><p>Bielicki JA <em>et al.</em> (2016). <strong>Selecting appropriate empirical antibiotic regimens for paediatric bloodstream infections: application of a Bayesian decision model to local and pooled antimicrobial resistance surveillance data.</strong> <em>Journal of Antimicrobial Chemotherapy</em> 71(3):794-802; <a href="https://doi.org/10.1093/jac/dkv397" class="external-link">doi:10.1093/jac/dkv397</a></p></li>
<li><p>Cook A <em>et al.</em> (2022). <strong>Improving empiric antibiotic prescribing in pediatric bloodstream infections: a potential application of weighted-incidence syndromic combination antibiograms (WISCA).</strong> <em>Expert Review of Anti-infective Therapy</em> 20(3):445-456; <a href="https://doi.org/10.1080/14787210.2021.1967145" class="external-link">doi:10.1080/14787210.2021.1967145</a></p></li>
<li><p>Klinker KP <em>et al.</em> (2021). <strong>Antimicrobial stewardship and antibiograms: importance of moving beyond traditional antibiograms.</strong> <em>Therapeutic Advances in Infectious Disease</em>, May 5;8:20499361211011373; <a href="https://doi.org/10.1177/20499361211011373" class="external-link">doi:10.1177/20499361211011373</a></p></li>
<li><p>Barbieri E <em>et al.</em> (2021). <strong>Development of a Weighted-Incidence Syndromic Combination Antibiogram (WISCA) to guide the choice of the empiric antibiotic treatment for urinary tract infection in paediatric patients: a Bayesian approach.</strong> <em>Antimicrobial Resistance &amp; Infection Control</em> May 1;10(1):74; <a href="https://doi.org/10.1186/s13756-021-00939-2" class="external-link">doi:10.1186/s13756-021-00939-2</a></p></li>
<li><p><strong>M39 Analysis and Presentation of Cumulative Antimicrobial Susceptibility Test Data, 5th Edition</strong>, 2022, <em>Clinical and Laboratory Standards Institute (CLSI)</em>. <a href="https://clsi.org/standards/products/microbiology/documents/m39/" class="external-link">https://clsi.org/standards/products/microbiology/documents/m39/</a>.</p></li>
</ul></div>
<div class="section level2">
<h2 id="author">Author<a class="anchor" aria-label="anchor" href="#author"></a></h2>
<p>Implementation: Dr. Larisse Bolton and Dr. Matthijs Berends</p>
@@ -408,7 +432,105 @@ Adhering to previously described approaches (see Source) and especially the Baye
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># IPM &lt;sir&gt;, MEM &lt;sir&gt;, MTR &lt;sir&gt;, CHL &lt;sir&gt;, COL &lt;sir&gt;, MUP &lt;sir&gt;, …</span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># \donttest{</span></span></span>
<span class="r-in"><span><span class="co"># Traditional antibiogram ----------------------------------------------</span></span></span>
<span class="r-in"><span><span class="co"># WISCA antibiogram (recommended for empirical therapy) -----------------</span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># basic WISCA: empirical coverage per regimen, weighted by pathogen</span></span></span>
<span class="r-in"><span><span class="co"># incidence, with 95% credible intervals</span></span></span>
<span class="r-in"><span><span class="fu">wisca</span><span class="op">(</span><span class="va">example_isolates</span>,</span></span>
<span class="r-in"><span> antimicrobials <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"AMC"</span>, <span class="st">"AMC+CIP"</span>, <span class="st">"AMC+GEN"</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="op">)</span></span></span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>invalid microorganism code, NA generated</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 1 × 3</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Type: Weighted-Incidence Syndromic Combination Antibiogram (WISCA)</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Cred. interval: 95%</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Simulations: 1000 per stratum</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> `Amoxicillin/clavulanic acid` Amoxicillin/clavulanic …¹ Amoxicillin/clavulan…²</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> 74.2% (72.1-76.1%) 88.8% (87.2-90.3%) 90.8% (89.3-92.1%) </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># abbreviated names: ¹​`Amoxicillin/clavulanic acid + Ciprofloxacin`,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># ²​`Amoxicillin/clavulanic acid + Gentamicin`</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># and use `wisca_plot()` to assess the simulation outcomes.</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Or, use it directly in R Markdown or Quarto, see `antibiogram()`.</span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># equivalent using antibiogram():</span></span></span>
<span class="r-in"><span><span class="fu">antibiogram</span><span class="op">(</span><span class="va">example_isolates</span>,</span></span>
<span class="r-in"><span> antimicrobials <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"AMC"</span>, <span class="st">"AMC+CIP"</span>, <span class="st">"AMC+GEN"</span><span class="op">)</span>,</span></span>
<span class="r-in"><span> wisca <span class="op">=</span> <span class="cn">TRUE</span></span></span>
<span class="r-in"><span><span class="op">)</span></span></span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>invalid microorganism code, NA generated</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 1 × 3</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Type: Weighted-Incidence Syndromic Combination Antibiogram (WISCA)</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Cred. interval: 95%</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Simulations: 1000 per stratum</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> `Amoxicillin/clavulanic acid` Amoxicillin/clavulanic …¹ Amoxicillin/clavulan…²</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> 74.2% (72.2-76.1%) 88.8% (87.1-90.4%) 90.8% (89.4-92.2%) </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># abbreviated names: ¹​`Amoxicillin/clavulanic acid + Ciprofloxacin`,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># ²​`Amoxicillin/clavulanic acid + Gentamicin`</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># and use `wisca_plot()` to assess the simulation outcomes.</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Or, use it directly in R Markdown or Quarto, see `antibiogram()`.</span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># stratified by syndrome or clinical group</span></span></span>
<span class="r-in"><span><span class="va">out</span> <span class="op">&lt;-</span> <span class="fu">wisca</span><span class="op">(</span><span class="va">example_isolates</span>,</span></span>
<span class="r-in"><span> antimicrobials <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"TZP"</span>, <span class="st">"TZP+TOB"</span>, <span class="st">"TZP+GEN"</span><span class="op">)</span>,</span></span>
<span class="r-in"><span> syndromic_group <span class="op">=</span> <span class="st">"ward"</span></span></span>
<span class="r-in"><span><span class="op">)</span></span></span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>invalid microorganism code, NA generated</span>
<span class="r-in"><span><span class="va">out</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 3 × 4</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Type: Weighted-Incidence Syndromic Combination Antibiogram (WISCA)</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Cred. interval: 95%</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Simulations: 1000 per stratum</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> `Syndromic Group` `Piperacillin/tazobactam` Piperacillin/tazobactam + Gentam…¹</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> Clinical 74.5% (68.8-79.8%) 93.6% (91.9-95.1%) </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> ICU 57.1% (48.2-65.9%) 86.7% (83.3-89.9%) </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">3</span> Outpatient 57.5% (46-68.7%) 76.5% (70.6-82.2%) </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># abbreviated name: ¹​`Piperacillin/tazobactam + Gentamicin`</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># 1 more variable: `Piperacillin/tazobactam + Tobramycin` &lt;chr&gt;</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># and use `wisca_plot()` to assess the simulation outcomes.</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Or, use it directly in R Markdown or Quarto, see `antibiogram()`.</span></span>
<span class="r-in"><span><span class="fu">wisca_plot</span><span class="op">(</span><span class="va">out</span><span class="op">)</span></span></span>
<span class="r-plt img"><img src="antibiogram-1.png" alt="" width="700" height="433"></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># stratified using grouped tibbles (e.g. by age and gender)</span></span></span>
<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/ns-load.html" class="external-link">requireNamespace</a></span><span class="op">(</span><span class="st">"dplyr"</span><span class="op">)</span><span class="op">)</span> <span class="op">{</span></span></span>
<span class="r-in"><span> <span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://dplyr.tidyverse.org" class="external-link">dplyr</a></span><span class="op">)</span></span></span>
<span class="r-in"><span> <span class="va">example_isolates</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span></span>
<span class="r-in"><span> <span class="fu"><a href="top_n_microorganisms.html">top_n_microorganisms</a></span><span class="op">(</span>n <span class="op">=</span> <span class="fl">10</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span></span>
<span class="r-in"><span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/group_by.html" class="external-link">group_by</a></span><span class="op">(</span></span></span>
<span class="r-in"><span> age_group <span class="op">=</span> <span class="fu"><a href="age_groups.html">age_groups</a></span><span class="op">(</span><span class="va">age</span>, <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">25</span>, <span class="fl">50</span>, <span class="fl">75</span><span class="op">)</span><span class="op">)</span>,</span></span>
<span class="r-in"><span> <span class="va">gender</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span></span>
<span class="r-in"><span> <span class="fu">wisca</span><span class="op">(</span>antimicrobials <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"TZP"</span>, <span class="st">"TZP+TOB"</span>, <span class="st">"TZP+GEN"</span><span class="op">)</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="op">}</span></span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> <span style="color: #00BBBB;"></span> Using column <span style="color: #00BB00; font-weight: bold;">mo</span> as input for `col_mo`.</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>Number of tested isolates should exceed 30 for each regimen (and group). WISCA</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> coverage estimates might be inaccurate.</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 8 × 5</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Type: Weighted-Incidence Syndromic Combination Antibiogram (WISCA)</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Cred. interval: 95%</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Simulations: 1000 per stratum</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> age_group gender `Piperacillin/tazobactam` Piperacillin/tazobactam + Gentami…¹</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> 0-24 F 57.7% (29.5-82.6%) 70.5% (45.9-89.1%) </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> 0-24 M 59.1% (33-84.2%) 76.1% (55.7-90.6%) </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">3</span> 25-49 F 67.4% (43.3-90.5%) 93.8% (87.8-97.9%) </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">4</span> 25-49 M 56.8% (27.5-86.5%) 90.9% (82.4-96.8%) </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">5</span> 50-74 F 68% (53.3-82.3%) 96.9% (94.7-98.5%) </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">6</span> 50-74 M 67.1% (56.5-77.5%) 96.8% (94.2-98.8%) </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">7</span> 75+ F 73.3% (62.9-83.6%) 97.7% (96-98.9%) </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">8</span> 75+ M 74% (64.2-83.1%) 97.9% (96.1-99.1%) </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># abbreviated name: ¹​`Piperacillin/tazobactam + Gentamicin`</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># 1 more variable: `Piperacillin/tazobactam + Tobramycin` &lt;chr&gt;</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># and use `wisca_plot()` to assess the simulation outcomes.</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Or, use it directly in R Markdown or Quarto, see `antibiogram()`.</span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># Traditional antibiogram (for AMR surveillance) ------------------------</span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="fu">antibiogram</span><span class="op">(</span><span class="va">example_isolates</span>,</span></span>
<span class="r-in"><span> antimicrobials <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fu"><a href="antimicrobial_selectors.html">aminoglycosides</a></span><span class="op">(</span><span class="op">)</span>, <span class="fu"><a href="antimicrobial_selectors.html">carbapenems</a></span><span class="op">(</span><span class="op">)</span><span class="op">)</span></span></span>
@@ -416,8 +538,9 @@ Adhering to previously described approaches (see Source) and especially the Baye
<span class="r-msg co"><span class="r-pr">#&gt;</span> <span style="color: #00BBBB;"></span> For `aminoglycosides()` using columns <span style="color: #00BB00; font-weight: bold;">GEN</span> (gentamicin), <span style="color: #00BB00; font-weight: bold;">TOB</span> (tobramycin), <span style="color: #00BB00; font-weight: bold;">AMK</span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> (amikacin), and <span style="color: #00BB00; font-weight: bold;">KAN</span> (kanamycin)</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> <span style="color: #00BBBB;"></span> For `carbapenems()` using columns <span style="color: #00BB00; font-weight: bold;">IPM</span> (imipenem) and <span style="color: #00BB00; font-weight: bold;">MEM</span> (meropenem)</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># An antibiogram: 10 × 7</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Type: Non-WISCA with 95% CI</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 10 × 7</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Type: Traditional Antibiogram</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Conf. interval: 95%</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Pathogen Amikacin Gentamicin Imipenem Kanamycin Meropenem Tobramycin</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> CoNS 0% (0-8%,N… 86% (82-9… 52% (37… 0% (0-8%… 52% (37-… 22% (12-3…</span>
@@ -431,7 +554,7 @@ Adhering to previously described approaches (see Source) and especially the Baye
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> S. hominis <span style="color: #BB0000;">NA</span> 92% (84-9… <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span> <span style="color: #BB0000;">NA</span> 85% (74-9…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> S. pneumoniae 0% (0-3%,N… 0% (0-3%,… <span style="color: #BB0000;">NA</span> 0% (0-3%… <span style="color: #BB0000;">NA</span> 0% (0-3%,…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># or use it directly in R Markdown or Quarto, see ?antibiogram</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># or use it directly in R Markdown or Quarto, see `antibiogram()`.</span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="fu">antibiogram</span><span class="op">(</span><span class="va">example_isolates</span>,</span></span>
<span class="r-in"><span> antimicrobials <span class="op">=</span> <span class="fu"><a href="antimicrobial_selectors.html">aminoglycosides</a></span><span class="op">(</span><span class="op">)</span>,</span></span>
@@ -440,43 +563,26 @@ Adhering to previously described approaches (see Source) and especially the Baye
<span class="r-in"><span><span class="op">)</span></span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> <span style="color: #00BBBB;"></span> For `aminoglycosides()` using columns <span style="color: #00BB00; font-weight: bold;">GEN</span> (gentamicin), <span style="color: #00BB00; font-weight: bold;">TOB</span> (tobramycin), <span style="color: #00BB00; font-weight: bold;">AMK</span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> (amikacin), and <span style="color: #00BB00; font-weight: bold;">KAN</span> (kanamycin)</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># An antibiogram: 2 × 5</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Type: Non-WISCA with 95% CI</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 2 × 5</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Type: Traditional Antibiogram</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Conf. interval: 95%</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Pathogen J01GB01 J01GB03 J01GB04 J01GB06 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> Gram-negative 96% (94-97%,N=686) 96% (95-98%,N=684) 0% (0-10%,N=35) 98% (96-…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> Gram-positive 34% (31-38%,N=665) 63% (60-66%,N=1170) 0% (0-1%,N=436) 0% (0-1%…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># or use it directly in R Markdown or Quarto, see ?antibiogram</span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="fu">antibiogram</span><span class="op">(</span><span class="va">example_isolates</span>,</span></span>
<span class="r-in"><span> antimicrobials <span class="op">=</span> <span class="fu"><a href="antimicrobial_selectors.html">carbapenems</a></span><span class="op">(</span><span class="op">)</span>,</span></span>
<span class="r-in"><span> ab_transform <span class="op">=</span> <span class="st">"name"</span>,</span></span>
<span class="r-in"><span> mo_transform <span class="op">=</span> <span class="st">"name"</span></span></span>
<span class="r-in"><span><span class="op">)</span></span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> <span style="color: #00BBBB;"></span> For `carbapenems()` using columns <span style="color: #00BB00; font-weight: bold;">IPM</span> (imipenem) and <span style="color: #00BB00; font-weight: bold;">MEM</span> (meropenem)</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># An antibiogram: 5 × 3</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Type: Non-WISCA with 95% CI</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Pathogen Imipenem Meropenem </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> Coagulase-negative Staphylococcus (CoNS) 52% (37-67%,N=48) 52% (37-67%,N=4…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> Enterococcus faecalis 100% (91-100%,N=38) <span style="color: #BB0000;">NA</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">3</span> Escherichia coli 100% (99-100%,N=422) 100% (99-100%,N…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">4</span> Klebsiella pneumoniae 100% (93-100%,N=51) 100% (93-100%,N…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">5</span> Proteus mirabilis 94% (79-99%,N=32) <span style="color: #BB0000;">NA</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># or use it directly in R Markdown or Quarto, see ?antibiogram</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># or use it directly in R Markdown or Quarto, see `antibiogram()`.</span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># Combined antibiogram -------------------------------------------------</span></span></span>
<span class="r-in"><span><span class="co"># Combination antibiogram (for AMR surveillance) ------------------------</span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># combined antimicrobials yield higher empiric coverage</span></span></span>
<span class="r-in"><span><span class="fu">antibiogram</span><span class="op">(</span><span class="va">example_isolates</span>,</span></span>
<span class="r-in"><span> antimicrobials <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"TZP"</span>, <span class="st">"TZP+TOB"</span>, <span class="st">"TZP+GEN"</span><span class="op">)</span>,</span></span>
<span class="r-in"><span> mo_transform <span class="op">=</span> <span class="st">"gramstain"</span></span></span>
<span class="r-in"><span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># An antibiogram: 2 × 4</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Type: Non-WISCA with 95% CI</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 2 × 4</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Type: Combination Antibiogram</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Conf. interval: 95%</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Pathogen Piperacillin/tazobac…¹ Piperacillin/tazobac…² Piperacillin/tazobac…³</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> Gram-neg… 88% (85-91%,N=641) 99% (97-99%,N=691) 98% (97-99%,N=693) </span>
@@ -485,7 +591,7 @@ Adhering to previously described approaches (see Source) and especially the Baye
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># ²​`Piperacillin/tazobactam + Gentamicin`,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># ³​`Piperacillin/tazobactam + Tobramycin`</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># or use it directly in R Markdown or Quarto, see ?antibiogram</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># or use it directly in R Markdown or Quarto, see `antibiogram()`.</span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># you can use any antimicrobial selector with `+` too:</span></span></span>
<span class="r-in"><span><span class="fu">antibiogram</span><span class="op">(</span><span class="va">example_isolates</span>,</span></span>
@@ -493,8 +599,9 @@ Adhering to previously described approaches (see Source) and especially the Baye
<span class="r-in"><span> mo_transform <span class="op">=</span> <span class="st">"gramstain"</span></span></span>
<span class="r-in"><span><span class="op">)</span></span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> <span style="color: #00BBBB;"></span> For `ureidopenicillins()` using column <span style="color: #00BB00; font-weight: bold;">TZP</span> (piperacillin/tazobactam)</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># An antibiogram: 2 × 4</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Type: Non-WISCA with 95% CI</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 2 × 4</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Type: Combination Antibiogram</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Conf. interval: 95%</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Pathogen Piperacillin/tazobac…¹ Piperacillin/tazobac…² Piperacillin/tazobac…³</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> Gram-neg… 88% (85-91%,N=641) 99% (97-99%,N=691) 98% (97-99%,N=693) </span>
@@ -503,7 +610,7 @@ Adhering to previously described approaches (see Source) and especially the Baye
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># ²​`Piperacillin/tazobactam + Gentamicin`,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># ³​`Piperacillin/tazobactam + Tobramycin`</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># or use it directly in R Markdown or Quarto, see ?antibiogram</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># or use it directly in R Markdown or Quarto, see `antibiogram()`.</span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># names of antimicrobials do not need to resemble columns exactly:</span></span></span>
<span class="r-in"><span><span class="fu">antibiogram</span><span class="op">(</span><span class="va">example_isolates</span>,</span></span>
@@ -512,19 +619,19 @@ Adhering to previously described approaches (see Source) and especially the Baye
<span class="r-in"><span> ab_transform <span class="op">=</span> <span class="st">"name"</span>,</span></span>
<span class="r-in"><span> sep <span class="op">=</span> <span class="st">" &amp; "</span></span></span>
<span class="r-in"><span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># An antibiogram: 2 × 3</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Type: Non-WISCA with 95% CI</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 2 × 3</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Type: Traditional Antibiogram</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Conf. interval: 95%</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Pathogen Ciprofloxacin `Ciprofloxacin &amp; Gentamicin`</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> Gram-negative 91% (88-93%,N=684) 99% (97-99%,N=694) </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> Gram-positive 77% (74-80%,N=724) 93% (91-94%,N=847) </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># or use it directly in R Markdown or Quarto, see ?antibiogram</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># or use it directly in R Markdown or Quarto, see `antibiogram()`.</span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># Syndromic antibiogram ------------------------------------------------</span></span></span>
<span class="r-in"><span><span class="co"># Syndromic antibiogram (for AMR surveillance) --------------------------</span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># the data set could contain a filter for e.g. respiratory specimens</span></span></span>
<span class="r-in"><span><span class="fu">antibiogram</span><span class="op">(</span><span class="va">example_isolates</span>,</span></span>
<span class="r-in"><span> antimicrobials <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fu"><a href="antimicrobial_selectors.html">aminoglycosides</a></span><span class="op">(</span><span class="op">)</span>, <span class="fu"><a href="antimicrobial_selectors.html">carbapenems</a></span><span class="op">(</span><span class="op">)</span><span class="op">)</span>,</span></span>
<span class="r-in"><span> syndromic_group <span class="op">=</span> <span class="st">"ward"</span></span></span>
@@ -532,8 +639,9 @@ Adhering to previously described approaches (see Source) and especially the Baye
<span class="r-msg co"><span class="r-pr">#&gt;</span> <span style="color: #00BBBB;"></span> For `aminoglycosides()` using columns <span style="color: #00BB00; font-weight: bold;">GEN</span> (gentamicin), <span style="color: #00BB00; font-weight: bold;">TOB</span> (tobramycin), <span style="color: #00BB00; font-weight: bold;">AMK</span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> (amikacin), and <span style="color: #00BB00; font-weight: bold;">KAN</span> (kanamycin)</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> <span style="color: #00BBBB;"></span> For `carbapenems()` using columns <span style="color: #00BB00; font-weight: bold;">IPM</span> (imipenem) and <span style="color: #00BB00; font-weight: bold;">MEM</span> (meropenem)</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># An antibiogram: 14 × 8</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Type: Non-WISCA with 95% CI</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 14 × 8</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Type: Syndromic Antibiogram</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Conf. interval: 95%</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> `Syndromic Group` Pathogen Amikacin Gentamicin Imipenem Kanamycin Meropenem</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> Clinical CoNS <span style="color: #BB0000;">NA</span> 89% (84-9… 57% (39… <span style="color: #BB0000;">NA</span> 57% (39-…</span>
@@ -552,14 +660,12 @@ Adhering to previously described approaches (see Source) and especially the Baye
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">14</span> ICU S. pneumo… 0% (0-1… 0% (0-12%… <span style="color: #BB0000;">NA</span> 0% (0-12… <span style="color: #BB0000;">NA</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># 1 more variable: Tobramycin &lt;chr&gt;</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># or use it directly in R Markdown or Quarto, see ?antibiogram</span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># now define a data set with only E. coli</span></span></span>
<span class="r-in"><span><span class="va">ex1</span> <span class="op">&lt;-</span> <span class="va">example_isolates</span><span class="op">[</span><span class="fu"><a href="https://rdrr.io/r/base/which.html" class="external-link">which</a></span><span class="op">(</span><span class="fu"><a href="mo_property.html">mo_genus</a></span><span class="op">(</span><span class="op">)</span> <span class="op">==</span> <span class="st">"Escherichia"</span><span class="op">)</span>, <span class="op">]</span></span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> <span style="color: #00BBBB;"></span> Using column <span style="color: #00BB00; font-weight: bold;">mo</span> as input for `mo_genus()`</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># or use it directly in R Markdown or Quarto, see `antibiogram()`.</span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># with a custom language, though this will be determined automatically</span></span></span>
<span class="r-in"><span><span class="co"># (i.e., this table will be in Spanish on Spanish systems)</span></span></span>
<span class="r-in"><span><span class="va">ex1</span> <span class="op">&lt;-</span> <span class="va">example_isolates</span><span class="op">[</span><span class="fu"><a href="https://rdrr.io/r/base/which.html" class="external-link">which</a></span><span class="op">(</span><span class="fu"><a href="mo_property.html">mo_genus</a></span><span class="op">(</span><span class="op">)</span> <span class="op">==</span> <span class="st">"Escherichia"</span><span class="op">)</span>, <span class="op">]</span></span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> <span style="color: #00BBBB;"></span> Using column <span style="color: #00BB00; font-weight: bold;">mo</span> as input for `mo_genus()`</span>
<span class="r-in"><span><span class="fu">antibiogram</span><span class="op">(</span><span class="va">ex1</span>,</span></span>
<span class="r-in"><span> antimicrobials <span class="op">=</span> <span class="fu"><a href="antimicrobial_selectors.html">aminoglycosides</a></span><span class="op">(</span><span class="op">)</span>,</span></span>
<span class="r-in"><span> ab_transform <span class="op">=</span> <span class="st">"name"</span>,</span></span>
@@ -570,45 +676,25 @@ Adhering to previously described approaches (see Source) and especially the Baye
<span class="r-in"><span><span class="op">)</span></span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> <span style="color: #00BBBB;"></span> For `aminoglycosides()` using columns <span style="color: #00BB00; font-weight: bold;">GEN</span> (gentamicin), <span style="color: #00BB00; font-weight: bold;">TOB</span> (tobramycin), <span style="color: #00BB00; font-weight: bold;">AMK</span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> (amikacin), and <span style="color: #00BB00; font-weight: bold;">KAN</span> (kanamycin)</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># An antibiogram: 2 × 5</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Type: Non-WISCA with 95% CI</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 2 × 5</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Type: Syndromic Antibiogram</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Conf. interval: 95%</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> `Grupo sindrómico` Patógeno Amikacina Gentamicina Tobramicina</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> No UCI E. coli 100% (97-100%,N=119) 98% (96-99%,N=32… 98% (96-99…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> UCI E. coli 100% (93-100%,N=52) 99% (95-100%,N=1… 96% (92-99…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># or use it directly in R Markdown or Quarto, see ?antibiogram</span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># WISCA antibiogram ----------------------------------------------------</span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># WISCA are not stratified by species, but rather on syndromes</span></span></span>
<span class="r-in"><span><span class="fu">antibiogram</span><span class="op">(</span><span class="va">example_isolates</span>,</span></span>
<span class="r-in"><span> antimicrobials <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"TZP"</span>, <span class="st">"TZP+TOB"</span>, <span class="st">"TZP+GEN"</span><span class="op">)</span>,</span></span>
<span class="r-in"><span> syndromic_group <span class="op">=</span> <span class="st">"ward"</span>,</span></span>
<span class="r-in"><span> wisca <span class="op">=</span> <span class="cn">TRUE</span></span></span>
<span class="r-in"><span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># An antibiogram: 3 × 4</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Type: WISCA with 95% CI</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> `Syndromic Group` `Piperacillin/tazobactam` Piperacillin/tazobactam + Gentam…¹</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> Clinical 73.4% (68.3-78.6%) 92.3% (90.7-93.7%) </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> ICU 57.4% (49.7-65.4%) 84.9% (82.1-87.6%) </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">3</span> Outpatient 57% (47.4-66.7%) 74.6% (68.8-79.8%) </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># abbreviated name: ¹​`Piperacillin/tazobactam + Gentamicin`</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># 1 more variable: `Piperacillin/tazobactam + Tobramycin` &lt;chr&gt;</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># or use it directly in R Markdown or Quarto, see ?antibiogram</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># or use it directly in R Markdown or Quarto, see `antibiogram()`.</span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># Print the output for R Markdown / Quarto -----------------------------</span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="va">ureido</span> <span class="op">&lt;-</span> <span class="fu">antibiogram</span><span class="op">(</span><span class="va">example_isolates</span>,</span></span>
<span class="r-in"><span><span class="va">ureido</span> <span class="op">&lt;-</span> <span class="fu">wisca</span><span class="op">(</span><span class="va">example_isolates</span>,</span></span>
<span class="r-in"><span> antimicrobials <span class="op">=</span> <span class="fu"><a href="antimicrobial_selectors.html">ureidopenicillins</a></span><span class="op">(</span><span class="op">)</span>,</span></span>
<span class="r-in"><span> syndromic_group <span class="op">=</span> <span class="st">"ward"</span>,</span></span>
<span class="r-in"><span> wisca <span class="op">=</span> <span class="cn">TRUE</span></span></span>
<span class="r-in"><span> syndromic_group <span class="op">=</span> <span class="st">"ward"</span></span></span>
<span class="r-in"><span><span class="op">)</span></span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> <span style="color: #00BBBB;"></span> For `ureidopenicillins()` using column <span style="color: #00BB00; font-weight: bold;">TZP</span> (piperacillin/tazobactam)</span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>invalid microorganism code, NA generated</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># in an Rmd file, you would just need to return `ureido` in a chunk,</span></span></span>
<span class="r-in"><span><span class="co"># but to be explicit here:</span></span></span>
@@ -619,9 +705,9 @@ Adhering to previously described approaches (see Source) and especially the Baye
<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> |Syndromic Group |Piperacillin/tazobactam |</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> |:---------------|:-----------------------|</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> |Clinical |73.5% (68-79%) |</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> |ICU |57.7% (49.9-65.3%) |</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> |Outpatient |56.9% (46.5-66.8%) |</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> |Clinical |74.6% (68.9-80%) |</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> |ICU |57% (49.1-65.8%) |</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> |Outpatient |57.4% (45.6-68.4%) |</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># Generate plots with ggplot2 or base R --------------------------------</span></span></span>
@@ -630,25 +716,26 @@ Adhering to previously described approaches (see Source) and especially the Baye
<span class="r-in"><span> antimicrobials <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"AMC"</span>, <span class="st">"CIP"</span>, <span class="st">"TZP"</span>, <span class="st">"TZP+TOB"</span><span class="op">)</span>,</span></span>
<span class="r-in"><span> mo_transform <span class="op">=</span> <span class="st">"gramstain"</span></span></span>
<span class="r-in"><span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="va">ab2</span> <span class="op">&lt;-</span> <span class="fu">antibiogram</span><span class="op">(</span><span class="va">example_isolates</span>,</span></span>
<span class="r-in"><span><span class="va">ab2</span> <span class="op">&lt;-</span> <span class="fu">wisca</span><span class="op">(</span><span class="va">example_isolates</span>,</span></span>
<span class="r-in"><span> antimicrobials <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"AMC"</span>, <span class="st">"CIP"</span>, <span class="st">"TZP"</span>, <span class="st">"TZP+TOB"</span><span class="op">)</span>,</span></span>
<span class="r-in"><span> mo_transform <span class="op">=</span> <span class="st">"gramstain"</span>,</span></span>
<span class="r-in"><span> syndromic_group <span class="op">=</span> <span class="st">"ward"</span></span></span>
<span class="r-in"><span><span class="op">)</span></span></span>
<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>invalid microorganism code, NA generated</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/ns-load.html" class="external-link">requireNamespace</a></span><span class="op">(</span><span class="st">"ggplot2"</span><span class="op">)</span><span class="op">)</span> <span class="op">{</span></span></span>
<span class="r-in"><span> <span class="fu">ggplot2</span><span class="fu">::</span><span class="fu"><a href="https://ggplot2.tidyverse.org/reference/autoplot.html" class="external-link">autoplot</a></span><span class="op">(</span><span class="va">ab1</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="op">}</span></span></span>
<span class="r-plt img"><img src="antibiogram-1.png" alt="" width="700" height="433"></span>
<span class="r-plt img"><img src="antibiogram-2.png" alt="" width="700" height="433"></span>
<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/ns-load.html" class="external-link">requireNamespace</a></span><span class="op">(</span><span class="st">"ggplot2"</span><span class="op">)</span><span class="op">)</span> <span class="op">{</span></span></span>
<span class="r-in"><span> <span class="fu">ggplot2</span><span class="fu">::</span><span class="fu"><a href="https://ggplot2.tidyverse.org/reference/autoplot.html" class="external-link">autoplot</a></span><span class="op">(</span><span class="va">ab2</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="op">}</span></span></span>
<span class="r-plt img"><img src="antibiogram-2.png" alt="" width="700" height="433"></span>
<span class="r-plt img"><img src="antibiogram-3.png" alt="" width="700" height="433"></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="fu"><a href="plot.html">plot</a></span><span class="op">(</span><span class="va">ab1</span><span class="op">)</span></span></span>
<span class="r-plt img"><img src="antibiogram-3.png" alt="" width="700" height="433"></span>
<span class="r-in"><span><span class="fu"><a href="plot.html">plot</a></span><span class="op">(</span><span class="va">ab2</span><span class="op">)</span></span></span>
<span class="r-plt img"><img src="antibiogram-4.png" alt="" width="700" height="433"></span>
<span class="r-in"><span><span class="fu"><a href="plot.html">plot</a></span><span class="op">(</span><span class="va">ab2</span><span class="op">)</span></span></span>
<span class="r-plt img"><img src="antibiogram-5.png" alt="" width="700" height="433"></span>
<span class="r-plt img"><img src="antibiogram-6.png" alt="" width="700" height="433"></span>
<span class="r-in"><span><span class="co"># }</span></span></span>
</code></pre></div>
</div>

View File

@@ -1,34 +1,76 @@
# Generate Traditional, Combination, Syndromic, or WISCA Antibiograms
# Generate Antibiograms (WISCA, Traditional, Combination, or Syndromic)
Create detailed antibiograms with options for traditional, combination,
syndromic, and Bayesian WISCA methods.
Generate antibiograms from antimicrobial susceptibility data, with
support for traditional, combination, syndromic, and WISCA
(Weighted-Incidence Syndromic Combination Antibiogram) methods.
Adhering to previously described approaches (see *Source*) and
especially the Bayesian WISCA model (Weighted-Incidence Syndromic
Combination Antibiogram) by Bielicki *et al.*, these functions provide
flexible output formats including plots and tables, ideal for
integration with R Markdown and Quarto reports.
**For empirical therapy guidance, WISCA is the recommended approach.**
When initiating empirical treatment, the causative pathogen is unknown,
and the clinically relevant question is: *"what is the probability that
this regimen will cover whatever pathogen turns out to cause the
infection?"* WISCA answers that question directly by weighting
susceptibility by pathogen incidence within a syndrome and providing
credible intervals via Bayesian Monte Carlo simulation. Traditional
antibiograms remain appropriate for tracking resistance per species for
surveillance purposes. See the section *Explaining WISCA* on this page
and the [WISCA vignette](https://amr-for-r.org/articles/WISCA.html) for
details.
All antibiogram types adhere to previously described approaches (see
*Source*), and the WISCA method implements the Bayesian decision model
by Bielicki *et al.* (2016,
[doi:10.1093/jac/dkv397](https://doi.org/10.1093/jac/dkv397) ). Output
formats include plots and tables, ideal for integration with R Markdown
and Quarto reports.
## Usage
``` r
antibiogram(x, antimicrobials = where(is.sir), mo_transform = "shortname",
ab_transform = "name", syndromic_group = NULL, add_total_n = FALSE,
only_all_tested = FALSE, digits = ifelse(wisca, 1, 0),
formatting_type = getOption("AMR_antibiogram_formatting_type",
ifelse(wisca, 14, 18)), col_mo = NULL, language = get_AMR_locale(),
minimum = 30, combine_SI = TRUE, sep = " + ", sort_columns = TRUE,
wisca = FALSE, simulations = 1000, conf_interval = 0.95,
interval_side = "two-tailed", info = interactive(), parallel = FALSE,
...)
wisca(x, antimicrobials = where(is.sir), ab_transform = "name",
syndromic_group = NULL, only_all_tested = FALSE, digits = 1,
wisca(
x,
antimicrobials = where(is.sir),
ab_transform = "name",
syndromic_group = NULL,
only_all_tested = FALSE,
digits = 1,
formatting_type = getOption("AMR_antibiogram_formatting_type", 14),
col_mo = NULL, language = get_AMR_locale(), combine_SI = TRUE,
sep = " + ", sort_columns = TRUE, simulations = 1000,
conf_interval = 0.95, interval_side = "two-tailed",
info = interactive(), parallel = FALSE, ...)
col_mo = NULL,
language = get_AMR_locale(),
combine_SI = TRUE,
sep = " + ",
sort_columns = TRUE,
simulations = 1000,
conf_interval = 0.95,
interval_side = "two-tailed",
info = interactive(),
parallel = FALSE,
...
)
antibiogram(
x,
antimicrobials = where(is.sir),
mo_transform = "shortname",
ab_transform = "name",
syndromic_group = NULL,
add_total_n = FALSE,
only_all_tested = FALSE,
digits = ifelse(wisca, 1, 0),
formatting_type = getOption("AMR_antibiogram_formatting_type", ifelse(wisca, 14, 18)),
col_mo = NULL,
language = get_AMR_locale(),
minimum = 30,
combine_SI = TRUE,
sep = " + ",
sort_columns = TRUE,
wisca = FALSE,
simulations = 1000,
conf_interval = 0.95,
interval_side = "two-tailed",
info = interactive(),
parallel = FALSE,
...
)
retrieve_wisca_parameters(wisca_model, ...)
@@ -36,44 +78,31 @@ retrieve_wisca_parameters(wisca_model, ...)
plot(x, ...)
# S3 method for class 'antibiogram'
autoplot(object, ...)
autoplot(
object,
geom = c("pointrange", "point", "col", "bar", "errorbar"),
ci = TRUE,
sort = TRUE,
flip = NULL,
caption = NULL,
...
)
wisca_plot(
wisca_model,
wisca_plot_type = c("susceptibility_incidence", "posterior_coverage"),
...
)
# S3 method for class 'antibiogram'
knit_print(x, italicise = TRUE,
na = getOption("knitr.kable.NA", default = ""), ...)
knit_print(
x,
italicise = TRUE,
na = getOption("knitr.kable.NA", default = ""),
...
)
```
## Source
- Bielicki JA *et al.* (2016). **Selecting appropriate empirical
antibiotic regimens for paediatric bloodstream infections: application
of a Bayesian decision model to local and pooled antimicrobial
resistance surveillance data** *Journal of Antimicrobial Chemotherapy*
71(3); [doi:10.1093/jac/dkv397](https://doi.org/10.1093/jac/dkv397)
- Bielicki JA *et al.* (2020). **Evaluation of the coverage of 3
antibiotic regimens for neonatal sepsis in the hospital setting across
Asian countries** *JAMA Netw Open.* 3(2):e1921124;
[doi:10.1001/jamanetworkopen.2019.21124](https://doi.org/10.1001/jamanetworkopen.2019.21124)
- Klinker KP *et al.* (2021). **Antimicrobial stewardship and
antibiograms: importance of moving beyond traditional antibiograms**.
*Therapeutic Advances in Infectious Disease*, May
5;8:20499361211011373;
[doi:10.1177/20499361211011373](https://doi.org/10.1177/20499361211011373)
- Barbieri E *et al.* (2021). **Development of a Weighted-Incidence
Syndromic Combination Antibiogram (WISCA) to guide the choice of the
empiric antibiotic treatment for urinary tract infection in paediatric
patients: a Bayesian approach** *Antimicrobial Resistance & Infection
Control* May 1;10(1):74;
[doi:10.1186/s13756-021-00939-2](https://doi.org/10.1186/s13756-021-00939-2)
- **M39 Analysis and Presentation of Cumulative Antimicrobial
Susceptibility Test Data, 5th Edition**, 2022, *Clinical and
Laboratory Standards Institute (CLSI)*.
<https://clsi.org/standards/products/microbiology/documents/m39/>.
## Arguments
- x:
@@ -127,21 +156,6 @@ knit_print(x, italicise = TRUE,
- `carbapenems() + c("", aminoglycosides())`
- mo_transform:
A character to transform microorganism input - must be `"name"`,
`"shortname"` (default), `"gramstain"`, or one of the column names of
the
[microorganisms](https://amr-for-r.org/reference/microorganisms.md)
data set: `"mo"`, `"fullname"`, `"status"`, `"kingdom"`, `"phylum"`,
`"class"`, `"order"`, `"family"`, `"genus"`, `"species"`,
`"subspecies"`, `"rank"`, `"ref"`, `"oxygen_tolerance"`, `"source"`,
`"lpsn"`, `"lpsn_parent"`, `"lpsn_renamed_to"`, `"mycobank"`,
`"mycobank_parent"`, `"mycobank_renamed_to"`, `"gbif"`,
`"gbif_parent"`, `"gbif_renamed_to"`, `"prevalence"`, or `"snomed"`.
Can also be `NULL` to not transform the input or `NA` to consider all
microorganisms 'unknown'.
- ab_transform:
A character to transform antimicrobial input - must be one of the
@@ -154,21 +168,10 @@ knit_print(x, italicise = TRUE,
- syndromic_group:
A column name of \`x\`, or values calculated to split rows of \`x\`,
e.g. by using \[ifelse()\] or
\[\`case_when()\`\]\[dplyr::case_when()\]. See \*Examples\*.
- add_total_n:
*(deprecated in favour of `formatting_type`)* A
[logical](https://rdrr.io/r/base/logical.html) to indicate whether
`n_tested` available numbers per pathogen should be added to the table
(default is `TRUE`). This will add the lowest and highest number of
available isolates per antimicrobial (e.g, if for *E. coli* 200
isolates are available for ciprofloxacin and 150 for amoxicillin, the
returned number will be "150-200"). This option is unavailable when
`wisca = TRUE`; in that case, use `retrieve_wisca_parameters()` to get
the parameters used for WISCA.
A column name of `x`, or values calculated to split rows of `x`, e.g.
by using [`ifelse()`](https://rdrr.io/r/base/ifelse.html) or
[`case_when()`](https://dplyr.tidyverse.org/reference/case-and-replace-when.html).
See *Examples*.
- only_all_tested:
@@ -200,13 +203,6 @@ knit_print(x, italicise = TRUE,
Language to translate text, which defaults to the system language (see
[`get_AMR_locale()`](https://amr-for-r.org/reference/translate.md)).
- minimum:
The minimum allowed number of available (tested) isolates. Any isolate
count lower than `minimum` will return `NA` with a warning. The
default number of `30` isolates is advised by the Clinical and
Laboratory Standards Institute (CLSI) as best practice, see *Source*.
- combine_SI:
A [logical](https://rdrr.io/r/base/logical.html) to indicate whether
@@ -223,15 +219,6 @@ knit_print(x, italicise = TRUE,
A [logical](https://rdrr.io/r/base/logical.html) to indicate whether
the antimicrobial columns must be sorted on name.
- wisca:
A [logical](https://rdrr.io/r/base/logical.html) to indicate whether a
Weighted-Incidence Syndromic Combination Antibiogram (WISCA) must be
generated (default is `FALSE`). This will use a Bayesian decision
model to estimate regimen coverage probabilities using [Monte Carlo
simulations](https://en.wikipedia.org/wiki/Monte_Carlo_method). Set
`simulations`, `conf_interval`, and `interval_side` to adjust.
- simulations:
(for WISCA) a numerical value to set the number of Monte Carlo
@@ -266,10 +253,57 @@ knit_print(x, italicise = TRUE,
- ...:
When used in [R Markdown or
Quarto](https://rdrr.io/pkg/knitr/man/kable.html): arguments passed on
to [`knitr::kable()`](https://rdrr.io/pkg/knitr/man/kable.html)
(otherwise, has no use).
Currently unused.
- mo_transform:
A character to transform microorganism input - must be `"name"`,
`"shortname"` (default), `"gramstain"`, or one of the column names of
the
[microorganisms](https://amr-for-r.org/reference/microorganisms.md)
data set: `"mo"`, `"fullname"`, `"status"`, `"domain"`, `"kingdom"`,
`"phylum"`, `"class"`, `"order"`, `"family"`, `"genus"`, `"species"`,
`"subspecies"`, `"rank"`, `"ref"`, `"oxygen_tolerance"`,
`"morphology"`, `"source"`, `"lpsn"`, `"lpsn_parent"`,
`"lpsn_renamed_to"`, `"mycobank"`, `"mycobank_parent"`,
`"mycobank_renamed_to"`, `"gbif"`, `"gbif_parent"`,
`"gbif_renamed_to"`, `"prevalence"`, or `"snomed"`. Can also be `NULL`
to not transform the input or `NA` to consider all microorganisms
'unknown'.
- add_total_n:
*(deprecated in favour of `formatting_type`)* A
[logical](https://rdrr.io/r/base/logical.html) to indicate whether
`n_tested` available numbers per pathogen should be added to the table
(default is `TRUE`). This will add the lowest and highest number of
available isolates per antimicrobial (e.g., if for *E. coli* 200
isolates are available for ciprofloxacin and 150 for amoxicillin, the
returned number will be "150-200"). This option is unavailable when
`wisca = TRUE`; in that case, use `retrieve_wisca_parameters()` to get
the parameters used for WISCA.
- minimum:
The minimum allowed number of available (tested) isolates. Any isolate
count lower than `minimum` will return `NA` with a warning. The
default number of `30` isolates is advised by the Clinical and
Laboratory Standards Institute (CLSI) as best practice, see *Source*.
- wisca:
A [logical](https://rdrr.io/r/base/logical.html) to indicate whether a
Weighted-Incidence Syndromic Combination Antibiogram (WISCA) must be
generated (default is `FALSE`). This will use a Bayesian decision
model to estimate regimen coverage probabilities using [Monte Carlo
simulations](https://en.wikipedia.org/wiki/Monte_Carlo_method). Per
[doi:10.1093/jac/dkv397](https://doi.org/10.1093/jac/dkv397) ,
susceptibility priors are \\\beta(0.5, 0.5)\\ (Jeffreys) and
intrinsically resistant pairs (based on
[intrinsic_resistant](https://amr-for-r.org/reference/intrinsic_resistant.md))
use \\\beta(1, 9999)\\.
Set `simulations`, `conf_interval`, and `interval_side` to adjust.
- wisca_model:
@@ -279,6 +313,42 @@ knit_print(x, italicise = TRUE,
An `antibiogram()` object.
- geom:
The plotting style for the point estimate. One of `"pointrange"`
(default), `"point"`, `"col"`/`"bar"`, or `"errorbar"`. `"pointrange"`
is recommended for coverage data: bars imply a meaningful baseline at
zero, which coverage estimates rarely have.
- ci:
Logical, whether to draw the credible/confidence interval. Defaults to
`TRUE`. Ignored (forced `TRUE`) when `geom = "pointrange"` or
`"errorbar"`, since the interval is intrinsic to those geoms.
- sort:
Logical, whether to order regimens by coverage. Defaults to `TRUE`.
When faceted (per pathogen) or grouped (syndromic), ordering is
applied within each panel/group.
- flip:
Logical, whether to draw regimens on the y-axis (horizontal). Defaults
to `NULL`, which flips automatically when any regimen label exceeds 20
characters (long combination names read poorly on the x-axis). Set
`TRUE`/`FALSE` to override.
- caption:
Text to show as caption, will explain non-inferiority for WISCA
models.
- wisca_plot_type:
Either `"susceptibility_incidence"` (default) or
`"posterior_coverage"`.
- italicise:
A [logical](https://rdrr.io/r/base/logical.html) to indicate whether
@@ -377,73 +447,37 @@ apparent from the susceptibility and its confidence level.
Set `digits` (defaults to `0`) to alter the rounding of the
susceptibility percentages.
### Antibiogram Types
### When to Use WISCA vs. Traditional Antibiograms
There are various antibiogram types, as summarised by Klinker *et al.*
(2021,
[doi:10.1177/20499361211011373](https://doi.org/10.1177/20499361211011373)
), and they are all supported by `antibiogram()`.
), and they are all supported by `antibiogram()`: traditional,
combination, syndromic, and WISCA.
For clinical coverage estimations, **use WISCA whenever possible**,
since it provides more precise coverage estimates by accounting for
pathogen incidence and antimicrobial susceptibility, as has been shown
by Bielicki *et al.* (2020,
[doi:10.1001/jamanetworkopen.2019.21124](https://doi.org/10.1001/jamanetworkopen.2019.21124)
). See the section *Explaining WISCA* on this page. Do note that WISCA
is pathogen-agnostic, meaning that the outcome is not stratied by
pathogen, but rather by syndrome.
**If your goal is to guide empirical therapy, use WISCA.** Traditional
antibiograms fragment susceptibility information by species, but at the
point of prescribing, the clinician does not know which species is
causing the infection. WISCA shifts the unit of analysis from the
isolate to the patient: it estimates the probability that a regimen will
cover the infection, given the local distribution of causative
pathogens. It evaluates combination regimens, weights by pathogen
incidence, and provides credible intervals that honestly communicate
uncertainty. Hebert *et al.* (2012) demonstrated this concretely for the
first time: ciprofloxacin showed 84% susceptibility against *E. coli* in
the traditional antibiogram, but WISCA coverage was only 62% for UTI and
37% for abdominal infections, because other species (including
intrinsically resistant enterococci) contribute substantially to these
syndromes. Note that WISCA is pathogen-agnostic: the outcome is not
stratified by species, but by syndrome.
1. **Traditional Antibiogram**
**Traditional, combination, and syndromic antibiograms remain
appropriate for AMR surveillance**, i.e., tracking resistance trends per
species over time. They are the right tool when the question is *"how
resistant is species X to drug Y in our setting?"* rather than *"what
regimen best covers this syndrome?"*.
Case example: Susceptibility of *Pseudomonas aeruginosa* to
piperacillin/tazobactam (TZP)
Code example:
antibiogram(your_data,
antimicrobials = "TZP")
2. **Combination Antibiogram**
Case example: Additional susceptibility of *Pseudomonas aeruginosa*
to TZP + tobramycin versus TZP alone
Code example:
antibiogram(your_data,
antimicrobials = c("TZP", "TZP+TOB", "TZP+GEN"))
3. **Syndromic Antibiogram**
Case example: Susceptibility of *Pseudomonas aeruginosa* to TZP
among respiratory specimens (obtained among ICU patients only)
Code example:
antibiogram(your_data,
antimicrobials = penicillins(),
syndromic_group = "ward")
4. **Weighted-Incidence Syndromic Combination Antibiogram (WISCA)**
WISCA can be applied to any antibiogram, see the section *Explaining
WISCA* on this page for more information.
Code example:
antibiogram(your_data,
antimicrobials = c("TZP", "TZP+TOB", "TZP+GEN"),
wisca = TRUE)
# this is equal to:
wisca(your_data,
antimicrobials = c("TZP", "TZP+TOB", "TZP+GEN"))
WISCA uses a sophisticated Bayesian decision model to combine both
local and pooled antimicrobial resistance data. This approach not
only evaluates local patterns but can also draw on multi-centre data
sets to improve regimen accuracy, even in low-incidence infections
like paediatric bloodstream infections (BSIs).
All four types are demonstrated in the *Examples* section below.
### Grouped tibbles
@@ -458,65 +492,6 @@ Code example:
group_by(has_sepsis, is_neonate, sex) %>%
wisca(antimicrobials = c("TZP", "TZP+TOB", "TZP+GEN"))
### Stepped Approach for Clinical Insight
In clinical practice, antimicrobial coverage decisions evolve as more
microbiological data becomes available. This theoretical stepped
approach ensures empirical coverage can continuously assessed to improve
patient outcomes:
1. **Initial Empirical Therapy (Admission / Pre-Culture Data)**
At admission, no pathogen information is available.
- Action: broad-spectrum coverage is based on local resistance
patterns and syndromic antibiograms. Using the pathogen-agnostic
yet incidence-weighted WISCA is preferred.
- Code example:
antibiogram(your_data,
antimicrobials = selected_regimens,
mo_transform = NA) # all pathogens set to `NA`
# preferred: use WISCA
wisca(your_data,
antimicrobials = selected_regimens)
2. **Refinement with Gram Stain Results**
When a blood culture becomes positive, the Gram stain provides an
initial and crucial first stratification (Gram-positive vs.
Gram-negative).
- Action: narrow coverage based on Gram stain-specific resistance
patterns.
- Code example:
antibiogram(your_data,
antimicrobials = selected_regimens,
mo_transform = "gramstain") # all pathogens set to Gram-pos/Gram-neg
3. **Definitive Therapy Based on Species Identification**
After cultivation of the pathogen, full pathogen identification
allows precise targeting of therapy.
- Action: adjust treatment to pathogen-specific antibiograms,
minimizing resistance risks.
- Code example:
antibiogram(your_data,
antimicrobials = selected_regimens,
mo_transform = "shortname") # all pathogens set to 'G. species', e.g., E. coli
By structuring antibiograms around this stepped approach, clinicians can
make data-driven adjustments at each stage, ensuring optimal empirical
and targeted therapy while reducing unnecessary broad-spectrum
antimicrobial use.
### Inclusion in Combination Antibiograms
Note that for combination antibiograms, it is important to realise that
@@ -567,14 +542,78 @@ transform the output of `antibiogram()` to your needs, e.g. with
## Explaining WISCA
WISCA (Weighted-Incidence Syndromic Combination Antibiogram) estimates
the probability of empirical coverage for combination regimens.
the probability that an empirical antimicrobial regimen will provide
adequate coverage for a given infection syndrome, before the causative
pathogen has been identified.
It weights susceptibility by pathogen prevalence within a clinical
syndrome and provides credible intervals around the expected coverage.
It does so by combining two quantities: the relative incidence of each
pathogen within the syndrome (modelled as a Dirichlet distribution) and
the susceptibility of each pathogen to the regimen (modelled as Beta
distributions). These are combined via Monte Carlo simulation to produce
a coverage estimate with a credible interval.
For more background, interpretation, and examples, see [the WISCA
**Prior distributions:** Pathogen incidence uses a non-informative
\\Dirichlet(1, 1, \ldots, 1)\\ prior. Susceptibility proportions use the
Jeffreys prior, \\\beta(0.5, 0.5)\\, except for pathogen-drug
combinations with known intrinsic resistance, which use a strongly
informative \\\beta(1, 9999)\\ prior that forces near-zero
susceptibility regardless of observed data. Intrinsic resistance is
determined using the
[intrinsic_resistant](https://amr-for-r.org/reference/intrinsic_resistant.md)
data set, which is based on ['EUCAST Expected Resistant Phenotypes'
v1.2](https://www.eucast.org/bacteria/important-additional-information/expert-rules/)
(2023).
**Interpreting the output:** Overlapping credible intervals between
regimens indicate no significant difference in coverage; if a
narrower-spectrum regimen overlaps with a broader one, the
narrower-spectrum option may be preferred on stewardship grounds.
Non-overlapping intervals indicate a clinically meaningful difference.
For small sample sizes, consider pooling data from multiple sites to
improve precision, provided pathogen distributions are sufficiently
similar (Bielicki *et al.*, 2016).
For the full mathematical derivation and worked examples, see the [WISCA
vignette](https://amr-for-r.org/articles/WISCA.html).
## References
- Hebert C *et al.* (2012). **Demonstration of the weighted-incidence
syndromic combination antibiogram: an empiric prescribing decision
aid.** *Infection Control & Hospital Epidemiology* 33(4):381-388;
[doi:10.1086/664768](https://doi.org/10.1086/664768)
- Bielicki JA *et al.* (2016). **Selecting appropriate empirical
antibiotic regimens for paediatric bloodstream infections: application
of a Bayesian decision model to local and pooled antimicrobial
resistance surveillance data.** *Journal of Antimicrobial
Chemotherapy* 71(3):794-802;
[doi:10.1093/jac/dkv397](https://doi.org/10.1093/jac/dkv397)
- Cook A *et al.* (2022). **Improving empiric antibiotic prescribing in
pediatric bloodstream infections: a potential application of
weighted-incidence syndromic combination antibiograms (WISCA).**
*Expert Review of Anti-infective Therapy* 20(3):445-456;
[doi:10.1080/14787210.2021.1967145](https://doi.org/10.1080/14787210.2021.1967145)
- Klinker KP *et al.* (2021). **Antimicrobial stewardship and
antibiograms: importance of moving beyond traditional antibiograms.**
*Therapeutic Advances in Infectious Disease*, May
5;8:20499361211011373;
[doi:10.1177/20499361211011373](https://doi.org/10.1177/20499361211011373)
- Barbieri E *et al.* (2021). **Development of a Weighted-Incidence
Syndromic Combination Antibiogram (WISCA) to guide the choice of the
empiric antibiotic treatment for urinary tract infection in paediatric
patients: a Bayesian approach.** *Antimicrobial Resistance & Infection
Control* May 1;10(1):74;
[doi:10.1186/s13756-021-00939-2](https://doi.org/10.1186/s13756-021-00939-2)
- **M39 Analysis and Presentation of Cumulative Antimicrobial
Susceptibility Test Data, 5th Edition**, 2022, *Clinical and
Laboratory Standards Institute (CLSI)*.
<https://clsi.org/standards/products/microbiology/documents/m39/>.
## Author
Implementation: Dr. Larisse Bolton and Dr. Matthijs Berends
@@ -607,7 +646,105 @@ example_isolates
#> # IPM <sir>, MEM <sir>, MTR <sir>, CHL <sir>, COL <sir>, MUP <sir>, …
# \donttest{
# Traditional antibiogram ----------------------------------------------
# WISCA antibiogram (recommended for empirical therapy) -----------------
# basic WISCA: empirical coverage per regimen, weighted by pathogen
# incidence, with 95% credible intervals
wisca(example_isolates,
antimicrobials = c("AMC", "AMC+CIP", "AMC+GEN")
)
#> Warning: invalid microorganism code, NA generated
#> # A tibble: 1 × 3
#> # Type: Weighted-Incidence Syndromic Combination Antibiogram (WISCA)
#> # Cred. interval: 95%
#> # Simulations: 1000 per stratum
#> `Amoxicillin/clavulanic acid` Amoxicillin/clavulanic …¹ Amoxicillin/clavulan…²
#> <chr> <chr> <chr>
#> 1 74.2% (72.1-76.1%) 88.8% (87.2-90.3%) 90.8% (89.3-92.1%)
#> # abbreviated names: ¹​`Amoxicillin/clavulanic acid + Ciprofloxacin`,
#> # ²​`Amoxicillin/clavulanic acid + Gentamicin`
#> # Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,
#> # and use `wisca_plot()` to assess the simulation outcomes.
#> # Or, use it directly in R Markdown or Quarto, see `antibiogram()`.
# equivalent using antibiogram():
antibiogram(example_isolates,
antimicrobials = c("AMC", "AMC+CIP", "AMC+GEN"),
wisca = TRUE
)
#> Warning: invalid microorganism code, NA generated
#> # A tibble: 1 × 3
#> # Type: Weighted-Incidence Syndromic Combination Antibiogram (WISCA)
#> # Cred. interval: 95%
#> # Simulations: 1000 per stratum
#> `Amoxicillin/clavulanic acid` Amoxicillin/clavulanic …¹ Amoxicillin/clavulan…²
#> <chr> <chr> <chr>
#> 1 74.2% (72.2-76.1%) 88.8% (87.1-90.4%) 90.8% (89.4-92.2%)
#> # abbreviated names: ¹​`Amoxicillin/clavulanic acid + Ciprofloxacin`,
#> # ²​`Amoxicillin/clavulanic acid + Gentamicin`
#> # Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,
#> # and use `wisca_plot()` to assess the simulation outcomes.
#> # Or, use it directly in R Markdown or Quarto, see `antibiogram()`.
# stratified by syndrome or clinical group
out <- wisca(example_isolates,
antimicrobials = c("TZP", "TZP+TOB", "TZP+GEN"),
syndromic_group = "ward"
)
#> Warning: invalid microorganism code, NA generated
out
#> # A tibble: 3 × 4
#> # Type: Weighted-Incidence Syndromic Combination Antibiogram (WISCA)
#> # Cred. interval: 95%
#> # Simulations: 1000 per stratum
#> `Syndromic Group` `Piperacillin/tazobactam` Piperacillin/tazobactam + Gentam…¹
#> <chr> <chr> <chr>
#> 1 Clinical 74.5% (68.8-79.8%) 93.6% (91.9-95.1%)
#> 2 ICU 57.1% (48.2-65.9%) 86.7% (83.3-89.9%)
#> 3 Outpatient 57.5% (46-68.7%) 76.5% (70.6-82.2%)
#> # abbreviated name: ¹​`Piperacillin/tazobactam + Gentamicin`
#> # 1 more variable: `Piperacillin/tazobactam + Tobramycin` <chr>
#> # Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,
#> # and use `wisca_plot()` to assess the simulation outcomes.
#> # Or, use it directly in R Markdown or Quarto, see `antibiogram()`.
wisca_plot(out)
# stratified using grouped tibbles (e.g. by age and gender)
if (requireNamespace("dplyr")) {
library(dplyr)
example_isolates %>%
top_n_microorganisms(n = 10) %>%
group_by(
age_group = age_groups(age, c(25, 50, 75)),
gender) %>%
wisca(antimicrobials = c("TZP", "TZP+TOB", "TZP+GEN"))
}
#> Using column mo as input for `col_mo`.
#> Warning: Number of tested isolates should exceed 30 for each regimen (and group). WISCA
#> coverage estimates might be inaccurate.
#> # A tibble: 8 × 5
#> # Type: Weighted-Incidence Syndromic Combination Antibiogram (WISCA)
#> # Cred. interval: 95%
#> # Simulations: 1000 per stratum
#> age_group gender `Piperacillin/tazobactam` Piperacillin/tazobactam + Gentami…¹
#> <chr> <chr> <chr> <chr>
#> 1 0-24 F 57.7% (29.5-82.6%) 70.5% (45.9-89.1%)
#> 2 0-24 M 59.1% (33-84.2%) 76.1% (55.7-90.6%)
#> 3 25-49 F 67.4% (43.3-90.5%) 93.8% (87.8-97.9%)
#> 4 25-49 M 56.8% (27.5-86.5%) 90.9% (82.4-96.8%)
#> 5 50-74 F 68% (53.3-82.3%) 96.9% (94.7-98.5%)
#> 6 50-74 M 67.1% (56.5-77.5%) 96.8% (94.2-98.8%)
#> 7 75+ F 73.3% (62.9-83.6%) 97.7% (96-98.9%)
#> 8 75+ M 74% (64.2-83.1%) 97.9% (96.1-99.1%)
#> # abbreviated name: ¹​`Piperacillin/tazobactam + Gentamicin`
#> # 1 more variable: `Piperacillin/tazobactam + Tobramycin` <chr>
#> # Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,
#> # and use `wisca_plot()` to assess the simulation outcomes.
#> # Or, use it directly in R Markdown or Quarto, see `antibiogram()`.
# Traditional antibiogram (for AMR surveillance) ------------------------
antibiogram(example_isolates,
antimicrobials = c(aminoglycosides(), carbapenems())
@@ -615,8 +752,9 @@ antibiogram(example_isolates,
#> For `aminoglycosides()` using columns GEN (gentamicin), TOB (tobramycin), AMK
#> (amikacin), and KAN (kanamycin)
#> For `carbapenems()` using columns IPM (imipenem) and MEM (meropenem)
#> # An antibiogram: 10 × 7
#> # Type: Non-WISCA with 95% CI
#> # A tibble: 10 × 7
#> # Type: Traditional Antibiogram
#> # Conf. interval: 95%
#> Pathogen Amikacin Gentamicin Imipenem Kanamycin Meropenem Tobramycin
#> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 CoNS 0% (0-8%,N… 86% (82-9… 52% (37… 0% (0-8%… 52% (37-… 22% (12-3…
@@ -630,7 +768,7 @@ antibiogram(example_isolates,
#> 9 S. hominis NA 92% (84-9… NA NA NA 85% (74-9…
#> 10 S. pneumoniae 0% (0-3%,N… 0% (0-3%,… NA 0% (0-3%… NA 0% (0-3%,…
#> # Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,
#> # or use it directly in R Markdown or Quarto, see ?antibiogram
#> # or use it directly in R Markdown or Quarto, see `antibiogram()`.
antibiogram(example_isolates,
antimicrobials = aminoglycosides(),
@@ -639,43 +777,26 @@ antibiogram(example_isolates,
)
#> For `aminoglycosides()` using columns GEN (gentamicin), TOB (tobramycin), AMK
#> (amikacin), and KAN (kanamycin)
#> # An antibiogram: 2 × 5
#> # Type: Non-WISCA with 95% CI
#> # A tibble: 2 × 5
#> # Type: Traditional Antibiogram
#> # Conf. interval: 95%
#> Pathogen J01GB01 J01GB03 J01GB04 J01GB06
#> <chr> <chr> <chr> <chr> <chr>
#> 1 Gram-negative 96% (94-97%,N=686) 96% (95-98%,N=684) 0% (0-10%,N=35) 98% (96-…
#> 2 Gram-positive 34% (31-38%,N=665) 63% (60-66%,N=1170) 0% (0-1%,N=436) 0% (0-1%…
#> # Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,
#> # or use it directly in R Markdown or Quarto, see ?antibiogram
antibiogram(example_isolates,
antimicrobials = carbapenems(),
ab_transform = "name",
mo_transform = "name"
)
#> For `carbapenems()` using columns IPM (imipenem) and MEM (meropenem)
#> # An antibiogram: 5 × 3
#> # Type: Non-WISCA with 95% CI
#> Pathogen Imipenem Meropenem
#> <chr> <chr> <chr>
#> 1 Coagulase-negative Staphylococcus (CoNS) 52% (37-67%,N=48) 52% (37-67%,N=4…
#> 2 Enterococcus faecalis 100% (91-100%,N=38) NA
#> 3 Escherichia coli 100% (99-100%,N=422) 100% (99-100%,N…
#> 4 Klebsiella pneumoniae 100% (93-100%,N=51) 100% (93-100%,N…
#> 5 Proteus mirabilis 94% (79-99%,N=32) NA
#> # Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,
#> # or use it directly in R Markdown or Quarto, see ?antibiogram
#> # or use it directly in R Markdown or Quarto, see `antibiogram()`.
# Combined antibiogram -------------------------------------------------
# Combination antibiogram (for AMR surveillance) ------------------------
# combined antimicrobials yield higher empiric coverage
antibiogram(example_isolates,
antimicrobials = c("TZP", "TZP+TOB", "TZP+GEN"),
mo_transform = "gramstain"
)
#> # An antibiogram: 2 × 4
#> # Type: Non-WISCA with 95% CI
#> # A tibble: 2 × 4
#> # Type: Combination Antibiogram
#> # Conf. interval: 95%
#> Pathogen Piperacillin/tazobac…¹ Piperacillin/tazobac…² Piperacillin/tazobac…³
#> <chr> <chr> <chr> <chr>
#> 1 Gram-neg… 88% (85-91%,N=641) 99% (97-99%,N=691) 98% (97-99%,N=693)
@@ -684,7 +805,7 @@ antibiogram(example_isolates,
#> # ²​`Piperacillin/tazobactam + Gentamicin`,
#> # ³​`Piperacillin/tazobactam + Tobramycin`
#> # Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,
#> # or use it directly in R Markdown or Quarto, see ?antibiogram
#> # or use it directly in R Markdown or Quarto, see `antibiogram()`.
# you can use any antimicrobial selector with `+` too:
antibiogram(example_isolates,
@@ -692,8 +813,9 @@ antibiogram(example_isolates,
mo_transform = "gramstain"
)
#> For `ureidopenicillins()` using column TZP (piperacillin/tazobactam)
#> # An antibiogram: 2 × 4
#> # Type: Non-WISCA with 95% CI
#> # A tibble: 2 × 4
#> # Type: Combination Antibiogram
#> # Conf. interval: 95%
#> Pathogen Piperacillin/tazobac…¹ Piperacillin/tazobac…² Piperacillin/tazobac…³
#> <chr> <chr> <chr> <chr>
#> 1 Gram-neg… 88% (85-91%,N=641) 99% (97-99%,N=691) 98% (97-99%,N=693)
@@ -702,7 +824,7 @@ antibiogram(example_isolates,
#> # ²​`Piperacillin/tazobactam + Gentamicin`,
#> # ³​`Piperacillin/tazobactam + Tobramycin`
#> # Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,
#> # or use it directly in R Markdown or Quarto, see ?antibiogram
#> # or use it directly in R Markdown or Quarto, see `antibiogram()`.
# names of antimicrobials do not need to resemble columns exactly:
antibiogram(example_isolates,
@@ -711,19 +833,19 @@ antibiogram(example_isolates,
ab_transform = "name",
sep = " & "
)
#> # An antibiogram: 2 × 3
#> # Type: Non-WISCA with 95% CI
#> # A tibble: 2 × 3
#> # Type: Traditional Antibiogram
#> # Conf. interval: 95%
#> Pathogen Ciprofloxacin `Ciprofloxacin & Gentamicin`
#> <chr> <chr> <chr>
#> 1 Gram-negative 91% (88-93%,N=684) 99% (97-99%,N=694)
#> 2 Gram-positive 77% (74-80%,N=724) 93% (91-94%,N=847)
#> # Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,
#> # or use it directly in R Markdown or Quarto, see ?antibiogram
#> # or use it directly in R Markdown or Quarto, see `antibiogram()`.
# Syndromic antibiogram ------------------------------------------------
# Syndromic antibiogram (for AMR surveillance) --------------------------
# the data set could contain a filter for e.g. respiratory specimens
antibiogram(example_isolates,
antimicrobials = c(aminoglycosides(), carbapenems()),
syndromic_group = "ward"
@@ -731,8 +853,9 @@ antibiogram(example_isolates,
#> For `aminoglycosides()` using columns GEN (gentamicin), TOB (tobramycin), AMK
#> (amikacin), and KAN (kanamycin)
#> For `carbapenems()` using columns IPM (imipenem) and MEM (meropenem)
#> # An antibiogram: 14 × 8
#> # Type: Non-WISCA with 95% CI
#> # A tibble: 14 × 8
#> # Type: Syndromic Antibiogram
#> # Conf. interval: 95%
#> `Syndromic Group` Pathogen Amikacin Gentamicin Imipenem Kanamycin Meropenem
#> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 Clinical CoNS NA 89% (84-9… 57% (39… NA 57% (39-…
@@ -751,14 +874,12 @@ antibiogram(example_isolates,
#> 14 ICU S. pneumo… 0% (0-1… 0% (0-12%… NA 0% (0-12… NA
#> # 1 more variable: Tobramycin <chr>
#> # Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,
#> # or use it directly in R Markdown or Quarto, see ?antibiogram
# now define a data set with only E. coli
ex1 <- example_isolates[which(mo_genus() == "Escherichia"), ]
#> Using column mo as input for `mo_genus()`
#> # or use it directly in R Markdown or Quarto, see `antibiogram()`.
# with a custom language, though this will be determined automatically
# (i.e., this table will be in Spanish on Spanish systems)
ex1 <- example_isolates[which(mo_genus() == "Escherichia"), ]
#> Using column mo as input for `mo_genus()`
antibiogram(ex1,
antimicrobials = aminoglycosides(),
ab_transform = "name",
@@ -769,45 +890,25 @@ antibiogram(ex1,
)
#> For `aminoglycosides()` using columns GEN (gentamicin), TOB (tobramycin), AMK
#> (amikacin), and KAN (kanamycin)
#> # An antibiogram: 2 × 5
#> # Type: Non-WISCA with 95% CI
#> # A tibble: 2 × 5
#> # Type: Syndromic Antibiogram
#> # Conf. interval: 95%
#> `Grupo sindrómico` Patógeno Amikacina Gentamicina Tobramicina
#> <chr> <chr> <chr> <chr> <chr>
#> 1 No UCI E. coli 100% (97-100%,N=119) 98% (96-99%,N=32… 98% (96-99…
#> 2 UCI E. coli 100% (93-100%,N=52) 99% (95-100%,N=1… 96% (92-99…
#> # Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,
#> # or use it directly in R Markdown or Quarto, see ?antibiogram
# WISCA antibiogram ----------------------------------------------------
# WISCA are not stratified by species, but rather on syndromes
antibiogram(example_isolates,
antimicrobials = c("TZP", "TZP+TOB", "TZP+GEN"),
syndromic_group = "ward",
wisca = TRUE
)
#> # An antibiogram: 3 × 4
#> # Type: WISCA with 95% CI
#> `Syndromic Group` `Piperacillin/tazobactam` Piperacillin/tazobactam + Gentam…¹
#> <chr> <chr> <chr>
#> 1 Clinical 73.4% (68.3-78.6%) 92.3% (90.7-93.7%)
#> 2 ICU 57.4% (49.7-65.4%) 84.9% (82.1-87.6%)
#> 3 Outpatient 57% (47.4-66.7%) 74.6% (68.8-79.8%)
#> # abbreviated name: ¹​`Piperacillin/tazobactam + Gentamicin`
#> # 1 more variable: `Piperacillin/tazobactam + Tobramycin` <chr>
#> # Use `ggplot2::autoplot()` or base R `plot()` to create a plot of this antibiogram,
#> # or use it directly in R Markdown or Quarto, see ?antibiogram
#> # or use it directly in R Markdown or Quarto, see `antibiogram()`.
# Print the output for R Markdown / Quarto -----------------------------
ureido <- antibiogram(example_isolates,
ureido <- wisca(example_isolates,
antimicrobials = ureidopenicillins(),
syndromic_group = "ward",
wisca = TRUE
syndromic_group = "ward"
)
#> For `ureidopenicillins()` using column TZP (piperacillin/tazobactam)
#> Warning: invalid microorganism code, NA generated
# in an Rmd file, you would just need to return `ureido` in a chunk,
# but to be explicit here:
@@ -818,9 +919,9 @@ if (requireNamespace("knitr")) {
#>
#> |Syndromic Group |Piperacillin/tazobactam |
#> |:---------------|:-----------------------|
#> |Clinical |73.5% (68-79%) |
#> |ICU |57.7% (49.9-65.3%) |
#> |Outpatient |56.9% (46.5-66.8%) |
#> |Clinical |74.6% (68.9-80%) |
#> |ICU |57% (49.1-65.8%) |
#> |Outpatient |57.4% (45.6-68.4%) |
# Generate plots with ggplot2 or base R --------------------------------
@@ -829,11 +930,11 @@ ab1 <- antibiogram(example_isolates,
antimicrobials = c("AMC", "CIP", "TZP", "TZP+TOB"),
mo_transform = "gramstain"
)
ab2 <- antibiogram(example_isolates,
ab2 <- wisca(example_isolates,
antimicrobials = c("AMC", "CIP", "TZP", "TZP+TOB"),
mo_transform = "gramstain",
syndromic_group = "ward"
)
#> Warning: invalid microorganism code, NA generated
if (requireNamespace("ggplot2")) {
ggplot2::autoplot(ab1)
@@ -848,5 +949,6 @@ plot(ab1)
plot(ab2)
# }
```

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Antimicrobial Selectors — antimicrobial_selectors • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Antimicrobial Selectors — antimicrobial_selectors"><meta name="description" content='These functions allow for filtering rows and selecting columns based on antimicrobial test results that are of a specific antimicrobial class or group, without the need to define the columns or antimicrobial abbreviations. They can be used in base R, tidyverse, tidymodels, and data.table.
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Antimicrobial Selectors — antimicrobial_selectors • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Antimicrobial Selectors — antimicrobial_selectors"><meta name="description" content='These functions allow for filtering rows and selecting columns based on antimicrobial test results that are of a specific antimicrobial class or group, without the need to define the columns or antimicrobial abbreviations. They can be used in base R, tidyverse, tidymodels, and data.table.
Simply puy, if you have a column name that resembles an antimicrobial drug, it will be picked up by any of these functions that matches its pharmaceutical class, code or name: column names "cefazolin", "kefzol", "CZO" and "J01DB04" would all be included in the following selection:
library(dplyr)
my_data_with_all_these_columns %&amp;gt;%
@@ -17,7 +17,7 @@ my_data_with_all_these_columns %&amp;gt;%
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -69,8 +69,12 @@ my_data_with_all_these_columns %&amp;gt;%
<div class="section level2">
<h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">aminoglycosides</span><span class="op">(</span>only_sir_columns <span class="op">=</span> <span class="cn">FALSE</span>, only_treatable <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> return_all <span class="op">=</span> <span class="cn">TRUE</span>, <span class="va">...</span><span class="op">)</span></span>
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">aminoglycosides</span><span class="op">(</span></span>
<span> only_sir_columns <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> only_treatable <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> return_all <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> <span class="va">...</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="fu">aminopenicillins</span><span class="op">(</span>only_sir_columns <span class="op">=</span> <span class="cn">FALSE</span>, return_all <span class="op">=</span> <span class="cn">TRUE</span>, <span class="va">...</span><span class="op">)</span></span>
<span></span>
@@ -78,41 +82,68 @@ my_data_with_all_these_columns %&amp;gt;%
<span></span>
<span><span class="fu">antimycobacterials</span><span class="op">(</span>only_sir_columns <span class="op">=</span> <span class="cn">FALSE</span>, return_all <span class="op">=</span> <span class="cn">TRUE</span>, <span class="va">...</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">betalactams</span><span class="op">(</span>only_sir_columns <span class="op">=</span> <span class="cn">FALSE</span>, only_treatable <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> return_all <span class="op">=</span> <span class="cn">TRUE</span>, <span class="va">...</span><span class="op">)</span></span>
<span><span class="fu">betalactams</span><span class="op">(</span></span>
<span> only_sir_columns <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> only_treatable <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> return_all <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> <span class="va">...</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="fu">betalactams_with_inhibitor</span><span class="op">(</span>only_sir_columns <span class="op">=</span> <span class="cn">FALSE</span>, return_all <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> <span class="va">...</span><span class="op">)</span></span>
<span><span class="fu">betalactams_with_inhibitor</span><span class="op">(</span>only_sir_columns <span class="op">=</span> <span class="cn">FALSE</span>, return_all <span class="op">=</span> <span class="cn">TRUE</span>, <span class="va">...</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">carbapenems</span><span class="op">(</span>only_sir_columns <span class="op">=</span> <span class="cn">FALSE</span>, only_treatable <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> return_all <span class="op">=</span> <span class="cn">TRUE</span>, <span class="va">...</span><span class="op">)</span></span>
<span><span class="fu">carbapenems</span><span class="op">(</span></span>
<span> only_sir_columns <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> only_treatable <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> return_all <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> <span class="va">...</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="fu">cephalosporins</span><span class="op">(</span>only_sir_columns <span class="op">=</span> <span class="cn">FALSE</span>, only_treatable <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> return_all <span class="op">=</span> <span class="cn">TRUE</span>, <span class="va">...</span><span class="op">)</span></span>
<span><span class="fu">cephalosporins</span><span class="op">(</span></span>
<span> only_sir_columns <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> only_treatable <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> return_all <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> <span class="va">...</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="fu">cephalosporins_1st</span><span class="op">(</span>only_sir_columns <span class="op">=</span> <span class="cn">FALSE</span>, return_all <span class="op">=</span> <span class="cn">TRUE</span>, <span class="va">...</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">cephalosporins_2nd</span><span class="op">(</span>only_sir_columns <span class="op">=</span> <span class="cn">FALSE</span>, return_all <span class="op">=</span> <span class="cn">TRUE</span>, <span class="va">...</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">cephalosporins_3rd</span><span class="op">(</span>only_sir_columns <span class="op">=</span> <span class="cn">FALSE</span>, only_treatable <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> return_all <span class="op">=</span> <span class="cn">TRUE</span>, <span class="va">...</span><span class="op">)</span></span>
<span><span class="fu">cephalosporins_3rd</span><span class="op">(</span></span>
<span> only_sir_columns <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> only_treatable <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> return_all <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> <span class="va">...</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="fu">cephalosporins_4th</span><span class="op">(</span>only_sir_columns <span class="op">=</span> <span class="cn">FALSE</span>, return_all <span class="op">=</span> <span class="cn">TRUE</span>, <span class="va">...</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">cephalosporins_5th</span><span class="op">(</span>only_sir_columns <span class="op">=</span> <span class="cn">FALSE</span>, return_all <span class="op">=</span> <span class="cn">TRUE</span>, <span class="va">...</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">fluoroquinolones</span><span class="op">(</span>only_sir_columns <span class="op">=</span> <span class="cn">FALSE</span>, only_treatable <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> return_all <span class="op">=</span> <span class="cn">TRUE</span>, <span class="va">...</span><span class="op">)</span></span>
<span><span class="fu">fluoroquinolones</span><span class="op">(</span></span>
<span> only_sir_columns <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> only_treatable <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> return_all <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> <span class="va">...</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="fu">glycopeptides</span><span class="op">(</span>only_sir_columns <span class="op">=</span> <span class="cn">FALSE</span>, return_all <span class="op">=</span> <span class="cn">TRUE</span>, <span class="va">...</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">ionophores</span><span class="op">(</span>only_sir_columns <span class="op">=</span> <span class="cn">FALSE</span>, return_all <span class="op">=</span> <span class="cn">TRUE</span>, <span class="va">...</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">isoxazolylpenicillins</span><span class="op">(</span>only_sir_columns <span class="op">=</span> <span class="cn">FALSE</span>, only_treatable <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> return_all <span class="op">=</span> <span class="cn">TRUE</span>, <span class="va">...</span><span class="op">)</span></span>
<span><span class="fu">isoxazolylpenicillins</span><span class="op">(</span></span>
<span> only_sir_columns <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> only_treatable <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> return_all <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> <span class="va">...</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="fu">lincosamides</span><span class="op">(</span>only_sir_columns <span class="op">=</span> <span class="cn">FALSE</span>, only_treatable <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> return_all <span class="op">=</span> <span class="cn">TRUE</span>, <span class="va">...</span><span class="op">)</span></span>
<span><span class="fu">lincosamides</span><span class="op">(</span></span>
<span> only_sir_columns <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> only_treatable <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> return_all <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> <span class="va">...</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="fu">lipoglycopeptides</span><span class="op">(</span>only_sir_columns <span class="op">=</span> <span class="cn">FALSE</span>, return_all <span class="op">=</span> <span class="cn">TRUE</span>, <span class="va">...</span><span class="op">)</span></span>
<span></span>
@@ -132,11 +163,19 @@ my_data_with_all_these_columns %&amp;gt;%
<span></span>
<span><span class="fu">phosphonics</span><span class="op">(</span>only_sir_columns <span class="op">=</span> <span class="cn">FALSE</span>, return_all <span class="op">=</span> <span class="cn">TRUE</span>, <span class="va">...</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">polymyxins</span><span class="op">(</span>only_sir_columns <span class="op">=</span> <span class="cn">FALSE</span>, only_treatable <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> return_all <span class="op">=</span> <span class="cn">TRUE</span>, <span class="va">...</span><span class="op">)</span></span>
<span><span class="fu">polymyxins</span><span class="op">(</span></span>
<span> only_sir_columns <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> only_treatable <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> return_all <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> <span class="va">...</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="fu">quinolones</span><span class="op">(</span>only_sir_columns <span class="op">=</span> <span class="cn">FALSE</span>, only_treatable <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> return_all <span class="op">=</span> <span class="cn">TRUE</span>, <span class="va">...</span><span class="op">)</span></span>
<span><span class="fu">quinolones</span><span class="op">(</span></span>
<span> only_sir_columns <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> only_treatable <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> return_all <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> <span class="va">...</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="fu">rifamycins</span><span class="op">(</span>only_sir_columns <span class="op">=</span> <span class="cn">FALSE</span>, return_all <span class="op">=</span> <span class="cn">TRUE</span>, <span class="va">...</span><span class="op">)</span></span>
<span></span>
@@ -146,25 +185,43 @@ my_data_with_all_these_columns %&amp;gt;%
<span></span>
<span><span class="fu">sulfonamides</span><span class="op">(</span>only_sir_columns <span class="op">=</span> <span class="cn">FALSE</span>, return_all <span class="op">=</span> <span class="cn">TRUE</span>, <span class="va">...</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">tetracyclines</span><span class="op">(</span>only_sir_columns <span class="op">=</span> <span class="cn">FALSE</span>, only_treatable <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> return_all <span class="op">=</span> <span class="cn">TRUE</span>, <span class="va">...</span><span class="op">)</span></span>
<span><span class="fu">tetracyclines</span><span class="op">(</span></span>
<span> only_sir_columns <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> only_treatable <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> return_all <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> <span class="va">...</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="fu">trimethoprims</span><span class="op">(</span>only_sir_columns <span class="op">=</span> <span class="cn">FALSE</span>, return_all <span class="op">=</span> <span class="cn">TRUE</span>, <span class="va">...</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">ureidopenicillins</span><span class="op">(</span>only_sir_columns <span class="op">=</span> <span class="cn">FALSE</span>, return_all <span class="op">=</span> <span class="cn">TRUE</span>, <span class="va">...</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">amr_class</span><span class="op">(</span><span class="va">amr_class</span>, only_sir_columns <span class="op">=</span> <span class="cn">FALSE</span>, only_treatable <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> return_all <span class="op">=</span> <span class="cn">TRUE</span>, <span class="va">...</span><span class="op">)</span></span>
<span><span class="fu">amr_class</span><span class="op">(</span></span>
<span> <span class="va">amr_class</span>,</span>
<span> only_sir_columns <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> only_treatable <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> return_all <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> <span class="va">...</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="fu">amr_selector</span><span class="op">(</span><span class="va">filter</span>, only_sir_columns <span class="op">=</span> <span class="cn">FALSE</span>, only_treatable <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> return_all <span class="op">=</span> <span class="cn">TRUE</span>, <span class="va">...</span><span class="op">)</span></span>
<span><span class="fu">amr_selector</span><span class="op">(</span></span>
<span> <span class="va">filter</span>,</span>
<span> only_sir_columns <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> only_treatable <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> return_all <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> <span class="va">...</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="fu">administrable_per_os</span><span class="op">(</span>only_sir_columns <span class="op">=</span> <span class="cn">FALSE</span>, return_all <span class="op">=</span> <span class="cn">TRUE</span>, <span class="va">...</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">administrable_iv</span><span class="op">(</span>only_sir_columns <span class="op">=</span> <span class="cn">FALSE</span>, return_all <span class="op">=</span> <span class="cn">TRUE</span>, <span class="va">...</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">not_intrinsic_resistant</span><span class="op">(</span>only_sir_columns <span class="op">=</span> <span class="cn">FALSE</span>, col_mo <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> version_expected_phenotypes <span class="op">=</span> <span class="fl">1.2</span>, <span class="va">...</span><span class="op">)</span></span></code></pre></div>
<span><span class="fu">not_intrinsic_resistant</span><span class="op">(</span></span>
<span> only_sir_columns <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> col_mo <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> version_expected_phenotypes <span class="op">=</span> <span class="fl">1.2</span>,</span>
<span> <span class="va">...</span></span>
<span><span class="op">)</span></span></code></pre></div>
</div>
<div class="section level2">

View File

@@ -18,8 +18,12 @@ pharmaceutical class, code or name: column names "cefazolin", "kefzol",
## Usage
``` r
aminoglycosides(only_sir_columns = FALSE, only_treatable = TRUE,
return_all = TRUE, ...)
aminoglycosides(
only_sir_columns = FALSE,
only_treatable = TRUE,
return_all = TRUE,
...
)
aminopenicillins(only_sir_columns = FALSE, return_all = TRUE, ...)
@@ -27,41 +31,68 @@ antifungals(only_sir_columns = FALSE, return_all = TRUE, ...)
antimycobacterials(only_sir_columns = FALSE, return_all = TRUE, ...)
betalactams(only_sir_columns = FALSE, only_treatable = TRUE,
return_all = TRUE, ...)
betalactams(
only_sir_columns = FALSE,
only_treatable = TRUE,
return_all = TRUE,
...
)
betalactams_with_inhibitor(only_sir_columns = FALSE, return_all = TRUE,
...)
betalactams_with_inhibitor(only_sir_columns = FALSE, return_all = TRUE, ...)
carbapenems(only_sir_columns = FALSE, only_treatable = TRUE,
return_all = TRUE, ...)
carbapenems(
only_sir_columns = FALSE,
only_treatable = TRUE,
return_all = TRUE,
...
)
cephalosporins(only_sir_columns = FALSE, only_treatable = TRUE,
return_all = TRUE, ...)
cephalosporins(
only_sir_columns = FALSE,
only_treatable = TRUE,
return_all = TRUE,
...
)
cephalosporins_1st(only_sir_columns = FALSE, return_all = TRUE, ...)
cephalosporins_2nd(only_sir_columns = FALSE, return_all = TRUE, ...)
cephalosporins_3rd(only_sir_columns = FALSE, only_treatable = TRUE,
return_all = TRUE, ...)
cephalosporins_3rd(
only_sir_columns = FALSE,
only_treatable = TRUE,
return_all = TRUE,
...
)
cephalosporins_4th(only_sir_columns = FALSE, return_all = TRUE, ...)
cephalosporins_5th(only_sir_columns = FALSE, return_all = TRUE, ...)
fluoroquinolones(only_sir_columns = FALSE, only_treatable = TRUE,
return_all = TRUE, ...)
fluoroquinolones(
only_sir_columns = FALSE,
only_treatable = TRUE,
return_all = TRUE,
...
)
glycopeptides(only_sir_columns = FALSE, return_all = TRUE, ...)
ionophores(only_sir_columns = FALSE, return_all = TRUE, ...)
isoxazolylpenicillins(only_sir_columns = FALSE, only_treatable = TRUE,
return_all = TRUE, ...)
isoxazolylpenicillins(
only_sir_columns = FALSE,
only_treatable = TRUE,
return_all = TRUE,
...
)
lincosamides(only_sir_columns = FALSE, only_treatable = TRUE,
return_all = TRUE, ...)
lincosamides(
only_sir_columns = FALSE,
only_treatable = TRUE,
return_all = TRUE,
...
)
lipoglycopeptides(only_sir_columns = FALSE, return_all = TRUE, ...)
@@ -81,11 +112,19 @@ phenicols(only_sir_columns = FALSE, return_all = TRUE, ...)
phosphonics(only_sir_columns = FALSE, return_all = TRUE, ...)
polymyxins(only_sir_columns = FALSE, only_treatable = TRUE,
return_all = TRUE, ...)
polymyxins(
only_sir_columns = FALSE,
only_treatable = TRUE,
return_all = TRUE,
...
)
quinolones(only_sir_columns = FALSE, only_treatable = TRUE,
return_all = TRUE, ...)
quinolones(
only_sir_columns = FALSE,
only_treatable = TRUE,
return_all = TRUE,
...
)
rifamycins(only_sir_columns = FALSE, return_all = TRUE, ...)
@@ -95,25 +134,43 @@ streptogramins(only_sir_columns = FALSE, return_all = TRUE, ...)
sulfonamides(only_sir_columns = FALSE, return_all = TRUE, ...)
tetracyclines(only_sir_columns = FALSE, only_treatable = TRUE,
return_all = TRUE, ...)
tetracyclines(
only_sir_columns = FALSE,
only_treatable = TRUE,
return_all = TRUE,
...
)
trimethoprims(only_sir_columns = FALSE, return_all = TRUE, ...)
ureidopenicillins(only_sir_columns = FALSE, return_all = TRUE, ...)
amr_class(amr_class, only_sir_columns = FALSE, only_treatable = TRUE,
return_all = TRUE, ...)
amr_class(
amr_class,
only_sir_columns = FALSE,
only_treatable = TRUE,
return_all = TRUE,
...
)
amr_selector(filter, only_sir_columns = FALSE, only_treatable = TRUE,
return_all = TRUE, ...)
amr_selector(
filter,
only_sir_columns = FALSE,
only_treatable = TRUE,
return_all = TRUE,
...
)
administrable_per_os(only_sir_columns = FALSE, return_all = TRUE, ...)
administrable_iv(only_sir_columns = FALSE, return_all = TRUE, ...)
not_intrinsic_resistant(only_sir_columns = FALSE, col_mo = NULL,
version_expected_phenotypes = 1.2, ...)
not_intrinsic_resistant(
only_sir_columns = FALSE,
col_mo = NULL,
version_expected_phenotypes = 1.2,
...
)
```
## Arguments

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Data Sets with 625 Antimicrobial Drugs — antimicrobials • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Data Sets with 625 Antimicrobial Drugs — antimicrobials"><meta name="description" content="Two data sets containing all antimicrobials and antivirals. Use as.ab() or one of the ab_* functions to retrieve values from the antimicrobials data set. Three identifiers are included in this data set: an antimicrobial ID (ab, primarily used in this package) as defined by WHONET/EARS-Net, an ATC code (atc) as defined by the WHO, and a Compound ID (cid) as found in PubChem. Other properties in this data set are derived from one or more of these codes. Note that some drugs have multiple ATC codes.
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Data Sets with 625 Antimicrobial Drugs — antimicrobials • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Data Sets with 625 Antimicrobial Drugs — antimicrobials"><meta name="description" content="Two data sets containing all antimicrobials and antivirals. Use as.ab() or one of the ab_* functions to retrieve values from the antimicrobials data set. Three identifiers are included in this data set: an antimicrobial ID (ab, primarily used in this package) as defined by WHONET/EARS-Net, an ATC code (atc) as defined by the WHO, and a Compound ID (cid) as found in PubChem. Other properties in this data set are derived from one or more of these codes. Note that some drugs have multiple ATC codes.
The antibiotics data set has been renamed to antimicrobials. The old name will be removed in a future version."><meta property="og:description" content="Two data sets containing all antimicrobials and antivirals. Use as.ab() or one of the ab_* functions to retrieve values from the antimicrobials data set. Three identifiers are included in this data set: an antimicrobial ID (ab, primarily used in this package) as defined by WHONET/EARS-Net, an ATC code (atc) as defined by the WHO, and a Compound ID (cid) as found in PubChem. Other properties in this data set are derived from one or more of these codes. Note that some drugs have multiple ATC codes.
The antibiotics data set has been renamed to antimicrobials. The old name will be removed in a future version."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -9,7 +9,7 @@ The antibiotics data set has been renamed to antimicrobials. The old name will b
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -75,12 +75,12 @@ The antibiotics data set has been renamed to antimicrobials. The old name will b
<li><p><code>cid</code><br> Compound ID as found in PubChem. <em><strong>This is a unique identifier.</strong></em></p></li>
<li><p><code>name</code><br> Official name as used by WHONET/EARS-Net or the WHO. <em><strong>This is a unique identifier.</strong></em></p></li>
<li><p><code>group</code><br> One or more short and concise group names, based on WHONET and WHOCC definitions</p></li>
<li><p><code>atc</code><br> ATC codes (Anatomical Therapeutic Chemical) as defined by the WHOCC, like <code>J01CR02</code> (last updated May 4th, 2025):</p></li>
<li><p><code>atc</code><br> ATC codes (Anatomical Therapeutic Chemical) as defined by the WHOCC, like <code>J01CR02</code> (last updated 4th of May, 2025):</p></li>
<li><p><code>atc_group1</code><br> Official pharmacological subgroup (3rd level ATC code) as defined by the WHOCC, like <code>"Macrolides, lincosamides and streptogramins"</code></p></li>
<li><p><code>atc_group2</code><br> Official chemical subgroup (4th level ATC code) as defined by the WHOCC, like <code>"Macrolides"</code></p></li>
<li><p><code>abbr</code><br> List of abbreviations as used in many countries, also for antimicrobial susceptibility testing (AST)</p></li>
<li><p><code>synonyms</code><br> Synonyms (often trade names) of a drug, as found in PubChem based on their compound ID</p></li>
</ul><p>ATC properties (last updated May 4th, 2025):</p><ul><li><p><code>oral_ddd</code><br> Defined Daily Dose (DDD), oral treatment, currently available for 180 drugs</p></li>
</ul><p>ATC properties (last updated 4th of May, 2025):</p><ul><li><p><code>oral_ddd</code><br> Defined Daily Dose (DDD), oral treatment, currently available for 180 drugs</p></li>
<li><p><code>oral_units</code><br> Units of <code>oral_ddd</code></p></li>
<li><p><code>iv_ddd</code><br> Defined Daily Dose (DDD), parenteral (intravenous) treatment, currently available for 153 drugs</p></li>
<li><p><code>iv_units</code><br> Units of <code>iv_ddd</code></p></li>
@@ -106,13 +106,6 @@ The antibiotics data set has been renamed to antimicrobials. The old name will b
<p>An object of class <code>deprecated_amr_dataset</code> (inherits from <code>tbl_df</code>, <code>tbl</code>, <code>data.frame</code>) with 505 rows and 14 columns.</p>
<p>An object of class <code>tbl_df</code> (inherits from <code>tbl</code>, <code>data.frame</code>) with 120 rows and 11 columns.</p>
</div>
<div class="section level2">
<h2 id="source">Source<a class="anchor" aria-label="anchor" href="#source"></a></h2>
<ul><li><p>WHO Collaborating Centre for Drug Statistics Methodology, Guidelines for ATC classification and DDD assignment, Oslo Accessed from <a href="https://atcddd.fhi.no/atc_ddd_index/" class="external-link">https://atcddd.fhi.no/atc_ddd_index/</a> on May 4th, 2025.</p></li>
<li><p>Logical Observation Identifiers Names and Codes (LOINC), Version 2.76 (18 September, 2023). Accessed from <a href="https://loinc.org" class="external-link">https://loinc.org</a> on October 19th, 2023.</p></li>
<li><p>European Commission Public Health PHARMACEUTICALS - COMMUNITY REGISTER: <a href="https://ec.europa.eu/health/documents/community-register/html/reg_hum_atc.htm" class="external-link">https://ec.europa.eu/health/documents/community-register/html/reg_hum_atc.htm</a></p></li>
</ul></div>
<div class="section level2">
<h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2>
<p>Properties that are based on an ATC code are only available when an ATC is available. These properties are: <code>atc_group1</code>, <code>atc_group2</code>, <code>oral_ddd</code>, <code>oral_units</code>, <code>iv_ddd</code> and <code>iv_units</code>. Do note that ATC codes are not unique. For example, J01CR02 is officially the ATC code for "amoxicillin and beta-lactamase inhibitor". Consequently, these two items from the antimicrobials data set both return <code>"J01CR02"</code>:</p>
@@ -132,11 +125,18 @@ The antibiotics data set has been renamed to antimicrobials. The old name will b
<h2 id="whocc">WHOCC<a class="anchor" aria-label="anchor" href="#whocc"></a></h2>
<p>This package contains <strong>all ~550 antibiotic, antimycotic and antiviral drugs</strong> and their Anatomical Therapeutic Chemical (ATC) codes, ATC groups and Defined Daily Dose (DDD) from the World Health Organization Collaborating Centre for Drug Statistics Methodology (WHOCC, <a href="https://atcddd.fhi.no" class="external-link">https://atcddd.fhi.no</a>) and the Pharmaceuticals Community Register of the European Commission (<a href="https://ec.europa.eu/health/documents/community-register/html/reg_hum_atc.htm" class="external-link">https://ec.europa.eu/health/documents/community-register/html/reg_hum_atc.htm</a>).</p>
<p>This package contains <strong>all ~550 antibiotic, antimycotic and antiviral drugs</strong> and their Anatomical Therapeutic Chemical (ATC) codes, ATC groups and Defined Daily Dose (DDD) from the World Health Organization Collaborating Centre for Drug Statistics Methodology (WHOCC, <a href="https://atcddd.fhi.no" class="external-link">https://atcddd.fhi.no</a>) and the Pharmaceuticals Community Register of the European Commission (<a href="https://ec.europa.eu/health/documents/community-register/html/index_en.htm" class="external-link">https://ec.europa.eu/health/documents/community-register/html/index_en.htm</a>).</p>
<p>These have become the gold standard for international drug utilisation monitoring and research.</p>
<p>The WHOCC is located in Oslo at the Norwegian Institute of Public Health and funded by the Norwegian government. The European Commission is the executive of the European Union and promotes its general interest.</p>
<p><strong>NOTE: The WHOCC copyright does not allow use for commercial purposes, unlike any other info from this package.</strong> See <a href="https://atcddd.fhi.no/copyright_disclaimer/." class="external-link">https://atcddd.fhi.no/copyright_disclaimer/.</a></p>
</div>
<div class="section level2">
<h2 id="references">References<a class="anchor" aria-label="anchor" href="#references"></a></h2>
<ul><li><p>WHO Collaborating Centre for Drug Statistics Methodology, Guidelines for ATC classification and DDD assignment, Oslo Accessed from <a href="https://atcddd.fhi.no/atc_ddd_index/" class="external-link">https://atcddd.fhi.no/atc_ddd_index/</a> on 4th of May, 2025.</p></li>
<li><p>Logical Observation Identifiers Names and Codes (LOINC), Version 2.76 (18 September, 2023). Accessed from <a href="https://loinc.org" class="external-link">https://loinc.org</a> on 19th of October, 2023.</p></li>
<li><p>European Commission Public Health PHARMACEUTICALS - COMMUNITY REGISTER: <a href="https://ec.europa.eu/health/documents/community-register/html/index_en.htm" class="external-link">https://ec.europa.eu/health/documents/community-register/html/index_en.htm</a></p></li>
</ul></div>
<div class="section level2">
<h2 id="see-also">See also<a class="anchor" aria-label="anchor" href="#see-also"></a></h2>
<div class="dont-index"><p><a href="microorganisms.html">microorganisms</a>, <a href="intrinsic_resistant.html">intrinsic_resistant</a></p></div>

View File

@@ -45,7 +45,7 @@ antivirals
- `atc`
ATC codes (Anatomical Therapeutic Chemical) as defined by the WHOCC,
like `J01CR02` (last updated May 4th, 2025):
like `J01CR02` (last updated 4th of May, 2025):
- `atc_group1`
Official pharmacological subgroup (3rd level ATC code) as defined by
@@ -63,7 +63,7 @@ antivirals
Synonyms (often trade names) of a drug, as found in PubChem based on
their compound ID
ATC properties (last updated May 4th, 2025):
ATC properties (last updated 4th of May, 2025):
- `oral_ddd`
Defined Daily Dose (DDD), oral treatment, currently available for 180
@@ -143,20 +143,6 @@ An object of class `deprecated_amr_dataset` (inherits from `tbl_df`,
An object of class `tbl_df` (inherits from `tbl`, `data.frame`) with 120
rows and 11 columns.
## Source
- WHO Collaborating Centre for Drug Statistics Methodology, Guidelines
for ATC classification and DDD assignment, Oslo Accessed from
<https://atcddd.fhi.no/atc_ddd_index/> on May 4th, 2025.
- Logical Observation Identifiers Names and Codes (LOINC), Version 2.76
(18 September, 2023). Accessed from <https://loinc.org> on October
19th, 2023.
- European Commission Public Health PHARMACEUTICALS - COMMUNITY
REGISTER:
<https://ec.europa.eu/health/documents/community-register/html/reg_hum_atc.htm>
## Details
Properties that are based on an ATC code are only available when an ATC
@@ -197,7 +183,7 @@ groups and Defined Daily Dose (DDD) from the World Health Organization
Collaborating Centre for Drug Statistics Methodology (WHOCC,
<https://atcddd.fhi.no>) and the Pharmaceuticals Community Register of
the European Commission
(<https://ec.europa.eu/health/documents/community-register/html/reg_hum_atc.htm>).
(<https://ec.europa.eu/health/documents/community-register/html/index_en.htm>).
These have become the gold standard for international drug utilisation
monitoring and research.
@@ -210,6 +196,20 @@ executive of the European Union and promotes its general interest.
unlike any other info from this package.** See
<https://atcddd.fhi.no/copyright_disclaimer/.>
## References
- WHO Collaborating Centre for Drug Statistics Methodology, Guidelines
for ATC classification and DDD assignment, Oslo Accessed from
<https://atcddd.fhi.no/atc_ddd_index/> on 4th of May, 2025.
- Logical Observation Identifiers Names and Codes (LOINC), Version 2.76
(18 September, 2023). Accessed from <https://loinc.org> on 19th of
October, 2023.
- European Commission Public Health PHARMACEUTICALS - COMMUNITY
REGISTER:
<https://ec.europa.eu/health/documents/community-register/html/index_en.htm>
## See also
[microorganisms](https://amr-for-r.org/reference/microorganisms.md),

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Transform Input to an Antibiotic ID — as.ab • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Transform Input to an Antibiotic ID — as.ab"><meta name="description" content="Use this function to determine the antimicrobial drug code of one or more antimicrobials. The data set antimicrobials will be searched for abbreviations, official names and synonyms (brand names)."><meta property="og:description" content="Use this function to determine the antimicrobial drug code of one or more antimicrobials. The data set antimicrobials will be searched for abbreviations, official names and synonyms (brand names)."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Transform Input to an Antibiotic ID — as.ab • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Transform Input to an Antibiotic ID — as.ab"><meta name="description" content="Use this function to determine the antimicrobial drug code of one or more antimicrobials. The data set antimicrobials will be searched for abbreviations, official names and synonyms (brand names)."><meta property="og:description" content="Use this function to determine the antimicrobial drug code of one or more antimicrobials. The data set antimicrobials will be searched for abbreviations, official names and synonyms (brand names)."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -55,8 +55,13 @@
<div class="section level2">
<h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">as.ab</span><span class="op">(</span><span class="va">x</span>, flag_multiple_results <span class="op">=</span> <span class="cn">TRUE</span>, language <span class="op">=</span> <span class="fu"><a href="translate.html">get_AMR_locale</a></span><span class="op">(</span><span class="op">)</span>,</span>
<span> info <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/interactive.html" class="external-link">interactive</a></span><span class="op">(</span><span class="op">)</span>, <span class="va">...</span><span class="op">)</span></span>
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">as.ab</span><span class="op">(</span></span>
<span> <span class="va">x</span>,</span>
<span> flag_multiple_results <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> language <span class="op">=</span> <span class="fu"><a href="translate.html">get_AMR_locale</a></span><span class="op">(</span><span class="op">)</span>,</span>
<span> info <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/interactive.html" class="external-link">interactive</a></span><span class="op">(</span><span class="op">)</span>,</span>
<span> <span class="va">...</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="fu">is.ab</span><span class="op">(</span><span class="va">x</span><span class="op">)</span></span>
<span></span>
@@ -110,13 +115,13 @@
<p>World Health Organization (WHO) Collaborating Centre for Drug Statistics Methodology: <a href="https://atcddd.fhi.no/atc_ddd_index/" class="external-link">https://atcddd.fhi.no/atc_ddd_index/</a></p>
<p>European Commission Public Health PHARMACEUTICALS - COMMUNITY REGISTER: <a href="https://health.ec.europa.eu/documents/community-register/html/reg_hum_atc.htm" class="external-link">https://health.ec.europa.eu/documents/community-register/html/reg_hum_atc.htm</a></p>
<p>European Commission Public Health PHARMACEUTICALS - COMMUNITY REGISTER: <a href="https://health.ec.europa.eu/documents/community-register/html/index_en.htm" class="external-link">https://health.ec.europa.eu/documents/community-register/html/index_en.htm</a></p>
</div>
<div class="section level2">
<h2 id="whocc">WHOCC<a class="anchor" aria-label="anchor" href="#whocc"></a></h2>
<p>This package contains <strong>all ~550 antibiotic, antimycotic and antiviral drugs</strong> and their Anatomical Therapeutic Chemical (ATC) codes, ATC groups and Defined Daily Dose (DDD) from the World Health Organization Collaborating Centre for Drug Statistics Methodology (WHOCC, <a href="https://atcddd.fhi.no" class="external-link">https://atcddd.fhi.no</a>) and the Pharmaceuticals Community Register of the European Commission (<a href="https://ec.europa.eu/health/documents/community-register/html/reg_hum_atc.htm" class="external-link">https://ec.europa.eu/health/documents/community-register/html/reg_hum_atc.htm</a>).</p>
<p>This package contains <strong>all ~550 antibiotic, antimycotic and antiviral drugs</strong> and their Anatomical Therapeutic Chemical (ATC) codes, ATC groups and Defined Daily Dose (DDD) from the World Health Organization Collaborating Centre for Drug Statistics Methodology (WHOCC, <a href="https://atcddd.fhi.no" class="external-link">https://atcddd.fhi.no</a>) and the Pharmaceuticals Community Register of the European Commission (<a href="https://ec.europa.eu/health/documents/community-register/html/index_en.htm" class="external-link">https://ec.europa.eu/health/documents/community-register/html/index_en.htm</a>).</p>
<p>These have become the gold standard for international drug utilisation monitoring and research.</p>
<p>The WHOCC is located in Oslo at the Norwegian Institute of Public Health and funded by the Norwegian government. The European Commission is the executive of the European Union and promotes its general interest.</p>
<p><strong>NOTE: The WHOCC copyright does not allow use for commercial purposes, unlike any other info from this package.</strong> See <a href="https://atcddd.fhi.no/copyright_disclaimer/." class="external-link">https://atcddd.fhi.no/copyright_disclaimer/.</a></p>

View File

@@ -9,8 +9,13 @@ names).
## Usage
``` r
as.ab(x, flag_multiple_results = TRUE, language = get_AMR_locale(),
info = interactive(), ...)
as.ab(
x,
flag_multiple_results = TRUE,
language = get_AMR_locale(),
info = interactive(),
...
)
is.ab(x)
@@ -102,7 +107,7 @@ World Health Organization (WHO) Collaborating Centre for Drug Statistics
Methodology: <https://atcddd.fhi.no/atc_ddd_index/>
European Commission Public Health PHARMACEUTICALS - COMMUNITY REGISTER:
<https://health.ec.europa.eu/documents/community-register/html/reg_hum_atc.htm>
<https://health.ec.europa.eu/documents/community-register/html/index_en.htm>
## WHOCC
@@ -112,7 +117,7 @@ groups and Defined Daily Dose (DDD) from the World Health Organization
Collaborating Centre for Drug Statistics Methodology (WHOCC,
<https://atcddd.fhi.no>) and the Pharmaceuticals Community Register of
the European Commission
(<https://ec.europa.eu/health/documents/community-register/html/reg_hum_atc.htm>).
(<https://ec.europa.eu/health/documents/community-register/html/index_en.htm>).
These have become the gold standard for international drug utilisation
monitoring and research.

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Transform Input to an Antiviral Drug ID — as.av • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Transform Input to an Antiviral Drug ID — as.av"><meta name="description" content="Use this function to determine the antiviral drug code of one or more antiviral drugs. The data set antivirals will be searched for abbreviations, official names and synonyms (brand names)."><meta property="og:description" content="Use this function to determine the antiviral drug code of one or more antiviral drugs. The data set antivirals will be searched for abbreviations, official names and synonyms (brand names)."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Transform Input to an Antiviral Drug ID — as.av • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Transform Input to an Antiviral Drug ID — as.av"><meta name="description" content="Use this function to determine the antiviral drug code of one or more antiviral drugs. The data set antivirals will be searched for abbreviations, official names and synonyms (brand names)."><meta property="og:description" content="Use this function to determine the antiviral drug code of one or more antiviral drugs. The data set antivirals will be searched for abbreviations, official names and synonyms (brand names)."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -105,7 +105,7 @@
<h2 id="whocc">WHOCC<a class="anchor" aria-label="anchor" href="#whocc"></a></h2>
<p>This package contains <strong>all ~550 antibiotic, antimycotic and antiviral drugs</strong> and their Anatomical Therapeutic Chemical (ATC) codes, ATC groups and Defined Daily Dose (DDD) from the World Health Organization Collaborating Centre for Drug Statistics Methodology (WHOCC, <a href="https://atcddd.fhi.no" class="external-link">https://atcddd.fhi.no</a>) and the Pharmaceuticals Community Register of the European Commission (<a href="https://ec.europa.eu/health/documents/community-register/html/reg_hum_atc.htm" class="external-link">https://ec.europa.eu/health/documents/community-register/html/reg_hum_atc.htm</a>).</p>
<p>This package contains <strong>all ~550 antibiotic, antimycotic and antiviral drugs</strong> and their Anatomical Therapeutic Chemical (ATC) codes, ATC groups and Defined Daily Dose (DDD) from the World Health Organization Collaborating Centre for Drug Statistics Methodology (WHOCC, <a href="https://atcddd.fhi.no" class="external-link">https://atcddd.fhi.no</a>) and the Pharmaceuticals Community Register of the European Commission (<a href="https://ec.europa.eu/health/documents/community-register/html/index_en.htm" class="external-link">https://ec.europa.eu/health/documents/community-register/html/index_en.htm</a>).</p>
<p>These have become the gold standard for international drug utilisation monitoring and research.</p>
<p>The WHOCC is located in Oslo at the Norwegian Institute of Public Health and funded by the Norwegian government. The European Commission is the executive of the European Union and promotes its general interest.</p>
<p><strong>NOTE: The WHOCC copyright does not allow use for commercial purposes, unlike any other info from this package.</strong> See <a href="https://atcddd.fhi.no/copyright_disclaimer/." class="external-link">https://atcddd.fhi.no/copyright_disclaimer/.</a></p>

View File

@@ -93,7 +93,7 @@ groups and Defined Daily Dose (DDD) from the World Health Organization
Collaborating Centre for Drug Statistics Methodology (WHOCC,
<https://atcddd.fhi.no>) and the Pharmaceuticals Community Register of
the European Commission
(<https://ec.europa.eu/health/documents/community-register/html/reg_hum_atc.htm>).
(<https://ec.europa.eu/health/documents/community-register/html/index_en.htm>).
These have become the gold standard for international drug utilisation
monitoring and research.

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Transform Input to Disk Diffusion Diameters — as.disk • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Transform Input to Disk Diffusion Diameters — as.disk"><meta name="description" content="This transforms a vector to a new class disk, which is a disk diffusion growth zone size (around an antibiotic disk) in millimetres between 0 and 50."><meta property="og:description" content="This transforms a vector to a new class disk, which is a disk diffusion growth zone size (around an antibiotic disk) in millimetres between 0 and 50."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Transform Input to Disk Diffusion Diameters — as.disk • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Transform Input to Disk Diffusion Diameters — as.disk"><meta name="description" content="This transforms a vector to a new class disk, which is a disk diffusion growth zone size (around an antibiotic disk) in millimetres between 0 and 50."><meta property="og:description" content="This transforms a vector to a new class disk, which is a disk diffusion growth zone size (around an antibiotic disk) in millimetres between 0 and 50."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Transform Input to Minimum Inhibitory Concentrations (MIC) — as.mic • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Transform Input to Minimum Inhibitory Concentrations (MIC) — as.mic"><meta name="description" content='This transforms vectors to a new class mic, which treats the input as decimal numbers, while maintaining operators (such as "&amp;gt;=") and only allowing valid MIC values known to the field of (medical) microbiology.'><meta property="og:description" content='This transforms vectors to a new class mic, which treats the input as decimal numbers, while maintaining operators (such as "&amp;gt;=") and only allowing valid MIC values known to the field of (medical) microbiology.'><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Transform Input to Minimum Inhibitory Concentrations (MIC) — as.mic • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Transform Input to Minimum Inhibitory Concentrations (MIC) — as.mic"><meta name="description" content='This transforms vectors to a new class mic, which treats the input as decimal numbers, while maintaining operators (such as "&amp;gt;=") and only allowing valid MIC values known to the field of (medical) microbiology.'><meta property="og:description" content='This transforms vectors to a new class mic, which treats the input as decimal numbers, while maintaining operators (such as "&amp;gt;=") and only allowing valid MIC values known to the field of (medical) microbiology.'><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -55,15 +55,19 @@
<div class="section level2">
<h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">as.mic</span><span class="op">(</span><span class="va">x</span>, na.rm <span class="op">=</span> <span class="cn">FALSE</span>, keep_operators <span class="op">=</span> <span class="st">"all"</span>,</span>
<span> round_to_next_log2 <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></span>
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">as.mic</span><span class="op">(</span><span class="va">x</span>, na.rm <span class="op">=</span> <span class="cn">FALSE</span>, keep_operators <span class="op">=</span> <span class="st">"all"</span>, round_to_next_log2 <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">is.mic</span><span class="op">(</span><span class="va">x</span><span class="op">)</span></span>
<span></span>
<span><span class="va">NA_mic_</span></span>
<span></span>
<span><span class="fu">rescale_mic</span><span class="op">(</span><span class="va">x</span>, <span class="va">mic_range</span>, keep_operators <span class="op">=</span> <span class="st">"edges"</span>, as.mic <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> round_to_next_log2 <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></span>
<span><span class="fu">rescale_mic</span><span class="op">(</span></span>
<span> <span class="va">x</span>,</span>
<span> <span class="va">mic_range</span>,</span>
<span> keep_operators <span class="op">=</span> <span class="st">"edges"</span>,</span>
<span> as.mic <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> round_to_next_log2 <span class="op">=</span> <span class="cn">FALSE</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="fu">mic_p50</span><span class="op">(</span><span class="va">x</span>, na.rm <span class="op">=</span> <span class="cn">FALSE</span>, <span class="va">...</span><span class="op">)</span></span>
<span></span>
@@ -98,7 +102,7 @@
<dt id="arg-as-mic">as.mic<a class="anchor" aria-label="anchor" href="#arg-as-mic"></a></dt>
<dd><p>A [logical] to indicate whether the `mic` class should be kept - the default is `TRUE` for [rescale_mic()] and `FALSE` for [droplevels()]. When setting this to `FALSE` in [rescale_mic()], the output will have factor levels that acknowledge `mic_range`.</p></dd>
<dd><p>A <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate whether the <code>mic</code> class should be kept - the default is <code>TRUE</code> for <code>rescale_mic()</code> and <code>FALSE</code> for <code><a href="https://rdrr.io/pkg/data.table/man/fdroplevels.html" class="external-link">droplevels()</a></code>. When setting this to <code>FALSE</code> in <code>rescale_mic()</code>, the output will have factor levels that acknowledge <code>mic_range</code>.</p></dd>
<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt>
@@ -107,45 +111,45 @@
</dl></div>
<div class="section level2">
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
<p>Ordered [factor] with additional class [`mic`], that in mathematical operations acts as a [numeric] vector. Bear in mind that the outcome of any mathematical operation on MICs will return a [numeric] value.</p>
<p>Ordered <a href="https://rdrr.io/pkg/data.table/man/fctr.html" class="external-link">factor</a> with additional class <code>mic</code>, that in mathematical operations acts as a <a href="https://rdrr.io/r/base/numeric.html" class="external-link">numeric</a> vector. Bear in mind that the outcome of any mathematical operation on MICs will return a <a href="https://rdrr.io/r/base/numeric.html" class="external-link">numeric</a> value.</p>
</div>
<div class="section level2">
<h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2>
<p>To interpret MIC values as SIR values, use [as.sir()] on MIC values. It supports guidelines from EUCAST (`r min(as.integer(gsub("[^0-9]", "", subset(clinical_breakpoints, guideline <!-- %like% "EUCAST")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(clinical_breakpoints, guideline %like% "EUCAST")$guideline)))`) and CLSI (`r min(as.integer(gsub("[^0-9]", "", subset(clinical_breakpoints, guideline %like% "CLSI")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(clinical_breakpoints, guideline %like% "CLSI")$guideline)))`). --></p>
<p>This class for MIC values is a quite a special data type: formally it is an ordered [factor] with valid MIC values as [factor] levels (to make sure only valid MIC values are retained), but for any mathematical operation it acts as decimal numbers:</p>
<p>“`
x &lt;- random_mic(10)
x
#&gt; Class &lt;mic&gt;
#&gt; [1] 16 1 8 8 64 &gt;=128 0.0625 32 32 16</p>
<p>is.factor(x)
#&gt; [1] TRUE</p>
<p>x[1] * 2
#&gt; [1] 32</p>
<p>median(x)
#&gt; [1] 26
“`</p>
<p>This makes it possible to maintain operators that often come with MIC values, such "&gt;=" and "&lt;=", even when filtering using [numeric] values in data analysis, e.g.:</p>
<p>“`
x[x &gt; 4]
#&gt; Class &lt;mic&gt;
#&gt; [1] 16 8 8 64 &gt;=128 32 32 16</p>
<p>df &lt;- data.frame(x, hospital = "A")
subset(df, x &gt; 4) # or with dplyr: df <!-- %&gt;% filter(x &gt; 4) -->
#&gt; x hospital
#&gt; 1 16 A
#&gt; 5 64 A
#&gt; 6 &gt;=128 A
#&gt; 8 32 A
#&gt; 9 32 A
#&gt; 10 16 A
“`</p>
<p>All so-called [group generic functions][groupGeneric()] are implemented for the MIC class (such as `!`, `!=`, `&lt;`, `&gt;=`, [exp()], [log2()]). Some mathematical functions are also implemented (such as [quantile()], [median()], [fivenum()]). Since [sd()] and [var()] are non-generic functions, these could not be extended. Use [mad()] as an alternative, or use e.g. `sd(as.numeric(x))` where `x` is your vector of MIC values.</p>
<p>Using [as.double()] or [as.numeric()] on MIC values will remove the operators and return a numeric vector. Do **not** use [as.integer()] on MIC values as by the <span style="R">R</span> convention on [factor]s, it will return the index of the factor levels (which is often useless for regular users).</p>
<p>The function [is.mic()] detects if the input contains class `mic`. If the input is a [data.frame] or [list], it iterates over all columns/items and returns a [logical] vector.</p>
<p>Use [droplevels()] to drop unused levels. At default, it will return a plain factor. Use `droplevels(..., as.mic = TRUE)` to maintain the `mic` class.</p>
<p>With [rescale_mic()], existing MIC ranges can be limited to a defined range of MIC values. This can be useful to better compare MIC distributions.</p>
<p>For `ggplot2`, use one of the [`scale_*_mic()`][scale_x_mic()] functions to plot MIC values. They allows custom MIC ranges and to plot intermediate log2 levels for missing MIC values.</p>
<p>To interpret MIC values as SIR values, use <code><a href="as.sir.html">as.sir()</a></code> on MIC values. It supports guidelines from EUCAST (2011-2026) and CLSI (2011-2026).</p>
<p>This class for MIC values is a quite a special data type: formally it is an ordered <a href="https://rdrr.io/pkg/data.table/man/fctr.html" class="external-link">factor</a> with valid MIC values as <a href="https://rdrr.io/pkg/data.table/man/fctr.html" class="external-link">factor</a> levels (to make sure only valid MIC values are retained), but for any mathematical operation it acts as decimal numbers:</p>
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" tabindex="-1"></a>x <span class="ot">&lt;-</span> <span class="fu">random_mic</span>(<span class="dv">10</span>)</span>
<span id="cb1-2"><a href="#cb1-2" tabindex="-1"></a>x</span>
<span id="cb1-3"><a href="#cb1-3" tabindex="-1"></a><span class="co">#&gt; Class &lt;mic&gt;</span></span>
<span id="cb1-4"><a href="#cb1-4" tabindex="-1"></a><span class="co">#&gt; [1] 16 1 8 8 64 &gt;=128 0.0625 32 32 16</span></span>
<span id="cb1-5"><a href="#cb1-5" tabindex="-1"></a></span>
<span id="cb1-6"><a href="#cb1-6" tabindex="-1"></a><span class="fu">is.factor</span>(x)</span>
<span id="cb1-7"><a href="#cb1-7" tabindex="-1"></a><span class="co">#&gt; [1] TRUE</span></span>
<span id="cb1-8"><a href="#cb1-8" tabindex="-1"></a></span>
<span id="cb1-9"><a href="#cb1-9" tabindex="-1"></a>x[<span class="dv">1</span>] <span class="sc">*</span> <span class="dv">2</span></span>
<span id="cb1-10"><a href="#cb1-10" tabindex="-1"></a><span class="co">#&gt; [1] 32</span></span>
<span id="cb1-11"><a href="#cb1-11" tabindex="-1"></a></span>
<span id="cb1-12"><a href="#cb1-12" tabindex="-1"></a><span class="fu">median</span>(x)</span>
<span id="cb1-13"><a href="#cb1-13" tabindex="-1"></a><span class="co">#&gt; [1] 26</span></span></code></pre><p></p></div>
<p>This makes it possible to maintain operators that often come with MIC values, such "&gt;=" and "&lt;=", even when filtering using <a href="https://rdrr.io/r/base/numeric.html" class="external-link">numeric</a> values in data analysis, e.g.:</p>
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" tabindex="-1"></a>x[x <span class="sc">&gt;</span> <span class="dv">4</span>]</span>
<span id="cb1-2"><a href="#cb1-2" tabindex="-1"></a><span class="co">#&gt; Class &lt;mic&gt;</span></span>
<span id="cb1-3"><a href="#cb1-3" tabindex="-1"></a><span class="co">#&gt; [1] 16 8 8 64 &gt;=128 32 32 16</span></span>
<span id="cb1-4"><a href="#cb1-4" tabindex="-1"></a></span>
<span id="cb1-5"><a href="#cb1-5" tabindex="-1"></a>df <span class="ot">&lt;-</span> <span class="fu">data.frame</span>(x, <span class="at">hospital =</span> <span class="st">"A"</span>)</span>
<span id="cb1-6"><a href="#cb1-6" tabindex="-1"></a><span class="fu">subset</span>(df, x <span class="sc">&gt;</span> <span class="dv">4</span>) <span class="co"># or with dplyr: df %&gt;% filter(x &gt; 4)</span></span>
<span id="cb1-7"><a href="#cb1-7" tabindex="-1"></a><span class="co">#&gt; x hospital</span></span>
<span id="cb1-8"><a href="#cb1-8" tabindex="-1"></a><span class="co">#&gt; 1 16 A</span></span>
<span id="cb1-9"><a href="#cb1-9" tabindex="-1"></a><span class="co">#&gt; 5 64 A</span></span>
<span id="cb1-10"><a href="#cb1-10" tabindex="-1"></a><span class="co">#&gt; 6 &gt;=128 A</span></span>
<span id="cb1-11"><a href="#cb1-11" tabindex="-1"></a><span class="co">#&gt; 8 32 A</span></span>
<span id="cb1-12"><a href="#cb1-12" tabindex="-1"></a><span class="co">#&gt; 9 32 A</span></span>
<span id="cb1-13"><a href="#cb1-13" tabindex="-1"></a><span class="co">#&gt; 10 16 A</span></span></code></pre><p></p></div>
<p>All so-called <a href="https://rdrr.io/r/base/groupGeneric.html" class="external-link">group generic functions</a> are implemented for the MIC class (such as <code>!</code>, <code>!=</code>, <code>&lt;</code>, <code>&gt;=</code>, <code><a href="https://rdrr.io/r/base/Log.html" class="external-link">exp()</a></code>, <code><a href="https://rdrr.io/r/base/Log.html" class="external-link">log2()</a></code>). Some mathematical functions are also implemented (such as <code><a href="https://rdrr.io/r/stats/quantile.html" class="external-link">quantile()</a></code>, <code><a href="https://rdrr.io/r/stats/median.html" class="external-link">median()</a></code>, <code><a href="https://rdrr.io/r/stats/fivenum.html" class="external-link">fivenum()</a></code>). Since <code><a href="https://rdrr.io/r/stats/sd.html" class="external-link">sd()</a></code> and <code><a href="https://rdrr.io/r/stats/cor.html" class="external-link">var()</a></code> are non-generic functions, these could not be extended. Use <code><a href="https://rdrr.io/r/stats/mad.html" class="external-link">mad()</a></code> as an alternative, or use e.g. <code>sd(as.numeric(x))</code> where <code>x</code> is your vector of MIC values.</p>
<p>Using <code><a href="https://rdrr.io/r/base/double.html" class="external-link">as.double()</a></code> or <code><a href="https://rdrr.io/r/base/numeric.html" class="external-link">as.numeric()</a></code> on MIC values will remove the operators and return a numeric vector. Do <strong>not</strong> use <code><a href="https://rdrr.io/r/base/integer.html" class="external-link">as.integer()</a></code> on MIC values as by the <span style="R">R</span> convention on <a href="https://rdrr.io/pkg/data.table/man/fctr.html" class="external-link">factor</a>s, it will return the index of the factor levels (which is often useless for regular users).</p>
<p>The function <code>is.mic()</code> detects if the input contains class <code>mic</code>. If the input is a <a href="https://rdrr.io/r/base/data.frame.html" class="external-link">data.frame</a> or <a href="https://rdrr.io/r/base/list.html" class="external-link">list</a>, it iterates over all columns/items and returns a <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> vector.</p>
<p>Use <code><a href="https://rdrr.io/pkg/data.table/man/fdroplevels.html" class="external-link">droplevels()</a></code> to drop unused levels. At default, it will return a plain factor. Use <code>droplevels(..., as.mic = TRUE)</code> to maintain the <code>mic</code> class.</p>
<p>With <code>rescale_mic()</code>, existing MIC ranges can be limited to a defined range of MIC values. This can be useful to better compare MIC distributions.</p>
<p>For <code>ggplot2</code>, use one of the <code><a href="plot.html">scale_*_mic()</a></code> functions to plot MIC values. They allows custom MIC ranges and to plot intermediate log2 levels for missing MIC values.</p>
<p><code>NA_mic_</code> is a missing value of the new <code>mic</code> class, analogous to e.g. base <span style="R">R</span>'s <code><a href="https://rdrr.io/r/base/NA.html" class="external-link">NA_character_</a></code>.</p>
<p>Use <code>mic_p50()</code> and <code>mic_p90()</code> to get the 50th and 90th percentile of MIC values. They return 'normal' <a href="https://rdrr.io/r/base/numeric.html" class="external-link">numeric</a> values.</p>
</div>

View File

@@ -7,15 +7,19 @@ allowing valid MIC values known to the field of (medical) microbiology.
## Usage
``` r
as.mic(x, na.rm = FALSE, keep_operators = "all",
round_to_next_log2 = FALSE)
as.mic(x, na.rm = FALSE, keep_operators = "all", round_to_next_log2 = FALSE)
is.mic(x)
NA_mic_
rescale_mic(x, mic_range, keep_operators = "edges", as.mic = TRUE,
round_to_next_log2 = FALSE)
rescale_mic(
x,
mic_range,
keep_operators = "edges",
as.mic = TRUE,
round_to_next_log2 = FALSE
)
mic_p50(x, na.rm = FALSE, ...)
@@ -62,10 +66,12 @@ droplevels(x, as.mic = FALSE, ...)
- as.mic:
A \[logical\] to indicate whether the \`mic\` class should be kept -
the default is \`TRUE\` for \[rescale_mic()\] and \`FALSE\` for
\[droplevels()\]. When setting this to \`FALSE\` in \[rescale_mic()\],
the output will have factor levels that acknowledge \`mic_range\`.
A [logical](https://rdrr.io/r/base/logical.html) to indicate whether
the `mic` class should be kept - the default is `TRUE` for
`rescale_mic()` and `FALSE` for
[`droplevels()`](https://rdrr.io/pkg/data.table/man/fdroplevels.html).
When setting this to `FALSE` in `rescale_mic()`, the output will have
factor levels that acknowledge `mic_range`.
- ...:
@@ -73,71 +79,101 @@ droplevels(x, as.mic = FALSE, ...)
## Value
Ordered \[factor\] with additional class \[\`mic\`\], that in
mathematical operations acts as a \[numeric\] vector. Bear in mind that
Ordered [factor](https://rdrr.io/pkg/data.table/man/fctr.html) with
additional class `mic`, that in mathematical operations acts as a
[numeric](https://rdrr.io/r/base/numeric.html) vector. Bear in mind that
the outcome of any mathematical operation on MICs will return a
\[numeric\] value.
[numeric](https://rdrr.io/r/base/numeric.html) value.
## Details
To interpret MIC values as SIR values, use \[as.sir()\] on MIC values.
It supports guidelines from EUCAST (\`r min(as.integer(gsub("\[^0-9\]",
"", subset(clinical_breakpoints, guideline
To interpret MIC values as SIR values, use
[`as.sir()`](https://amr-for-r.org/reference/as.sir.md) on MIC values.
It supports guidelines from EUCAST (2011-2026) and CLSI (2011-2026).
This class for MIC values is a quite a special data type: formally it is
an ordered \[factor\] with valid MIC values as \[factor\] levels (to
make sure only valid MIC values are retained), but for any mathematical
an ordered [factor](https://rdrr.io/pkg/data.table/man/fctr.html) with
valid MIC values as
[factor](https://rdrr.io/pkg/data.table/man/fctr.html) levels (to make
sure only valid MIC values are retained), but for any mathematical
operation it acts as decimal numbers:
“\` x \<- random_mic(10) x \#\> Class \<mic\> \#\> \[1\] 16 1 8 8 64
\>=128 0.0625 32 32 16
x <- random_mic(10)
x
#> Class <mic>
#> [1] 16 1 8 8 64 >=128 0.0625 32 32 16
is.factor(x) \#\> \[1\] TRUE
is.factor(x)
#> [1] TRUE
x\[1\] \* 2 \#\> \[1\] 32
x[1] * 2
#> [1] 32
median(x) \#\> \[1\] 26 “\`
median(x)
#> [1] 26
This makes it possible to maintain operators that often come with MIC
values, such "\>=" and "\<=", even when filtering using \[numeric\]
values in data analysis, e.g.:
values, such "\>=" and "\<=", even when filtering using
[numeric](https://rdrr.io/r/base/numeric.html) values in data analysis,
e.g.:
“\` x\[x \> 4\] \#\> Class \<mic\> \#\> \[1\] 16 8 8 64 \>=128 32 32 16
x[x > 4]
#> Class <mic>
#> [1] 16 8 8 64 >=128 32 32 16
df \<- data.frame(x, hospital = "A") subset(df, x \> 4) \# or with
dplyr: df \#\> x hospital \#\> 1 16 A \#\> 5 64 A \#\> 6 \>=128 A \#\> 8
32 A \#\> 9 32 A \#\> 10 16 A “\`
df <- data.frame(x, hospital = "A")
subset(df, x > 4) # or with dplyr: df %>% filter(x > 4)
#> x hospital
#> 1 16 A
#> 5 64 A
#> 6 >=128 A
#> 8 32 A
#> 9 32 A
#> 10 16 A
All so-called \[group generic functions\]\[groupGeneric()\] are
implemented for the MIC class (such as \`!\`, \`!=\`, \`\<\`, \`\>=\`,
\[exp()\], \[log2()\]). Some mathematical functions are also implemented
(such as \[quantile()\], \[median()\], \[fivenum()\]). Since \[sd()\]
and \[var()\] are non-generic functions, these could not be extended.
Use \[mad()\] as an alternative, or use e.g. \`sd(as.numeric(x))\` where
\`x\` is your vector of MIC values.
All so-called [group generic
functions](https://rdrr.io/r/base/groupGeneric.html) are implemented for
the MIC class (such as `!`, `!=`, `<`, `>=`,
[`exp()`](https://rdrr.io/r/base/Log.html),
[`log2()`](https://rdrr.io/r/base/Log.html)). Some mathematical
functions are also implemented (such as
[`quantile()`](https://rdrr.io/r/stats/quantile.html),
[`median()`](https://rdrr.io/r/stats/median.html),
[`fivenum()`](https://rdrr.io/r/stats/fivenum.html)). Since
[`sd()`](https://rdrr.io/r/stats/sd.html) and
[`var()`](https://rdrr.io/r/stats/cor.html) are non-generic functions,
these could not be extended. Use
[`mad()`](https://rdrr.io/r/stats/mad.html) as an alternative, or use
e.g. `sd(as.numeric(x))` where `x` is your vector of MIC values.
Using \[as.double()\] or \[as.numeric()\] on MIC values will remove the
operators and return a numeric vector. Do \*\*not\*\* use
\[as.integer()\] on MIC values as by the R convention on \[factor\]s, it
will return the index of the factor levels (which is often useless for
regular users).
Using [`as.double()`](https://rdrr.io/r/base/double.html) or
[`as.numeric()`](https://rdrr.io/r/base/numeric.html) on MIC values will
remove the operators and return a numeric vector. Do **not** use
[`as.integer()`](https://rdrr.io/r/base/integer.html) on MIC values as
by the R convention on
[factor](https://rdrr.io/pkg/data.table/man/fctr.html)s, it will return
the index of the factor levels (which is often useless for regular
users).
The function \[is.mic()\] detects if the input contains class \`mic\`.
If the input is a \[data.frame\] or \[list\], it iterates over all
columns/items and returns a \[logical\] vector.
The function `is.mic()` detects if the input contains class `mic`. If
the input is a [data.frame](https://rdrr.io/r/base/data.frame.html) or
[list](https://rdrr.io/r/base/list.html), it iterates over all
columns/items and returns a
[logical](https://rdrr.io/r/base/logical.html) vector.
Use \[droplevels()\] to drop unused levels. At default, it will return a
plain factor. Use \`droplevels(..., as.mic = TRUE)\` to maintain the
\`mic\` class.
Use
[`droplevels()`](https://rdrr.io/pkg/data.table/man/fdroplevels.html) to
drop unused levels. At default, it will return a plain factor. Use
`droplevels(..., as.mic = TRUE)` to maintain the `mic` class.
With \[rescale_mic()\], existing MIC ranges can be limited to a defined
With `rescale_mic()`, existing MIC ranges can be limited to a defined
range of MIC values. This can be useful to better compare MIC
distributions.
For \`ggplot2\`, use one of the
\[\`scale\_\*\_mic()\`\]\[scale_x_mic()\] functions to plot MIC values.
They allows custom MIC ranges and to plot intermediate log2 levels for
missing MIC values.
For `ggplot2`, use one of the
[`scale_*_mic()`](https://amr-for-r.org/reference/plot.md) functions to
plot MIC values. They allows custom MIC ranges and to plot intermediate
log2 levels for missing MIC values.
`NA_mic_` is a missing value of the new `mic` class, analogous to e.g.
base R's [`NA_character_`](https://rdrr.io/r/base/NA.html).

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Transform Arbitrary Input to Valid Microbial Taxonomy — as.mo • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Transform Arbitrary Input to Valid Microbial Taxonomy — as.mo"><meta name="description" content='Use this function to get a valid microorganism code (mo) based on arbitrary user input. Determination is done using intelligent rules and the complete taxonomic tree of the kingdoms Animalia, Archaea, Bacteria, Chromista, and Protozoa, and most microbial species from the kingdom Fungi (see Source). The input can be almost anything: a full name (like "Staphylococcus aureus"), an abbreviated name (such as "S. aureus"), an abbreviation known in the field (such as "MRSA"), or just a genus. See Examples.'><meta property="og:description" content='Use this function to get a valid microorganism code (mo) based on arbitrary user input. Determination is done using intelligent rules and the complete taxonomic tree of the kingdoms Animalia, Archaea, Bacteria, Chromista, and Protozoa, and most microbial species from the kingdom Fungi (see Source). The input can be almost anything: a full name (like "Staphylococcus aureus"), an abbreviated name (such as "S. aureus"), an abbreviation known in the field (such as "MRSA"), or just a genus. See Examples.'><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Transform Arbitrary Input to Valid Microbial Taxonomy — as.mo • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Transform Arbitrary Input to Valid Microbial Taxonomy — as.mo"><meta name="description" content='Use this function to get a valid microorganism code (mo) based on arbitrary user input. Determination is done using intelligent rules and the complete taxonomic tree of the domains Animalia, Archaea, Bacteria, Chromista, Plantae, and Protozoa, and most microbial species from the domain Fungi (see Source). The input can be almost anything: a full name (like "Staphylococcus aureus"), an abbreviated name (such as "S. aureus"), an abbreviation known in the field (such as "MRSA"), or just a genus. See Examples.'><meta property="og:description" content='Use this function to get a valid microorganism code (mo) based on arbitrary user input. Determination is done using intelligent rules and the complete taxonomic tree of the domains Animalia, Archaea, Bacteria, Chromista, Plantae, and Protozoa, and most microbial species from the domain Fungi (see Source). The input can be almost anything: a full name (like "Staphylococcus aureus"), an abbreviated name (such as "S. aureus"), an abbreviation known in the field (such as "MRSA"), or just a genus. See Examples.'><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -50,19 +50,25 @@
</div>
<div class="ref-description section level2">
<p>Use this function to get a valid microorganism code (<code>mo</code>) based on arbitrary user input. Determination is done using intelligent rules and the complete taxonomic tree of the kingdoms Animalia, Archaea, Bacteria, Chromista, and Protozoa, and most microbial species from the kingdom Fungi (see <em>Source</em>). The input can be almost anything: a full name (like <code>"Staphylococcus aureus"</code>), an abbreviated name (such as <code>"S. aureus"</code>), an abbreviation known in the field (such as <code>"MRSA"</code>), or just a genus. See <em>Examples</em>.</p>
<p>Use this function to get a valid microorganism code (<code>mo</code>) based on arbitrary user input. Determination is done using intelligent rules and the complete taxonomic tree of the domains Animalia, Archaea, Bacteria, Chromista, Plantae, and Protozoa, and most microbial species from the domain Fungi (see <em>Source</em>). The input can be almost anything: a full name (like <code>"Staphylococcus aureus"</code>), an abbreviated name (such as <code>"S. aureus"</code>), an abbreviation known in the field (such as <code>"MRSA"</code>), or just a genus. See <em>Examples</em>.</p>
</div>
<div class="section level2">
<h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">as.mo</span><span class="op">(</span><span class="va">x</span>, Becker <span class="op">=</span> <span class="cn">FALSE</span>, Lancefield <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">as.mo</span><span class="op">(</span></span>
<span> <span class="va">x</span>,</span>
<span> Becker <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> Lancefield <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> minimum_matching_score <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> keep_synonyms <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"AMR_keep_synonyms"</span>, <span class="cn">FALSE</span><span class="op">)</span>,</span>
<span> reference_df <span class="op">=</span> <span class="fu"><a href="mo_source.html">get_mo_source</a></span><span class="op">(</span><span class="op">)</span>,</span>
<span> ignore_pattern <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"AMR_ignore_pattern"</span>, <span class="cn">NULL</span><span class="op">)</span>,</span>
<span> cleaning_regex <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"AMR_cleaning_regex"</span>, <span class="fu">mo_cleaning_regex</span><span class="op">(</span><span class="op">)</span><span class="op">)</span>,</span>
<span> only_fungi <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"AMR_only_fungi"</span>, <span class="cn">FALSE</span><span class="op">)</span>,</span>
<span> language <span class="op">=</span> <span class="fu"><a href="translate.html">get_AMR_locale</a></span><span class="op">(</span><span class="op">)</span>, info <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/interactive.html" class="external-link">interactive</a></span><span class="op">(</span><span class="op">)</span>, <span class="va">...</span><span class="op">)</span></span>
<span> language <span class="op">=</span> <span class="fu"><a href="translate.html">get_AMR_locale</a></span><span class="op">(</span><span class="op">)</span>,</span>
<span> info <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/interactive.html" class="external-link">interactive</a></span><span class="op">(</span><span class="op">)</span>,</span>
<span> <span class="va">...</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="fu">is.mo</span><span class="op">(</span><span class="va">x</span><span class="op">)</span></span>
<span></span>
@@ -98,7 +104,7 @@
<dt id="arg-minimum-matching-score">minimum_matching_score<a class="anchor" aria-label="anchor" href="#arg-minimum-matching-score"></a></dt>
<dd><p>A numeric value to set as the lower limit for the <a href="mo_matching_score.html">MO matching score</a>. When left blank, this will be determined automatically based on the character length of <code>x</code>, its <a href="microorganisms.html">taxonomic kingdom</a> and <a href="mo_matching_score.html">human pathogenicity</a>.</p></dd>
<dd><p>A numeric value to set as the lower limit for the <a href="mo_matching_score.html">MO matching score</a>. When left blank, this will be determined automatically based on the character length of <code>x</code>, its <a href="microorganisms.html">taxonomic domain</a> and <a href="mo_matching_score.html">human pathogenicity</a>.</p></dd>
<dt id="arg-keep-synonyms">keep_synonyms<a class="anchor" aria-label="anchor" href="#arg-keep-synonyms"></a></dt>
@@ -119,7 +125,7 @@
<dt id="arg-only-fungi">only_fungi<a class="anchor" aria-label="anchor" href="#arg-only-fungi"></a></dt>
<dd><p>A <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate if only fungi must be found, making sure that e.g. misspellings always return records from the kingdom of Fungi. This can be set globally for <a href="mo_property.html">all microorganism functions</a> with the package option <code><a href="AMR-options.html">AMR_only_fungi</a></code>, i.e. <code>options(AMR_only_fungi = TRUE)</code>.</p></dd>
<dd><p>A <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate if only fungi must be found, making sure that e.g. misspellings always return records from the domain of Fungi. This can be set globally for <a href="mo_property.html">all microorganism functions</a> with the package option <code><a href="AMR-options.html">AMR_only_fungi</a></code>, i.e. <code>options(AMR_only_fungi = TRUE)</code>.</p></dd>
<dt id="arg-language">language<a class="anchor" aria-label="anchor" href="#arg-language"></a></dt>
@@ -151,7 +157,7 @@
<span id="cb1-8"><a href="#cb1-8" tabindex="-1"></a> <span class="er">|</span> <span class="er">|</span> <span class="er">|</span> \<span class="sc">--</span><span class="ot">-&gt;</span> subspecies, a <span class="dv">3-5</span> letter acronym</span>
<span id="cb1-9"><a href="#cb1-9" tabindex="-1"></a> <span class="sc">|</span> <span class="er">|</span> \<span class="sc">---</span><span class="ot">-&gt;</span> species, a <span class="dv">3-6</span> letter acronym</span>
<span id="cb1-10"><a href="#cb1-10" tabindex="-1"></a> <span class="sc">|</span> \<span class="sc">---</span><span class="ot">-&gt;</span> genus, a <span class="dv">4-8</span> letter acronym</span>
<span id="cb1-11"><a href="#cb1-11" tabindex="-1"></a> \<span class="sc">---</span><span class="ot">-&gt;</span> kingdom<span class="sc">:</span> <span class="fu">A</span> (Archaea), <span class="fu">AN</span> (Animalia), <span class="fu">B</span> (Bacteria),</span>
<span id="cb1-11"><a href="#cb1-11" tabindex="-1"></a> \<span class="sc">---</span><span class="ot">-&gt;</span> domain<span class="sc">:</span> <span class="fu">A</span> (Archaea), <span class="fu">AN</span> (Animalia), <span class="fu">B</span> (Bacteria),</span>
<span id="cb1-12"><a href="#cb1-12" tabindex="-1"></a> <span class="fu">C</span> (Chromista), <span class="fu">F</span> (Fungi), <span class="fu">PL</span> (Plantae),</span>
<span id="cb1-13"><a href="#cb1-13" tabindex="-1"></a> <span class="fu">P</span> (Protozoa)</span></code></pre><p></p></div>
<p>Values that cannot be coerced will be considered 'unknown' and will return the MO code <code>UNKNOWN</code> with a warning.</p>
@@ -161,7 +167,7 @@
<h3 id="coping-with-uncertain-results">Coping with Uncertain Results<a class="anchor" aria-label="anchor" href="#coping-with-uncertain-results"></a></h3>
<p>Results of non-exact taxonomic input are based on their <a href="mo_matching_score.html">matching score</a>. The lowest allowed score can be set with the <code>minimum_matching_score</code> argument. At default this will be determined based on the character length of the input, the <a href="microorganisms.html">taxonomic kingdom</a>, and the <a href="mo_matching_score.html">human pathogenicity</a> of the taxonomic outcome. If values are matched with uncertainty, a message will be shown to suggest the user to inspect the results with <code>mo_uncertainties()</code>, which returns a <a href="https://rdrr.io/r/base/data.frame.html" class="external-link">data.frame</a> with all specifications.</p>
<p>Results of non-exact taxonomic input are based on their <a href="mo_matching_score.html">matching score</a>. The lowest allowed score can be set with the <code>minimum_matching_score</code> argument. At default this will be determined based on the character length of the input, the <a href="microorganisms.html">taxonomic domain</a>, and the <a href="mo_matching_score.html">human pathogenicity</a> of the taxonomic outcome. If values are matched with uncertainty, a message will be shown to suggest the user to inspect the results with <code>mo_uncertainties()</code>, which returns a <a href="https://rdrr.io/r/base/data.frame.html" class="external-link">data.frame</a> with all specifications.</p>
<p>To increase the quality of matching, the <code>cleaning_regex</code> argument is used to clean the input. This must be a <a href="https://rdrr.io/r/base/regex.html" class="external-link">regular expression</a> that matches parts of the input that should be removed before the input is matched against the <a href="microorganisms.html">available microbial taxonomy</a>. It will be matched Perl-compatible and case-insensitive. The default value of <code>cleaning_regex</code> is the outcome of the helper function <code>mo_cleaning_regex()</code>.</p>
<p>There are three helper functions that can be run after using the <code>as.mo()</code> function:</p><ul><li><p>Use <code>mo_uncertainties()</code> to get a <a href="https://rdrr.io/r/base/data.frame.html" class="external-link">data.frame</a> that prints in a pretty format with all taxonomic names that were guessed. The output contains the matching score for all matches (see <em>Matching Score for Microorganisms</em> below).</p></li>
<li><p>Use <code>mo_failures()</code> to get a <a href="https://rdrr.io/r/base/character.html" class="external-link">character</a> <a href="https://rdrr.io/r/base/vector.html" class="external-link">vector</a> with all values that could not be coerced to a valid value.</p></li>
@@ -181,8 +187,8 @@
<h3 id="coagulase-negative-and-coagulase-positive-staphylococci">Coagulase-negative and Coagulase-positive Staphylococci<a class="anchor" aria-label="anchor" href="#coagulase-negative-and-coagulase-positive-staphylococci"></a></h3>
<p>With <code>Becker = TRUE</code>, the following staphylococci will be converted to their corresponding coagulase group:</p><ul><li><p>Coagulase-negative: <em>S. americanisciuri</em>, <em>S. argensis</em>, <em>S. arlettae</em>, <em>S. auricularis</em>, <em>S. borealis</em>, <em>S. brunensis</em>, <em>S. caeli</em>, <em>S. caledonicus</em>, <em>S. canis</em>, <em>S. capitis</em>, <em>S. capitis capitis</em>, <em>S. capitis urealyticus</em>, <em>S. capitis ureolyticus</em>, <em>S. caprae</em>, <em>S. carnosus</em>, <em>S. carnosus carnosus</em>, <em>S. carnosus utilis</em>, <em>S. casei</em>, <em>S. caseolyticus</em>, <em>S. chromogenes</em>, <em>S. cohnii</em>, <em>S. cohnii cohnii</em>, <em>S. cohnii urealyticum</em>, <em>S. cohnii urealyticus</em>, <em>S. condimenti</em>, <em>S. croceilyticus</em>, <em>S. debuckii</em>, <em>S. devriesei</em>, <em>S. durrellii</em>, <em>S. edaphicus</em>, <em>S. epidermidis</em>, <em>S. equorum</em>, <em>S. equorum equorum</em>, <em>S. equorum linens</em>, <em>S. felis</em>, <em>S. fleurettii</em>, <em>S. gallinarum</em>, <em>S. haemolyticus</em>, <em>S. hominis</em>, <em>S. hominis hominis</em>, <em>S. hominis novobiosepticus</em>, <em>S. jettensis</em>, <em>S. kloosii</em>, <em>S. lentus</em>, <em>S. lloydii</em>, <em>S. lugdunensis</em>, <em>S. marylandisciuri</em>, <em>S. massiliensis</em>, <em>S. microti</em>, <em>S. muscae</em>, <em>S. nepalensis</em>, <em>S. pasteuri</em>, <em>S. petrasii</em>, <em>S. petrasii croceilyticus</em>, <em>S. petrasii jettensis</em>, <em>S. petrasii petrasii</em>, <em>S. petrasii pragensis</em>, <em>S. pettenkoferi</em>, <em>S. piscifermentans</em>, <em>S. pragensis</em>, <em>S. pseudoxylosus</em>, <em>S. pulvereri</em>, <em>S. ratti</em>, <em>S. rostri</em>, <em>S. saccharolyticus</em>, <em>S. saprophyticus</em>, <em>S. saprophyticus bovis</em>, <em>S. saprophyticus saprophyticus</em>, <em>S. schleiferi</em>, <em>S. schleiferi schleiferi</em>, <em>S. sciuri</em>, <em>S. sciuri carnaticus</em>, <em>S. sciuri lentus</em>, <em>S. sciuri rodentium</em>, <em>S. sciuri sciuri</em>, <em>S. shinii</em>, <em>S. simulans</em>, <em>S. stepanovicii</em>, <em>S. succinus</em>, <em>S. succinus casei</em>, <em>S. succinus succinus</em>, <em>S. taiwanensis</em>, <em>S. urealyticus</em>, <em>S. ureilyticus</em>, <em>S. veratri</em>, <em>S. vitulinus</em>, <em>S. vitulus</em>, <em>S. warneri</em>, and <em>S. xylosus</em></p></li>
<li><p>Coagulase-positive: <em>S. agnetis</em>, <em>S. argenteus</em>, <em>S. coagulans</em>, <em>S. cornubiensis</em>, <em>S. delphini</em>, <em>S. hyicus</em>, <em>S. hyicus chromogenes</em>, <em>S. hyicus hyicus</em>, <em>S. intermedius</em>, <em>S. lutrae</em>, <em>S. pseudintermedius</em>, <em>S. roterodami</em>, <em>S. schleiferi coagulans</em>, <em>S. schweitzeri</em>, <em>S. simiae</em>, and <em>S. singaporensis</em></p></li>
<p>With <code>Becker = TRUE</code>, the following staphylococci will be converted to their corresponding coagulase group:</p><ul><li><p>Coagulase-negative: <em>S. americanisciuri</em>, <em>S. argensis</em>, <em>S. arlettae</em>, <em>S. auricularis</em>, <em>S. borealis</em>, <em>S. brunensis</em>, <em>S. caeli</em>, <em>S. caledonicus</em>, <em>S. canis</em>, <em>S. capitis</em>, <em>S. capitis capitis</em>, <em>S. capitis urealyticus</em>, <em>S. capitis ureolyticus</em>, <em>S. caprae</em>, <em>S. carnosus</em>, <em>S. carnosus carnosus</em>, <em>S. carnosus utilis</em>, <em>S. casei</em>, <em>S. caseolyticus</em>, <em>S. caseorum</em>, <em>S. chromogenes</em>, <em>S. cohnii</em>, <em>S. cohnii cohnii</em>, <em>S. cohnii urealyticum</em>, <em>S. cohnii urealyticus</em>, <em>S. cohnii ureilyticus</em>, <em>S. condimenti</em>, <em>S. croceilyticus</em>, <em>S. debuckii</em>, <em>S. devriesei</em>, <em>S. durrellii</em>, <em>S. edaphicus</em>, <em>S. epidermidis</em>, <em>S. equorum</em>, <em>S. equorum equorum</em>, <em>S. equorum linens</em>, <em>S. felis</em>, <em>S. fleurettii</em>, <em>S. gallinarum</em>, <em>S. haemolyticus</em>, <em>S. halotolerans</em>, <em>S. hominis</em>, <em>S. hominis hominis</em>, <em>S. hominis novobiosepticus</em>, <em>S. hsinchuensis</em>, <em>S. jettensis</em>, <em>S. kloosii</em>, <em>S. lentus</em>, <em>S. lloydii</em>, <em>S. lugdunensis</em>, <em>S. marylandisciuri</em>, <em>S. massiliensis</em>, <em>S. microti</em>, <em>S. muscae</em>, <em>S. nepalensis</em>, <em>S. pasteuri</em>, <em>S. petrasii</em>, <em>S. petrasii croceilyticus</em>, <em>S. petrasii jettensis</em>, <em>S. petrasii petrasii</em>, <em>S. petrasii pragensis</em>, <em>S. pettenkoferi</em>, <em>S. piscifermentans</em>, <em>S. pragensis</em>, <em>S. pseudoxylosus</em>, <em>S. pulvereri</em>, <em>S. ratti</em>, <em>S. rostri</em>, <em>S. saccharolyticus</em>, <em>S. saprophyticus</em>, <em>S. saprophyticus bovis</em>, <em>S. saprophyticus saprophyticus</em>, <em>S. schleiferi</em>, <em>S. schleiferi schleiferi</em>, <em>S. sciuri</em>, <em>S. sciuri carnaticus</em>, <em>S. sciuri lentus</em>, <em>S. sciuri rodentium</em>, <em>S. sciuri sciuri</em>, <em>S. shinii</em>, <em>S. simulans</em>, <em>S. stepanovicii</em>, <em>S. succinus</em>, <em>S. succinus casei</em>, <em>S. succinus succinus</em>, <em>S. taiwanensis</em>, <em>S. urealyticus</em>, <em>S. ureilyticus</em>, <em>S. veratri</em>, <em>S. vitulinus</em>, <em>S. vitulus</em>, <em>S. warneri</em>, and <em>S. xylosus</em></p></li>
<li><p>Coagulase-positive: <em>S. agnetis</em>, <em>S. argenteus</em>, <em>S. coagulans</em>, <em>S. cornubiensis</em>, <em>S. delphini</em>, <em>S. hyicus</em>, <em>S. hyicus chromogenes</em>, <em>S. hyicus hyicus</em>, <em>S. intermedius</em>, <em>S. lutrae</em>, <em>S. pseudintermedius</em>, <em>S. roterodami</em>, <em>S. schleiferi coagulans</em>, <em>S. schweitzeri</em>, <em>S. simiae</em>, <em>S. singaporensis</em>, and <em>S. ursi</em></p></li>
</ul><p>This is based on:</p><ul><li><p>Becker K <em>et al.</em> (2014). <strong>Coagulase-Negative Staphylococci.</strong> <em>Clin Microbiol Rev.</em> 27(4): 870-926; <a href="https://doi.org/10.1128/CMR.00109-13" class="external-link">doi:10.1128/CMR.00109-13</a></p></li>
<li><p>Becker K <em>et al.</em> (2019). <strong>Implications of identifying the recently defined members of the <em>S. aureus</em> complex, <em>S. argenteus</em> and <em>S. schweitzeri</em>: A position paper of members of the ESCMID Study Group for staphylococci and Staphylococcal Diseases (ESGS).</strong> <em>Clin Microbiol Infect</em>; <a href="https://doi.org/10.1016/j.cmi.2019.02.028" class="external-link">doi:10.1016/j.cmi.2019.02.028</a></p></li>
<li><p>Becker K <em>et al.</em> (2020). <strong>Emergence of coagulase-negative staphylococci.</strong> <em>Expert Rev Anti Infect Ther.</em> 18(4):349-366; <a href="https://doi.org/10.1080/14787210.2020.1730813" class="external-link">doi:10.1080/14787210.2020.1730813</a></p></li>
@@ -211,14 +217,14 @@
<ul><li><p>Berends MS <em>et al.</em> (2022). <strong>AMR: An R Package for Working with Antimicrobial Resistance Data</strong>. <em>Journal of Statistical Software</em>, 104(3), 1-31; <a href="https://doi.org/10.18637/jss.v104.i03" class="external-link">doi:10.18637/jss.v104.i03</a></p></li>
<li><p>Parte, AC <em>et al.</em> (2020). <strong>List of Prokaryotic names with Standing in Nomenclature (LPSN) moves to the DSMZ.</strong> International Journal of Systematic and Evolutionary Microbiology, 70, 5607-5612; <a href="https://doi.org/10.1099/ijsem.0.004332" class="external-link">doi:10.1099/ijsem.0.004332</a>
. Accessed from <a href="https://lpsn.dsmz.de" class="external-link">https://lpsn.dsmz.de</a> on June 24th, 2024.</p></li>
<li><p>Freese, HM <em>et al.</em> (2026). <strong>TYGS and LPSN in 2025: a Global Core Biodata Resource for genome-based classification and nomenclature of prokaryotes within DSMZ Digital Diversity.</strong> Nucleic Acids Research, 54, D884D891; <a href="https://doi.org/10.1093/nar/gkaf1110" class="external-link">doi:10.1093/nar/gkaf1110</a>
. Accessed from <a href="https://lpsn.dsmz.de" class="external-link">https://lpsn.dsmz.de</a> on 7th of May, 2026.</p></li>
<li><p>Vincent, R <em>et al</em> (2013). <strong>MycoBank gearing up for new horizons.</strong> IMA Fungus, 4(2), 371-9; <a href="https://doi.org/10.5598/imafungus.2013.04.02.16" class="external-link">doi:10.5598/imafungus.2013.04.02.16</a>
. Accessed from <a href="https://www.mycobank.org" class="external-link">https://www.mycobank.org</a> on June 24th, 2024.</p></li>
<li><p>GBIF Secretariat (2023). GBIF Backbone Taxonomy. Checklist dataset <a href="https://doi.org/10.15468/39omei" class="external-link">doi:10.15468/39omei</a>
. Accessed from <a href="https://www.gbif.org" class="external-link">https://www.gbif.org</a> on June 24th, 2024.</p></li>
. Accessed from <a href="https://www.mycobank.org" class="external-link">https://www.mycobank.org</a> on 7th of May, 2026.</p></li>
<li><p>Banki, O. <em>et al.</em> (2026). Catalogue of Life (2026-04-18 XR). Catalogue of Life Foundation, Amsterdam, Netherlands. <a href="https://doi.org/10.48580/dgxjw" class="external-link">doi:10.48580/dgxjw</a>
. Accessed from <a href="https://www.gbif.org" class="external-link">https://www.gbif.org</a> on 7th of May, 2026.</p></li>
<li><p>Reimer, LC <em>et al.</em> (2022). <strong><em>BacDive</em> in 2022: the knowledge base for standardized bacterial and archaeal data.</strong> Nucleic Acids Res., 50(D1):D741-D74; <a href="https://doi.org/10.1093/nar/gkab961" class="external-link">doi:10.1093/nar/gkab961</a>
. Accessed from <a href="https://bacdive.dsmz.de" class="external-link">https://bacdive.dsmz.de</a> on July 16th, 2024.</p></li>
. Accessed from <a href="https://bacdive.dsmz.de" class="external-link">https://bacdive.dsmz.de</a> on 7th of May, 2026.</p></li>
<li><p>Public Health Information Network Vocabulary Access and Distribution System (PHIN VADS). US Edition of SNOMED CT from 1 September 2020. Value Set Name 'Microorganism', OID 2.16.840.1.114222.4.11.1009 (v12). URL: <a href="https://www.cdc.gov/phin/php/phinvads/" class="external-link">https://www.cdc.gov/phin/php/phinvads/</a></p></li>
<li><p>Bartlett A <em>et al.</em> (2022). <strong>A comprehensive list of bacterial pathogens infecting humans</strong> <em>Microbiology</em> 168:001269; <a href="https://doi.org/10.1099/mic.0.001269" class="external-link">doi:10.1099/mic.0.001269</a></p></li>
</ul></div>
@@ -233,7 +239,7 @@
<li><p>\(l_n\) is the length of \(n\);</p></li>
<li><p>\(lev\) is the <a href="https://en.wikipedia.org/wiki/Levenshtein_distance" class="external-link">Levenshtein distance function</a> (counting any insertion as 1, and any deletion or substitution as 2) that is needed to change \(x\) into \(n\);</p></li>
<li><p>\(p_n\) is the human pathogenic prevalence group of \(n\), as described below;</p></li>
<li><p>\(k_n\) is the taxonomic kingdom of \(n\), set as Bacteria = 1, Fungi = 1.25, Protozoa = 1.5, Chromista = 1.75, Archaea = 2, others = 3.</p></li>
<li><p>\(k_n\) is the taxonomic domain ('kingdom' until taxonomic reclassification of 2024) of \(n\), set as Bacteria = 1, Fungi = 1.25, Protozoa = 1.5, Chromista = 1.75, Archaea = 2, others = 3.</p></li>
</ul><p>The grouping into human pathogenic prevalence \(p\) is based on recent work from Bartlett <em>et al.</em> (2022, <a href="https://doi.org/10.1099/mic.0.001269" class="external-link">doi:10.1099/mic.0.001269</a>
) who extensively studied medical-scientific literature to categorise all bacterial species into these groups:</p><ul><li><p><strong>Established</strong>, if a taxonomic species has infected at least three persons in three or more references. These records have <code>prevalence = 1.15</code> in the <a href="microorganisms.html">microorganisms</a> data set;</p></li>
<li><p><strong>Putative</strong>, if a taxonomic species has fewer than three known cases. These records have <code>prevalence = 1.25</code> in the <a href="microorganisms.html">microorganisms</a> data set.</p></li>
@@ -241,7 +247,7 @@
<li><p>Any genus present in the <strong>established</strong> list also has <code>prevalence = 1.15</code> in the <a href="microorganisms.html">microorganisms</a> data set;</p></li>
<li><p>Any other genus present in the <strong>putative</strong> list has <code>prevalence = 1.25</code> in the <a href="microorganisms.html">microorganisms</a> data set;</p></li>
<li><p>Any other species or subspecies of which the genus is present in the two aforementioned groups, has <code>prevalence = 1.5</code> in the <a href="microorganisms.html">microorganisms</a> data set;</p></li>
<li><p>Any <em>non-bacterial</em> genus, species or subspecies of which the genus is present in the following list, has <code>prevalence = 1.25</code> in the <a href="microorganisms.html">microorganisms</a> data set: <em>Absidia</em>, <em>Acanthamoeba</em>, <em>Acremonium</em>, <em>Actinomucor</em>, <em>Aedes</em>, <em>Alternaria</em>, <em>Amoeba</em>, <em>Ancylostoma</em>, <em>Angiostrongylus</em>, <em>Anisakis</em>, <em>Anopheles</em>, <em>Apophysomyces</em>, <em>Arthroderma</em>, <em>Aspergillus</em>, <em>Aureobasidium</em>, <em>Basidiobolus</em>, <em>Beauveria</em>, <em>Bipolaris</em>, <em>Blastobotrys</em>, <em>Blastocystis</em>, <em>Blastomyces</em>, <em>Candida</em>, <em>Capillaria</em>, <em>Chaetomium</em>, <em>Chilomastix</em>, <em>Chrysonilia</em>, <em>Chrysosporium</em>, <em>Cladophialophora</em>, <em>Cladosporium</em>, <em>Clavispora</em>, <em>Coccidioides</em>, <em>Cokeromyces</em>, <em>Conidiobolus</em>, <em>Coniochaeta</em>, <em>Contracaecum</em>, <em>Cordylobia</em>, <em>Cryptococcus</em>, <em>Cryptosporidium</em>, <em>Cunninghamella</em>, <em>Curvularia</em>, <em>Cyberlindnera</em>, <em>Debaryozyma</em>, <em>Demodex</em>, <em>Dermatobia</em>, <em>Dientamoeba</em>, <em>Diphyllobothrium</em>, <em>Dirofilaria</em>, <em>Echinostoma</em>, <em>Entamoeba</em>, <em>Enterobius</em>, <em>Epidermophyton</em>, <em>Exidia</em>, <em>Exophiala</em>, <em>Exserohilum</em>, <em>Fasciola</em>, <em>Fonsecaea</em>, <em>Fusarium</em>, <em>Geotrichum</em>, <em>Giardia</em>, <em>Graphium</em>, <em>Haloarcula</em>, <em>Halobacterium</em>, <em>Halococcus</em>, <em>Hansenula</em>, <em>Hendersonula</em>, <em>Heterophyes</em>, <em>Histomonas</em>, <em>Histoplasma</em>, <em>Hortaea</em>, <em>Hymenolepis</em>, <em>Hypomyces</em>, <em>Hysterothylacium</em>, <em>Kloeckera</em>, <em>Kluyveromyces</em>, <em>Kodamaea</em>, <em>Lacazia</em>, <em>Leishmania</em>, <em>Lichtheimia</em>, <em>Lodderomyces</em>, <em>Lomentospora</em>, <em>Madurella</em>, <em>Malassezia</em>, <em>Malbranchea</em>, <em>Metagonimus</em>, <em>Meyerozyma</em>, <em>Microsporidium</em>, <em>Microsporum</em>, <em>Millerozyma</em>, <em>Mortierella</em>, <em>Mucor</em>, <em>Mycocentrospora</em>, <em>Nannizzia</em>, <em>Necator</em>, <em>Nectria</em>, <em>Ochroconis</em>, <em>Oesophagostomum</em>, <em>Oidiodendron</em>, <em>Opisthorchis</em>, <em>Paecilomyces</em>, <em>Paracoccidioides</em>, <em>Pediculus</em>, <em>Penicillium</em>, <em>Phaeoacremonium</em>, <em>Phaeomoniella</em>, <em>Phialophora</em>, <em>Phlebotomus</em>, <em>Phoma</em>, <em>Pichia</em>, <em>Piedraia</em>, <em>Pithomyces</em>, <em>Pityrosporum</em>, <em>Pneumocystis</em>, <em>Pseudallescheria</em>, <em>Pseudoscopulariopsis</em>, <em>Pseudoterranova</em>, <em>Pulex</em>, <em>Purpureocillium</em>, <em>Quambalaria</em>, <em>Rhinocladiella</em>, <em>Rhizomucor</em>, <em>Rhizopus</em>, <em>Rhodotorula</em>, <em>Saccharomyces</em>, <em>Saksenaea</em>, <em>Saprochaete</em>, <em>Sarcoptes</em>, <em>Scedosporium</em>, <em>Schistosoma</em>, <em>Schizosaccharomyces</em>, <em>Scolecobasidium</em>, <em>Scopulariopsis</em>, <em>Scytalidium</em>, <em>Spirometra</em>, <em>Sporobolomyces</em>, <em>Sporopachydermia</em>, <em>Sporothrix</em>, <em>Sporotrichum</em>, <em>Stachybotrys</em>, <em>Strongyloides</em>, <em>Syncephalastrum</em>, <em>Syngamus</em>, <em>Taenia</em>, <em>Talaromyces</em>, <em>Teleomorph</em>, <em>Toxocara</em>, <em>Trichinella</em>, <em>Trichobilharzia</em>, <em>Trichoderma</em>, <em>Trichomonas</em>, <em>Trichophyton</em>, <em>Trichosporon</em>, <em>Trichostrongylus</em>, <em>Trichuris</em>, <em>Tritirachium</em>, <em>Trombicula</em>, <em>Trypanosoma</em>, <em>Tunga</em>, <em>Ulocladium</em>, <em>Ustilago</em>, <em>Verticillium</em>, <em>Wallemia</em>, <em>Wangiella</em>, <em>Wickerhamomyces</em>, <em>Wuchereria</em>, <em>Yarrowia</em>, or <em>Zygosaccharomyces</em>;</p></li>
<li><p>Any <em>non-bacterial</em> genus, species or subspecies of which the genus is present in the following list, has <code>prevalence = 1.25</code> in the <a href="microorganisms.html">microorganisms</a> data set: <em>Absidia</em>, <em>Acanthamoeba</em>, <em>Acremonium</em>, <em>Actinomucor</em>, <em>Aedes</em>, <em>Alternaria</em>, <em>Amoeba</em>, <em>Ancylostoma</em>, <em>Angiostrongylus</em>, <em>Anisakis</em>, <em>Anopheles</em>, <em>Apophysomyces</em>, <em>Arthroderma</em>, <em>Aspergillus</em>, <em>Aureobasidium</em>, <em>Basidiobolus</em>, <em>Beauveria</em>, <em>Bipolaris</em>, <em>Blastobotrys</em>, <em>Blastocystis</em>, <em>Blastomyces</em>, <em>Candida</em>, <em>Capillaria</em>, <em>Chaetomium</em>, <em>Chilomastix</em>, <em>Chrysonilia</em>, <em>Chrysosporium</em>, <em>Cladophialophora</em>, <em>Cladosporium</em>, <em>Clavispora</em>, <em>Coccidioides</em>, <em>Cokeromyces</em>, <em>Conidiobolus</em>, <em>Coniochaeta</em>, <em>Contracaecum</em>, <em>Cordylobia</em>, <em>Cryptococcus</em>, <em>Cryptosporidium</em>, <em>Cunninghamella</em>, <em>Curvularia</em>, <em>Cyberlindnera</em>, <em>Debaryozyma</em>, <em>Demodex</em>, <em>Dermatobia</em>, <em>Dientamoeba</em>, <em>Diphyllobothrium</em>, <em>Dirofilaria</em>, <em>Echinostoma</em>, <em>Entamoeba</em>, <em>Enterobius</em>, <em>Epidermophyton</em>, <em>Exidia</em>, <em>Exophiala</em>, <em>Exserohilum</em>, <em>Fasciola</em>, <em>Fonsecaea</em>, <em>Fusarium</em>, <em>Geotrichum</em>, <em>Giardia</em>, <em>Graphium</em>, <em>Haloarcula</em>, <em>Halobacterium</em>, <em>Halococcus</em>, <em>Hansenula</em>, <em>Hendersonula</em>, <em>Heterophyes</em>, <em>Histomonas</em>, <em>Histoplasma</em>, <em>Hortaea</em>, <em>Hymenolepis</em>, <em>Hypomyces</em>, <em>Hysterothylacium</em>, <em>Kloeckera</em>, <em>Kluyveromyces</em>, <em>Kodamaea</em>, <em>Lacazia</em>, <em>Leishmania</em>, <em>Lichtheimia</em>, <em>Lodderomyces</em>, <em>Lomentospora</em>, <em>Madurella</em>, <em>Malassezia</em>, <em>Malbranchea</em>, <em>Metagonimus</em>, <em>Meyerozyma</em>, <em>Microascus</em>, <em>Microsporidium</em>, <em>Microsporum</em>, <em>Millerozyma</em>, <em>Mortierella</em>, <em>Mucor</em>, <em>Mycocentrospora</em>, <em>Nannizzia</em>, <em>Necator</em>, <em>Nectria</em>, <em>Ochroconis</em>, <em>Oesophagostomum</em>, <em>Oidiodendron</em>, <em>Opisthorchis</em>, <em>Paecilomyces</em>, <em>Paracoccidioides</em>, <em>Pediculus</em>, <em>Penicillium</em>, <em>Phaeoacremonium</em>, <em>Phaeomoniella</em>, <em>Phialophora</em>, <em>Phlebotomus</em>, <em>Phoma</em>, <em>Pichia</em>, <em>Piedraia</em>, <em>Pithomyces</em>, <em>Pityrosporum</em>, <em>Plasmodium</em>, <em>Pneumocystis</em>, <em>Pseudallescheria</em>, <em>Pseudoscopulariopsis</em>, <em>Pseudoterranova</em>, <em>Pulex</em>, <em>Purpureocillium</em>, <em>Quambalaria</em>, <em>Rhinocladiella</em>, <em>Rhizomucor</em>, <em>Rhizopus</em>, <em>Rhodotorula</em>, <em>Saccharomyces</em>, <em>Saksenaea</em>, <em>Saprochaete</em>, <em>Sarcoptes</em>, <em>Scedosporium</em>, <em>Schistosoma</em>, <em>Schizophyllum</em>, <em>Schizosaccharomyces</em>, <em>Scolecobasidium</em>, <em>Scopulariopsis</em>, <em>Scytalidium</em>, <em>Spirometra</em>, <em>Sporobolomyces</em>, <em>Sporopachydermia</em>, <em>Sporothrix</em>, <em>Sporotrichum</em>, <em>Stachybotrys</em>, <em>Strongyloides</em>, <em>Syncephalastrum</em>, <em>Syngamus</em>, <em>Taenia</em>, <em>Talaromyces</em>, <em>Teleomorph</em>, <em>Toxocara</em>, <em>Trichinella</em>, <em>Trichobilharzia</em>, <em>Trichoderma</em>, <em>Trichomonas</em>, <em>Trichophyton</em>, <em>Trichosporon</em>, <em>Trichostrongylus</em>, <em>Trichuris</em>, <em>Tritirachium</em>, <em>Trombicula</em>, <em>Trypanosoma</em>, <em>Tunga</em>, <em>Ulocladium</em>, <em>Ustilago</em>, <em>Verticillium</em>, <em>Wallemia</em>, <em>Wangiella</em>, <em>Wickerhamomyces</em>, <em>Wuchereria</em>, <em>Yarrowia</em>, or <em>Zygosaccharomyces</em>;</p></li>
<li><p>All other records have <code>prevalence = 2.0</code> in the <a href="microorganisms.html">microorganisms</a> data set.</p></li>
</ul><p>When calculating the matching score, all characters in \(x\) and \(n\) are ignored that are other than A-Z, a-z, 0-9, spaces and parentheses.</p>
<p>All matches are sorted descending on their matching score and for all user input values, the top match will be returned. This will lead to the effect that e.g., <code>"E. coli"</code> will return the microbial ID of <em>Escherichia coli</em> (\(m = 0.688\), a highly prevalent microorganism found in humans) and not <em>Entamoeba coli</em> (\(m = 0.381\), a less prevalent microorganism in humans), although the latter would alphabetically come first.</p>

View File

@@ -2,24 +2,30 @@
Use this function to get a valid microorganism code (`mo`) based on
arbitrary user input. Determination is done using intelligent rules and
the complete taxonomic tree of the kingdoms Animalia, Archaea, Bacteria,
Chromista, and Protozoa, and most microbial species from the kingdom
Fungi (see *Source*). The input can be almost anything: a full name
(like `"Staphylococcus aureus"`), an abbreviated name (such as
the complete taxonomic tree of the domains Animalia, Archaea, Bacteria,
Chromista, Plantae, and Protozoa, and most microbial species from the
domain Fungi (see *Source*). The input can be almost anything: a full
name (like `"Staphylococcus aureus"`), an abbreviated name (such as
`"S. aureus"`), an abbreviation known in the field (such as `"MRSA"`),
or just a genus. See *Examples*.
## Usage
``` r
as.mo(x, Becker = FALSE, Lancefield = FALSE,
as.mo(
x,
Becker = FALSE,
Lancefield = FALSE,
minimum_matching_score = NULL,
keep_synonyms = getOption("AMR_keep_synonyms", FALSE),
reference_df = get_mo_source(),
ignore_pattern = getOption("AMR_ignore_pattern", NULL),
cleaning_regex = getOption("AMR_cleaning_regex", mo_cleaning_regex()),
only_fungi = getOption("AMR_only_fungi", FALSE),
language = get_AMR_locale(), info = interactive(), ...)
language = get_AMR_locale(),
info = interactive(),
...
)
is.mo(x)
@@ -76,7 +82,7 @@ NA_mo_
score](https://amr-for-r.org/reference/mo_matching_score.md). When
left blank, this will be determined automatically based on the
character length of `x`, its [taxonomic
kingdom](https://amr-for-r.org/reference/microorganisms.md) and [human
domain](https://amr-for-r.org/reference/microorganisms.md) and [human
pathogenicity](https://amr-for-r.org/reference/mo_matching_score.md).
- keep_synonyms:
@@ -130,7 +136,7 @@ NA_mo_
A [logical](https://rdrr.io/r/base/logical.html) to indicate if only
fungi must be found, making sure that e.g. misspellings always return
records from the kingdom of Fungi. This can be set globally for [all
records from the domain of Fungi. This can be set globally for [all
microorganism
functions](https://amr-for-r.org/reference/mo_property.md) with the
package option
@@ -174,7 +180,7 @@ human-readable and typically looks like these examples:
| | | \---> subspecies, a 3-5 letter acronym
| | \----> species, a 3-6 letter acronym
| \----> genus, a 4-8 letter acronym
\----> kingdom: A (Archaea), AN (Animalia), B (Bacteria),
\----> domain: A (Archaea), AN (Animalia), B (Bacteria),
C (Chromista), F (Fungi), PL (Plantae),
P (Protozoa)
@@ -201,7 +207,7 @@ score](https://amr-for-r.org/reference/mo_matching_score.md). The lowest
allowed score can be set with the `minimum_matching_score` argument. At
default this will be determined based on the character length of the
input, the [taxonomic
kingdom](https://amr-for-r.org/reference/microorganisms.md), and the
domain](https://amr-for-r.org/reference/microorganisms.md), and the
[human
pathogenicity](https://amr-for-r.org/reference/mo_matching_score.md) of
the taxonomic outcome. If values are matched with uncertainty, a message
@@ -263,32 +269,34 @@ their corresponding coagulase group:
caeli*, *S. caledonicus*, *S. canis*, *S. capitis*, *S. capitis
capitis*, *S. capitis urealyticus*, *S. capitis ureolyticus*, *S.
caprae*, *S. carnosus*, *S. carnosus carnosus*, *S. carnosus utilis*,
*S. casei*, *S. caseolyticus*, *S. chromogenes*, *S. cohnii*, *S.
cohnii cohnii*, *S. cohnii urealyticum*, *S. cohnii urealyticus*, *S.
condimenti*, *S. croceilyticus*, *S. debuckii*, *S. devriesei*, *S.
durrellii*, *S. edaphicus*, *S. epidermidis*, *S. equorum*, *S.
equorum equorum*, *S. equorum linens*, *S. felis*, *S. fleurettii*,
*S. gallinarum*, *S. haemolyticus*, *S. hominis*, *S. hominis
hominis*, *S. hominis novobiosepticus*, *S. jettensis*, *S. kloosii*,
*S. lentus*, *S. lloydii*, *S. lugdunensis*, *S. marylandisciuri*, *S.
massiliensis*, *S. microti*, *S. muscae*, *S. nepalensis*, *S.
pasteuri*, *S. petrasii*, *S. petrasii croceilyticus*, *S. petrasii
jettensis*, *S. petrasii petrasii*, *S. petrasii pragensis*, *S.
pettenkoferi*, *S. piscifermentans*, *S. pragensis*, *S.
pseudoxylosus*, *S. pulvereri*, *S. ratti*, *S. rostri*, *S.
saccharolyticus*, *S. saprophyticus*, *S. saprophyticus bovis*, *S.
saprophyticus saprophyticus*, *S. schleiferi*, *S. schleiferi
schleiferi*, *S. sciuri*, *S. sciuri carnaticus*, *S. sciuri lentus*,
*S. sciuri rodentium*, *S. sciuri sciuri*, *S. shinii*, *S. simulans*,
*S. stepanovicii*, *S. succinus*, *S. succinus casei*, *S. succinus
succinus*, *S. taiwanensis*, *S. urealyticus*, *S. ureilyticus*, *S.
veratri*, *S. vitulinus*, *S. vitulus*, *S. warneri*, and *S. xylosus*
*S. casei*, *S. caseolyticus*, *S. caseorum*, *S. chromogenes*, *S.
cohnii*, *S. cohnii cohnii*, *S. cohnii urealyticum*, *S. cohnii
urealyticus*, *S. cohnii ureilyticus*, *S. condimenti*, *S.
croceilyticus*, *S. debuckii*, *S. devriesei*, *S. durrellii*, *S.
edaphicus*, *S. epidermidis*, *S. equorum*, *S. equorum equorum*, *S.
equorum linens*, *S. felis*, *S. fleurettii*, *S. gallinarum*, *S.
haemolyticus*, *S. halotolerans*, *S. hominis*, *S. hominis hominis*,
*S. hominis novobiosepticus*, *S. hsinchuensis*, *S. jettensis*, *S.
kloosii*, *S. lentus*, *S. lloydii*, *S. lugdunensis*, *S.
marylandisciuri*, *S. massiliensis*, *S. microti*, *S. muscae*, *S.
nepalensis*, *S. pasteuri*, *S. petrasii*, *S. petrasii
croceilyticus*, *S. petrasii jettensis*, *S. petrasii petrasii*, *S.
petrasii pragensis*, *S. pettenkoferi*, *S. piscifermentans*, *S.
pragensis*, *S. pseudoxylosus*, *S. pulvereri*, *S. ratti*, *S.
rostri*, *S. saccharolyticus*, *S. saprophyticus*, *S. saprophyticus
bovis*, *S. saprophyticus saprophyticus*, *S. schleiferi*, *S.
schleiferi schleiferi*, *S. sciuri*, *S. sciuri carnaticus*, *S.
sciuri lentus*, *S. sciuri rodentium*, *S. sciuri sciuri*, *S.
shinii*, *S. simulans*, *S. stepanovicii*, *S. succinus*, *S. succinus
casei*, *S. succinus succinus*, *S. taiwanensis*, *S. urealyticus*,
*S. ureilyticus*, *S. veratri*, *S. vitulinus*, *S. vitulus*, *S.
warneri*, and *S. xylosus*
- Coagulase-positive: *S. agnetis*, *S. argenteus*, *S. coagulans*, *S.
cornubiensis*, *S. delphini*, *S. hyicus*, *S. hyicus chromogenes*,
*S. hyicus hyicus*, *S. intermedius*, *S. lutrae*, *S.
pseudintermedius*, *S. roterodami*, *S. schleiferi coagulans*, *S.
schweitzeri*, *S. simiae*, and *S. singaporensis*
schweitzeri*, *S. simiae*, *S. singaporensis*, and *S. ursi*
This is based on:
@@ -356,26 +364,28 @@ base R's [`NA_character_`](https://rdrr.io/r/base/NA.html).
104(3), 1-31;
[doi:10.18637/jss.v104.i03](https://doi.org/10.18637/jss.v104.i03)
- Parte, AC *et al.* (2020). **List of Prokaryotic names with Standing
in Nomenclature (LPSN) moves to the DSMZ.** International Journal of
Systematic and Evolutionary Microbiology, 70, 5607-5612;
[doi:10.1099/ijsem.0.004332](https://doi.org/10.1099/ijsem.0.004332) .
Accessed from <https://lpsn.dsmz.de> on June 24th, 2024.
- Freese, HM *et al.* (2026). **TYGS and LPSN in 2025: a Global Core
Biodata Resource for genome-based classification and nomenclature of
prokaryotes within DSMZ Digital Diversity.** Nucleic Acids Research,
54, D884D891;
[doi:10.1093/nar/gkaf1110](https://doi.org/10.1093/nar/gkaf1110) .
Accessed from <https://lpsn.dsmz.de> on 7th of May, 2026.
- Vincent, R *et al* (2013). **MycoBank gearing up for new horizons.**
IMA Fungus, 4(2), 371-9;
[doi:10.5598/imafungus.2013.04.02.16](https://doi.org/10.5598/imafungus.2013.04.02.16)
. Accessed from <https://www.mycobank.org> on June 24th, 2024.
. Accessed from <https://www.mycobank.org> on 7th of May, 2026.
- GBIF Secretariat (2023). GBIF Backbone Taxonomy. Checklist dataset
[doi:10.15468/39omei](https://doi.org/10.15468/39omei) . Accessed from
<https://www.gbif.org> on June 24th, 2024.
- Banki, O. *et al.* (2026). Catalogue of Life (2026-04-18 XR).
Catalogue of Life Foundation, Amsterdam, Netherlands.
[doi:10.48580/dgxjw](https://doi.org/10.48580/dgxjw) . Accessed from
<https://www.gbif.org> on 7th of May, 2026.
- Reimer, LC *et al.* (2022). ***BacDive* in 2022: the knowledge base
for standardized bacterial and archaeal data.** Nucleic Acids Res.,
50(D1):D741-D74;
[doi:10.1093/nar/gkab961](https://doi.org/10.1093/nar/gkab961) .
Accessed from <https://bacdive.dsmz.de> on July 16th, 2024.
Accessed from <https://bacdive.dsmz.de> on 7th of May, 2026.
- Public Health Information Network Vocabulary Access and Distribution
System (PHIN VADS). US Edition of SNOMED CT from 1 September 2020.
@@ -413,8 +423,9 @@ where:
- \\p_n\\ is the human pathogenic prevalence group of \\n\\, as
described below;
- \\k_n\\ is the taxonomic kingdom of \\n\\, set as Bacteria = 1, Fungi
= 1.25, Protozoa = 1.5, Chromista = 1.75, Archaea = 2, others = 3.
- \\k_n\\ is the taxonomic domain ('kingdom' until taxonomic
reclassification of 2024) of \\n\\, set as Bacteria = 1, Fungi = 1.25,
Protozoa = 1.5, Chromista = 1.75, Archaea = 2, others = 3.
The grouping into human pathogenic prevalence \\p\\ is based on recent
work from Bartlett *et al.* (2022,
@@ -477,17 +488,18 @@ Furthermore,
*Hymenolepis*, *Hypomyces*, *Hysterothylacium*, *Kloeckera*,
*Kluyveromyces*, *Kodamaea*, *Lacazia*, *Leishmania*, *Lichtheimia*,
*Lodderomyces*, *Lomentospora*, *Madurella*, *Malassezia*,
*Malbranchea*, *Metagonimus*, *Meyerozyma*, *Microsporidium*,
*Microsporum*, *Millerozyma*, *Mortierella*, *Mucor*,
*Mycocentrospora*, *Nannizzia*, *Necator*, *Nectria*, *Ochroconis*,
*Oesophagostomum*, *Oidiodendron*, *Opisthorchis*, *Paecilomyces*,
*Paracoccidioides*, *Pediculus*, *Penicillium*, *Phaeoacremonium*,
*Phaeomoniella*, *Phialophora*, *Phlebotomus*, *Phoma*, *Pichia*,
*Piedraia*, *Pithomyces*, *Pityrosporum*, *Pneumocystis*,
*Pseudallescheria*, *Pseudoscopulariopsis*, *Pseudoterranova*,
*Pulex*, *Purpureocillium*, *Quambalaria*, *Rhinocladiella*,
*Rhizomucor*, *Rhizopus*, *Rhodotorula*, *Saccharomyces*, *Saksenaea*,
*Saprochaete*, *Sarcoptes*, *Scedosporium*, *Schistosoma*,
*Malbranchea*, *Metagonimus*, *Meyerozyma*, *Microascus*,
*Microsporidium*, *Microsporum*, *Millerozyma*, *Mortierella*,
*Mucor*, *Mycocentrospora*, *Nannizzia*, *Necator*, *Nectria*,
*Ochroconis*, *Oesophagostomum*, *Oidiodendron*, *Opisthorchis*,
*Paecilomyces*, *Paracoccidioides*, *Pediculus*, *Penicillium*,
*Phaeoacremonium*, *Phaeomoniella*, *Phialophora*, *Phlebotomus*,
*Phoma*, *Pichia*, *Piedraia*, *Pithomyces*, *Pityrosporum*,
*Plasmodium*, *Pneumocystis*, *Pseudallescheria*,
*Pseudoscopulariopsis*, *Pseudoterranova*, *Pulex*, *Purpureocillium*,
*Quambalaria*, *Rhinocladiella*, *Rhizomucor*, *Rhizopus*,
*Rhodotorula*, *Saccharomyces*, *Saksenaea*, *Saprochaete*,
*Sarcoptes*, *Scedosporium*, *Schistosoma*, *Schizophyllum*,
*Schizosaccharomyces*, *Scolecobasidium*, *Scopulariopsis*,
*Scytalidium*, *Spirometra*, *Sporobolomyces*, *Sporopachydermia*,
*Sporothrix*, *Sporotrichum*, *Stachybotrys*, *Strongyloides*,

View File

@@ -1,7 +1,7 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Interpret MIC and Disk Diffusion as SIR, or Clean Existing SIR Data — as.sir • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Interpret MIC and Disk Diffusion as SIR, or Clean Existing SIR Data — as.sir"><meta name="description" content='Clean up existing SIR values, or interpret minimum inhibitory concentration (MIC) values and disk diffusion diameters according to EUCAST or CLSI. [as.sir()] transforms the input to a new class [`sir`], which is an ordered [factor] containing the levels `S`, `SDD`, `I`, `R`, `NI`.
Breakpoints are currently implemented from EUCAST `r min(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, guideline '><meta property="og:description" content='Clean up existing SIR values, or interpret minimum inhibitory concentration (MIC) values and disk diffusion diameters according to EUCAST or CLSI. [as.sir()] transforms the input to a new class [`sir`], which is an ordered [factor] containing the levels `S`, `SDD`, `I`, `R`, `NI`.
Breakpoints are currently implemented from EUCAST `r min(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, guideline '><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Interpret MIC and Disk Diffusion as SIR, or Clean Existing SIR Data — as.sir • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Interpret MIC and Disk Diffusion as SIR, or Clean Existing SIR Data — as.sir"><meta name="description" content="Clean up existing SIR values, or interpret minimum inhibitory concentration (MIC) values and disk diffusion diameters according to EUCAST or CLSI. as.sir() transforms the input to a new class sir, which is an ordered factor containing the levels S, SDD, I, R, NI.
Breakpoints are currently implemented from EUCAST 2011-2026 and CLSI 2011-2026, see Details. All breakpoints used for interpretation are available in our clinical_breakpoints data set."><meta property="og:description" content="Clean up existing SIR values, or interpret minimum inhibitory concentration (MIC) values and disk diffusion diameters according to EUCAST or CLSI. as.sir() transforms the input to a new class sir, which is an ordered factor containing the levels S, SDD, I, R, NI.
Breakpoints are currently implemented from EUCAST 2011-2026 and CLSI 2011-2026, see Details. All breakpoints used for interpretation are available in our clinical_breakpoints data set."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -9,7 +9,7 @@ Breakpoints are currently implemented from EUCAST `r min(as.integer(gsub("[^0-9]
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -52,8 +52,8 @@ Breakpoints are currently implemented from EUCAST `r min(as.integer(gsub("[^0-9]
</div>
<div class="ref-description section level2">
<p>Clean up existing SIR values, or interpret minimum inhibitory concentration (MIC) values and disk diffusion diameters according to EUCAST or CLSI. [as.sir()] transforms the input to a new class [`sir`], which is an ordered [factor] containing the levels `S`, `SDD`, `I`, `R`, `NI`.</p>
<p>Breakpoints are currently implemented from EUCAST `r min(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, guideline <!-- %like% "EUCAST")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, guideline %like% "EUCAST")$guideline)))` and CLSI `r min(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, guideline %like% "CLSI")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, guideline %like% "CLSI")$guideline)))`, see *Details*. All breakpoints used for interpretation are available in our [clinical_breakpoints] data set. --></p>
<p>Clean up existing SIR values, or interpret minimum inhibitory concentration (MIC) values and disk diffusion diameters according to EUCAST or CLSI. <code>as.sir()</code> transforms the input to a new class <code>sir</code>, which is an ordered <a href="https://rdrr.io/pkg/data.table/man/fctr.html" class="external-link">factor</a> containing the levels <code>S</code>, <code>SDD</code>, <code>I</code>, <code>R</code>, <code>NI</code>.</p>
<p>Breakpoints are currently implemented from EUCAST 2011-2026 and CLSI 2011-2026, see <em>Details</em>. All breakpoints used for interpretation are available in our <a href="clinical_breakpoints.html">clinical_breakpoints</a> data set.</p>
</div>
<div class="section level2">
@@ -67,63 +67,93 @@ Breakpoints are currently implemented from EUCAST `r min(as.integer(gsub("[^0-9]
<span><span class="fu">is_sir_eligible</span><span class="op">(</span><span class="va">x</span>, threshold <span class="op">=</span> <span class="fl">0.05</span><span class="op">)</span></span>
<span></span>
<span><span class="co"># Default S3 method</span></span>
<span><span class="fu">as.sir</span><span class="op">(</span><span class="va">x</span>, S <span class="op">=</span> <span class="st">"^(S|U|1)+$"</span>, I <span class="op">=</span> <span class="st">"^(I|2)+$"</span>,</span>
<span> R <span class="op">=</span> <span class="st">"^(R|3)+$"</span>, NI <span class="op">=</span> <span class="st">"^(N|NI|V|4)+$"</span>, SDD <span class="op">=</span> <span class="st">"^(SDD|D|H|5)+$"</span>,</span>
<span> WT <span class="op">=</span> <span class="st">"^(WT|6)+$"</span>, NWT <span class="op">=</span> <span class="st">"^(NWT|7)+$"</span>, NS <span class="op">=</span> <span class="st">"^(NS|8)+$"</span>,</span>
<span> info <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/interactive.html" class="external-link">interactive</a></span><span class="op">(</span><span class="op">)</span>, <span class="va">...</span><span class="op">)</span></span>
<span><span class="fu">as.sir</span><span class="op">(</span></span>
<span> <span class="va">x</span>,</span>
<span> S <span class="op">=</span> <span class="st">"^(S|U|1)+$"</span>,</span>
<span> I <span class="op">=</span> <span class="st">"^(I|2)+$"</span>,</span>
<span> R <span class="op">=</span> <span class="st">"^(R|3)+$"</span>,</span>
<span> NI <span class="op">=</span> <span class="st">"^(N|NI|V|4)+$"</span>,</span>
<span> SDD <span class="op">=</span> <span class="st">"^(SDD|D|H|5)+$"</span>,</span>
<span> WT <span class="op">=</span> <span class="st">"^(WT|6)+$"</span>,</span>
<span> NWT <span class="op">=</span> <span class="st">"^(NWT|7)+$"</span>,</span>
<span> NS <span class="op">=</span> <span class="st">"^(NS|8)+$"</span>,</span>
<span> info <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/interactive.html" class="external-link">interactive</a></span><span class="op">(</span><span class="op">)</span>,</span>
<span> <span class="va">...</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="co"># S3 method for class 'mic'</span></span>
<span><span class="fu">as.sir</span><span class="op">(</span><span class="va">x</span>, mo <span class="op">=</span> <span class="cn">NULL</span>, ab <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/deparse.html" class="external-link">deparse</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/substitute.html" class="external-link">substitute</a></span><span class="op">(</span><span class="va">x</span><span class="op">)</span><span class="op">)</span>,</span>
<span> guideline <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"AMR_guideline"</span>, <span class="st">"EUCAST"</span><span class="op">)</span>, uti <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span><span class="fu">as.sir</span><span class="op">(</span></span>
<span> <span class="va">x</span>,</span>
<span> mo <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> ab <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/deparse.html" class="external-link">deparse</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/substitute.html" class="external-link">substitute</a></span><span class="op">(</span><span class="va">x</span><span class="op">)</span><span class="op">)</span>,</span>
<span> guideline <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"AMR_guideline"</span>, <span class="st">"EUCAST"</span><span class="op">)</span>,</span>
<span> uti <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> capped_mic_handling <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"AMR_capped_mic_handling"</span>, <span class="st">"standard"</span><span class="op">)</span>,</span>
<span> as_wt_nwt <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/identical.html" class="external-link">identical</a></span><span class="op">(</span><span class="va">breakpoint_type</span>, <span class="st">"ECOFF"</span><span class="op">)</span>,</span>
<span> add_intrinsic_resistance <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> reference_data <span class="op">=</span> <span class="fu">AMR</span><span class="fu">::</span><span class="va"><a href="clinical_breakpoints.html">clinical_breakpoints</a></span>,</span>
<span> substitute_missing_r_breakpoint <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"AMR_substitute_missing_r_breakpoint"</span>,</span>
<span> <span class="cn">FALSE</span><span class="op">)</span>, include_screening <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"AMR_include_screening"</span>, <span class="cn">FALSE</span><span class="op">)</span>,</span>
<span> <span class="cn">FALSE</span><span class="op">)</span>,</span>
<span> include_screening <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"AMR_include_screening"</span>, <span class="cn">FALSE</span><span class="op">)</span>,</span>
<span> include_PKPD <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"AMR_include_PKPD"</span>, <span class="cn">TRUE</span><span class="op">)</span>,</span>
<span> breakpoint_type <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"AMR_breakpoint_type"</span>, <span class="st">"human"</span><span class="op">)</span>, host <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> language <span class="op">=</span> <span class="fu"><a href="translate.html">get_AMR_locale</a></span><span class="op">(</span><span class="op">)</span>, verbose <span class="op">=</span> <span class="cn">FALSE</span>, info <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/interactive.html" class="external-link">interactive</a></span><span class="op">(</span><span class="op">)</span>,</span>
<span> conserve_capped_values <span class="op">=</span> <span class="cn">NULL</span>, <span class="va">...</span><span class="op">)</span></span>
<span> breakpoint_type <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"AMR_breakpoint_type"</span>, <span class="st">"human"</span><span class="op">)</span>,</span>
<span> host <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> language <span class="op">=</span> <span class="fu"><a href="translate.html">get_AMR_locale</a></span><span class="op">(</span><span class="op">)</span>,</span>
<span> verbose <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> info <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/interactive.html" class="external-link">interactive</a></span><span class="op">(</span><span class="op">)</span>,</span>
<span> conserve_capped_values <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> <span class="va">...</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="co"># S3 method for class 'disk'</span></span>
<span><span class="fu">as.sir</span><span class="op">(</span><span class="va">x</span>, mo <span class="op">=</span> <span class="cn">NULL</span>, ab <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/deparse.html" class="external-link">deparse</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/substitute.html" class="external-link">substitute</a></span><span class="op">(</span><span class="va">x</span><span class="op">)</span><span class="op">)</span>,</span>
<span> guideline <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"AMR_guideline"</span>, <span class="st">"EUCAST"</span><span class="op">)</span>, uti <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span><span class="fu">as.sir</span><span class="op">(</span></span>
<span> <span class="va">x</span>,</span>
<span> mo <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> ab <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/deparse.html" class="external-link">deparse</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/substitute.html" class="external-link">substitute</a></span><span class="op">(</span><span class="va">x</span><span class="op">)</span><span class="op">)</span>,</span>
<span> guideline <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"AMR_guideline"</span>, <span class="st">"EUCAST"</span><span class="op">)</span>,</span>
<span> uti <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> as_wt_nwt <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/identical.html" class="external-link">identical</a></span><span class="op">(</span><span class="va">breakpoint_type</span>, <span class="st">"ECOFF"</span><span class="op">)</span>,</span>
<span> add_intrinsic_resistance <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> reference_data <span class="op">=</span> <span class="fu">AMR</span><span class="fu">::</span><span class="va"><a href="clinical_breakpoints.html">clinical_breakpoints</a></span>,</span>
<span> substitute_missing_r_breakpoint <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"AMR_substitute_missing_r_breakpoint"</span>,</span>
<span> <span class="cn">FALSE</span><span class="op">)</span>, include_screening <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"AMR_include_screening"</span>, <span class="cn">FALSE</span><span class="op">)</span>,</span>
<span> <span class="cn">FALSE</span><span class="op">)</span>,</span>
<span> include_screening <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"AMR_include_screening"</span>, <span class="cn">FALSE</span><span class="op">)</span>,</span>
<span> include_PKPD <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"AMR_include_PKPD"</span>, <span class="cn">TRUE</span><span class="op">)</span>,</span>
<span> breakpoint_type <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"AMR_breakpoint_type"</span>, <span class="st">"human"</span><span class="op">)</span>, host <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> language <span class="op">=</span> <span class="fu"><a href="translate.html">get_AMR_locale</a></span><span class="op">(</span><span class="op">)</span>, verbose <span class="op">=</span> <span class="cn">FALSE</span>, info <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/interactive.html" class="external-link">interactive</a></span><span class="op">(</span><span class="op">)</span>,</span>
<span> <span class="va">...</span><span class="op">)</span></span>
<span> breakpoint_type <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"AMR_breakpoint_type"</span>, <span class="st">"human"</span><span class="op">)</span>,</span>
<span> host <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> language <span class="op">=</span> <span class="fu"><a href="translate.html">get_AMR_locale</a></span><span class="op">(</span><span class="op">)</span>,</span>
<span> verbose <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> info <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/interactive.html" class="external-link">interactive</a></span><span class="op">(</span><span class="op">)</span>,</span>
<span> <span class="va">...</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="co"># S3 method for class 'data.frame'</span></span>
<span><span class="fu">as.sir</span><span class="op">(</span><span class="va">x</span>, <span class="va">...</span>, col_mo <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> guideline <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"AMR_guideline"</span>, <span class="st">"EUCAST"</span><span class="op">)</span>, uti <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span><span class="fu">as.sir</span><span class="op">(</span></span>
<span> <span class="va">x</span>,</span>
<span> <span class="va">...</span>,</span>
<span> col_mo <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> guideline <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"AMR_guideline"</span>, <span class="st">"EUCAST"</span><span class="op">)</span>,</span>
<span> uti <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> capped_mic_handling <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"AMR_capped_mic_handling"</span>, <span class="st">"standard"</span><span class="op">)</span>,</span>
<span> as_wt_nwt <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/identical.html" class="external-link">identical</a></span><span class="op">(</span><span class="va">breakpoint_type</span>, <span class="st">"ECOFF"</span><span class="op">)</span>,</span>
<span> add_intrinsic_resistance <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> reference_data <span class="op">=</span> <span class="fu">AMR</span><span class="fu">::</span><span class="va"><a href="clinical_breakpoints.html">clinical_breakpoints</a></span>,</span>
<span> substitute_missing_r_breakpoint <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"AMR_substitute_missing_r_breakpoint"</span>,</span>
<span> <span class="cn">FALSE</span><span class="op">)</span>, include_screening <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"AMR_include_screening"</span>, <span class="cn">FALSE</span><span class="op">)</span>,</span>
<span> <span class="cn">FALSE</span><span class="op">)</span>,</span>
<span> include_screening <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"AMR_include_screening"</span>, <span class="cn">FALSE</span><span class="op">)</span>,</span>
<span> include_PKPD <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"AMR_include_PKPD"</span>, <span class="cn">TRUE</span><span class="op">)</span>,</span>
<span> breakpoint_type <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"AMR_breakpoint_type"</span>, <span class="st">"human"</span><span class="op">)</span>, host <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> language <span class="op">=</span> <span class="fu"><a href="translate.html">get_AMR_locale</a></span><span class="op">(</span><span class="op">)</span>, verbose <span class="op">=</span> <span class="cn">FALSE</span>, info <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/interactive.html" class="external-link">interactive</a></span><span class="op">(</span><span class="op">)</span>,</span>
<span> parallel <span class="op">=</span> <span class="cn">FALSE</span>, conserve_capped_values <span class="op">=</span> <span class="cn">NULL</span><span class="op">)</span></span>
<span> breakpoint_type <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"AMR_breakpoint_type"</span>, <span class="st">"human"</span><span class="op">)</span>,</span>
<span> host <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> language <span class="op">=</span> <span class="fu"><a href="translate.html">get_AMR_locale</a></span><span class="op">(</span><span class="op">)</span>,</span>
<span> verbose <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> info <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/interactive.html" class="external-link">interactive</a></span><span class="op">(</span><span class="op">)</span>,</span>
<span> parallel <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> conserve_capped_values <span class="op">=</span> <span class="cn">NULL</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="fu">sir_interpretation_history</span><span class="op">(</span>clean <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></span></code></pre></div>
</div>
<div class="section level2">
<h2 id="source">Source<a class="anchor" aria-label="anchor" href="#source"></a></h2>
<p>For interpretations of minimum inhibitory concentration (MIC) values and disk diffusion diameters:</p><ul><li><p><strong>CLSI M39: Analysis and Presentation of Cumulative Antimicrobial Susceptibility Test Data</strong>, 2011-2026, <em>Clinical and Laboratory Standards Institute</em> (CLSI). <a href="https://clsi.org/standards/products/microbiology/documents/m39/" class="external-link">https://clsi.org/standards/products/microbiology/documents/m39/</a>.</p></li>
<li><p><strong>CLSI M100: Performance Standard for Antimicrobial Susceptibility Testing</strong>, 2011-2026, <em>Clinical and Laboratory Standards Institute</em> (CLSI). <a href="https://clsi.org/standards/products/microbiology/documents/m100/" class="external-link">https://clsi.org/standards/products/microbiology/documents/m100/</a>.</p></li>
<li><p><strong>CLSI VET01: Performance Standards for Antimicrobial Disk and Dilution Susceptibility Tests for Bacteria Isolated From Animals</strong>, 2019-2026, <em>Clinical and Laboratory Standards Institute</em> (CLSI). <a href="https://clsi.org/standards/products/veterinary-medicine/documents/vet01/" class="external-link">https://clsi.org/standards/products/veterinary-medicine/documents/vet01/</a>.</p></li>
<li><p><strong>EUCAST Breakpoint tables for interpretation of MICs and zone diameters</strong>, 2011-2026, <em>European Committee on Antimicrobial Susceptibility Testing</em> (EUCAST). <a href="https://www.eucast.org/bacteria/clinical-breakpoints-and-interpretation/clinical-breakpoint-tables/" class="external-link">https://www.eucast.org/bacteria/clinical-breakpoints-and-interpretation/clinical-breakpoint-tables/</a>.</p></li>
<li><p><strong>WHONET</strong> as a source for machine-reading the clinical breakpoints (<a href="https://amr-for-r.org/reference/clinical_breakpoints.html#imported-from-whonet">read more here</a>), 1989-2026, <em>WHO Collaborating Centre for Surveillance of Antimicrobial Resistance</em>. <a href="https://whonet.org/" class="external-link">https://whonet.org/</a>.</p></li>
</ul></div>
<div class="section level2">
<h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2>
@@ -236,7 +266,7 @@ Breakpoints are currently implemented from EUCAST `r min(as.integer(gsub("[^0-9]
</dl></div>
<div class="section level2">
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
<p>Ordered [factor] with new class `sir`</p>
<p>Ordered <a href="https://rdrr.io/pkg/data.table/man/fctr.html" class="external-link">factor</a> with new class <code>sir</code></p>
</div>
<div class="section level2">
<h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2>
@@ -336,6 +366,14 @@ Breakpoints are currently implemented from EUCAST `r min(as.integer(gsub("[^0-9]
<p>For maximum compatibility, we also provide machine-readable, tab-separated plain text files suitable for use in any software, including laboratory information systems.</p>
<p>Visit <a href="https://amr-for-r.org/articles/datasets.html">our website for direct download links</a>, or explore the actual files in <a href="https://github.com/msberends/AMR/tree/main/data-raw/datasets" class="external-link">our GitHub repository</a>.</p>
</div>
<div class="section level2">
<h2 id="references">References<a class="anchor" aria-label="anchor" href="#references"></a></h2>
<p>For interpretations of minimum inhibitory concentration (MIC) values and disk diffusion diameters:</p><ul><li><p><strong>CLSI M39: Analysis and Presentation of Cumulative Antimicrobial Susceptibility Test Data</strong>, 2011-2026, <em>Clinical and Laboratory Standards Institute</em> (CLSI). <a href="https://clsi.org/standards/products/microbiology/documents/m39/" class="external-link">https://clsi.org/standards/products/microbiology/documents/m39/</a>.</p></li>
<li><p><strong>CLSI M100: Performance Standard for Antimicrobial Susceptibility Testing</strong>, 2011-2026, <em>Clinical and Laboratory Standards Institute</em> (CLSI). <a href="https://clsi.org/standards/products/microbiology/documents/m100/" class="external-link">https://clsi.org/standards/products/microbiology/documents/m100/</a>.</p></li>
<li><p><strong>CLSI VET01: Performance Standards for Antimicrobial Disk and Dilution Susceptibility Tests for Bacteria Isolated From Animals</strong>, 2019-2026, <em>Clinical and Laboratory Standards Institute</em> (CLSI). <a href="https://clsi.org/standards/products/veterinary-medicine/documents/vet01/" class="external-link">https://clsi.org/standards/products/veterinary-medicine/documents/vet01/</a>.</p></li>
<li><p><strong>EUCAST Breakpoint tables for interpretation of MICs and zone diameters</strong>, 2011-2026, <em>European Committee on Antimicrobial Susceptibility Testing</em> (EUCAST). <a href="https://www.eucast.org/bacteria/clinical-breakpoints-and-interpretation/clinical-breakpoint-tables/" class="external-link">https://www.eucast.org/bacteria/clinical-breakpoints-and-interpretation/clinical-breakpoint-tables/</a>.</p></li>
<li><p><strong>WHONET</strong> as a source for machine-reading the clinical breakpoints (<a href="https://amr-for-r.org/reference/clinical_breakpoints.html#imported-from-whonet">read more here</a>), 1989-2026, <em>WHO Collaborating Centre for Surveillance of Antimicrobial Resistance</em>. <a href="https://whonet.org/" class="external-link">https://whonet.org/</a>.</p></li>
</ul></div>
<div class="section level2">
<h2 id="see-also">See also<a class="anchor" aria-label="anchor" href="#see-also"></a></h2>
<div class="dont-index"><p><code><a href="as.mic.html">as.mic()</a></code>, <code><a href="as.disk.html">as.disk()</a></code>, <code><a href="as.mo.html">as.mo()</a></code></p></div>
@@ -420,10 +458,10 @@ Breakpoints are currently implemented from EUCAST `r min(as.integer(gsub("[^0-9]
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 4 × 18</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> datetime index method ab_given mo_given host_given input_given</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dttm&gt;</span> <span style="color: #949494; font-style: italic;">&lt;int&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> 2026-05-02 <span style="color: #949494;">13:02:42</span> 1 MIC amoxicillin Escherich… human 8 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> 2026-05-02 <span style="color: #949494;">13:02:42</span> 1 MIC cipro Escherich… human 0.256 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">3</span> 2026-05-02 <span style="color: #949494;">13:02:42</span> 1 DISK tobra Escherich… human 16 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">4</span> 2026-05-02 <span style="color: #949494;">13:02:43</span> 1 DISK genta Escherich… human 18 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> 2026-06-23 <span style="color: #949494;">17:55:31</span> 1 MIC amoxicillin Escherich… human 8 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> 2026-06-23 <span style="color: #949494;">17:55:31</span> 1 MIC cipro Escherich… human 0.256 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">3</span> 2026-06-23 <span style="color: #949494;">17:55:32</span> 1 DISK tobra Escherich… human 16 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">4</span> 2026-06-23 <span style="color: #949494;">17:55:32</span> 1 DISK genta Escherich… human 18 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># 11 more variables: ab &lt;ab&gt;, mo &lt;mo&gt;, host &lt;chr&gt;, input &lt;chr&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># outcome &lt;sir&gt;, notes &lt;chr&gt;, guideline &lt;chr&gt;, ref_table &lt;chr&gt;, uti &lt;lgl&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># breakpoint_S_R &lt;chr&gt;, site &lt;chr&gt;</span></span>

View File

@@ -2,13 +2,16 @@
Clean up existing SIR values, or interpret minimum inhibitory
concentration (MIC) values and disk diffusion diameters according to
EUCAST or CLSI. \[as.sir()\] transforms the input to a new class
\[\`sir\`\], which is an ordered \[factor\] containing the levels \`S\`,
\`SDD\`, \`I\`, \`R\`, \`NI\`.
EUCAST or CLSI. `as.sir()` transforms the input to a new class `sir`,
which is an ordered
[factor](https://rdrr.io/pkg/data.table/man/fctr.html) containing the
levels `S`, `SDD`, `I`, `R`, `NI`.
Breakpoints are currently implemented from EUCAST \`r
min(as.integer(gsub("\[^0-9\]", "", subset(AMR::clinical_breakpoints,
guideline
Breakpoints are currently implemented from EUCAST 2011-2026 and CLSI
2011-2026, see *Details*. All breakpoints used for interpretation are
available in our
[clinical_breakpoints](https://amr-for-r.org/reference/clinical_breakpoints.md)
data set.
## Usage
@@ -22,86 +25,93 @@ is.sir(x)
is_sir_eligible(x, threshold = 0.05)
# Default S3 method
as.sir(x, S = "^(S|U|1)+$", I = "^(I|2)+$",
R = "^(R|3)+$", NI = "^(N|NI|V|4)+$", SDD = "^(SDD|D|H|5)+$",
WT = "^(WT|6)+$", NWT = "^(NWT|7)+$", NS = "^(NS|8)+$",
info = interactive(), ...)
as.sir(
x,
S = "^(S|U|1)+$",
I = "^(I|2)+$",
R = "^(R|3)+$",
NI = "^(N|NI|V|4)+$",
SDD = "^(SDD|D|H|5)+$",
WT = "^(WT|6)+$",
NWT = "^(NWT|7)+$",
NS = "^(NS|8)+$",
info = interactive(),
...
)
# S3 method for class 'mic'
as.sir(x, mo = NULL, ab = deparse(substitute(x)),
guideline = getOption("AMR_guideline", "EUCAST"), uti = NULL,
as.sir(
x,
mo = NULL,
ab = deparse(substitute(x)),
guideline = getOption("AMR_guideline", "EUCAST"),
uti = NULL,
capped_mic_handling = getOption("AMR_capped_mic_handling", "standard"),
as_wt_nwt = identical(breakpoint_type, "ECOFF"),
add_intrinsic_resistance = FALSE,
reference_data = AMR::clinical_breakpoints,
substitute_missing_r_breakpoint = getOption("AMR_substitute_missing_r_breakpoint",
FALSE), include_screening = getOption("AMR_include_screening", FALSE),
FALSE),
include_screening = getOption("AMR_include_screening", FALSE),
include_PKPD = getOption("AMR_include_PKPD", TRUE),
breakpoint_type = getOption("AMR_breakpoint_type", "human"), host = NULL,
language = get_AMR_locale(), verbose = FALSE, info = interactive(),
conserve_capped_values = NULL, ...)
breakpoint_type = getOption("AMR_breakpoint_type", "human"),
host = NULL,
language = get_AMR_locale(),
verbose = FALSE,
info = interactive(),
conserve_capped_values = NULL,
...
)
# S3 method for class 'disk'
as.sir(x, mo = NULL, ab = deparse(substitute(x)),
guideline = getOption("AMR_guideline", "EUCAST"), uti = NULL,
as.sir(
x,
mo = NULL,
ab = deparse(substitute(x)),
guideline = getOption("AMR_guideline", "EUCAST"),
uti = NULL,
as_wt_nwt = identical(breakpoint_type, "ECOFF"),
add_intrinsic_resistance = FALSE,
reference_data = AMR::clinical_breakpoints,
substitute_missing_r_breakpoint = getOption("AMR_substitute_missing_r_breakpoint",
FALSE), include_screening = getOption("AMR_include_screening", FALSE),
FALSE),
include_screening = getOption("AMR_include_screening", FALSE),
include_PKPD = getOption("AMR_include_PKPD", TRUE),
breakpoint_type = getOption("AMR_breakpoint_type", "human"), host = NULL,
language = get_AMR_locale(), verbose = FALSE, info = interactive(),
...)
breakpoint_type = getOption("AMR_breakpoint_type", "human"),
host = NULL,
language = get_AMR_locale(),
verbose = FALSE,
info = interactive(),
...
)
# S3 method for class 'data.frame'
as.sir(x, ..., col_mo = NULL,
guideline = getOption("AMR_guideline", "EUCAST"), uti = NULL,
as.sir(
x,
...,
col_mo = NULL,
guideline = getOption("AMR_guideline", "EUCAST"),
uti = NULL,
capped_mic_handling = getOption("AMR_capped_mic_handling", "standard"),
as_wt_nwt = identical(breakpoint_type, "ECOFF"),
add_intrinsic_resistance = FALSE,
reference_data = AMR::clinical_breakpoints,
substitute_missing_r_breakpoint = getOption("AMR_substitute_missing_r_breakpoint",
FALSE), include_screening = getOption("AMR_include_screening", FALSE),
FALSE),
include_screening = getOption("AMR_include_screening", FALSE),
include_PKPD = getOption("AMR_include_PKPD", TRUE),
breakpoint_type = getOption("AMR_breakpoint_type", "human"), host = NULL,
language = get_AMR_locale(), verbose = FALSE, info = interactive(),
parallel = FALSE, conserve_capped_values = NULL)
breakpoint_type = getOption("AMR_breakpoint_type", "human"),
host = NULL,
language = get_AMR_locale(),
verbose = FALSE,
info = interactive(),
parallel = FALSE,
conserve_capped_values = NULL
)
sir_interpretation_history(clean = FALSE)
```
## Source
For interpretations of minimum inhibitory concentration (MIC) values and
disk diffusion diameters:
- **CLSI M39: Analysis and Presentation of Cumulative Antimicrobial
Susceptibility Test Data**, 2011-2026, *Clinical and Laboratory
Standards Institute* (CLSI).
<https://clsi.org/standards/products/microbiology/documents/m39/>.
- **CLSI M100: Performance Standard for Antimicrobial Susceptibility
Testing**, 2011-2026, *Clinical and Laboratory Standards Institute*
(CLSI).
<https://clsi.org/standards/products/microbiology/documents/m100/>.
- **CLSI VET01: Performance Standards for Antimicrobial Disk and
Dilution Susceptibility Tests for Bacteria Isolated From Animals**,
2019-2026, *Clinical and Laboratory Standards Institute* (CLSI).
<https://clsi.org/standards/products/veterinary-medicine/documents/vet01/>.
- **EUCAST Breakpoint tables for interpretation of MICs and zone
diameters**, 2011-2026, *European Committee on Antimicrobial
Susceptibility Testing* (EUCAST).
<https://www.eucast.org/bacteria/clinical-breakpoints-and-interpretation/clinical-breakpoint-tables/>.
- **WHONET** as a source for machine-reading the clinical breakpoints
([read more
here](https://amr-for-r.org/reference/clinical_breakpoints.html#imported-from-whonet)),
1989-2026, *WHO Collaborating Centre for Surveillance of Antimicrobial
Resistance*. <https://whonet.org/>.
## Arguments
- x:
@@ -364,7 +374,8 @@ disk diffusion diameters:
## Value
Ordered \[factor\] with new class \`sir\`
Ordered [factor](https://rdrr.io/pkg/data.table/man/fctr.html) with new
class `sir`
## Details
@@ -577,6 +588,37 @@ links](https://amr-for-r.org/articles/datasets.html), or explore the
actual files in [our GitHub
repository](https://github.com/msberends/AMR/tree/main/data-raw/datasets).
## References
For interpretations of minimum inhibitory concentration (MIC) values and
disk diffusion diameters:
- **CLSI M39: Analysis and Presentation of Cumulative Antimicrobial
Susceptibility Test Data**, 2011-2026, *Clinical and Laboratory
Standards Institute* (CLSI).
<https://clsi.org/standards/products/microbiology/documents/m39/>.
- **CLSI M100: Performance Standard for Antimicrobial Susceptibility
Testing**, 2011-2026, *Clinical and Laboratory Standards Institute*
(CLSI).
<https://clsi.org/standards/products/microbiology/documents/m100/>.
- **CLSI VET01: Performance Standards for Antimicrobial Disk and
Dilution Susceptibility Tests for Bacteria Isolated From Animals**,
2019-2026, *Clinical and Laboratory Standards Institute* (CLSI).
<https://clsi.org/standards/products/veterinary-medicine/documents/vet01/>.
- **EUCAST Breakpoint tables for interpretation of MICs and zone
diameters**, 2011-2026, *European Committee on Antimicrobial
Susceptibility Testing* (EUCAST).
<https://www.eucast.org/bacteria/clinical-breakpoints-and-interpretation/clinical-breakpoint-tables/>.
- **WHONET** as a source for machine-reading the clinical breakpoints
([read more
here](https://amr-for-r.org/reference/clinical_breakpoints.html#imported-from-whonet)),
1989-2026, *WHO Collaborating Centre for Surveillance of Antimicrobial
Resistance*. <https://whonet.org/>.
## See also
[`as.mic()`](https://amr-for-r.org/reference/as.mic.md),
@@ -663,10 +705,10 @@ sir_interpretation_history()
#> # A tibble: 4 × 18
#> datetime index method ab_given mo_given host_given input_given
#> <dttm> <int> <chr> <chr> <chr> <chr> <chr>
#> 1 2026-05-02 13:02:42 1 MIC amoxicillin Escherich… human 8
#> 2 2026-05-02 13:02:42 1 MIC cipro Escherich… human 0.256
#> 3 2026-05-02 13:02:42 1 DISK tobra Escherich… human 16
#> 4 2026-05-02 13:02:43 1 DISK genta Escherich… human 18
#> 1 2026-06-23 17:55:31 1 MIC amoxicillin Escherich… human 8
#> 2 2026-06-23 17:55:31 1 MIC cipro Escherich… human 0.256
#> 3 2026-06-23 17:55:32 1 DISK tobra Escherich… human 16
#> 4 2026-06-23 17:55:32 1 DISK genta Escherich… human 18
#> # 11 more variables: ab <ab>, mo <mo>, host <chr>, input <chr>,
#> # outcome <sir>, notes <chr>, guideline <chr>, ref_table <chr>, uti <lgl>,
#> # breakpoint_S_R <chr>, site <chr>

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Get ATC Properties from WHOCC Website — atc_online_property • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Get ATC Properties from WHOCC Website — atc_online_property"><meta name="description" content="Gets data from the WHOCC website to determine properties of an Anatomical Therapeutic Chemical (ATC) (e.g. an antimicrobial), such as the name, defined daily dose (DDD) or standard unit."><meta property="og:description" content="Gets data from the WHOCC website to determine properties of an Anatomical Therapeutic Chemical (ATC) (e.g. an antimicrobial), such as the name, defined daily dose (DDD) or standard unit."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Get ATC Properties from WHOCC Website — atc_online_property • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Get ATC Properties from WHOCC Website — atc_online_property"><meta name="description" content="Gets data from the WHOCC website to determine properties of an Anatomical Therapeutic Chemical (ATC) (e.g. an antimicrobial), such as the name, defined daily dose (DDD) or standard unit."><meta property="og:description" content="Gets data from the WHOCC website to determine properties of an Anatomical Therapeutic Chemical (ATC) (e.g. an antimicrobial), such as the name, defined daily dose (DDD) or standard unit."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -55,9 +55,13 @@
<div class="section level2">
<h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">atc_online_property</span><span class="op">(</span><span class="va">atc_code</span>, <span class="va">property</span>, administration <span class="op">=</span> <span class="st">"O"</span>,</span>
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">atc_online_property</span><span class="op">(</span></span>
<span> <span class="va">atc_code</span>,</span>
<span> <span class="va">property</span>,</span>
<span> administration <span class="op">=</span> <span class="st">"O"</span>,</span>
<span> url <span class="op">=</span> <span class="st">"https://atcddd.fhi.no/atc_ddd_index/?code=%s&amp;showdescription=no"</span>,</span>
<span> url_vet <span class="op">=</span> <span class="st">"https://atcddd.fhi.no/atcvet/atcvet_index/?code=%s&amp;showdescription=no"</span><span class="op">)</span></span>
<span> url_vet <span class="op">=</span> <span class="st">"https://atcddd.fhi.no/atcvet/atcvet_index/?code=%s&amp;showdescription=no"</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="fu">atc_online_groups</span><span class="op">(</span><span class="va">atc_code</span>, <span class="va">...</span><span class="op">)</span></span>
<span></span>

View File

@@ -7,9 +7,13 @@ the name, defined daily dose (DDD) or standard unit.
## Usage
``` r
atc_online_property(atc_code, property, administration = "O",
atc_online_property(
atc_code,
property,
administration = "O",
url = "https://atcddd.fhi.no/atc_ddd_index/?code=%s&showdescription=no",
url_vet = "https://atcddd.fhi.no/atcvet/atcvet_index/?code=%s&showdescription=no")
url_vet = "https://atcddd.fhi.no/atcvet/atcvet_index/?code=%s&showdescription=no"
)
atc_online_groups(atc_code, ...)

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Retrieve Antiviral Drug Names and Doses from Clinical Text — av_from_text • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Retrieve Antiviral Drug Names and Doses from Clinical Text — av_from_text"><meta name="description" content="Use this function on e.g. clinical texts from health care records. It returns a list with all antiviral drugs, doses and forms of administration found in the texts."><meta property="og:description" content="Use this function on e.g. clinical texts from health care records. It returns a list with all antiviral drugs, doses and forms of administration found in the texts."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Retrieve Antiviral Drug Names and Doses from Clinical Text — av_from_text • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Retrieve Antiviral Drug Names and Doses from Clinical Text — av_from_text"><meta name="description" content="Use this function on e.g. clinical texts from health care records. It returns a list with all antiviral drugs, doses and forms of administration found in the texts."><meta property="og:description" content="Use this function on e.g. clinical texts from health care records. It returns a list with all antiviral drugs, doses and forms of administration found in the texts."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -55,9 +55,15 @@
<div class="section level2">
<h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">av_from_text</span><span class="op">(</span><span class="va">text</span>, type <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"drug"</span>, <span class="st">"dose"</span>, <span class="st">"administration"</span><span class="op">)</span>,</span>
<span> collapse <span class="op">=</span> <span class="cn">NULL</span>, translate_av <span class="op">=</span> <span class="cn">FALSE</span>, thorough_search <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> info <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/interactive.html" class="external-link">interactive</a></span><span class="op">(</span><span class="op">)</span>, <span class="va">...</span><span class="op">)</span></span></code></pre></div>
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">av_from_text</span><span class="op">(</span></span>
<span> <span class="va">text</span>,</span>
<span> type <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"drug"</span>, <span class="st">"dose"</span>, <span class="st">"administration"</span><span class="op">)</span>,</span>
<span> collapse <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> translate_av <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> thorough_search <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> info <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/interactive.html" class="external-link">interactive</a></span><span class="op">(</span><span class="op">)</span>,</span>
<span> <span class="va">...</span></span>
<span><span class="op">)</span></span></code></pre></div>
</div>
<div class="section level2">

View File

@@ -7,9 +7,15 @@ drugs, doses and forms of administration found in the texts.
## Usage
``` r
av_from_text(text, type = c("drug", "dose", "administration"),
collapse = NULL, translate_av = FALSE, thorough_search = NULL,
info = interactive(), ...)
av_from_text(
text,
type = c("drug", "dose", "administration"),
collapse = NULL,
translate_av = FALSE,
thorough_search = NULL,
info = interactive(),
...
)
```
## Arguments

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Get Properties of an Antiviral Drug — av_property • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Get Properties of an Antiviral Drug — av_property"><meta name="description" content="Use these functions to return a specific property of an antiviral drug from the antivirals data set. All input values will be evaluated internally with as.av()."><meta property="og:description" content="Use these functions to return a specific property of an antiviral drug from the antivirals data set. All input values will be evaluated internally with as.av()."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Get Properties of an Antiviral Drug — av_property • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Get Properties of an Antiviral Drug — av_property"><meta name="description" content="Use these functions to return a specific property of an antiviral drug from the antivirals data set. All input values will be evaluated internally with as.av()."><meta property="og:description" content="Use these functions to return a specific property of an antiviral drug from the antivirals data set. All input values will be evaluated internally with as.av()."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Check Availability of Columns — availability • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Check Availability of Columns — availability"><meta name="description" content="Easy check for data availability of all columns in a data set. This makes it easy to get an idea of which antimicrobial combinations can be used for calculation with e.g. susceptibility() and resistance()."><meta property="og:description" content="Easy check for data availability of all columns in a data set. This makes it easy to get an idea of which antimicrobial combinations can be used for calculation with e.g. susceptibility() and resistance()."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Check Availability of Columns — availability • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Check Availability of Columns — availability"><meta name="description" content="Easy check for data availability of all columns in a data set. This makes it easy to get an idea of which antimicrobial combinations can be used for calculation with e.g. susceptibility() and resistance()."><meta property="og:description" content="Easy check for data availability of all columns in a data set. This makes it easy to get an idea of which antimicrobial combinations can be used for calculation with e.g. susceptibility() and resistance()."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Determine Bug-Drug Combinations — bug_drug_combinations • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Determine Bug-Drug Combinations — bug_drug_combinations"><meta name="description" content="Determine antimicrobial resistance (AMR) of all bug-drug combinations in your data set where at least 30 (default) isolates are available per species. Use format() on the result to prettify it to a publishable/printable format, see Examples."><meta property="og:description" content="Determine antimicrobial resistance (AMR) of all bug-drug combinations in your data set where at least 30 (default) isolates are available per species. Use format() on the result to prettify it to a publishable/printable format, see Examples."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Determine Bug-Drug Combinations — bug_drug_combinations • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Determine Bug-Drug Combinations — bug_drug_combinations"><meta name="description" content="Determine antimicrobial resistance (AMR) of all bug-drug combinations in your data set where at least 30 (default) isolates are available per species. Use format() on the result to prettify it to a publishable/printable format, see Examples."><meta property="og:description" content="Determine antimicrobial resistance (AMR) of all bug-drug combinations in your data set where at least 30 (default) isolates are available per species. Use format() on the result to prettify it to a publishable/printable format, see Examples."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -55,15 +55,27 @@
<div class="section level2">
<h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">bug_drug_combinations</span><span class="op">(</span><span class="va">x</span>, col_mo <span class="op">=</span> <span class="cn">NULL</span>, FUN <span class="op">=</span> <span class="va">mo_shortname</span>,</span>
<span> include_n_rows <span class="op">=</span> <span class="cn">FALSE</span>, <span class="va">...</span><span class="op">)</span></span>
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">bug_drug_combinations</span><span class="op">(</span></span>
<span> <span class="va">x</span>,</span>
<span> col_mo <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> FUN <span class="op">=</span> <span class="va">mo_shortname</span>,</span>
<span> include_n_rows <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> <span class="va">...</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="co"># S3 method for class 'bug_drug_combinations'</span></span>
<span><span class="fu"><a href="https://rdrr.io/r/base/format.html" class="external-link">format</a></span><span class="op">(</span><span class="va">x</span>, translate_ab <span class="op">=</span> <span class="st">"name (ab, atc)"</span>,</span>
<span> language <span class="op">=</span> <span class="fu"><a href="translate.html">get_AMR_locale</a></span><span class="op">(</span><span class="op">)</span>, minimum <span class="op">=</span> <span class="fl">30</span>, combine_SI <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> add_ab_group <span class="op">=</span> <span class="cn">TRUE</span>, remove_intrinsic_resistant <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> decimal.mark <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"OutDec"</span><span class="op">)</span>, big.mark <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/ifelse.html" class="external-link">ifelse</a></span><span class="op">(</span><span class="va">decimal.mark</span> <span class="op">==</span></span>
<span> <span class="st">","</span>, <span class="st">"."</span>, <span class="st">","</span><span class="op">)</span>, <span class="va">...</span><span class="op">)</span></span></code></pre></div>
<span><span class="fu"><a href="https://rdrr.io/r/base/format.html" class="external-link">format</a></span><span class="op">(</span></span>
<span> <span class="va">x</span>,</span>
<span> translate_ab <span class="op">=</span> <span class="st">"name (ab, atc)"</span>,</span>
<span> language <span class="op">=</span> <span class="fu"><a href="translate.html">get_AMR_locale</a></span><span class="op">(</span><span class="op">)</span>,</span>
<span> minimum <span class="op">=</span> <span class="fl">30</span>,</span>
<span> combine_SI <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> add_ab_group <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> remove_intrinsic_resistant <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> decimal.mark <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"OutDec"</span><span class="op">)</span>,</span>
<span> big.mark <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/ifelse.html" class="external-link">ifelse</a></span><span class="op">(</span><span class="va">decimal.mark</span> <span class="op">==</span> <span class="st">","</span>, <span class="st">"."</span>, <span class="st">","</span><span class="op">)</span>,</span>
<span> <span class="va">...</span></span>
<span><span class="op">)</span></span></code></pre></div>
</div>
<div class="section level2">

View File

@@ -8,15 +8,27 @@ result to prettify it to a publishable/printable format, see *Examples*.
## Usage
``` r
bug_drug_combinations(x, col_mo = NULL, FUN = mo_shortname,
include_n_rows = FALSE, ...)
bug_drug_combinations(
x,
col_mo = NULL,
FUN = mo_shortname,
include_n_rows = FALSE,
...
)
# S3 method for class 'bug_drug_combinations'
format(x, translate_ab = "name (ab, atc)",
language = get_AMR_locale(), minimum = 30, combine_SI = TRUE,
add_ab_group = TRUE, remove_intrinsic_resistant = FALSE,
decimal.mark = getOption("OutDec"), big.mark = ifelse(decimal.mark ==
",", ".", ","), ...)
format(
x,
translate_ab = "name (ab, atc)",
language = get_AMR_locale(),
minimum = 30,
combine_SI = TRUE,
add_ab_group = TRUE,
remove_intrinsic_resistant = FALSE,
decimal.mark = getOption("OutDec"),
big.mark = ifelse(decimal.mark == ",", ".", ","),
...
)
```
## Arguments

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Data Set with Clinical Breakpoints for SIR Interpretation — clinical_breakpoints • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Data Set with Clinical Breakpoints for SIR Interpretation — clinical_breakpoints"><meta name="description" content="Data set containing clinical breakpoints to interpret MIC and disk diffusion to SIR values, according to international guidelines. This data set contains breakpoints for humans, 7 different animal groups, and ECOFFs.
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Data Set with Clinical Breakpoints for SIR Interpretation — clinical_breakpoints • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Data Set with Clinical Breakpoints for SIR Interpretation — clinical_breakpoints"><meta name="description" content="Data set containing clinical breakpoints to interpret MIC and disk diffusion to SIR values, according to international guidelines. This data set contains breakpoints for humans, 7 different animal groups, and ECOFFs.
These breakpoints are currently implemented:
For clinical microbiology: EUCAST 2011-2026 and CLSI 2011-2026;
For veterinary microbiology: EUCAST 2021-2026 and CLSI 2019-2026;
@@ -21,7 +21,7 @@ Use as.sir() to transform MICs or disks measurements to SIR values."><meta prope
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -78,7 +78,7 @@ Use as.sir() to transform MICs or disks measurements to SIR values."><meta prope
<div class="section level2">
<h2 id="format">Format<a class="anchor" aria-label="anchor" href="#format"></a></h2>
<p>A <a href="https://tibble.tidyverse.org/reference/tibble.html" class="external-link">tibble</a> with 45 730 observations and 14 variables:</p><ul><li><p><code>guideline</code><br> Name of the guideline</p></li>
<p>A <a href="https://tibble.tidyverse.org/reference/tibble.html" class="external-link">tibble</a> with 45 555 observations and 14 variables:</p><ul><li><p><code>guideline</code><br> Name of the guideline</p></li>
<li><p><code>type</code><br> Breakpoint type, either <code>"ECOFF"</code>, <code>"animal"</code>, or <code>"human"</code></p></li>
<li><p><code>host</code><br> Host of infectious agent. This is mostly useful for veterinary breakpoints and is either <code>"ECOFF"</code>, <code>"aquatic"</code>, <code>"cats"</code>, <code>"cattle"</code>, <code>"dogs"</code>, <code>"horse"</code>, <code>"human"</code>, <code>"poultry"</code>, or <code>"swine"</code></p></li>
<li><p><code>method</code><br> Testing method, either <code>"DISK"</code> or <code>"MIC"</code></p></li>
@@ -143,7 +143,7 @@ Use as.sir() to transform MICs or disks measurements to SIR values."><meta prope
<div class="section level2">
<h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="va">clinical_breakpoints</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 45,730 × 14</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 45,555 × 14</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> guideline type host method site mo rank_index ab ref_tbl </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;mo&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dbl&gt;</span> <span style="color: #949494; font-style: italic;">&lt;ab&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> EUCAST 2026 human human DISK <span style="color: #BB0000;">NA</span> <span style="color: #949494;">B_</span>ACHRMB<span style="color: #949494;">_</span>XYLS 2 MEM A. xylo…</span>
@@ -156,7 +156,7 @@ Use as.sir() to transform MICs or disks measurements to SIR values."><meta prope
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> EUCAST 2026 human human DISK Uncomp… <span style="color: #949494;">B_</span>ACNTB 3 AMK Acineto…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> EUCAST 2026 human human MIC <span style="color: #BB0000;">NA</span> <span style="color: #949494;">B_</span>ACNTB 3 AMK Acineto…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> EUCAST 2026 human human MIC Uncomp… <span style="color: #949494;">B_</span>ACNTB 3 AMK Acineto…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># 45,720 more rows</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># 45,545 more rows</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># 5 more variables: disk_dose &lt;chr&gt;, breakpoint_S &lt;dbl&gt;, breakpoint_R &lt;dbl&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># uti &lt;lgl&gt;, is_SDD &lt;lgl&gt;</span></span>
</code></pre></div>

View File

@@ -26,7 +26,7 @@ clinical_breakpoints
## Format
A [tibble](https://tibble.tidyverse.org/reference/tibble.html) with 45
730 observations and 14 variables:
555 observations and 14 variables:
- `guideline`
Name of the guideline
@@ -154,7 +154,7 @@ repository](https://github.com/msberends/AMR/tree/main/data-raw/datasets).
``` r
clinical_breakpoints
#> # A tibble: 45,730 × 14
#> # A tibble: 45,555 × 14
#> guideline type host method site mo rank_index ab ref_tbl
#> <chr> <chr> <chr> <chr> <chr> <mo> <dbl> <ab> <chr>
#> 1 EUCAST 2026 human human DISK NA B_ACHRMB_XYLS 2 MEM A. xylo…
@@ -167,7 +167,7 @@ clinical_breakpoints
#> 8 EUCAST 2026 human human DISK Uncomp… B_ACNTB 3 AMK Acineto…
#> 9 EUCAST 2026 human human MIC NA B_ACNTB 3 AMK Acineto…
#> 10 EUCAST 2026 human human MIC Uncomp… B_ACNTB 3 AMK Acineto…
#> # 45,720 more rows
#> # 45,545 more rows
#> # 5 more variables: disk_dose <chr>, breakpoint_S <dbl>, breakpoint_R <dbl>,
#> # uti <lgl>, is_SDD <lgl>
```

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Count Available Isolates — count • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Count Available Isolates — count"><meta name="description" content="These functions can be used to count resistant/susceptible microbial isolates. All functions support quasiquotation with pipes, can be used in summarise() from the dplyr package and also support grouped variables, see Examples.
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Count Available Isolates — count • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Count Available Isolates — count"><meta name="description" content="These functions can be used to count resistant/susceptible microbial isolates. All functions support quasiquotation with pipes, can be used in summarise() from the dplyr package and also support grouped variables, see Examples.
count_resistant() should be used to count resistant isolates, count_susceptible() should be used to count susceptible isolates."><meta property="og:description" content="These functions can be used to count resistant/susceptible microbial isolates. All functions support quasiquotation with pipes, can be used in summarise() from the dplyr package and also support grouped variables, see Examples.
count_resistant() should be used to count resistant isolates, count_susceptible() should be used to count susceptible isolates."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -9,7 +9,7 @@ count_resistant() should be used to count resistant isolates, count_susceptible(
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -58,11 +58,17 @@ count_resistant() should be used to count resistant isolates, count_susceptible(
<div class="section level2">
<h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">count_resistant</span><span class="op">(</span><span class="va">...</span>, only_all_tested <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> guideline <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"AMR_guideline"</span>, <span class="st">"EUCAST"</span><span class="op">)</span><span class="op">)</span></span>
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">count_resistant</span><span class="op">(</span></span>
<span> <span class="va">...</span>,</span>
<span> only_all_tested <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> guideline <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"AMR_guideline"</span>, <span class="st">"EUCAST"</span><span class="op">)</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="fu">count_susceptible</span><span class="op">(</span><span class="va">...</span>, only_all_tested <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> guideline <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"AMR_guideline"</span>, <span class="st">"EUCAST"</span><span class="op">)</span><span class="op">)</span></span>
<span><span class="fu">count_susceptible</span><span class="op">(</span></span>
<span> <span class="va">...</span>,</span>
<span> only_all_tested <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> guideline <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"AMR_guideline"</span>, <span class="st">"EUCAST"</span><span class="op">)</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="fu">count_S</span><span class="op">(</span><span class="va">...</span>, only_all_tested <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></span>
<span></span>
@@ -78,8 +84,12 @@ count_resistant() should be used to count resistant isolates, count_susceptible(
<span></span>
<span><span class="fu">n_sir</span><span class="op">(</span><span class="va">...</span>, only_all_tested <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">count_df</span><span class="op">(</span><span class="va">data</span>, translate_ab <span class="op">=</span> <span class="st">"name"</span>, language <span class="op">=</span> <span class="fu"><a href="translate.html">get_AMR_locale</a></span><span class="op">(</span><span class="op">)</span>,</span>
<span> combine_SI <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></code></pre></div>
<span><span class="fu">count_df</span><span class="op">(</span></span>
<span> <span class="va">data</span>,</span>
<span> translate_ab <span class="op">=</span> <span class="st">"name"</span>,</span>
<span> language <span class="op">=</span> <span class="fu"><a href="translate.html">get_AMR_locale</a></span><span class="op">(</span><span class="op">)</span>,</span>
<span> combine_SI <span class="op">=</span> <span class="cn">TRUE</span></span>
<span><span class="op">)</span></span></code></pre></div>
</div>
<div class="section level2">

View File

@@ -12,11 +12,17 @@ from the `dplyr` package and also support grouped variables, see
## Usage
``` r
count_resistant(..., only_all_tested = FALSE,
guideline = getOption("AMR_guideline", "EUCAST"))
count_resistant(
...,
only_all_tested = FALSE,
guideline = getOption("AMR_guideline", "EUCAST")
)
count_susceptible(..., only_all_tested = FALSE,
guideline = getOption("AMR_guideline", "EUCAST"))
count_susceptible(
...,
only_all_tested = FALSE,
guideline = getOption("AMR_guideline", "EUCAST")
)
count_S(..., only_all_tested = FALSE)
@@ -32,8 +38,12 @@ count_all(..., only_all_tested = FALSE)
n_sir(..., only_all_tested = FALSE)
count_df(data, translate_ab = "name", language = get_AMR_locale(),
combine_SI = TRUE)
count_df(
data,
translate_ab = "name",
language = get_AMR_locale(),
combine_SI = TRUE
)
```
## Arguments

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Define Custom Interpretive Rules — custom_interpretive_rules • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Define Custom Interpretive Rules — custom_interpretive_rules"><meta name="description" content="Define custom interpretive rules for your organisation or specific analysis and use the output of this function in interpretive_rules()."><meta property="og:description" content="Define custom interpretive rules for your organisation or specific analysis and use the output of this function in interpretive_rules()."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Define Custom Interpretive Rules — custom_interpretive_rules • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Define Custom Interpretive Rules — custom_interpretive_rules"><meta name="description" content="Define custom interpretive rules for your organisation or specific analysis and use the output of this function in interpretive_rules()."><meta property="og:description" content="Define custom interpretive rules for your organisation or specific analysis and use the output of this function in interpretive_rules()."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -112,7 +112,7 @@
<h3 id="using-taxonomic-properties-in-rules">Using taxonomic properties in rules<a class="anchor" aria-label="anchor" href="#using-taxonomic-properties-in-rules"></a></h3>
<p>There is one exception in columns used for the rules: all column names of the <a href="microorganisms.html">microorganisms</a> data set can also be used, but do not have to exist in the data set. These column names are: <code>"mo"</code>, <code>"fullname"</code>, <code>"status"</code>, <code>"kingdom"</code>, <code>"phylum"</code>, <code>"class"</code>, <code>"order"</code>, <code>"family"</code>, <code>"genus"</code>, <code>"species"</code>, <code>"subspecies"</code>, <code>"rank"</code>, <code>"ref"</code>, <code>"oxygen_tolerance"</code>, <code>"source"</code>, <code>"lpsn"</code>, <code>"lpsn_parent"</code>, <code>"lpsn_renamed_to"</code>, <code>"mycobank"</code>, <code>"mycobank_parent"</code>, <code>"mycobank_renamed_to"</code>, <code>"gbif"</code>, <code>"gbif_parent"</code>, <code>"gbif_renamed_to"</code>, <code>"prevalence"</code>, and <code>"snomed"</code>. Thus, this next example will work as well, despite the fact that the <code>df</code> data set does not contain a column <code>genus</code>:</p>
<p>There is one exception in columns used for the rules: all column names of the <a href="microorganisms.html">microorganisms</a> data set can also be used, but do not have to exist in the data set. These column names are: <code>"mo"</code>, <code>"fullname"</code>, <code>"status"</code>, <code>"domain"</code>, <code>"kingdom"</code>, <code>"phylum"</code>, <code>"class"</code>, <code>"order"</code>, <code>"family"</code>, <code>"genus"</code>, <code>"species"</code>, <code>"subspecies"</code>, <code>"rank"</code>, <code>"ref"</code>, <code>"oxygen_tolerance"</code>, <code>"morphology"</code>, <code>"source"</code>, <code>"lpsn"</code>, <code>"lpsn_parent"</code>, <code>"lpsn_renamed_to"</code>, <code>"mycobank"</code>, <code>"mycobank_parent"</code>, <code>"mycobank_renamed_to"</code>, <code>"gbif"</code>, <code>"gbif_parent"</code>, <code>"gbif_renamed_to"</code>, <code>"prevalence"</code>, and <code>"snomed"</code>. Thus, this next example will work as well, despite the fact that the <code>df</code> data set does not contain a column <code>genus</code>:</p>
<p></p><div class="sourceCode r"><pre><code><span><span class="va">y</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/custom_interpretive_rules.html">custom_interpretive_rules</a></span><span class="op">(</span></span>
<span> <span class="va">TZP</span> <span class="op">==</span> <span class="st">"S"</span> <span class="op">&amp;</span> <span class="va">genus</span> <span class="op">==</span> <span class="st">"Klebsiella"</span> <span class="op">~</span> <span class="va">aminopenicillins</span> <span class="op">==</span> <span class="st">"S"</span>,</span>
<span> <span class="va">TZP</span> <span class="op">==</span> <span class="st">"R"</span> <span class="op">&amp;</span> <span class="va">genus</span> <span class="op">==</span> <span class="st">"Klebsiella"</span> <span class="op">~</span> <span class="va">aminopenicillins</span> <span class="op">==</span> <span class="st">"R"</span></span>

View File

@@ -85,14 +85,15 @@ There is one exception in columns used for the rules: all column names
of the
[microorganisms](https://amr-for-r.org/reference/microorganisms.md) data
set can also be used, but do not have to exist in the data set. These
column names are: `"mo"`, `"fullname"`, `"status"`, `"kingdom"`,
`"phylum"`, `"class"`, `"order"`, `"family"`, `"genus"`, `"species"`,
`"subspecies"`, `"rank"`, `"ref"`, `"oxygen_tolerance"`, `"source"`,
`"lpsn"`, `"lpsn_parent"`, `"lpsn_renamed_to"`, `"mycobank"`,
`"mycobank_parent"`, `"mycobank_renamed_to"`, `"gbif"`, `"gbif_parent"`,
`"gbif_renamed_to"`, `"prevalence"`, and `"snomed"`. Thus, this next
example will work as well, despite the fact that the `df` data set does
not contain a column `genus`:
column names are: `"mo"`, `"fullname"`, `"status"`, `"domain"`,
`"kingdom"`, `"phylum"`, `"class"`, `"order"`, `"family"`, `"genus"`,
`"species"`, `"subspecies"`, `"rank"`, `"ref"`, `"oxygen_tolerance"`,
`"morphology"`, `"source"`, `"lpsn"`, `"lpsn_parent"`,
`"lpsn_renamed_to"`, `"mycobank"`, `"mycobank_parent"`,
`"mycobank_renamed_to"`, `"gbif"`, `"gbif_parent"`, `"gbif_renamed_to"`,
`"prevalence"`, and `"snomed"`. Thus, this next example will work as
well, despite the fact that the `df` data set does not contain a column
`genus`:
y <- custom_interpretive_rules(
TZP == "S" & genus == "Klebsiella" ~ aminopenicillins == "S",

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Define Custom MDRO Guideline — custom_mdro_guideline • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Define Custom MDRO Guideline — custom_mdro_guideline"><meta name="description" content="Define custom a MDRO guideline for your organisation or specific analysis and use the output of this function in mdro()."><meta property="og:description" content="Define custom a MDRO guideline for your organisation or specific analysis and use the output of this function in mdro()."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Define Custom MDRO Guideline — custom_mdro_guideline • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Define Custom MDRO Guideline — custom_mdro_guideline"><meta name="description" content="Define custom a MDRO guideline for your organisation or specific analysis and use the output of this function in mdro()."><meta property="og:description" content="Define custom a MDRO guideline for your organisation or specific analysis and use the output of this function in mdro()."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -70,7 +70,7 @@
<dt id="arg-as-factor">as_factor<a class="anchor" aria-label="anchor" href="#arg-as-factor"></a></dt>
<dd><p>A [logical] to indicate whether the returned value should be an ordered [factor] (`TRUE`, default), or otherwise a [character] vector. For combining rules sets (using [c()]) this value will be inherited from the first set at default.</p></dd>
<dd><p>A <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate whether the returned value should be an ordered <a href="https://rdrr.io/pkg/data.table/man/fctr.html" class="external-link">factor</a> (<code>TRUE</code>, default), or otherwise a <a href="https://rdrr.io/r/base/character.html" class="external-link">character</a> vector. For combining rules sets (using <code><a href="https://rdrr.io/r/base/c.html" class="external-link">c()</a></code>) this value will be inherited from the first set at default.</p></dd>
<dt id="arg-x">x<a class="anchor" aria-label="anchor" href="#arg-x"></a></dt>

View File

@@ -22,10 +22,13 @@ c(x, ..., as_factor = NULL)
- as_factor:
A \[logical\] to indicate whether the returned value should be an
ordered \[factor\] (\`TRUE\`, default), or otherwise a \[character\]
vector. For combining rules sets (using \[c()\]) this value will be
inherited from the first set at default.
A [logical](https://rdrr.io/r/base/logical.html) to indicate whether
the returned value should be an ordered
[factor](https://rdrr.io/pkg/data.table/man/fctr.html) (`TRUE`,
default), or otherwise a
[character](https://rdrr.io/r/base/character.html) vector. For
combining rules sets (using [`c()`](https://rdrr.io/r/base/c.html))
this value will be inherited from the first set at default.
- x:

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Data Set with Treatment Dosages as Defined by EUCAST — dosage • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Data Set with Treatment Dosages as Defined by EUCAST — dosage"><meta name="description" content="EUCAST breakpoints used in this package are based on the dosages in this data set. They can be retrieved with eucast_dosage()."><meta property="og:description" content="EUCAST breakpoints used in this package are based on the dosages in this data set. They can be retrieved with eucast_dosage()."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Data Set with Treatment Dosages as Defined by EUCAST — dosage • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Data Set with Treatment Dosages as Defined by EUCAST — dosage"><meta name="description" content="EUCAST breakpoints used in this package are based on the dosages in this data set. They can be retrieved with eucast_dosage()."><meta property="og:description" content="EUCAST breakpoints used in this package are based on the dosages in this data set. They can be retrieved with eucast_dosage()."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Data Set with 500 ESBL Isolates — esbl_isolates • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Data Set with 500 ESBL Isolates — esbl_isolates"><meta name="description" content="A data set containing 500 microbial isolates with MIC values of common antibiotics and a binary esbl column for extended-spectrum beta-lactamase (ESBL) production. This data set contains randomised fictitious data but reflects reality and can be used to practise AMR-related machine learning, e.g., classification modelling with tidymodels."><meta property="og:description" content="A data set containing 500 microbial isolates with MIC values of common antibiotics and a binary esbl column for extended-spectrum beta-lactamase (ESBL) production. This data set contains randomised fictitious data but reflects reality and can be used to practise AMR-related machine learning, e.g., classification modelling with tidymodels."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Data Set with 500 ESBL Isolates — esbl_isolates • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Data Set with 500 ESBL Isolates — esbl_isolates"><meta name="description" content="A data set containing 500 microbial isolates with MIC values of common antibiotics and a binary esbl column for extended-spectrum beta-lactamase (ESBL) production. This data set contains randomised fictitious data but reflects reality and can be used to practise AMR-related machine learning, e.g., classification modelling with tidymodels."><meta property="og:description" content="A data set containing 500 microbial isolates with MIC values of common antibiotics and a binary esbl column for extended-spectrum beta-lactamase (ESBL) production. This data set contains randomised fictitious data but reflects reality and can be used to practise AMR-related machine learning, e.g., classification modelling with tidymodels."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Data Set with 2 000 Example Isolates — example_isolates • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Data Set with 2 000 Example Isolates — example_isolates"><meta name="description" content="A data set containing 2 000 microbial isolates with their full antibiograms. This data set contains randomised fictitious data, but reflects reality and can be used to practise AMR data analysis. For examples, please read the tutorial on our website."><meta property="og:description" content="A data set containing 2 000 microbial isolates with their full antibiograms. This data set contains randomised fictitious data, but reflects reality and can be used to practise AMR data analysis. For examples, please read the tutorial on our website."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Data Set with 2 000 Example Isolates — example_isolates • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Data Set with 2 000 Example Isolates — example_isolates"><meta name="description" content="A data set containing 2 000 microbial isolates with their full antibiograms. This data set contains randomised fictitious data, but reflects reality and can be used to practise AMR data analysis. For examples, please read the tutorial on our website."><meta property="og:description" content="A data set containing 2 000 microbial isolates with their full antibiograms. This data set contains randomised fictitious data, but reflects reality and can be used to practise AMR data analysis. For examples, please read the tutorial on our website."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Data Set with Unclean Data — example_isolates_unclean • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Data Set with Unclean Data — example_isolates_unclean"><meta name="description" content="A data set containing 3 000 microbial isolates that are not cleaned up and consequently not ready for AMR data analysis. This data set can be used for practice."><meta property="og:description" content="A data set containing 3 000 microbial isolates that are not cleaned up and consequently not ready for AMR data analysis. This data set can be used for practice."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Data Set with Unclean Data — example_isolates_unclean • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Data Set with Unclean Data — example_isolates_unclean"><meta name="description" content="A data set containing 3 000 microbial isolates that are not cleaned up and consequently not ready for AMR data analysis. This data set can be used for practice."><meta property="og:description" content="A data set containing 3 000 microbial isolates that are not cleaned up and consequently not ready for AMR data analysis. This data set can be used for practice."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Export Data Set as NCBI BioSample Antibiogram — export_ncbi_biosample • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Export Data Set as NCBI BioSample Antibiogram — export_ncbi_biosample"><meta name="description" content="Export Data Set as NCBI BioSample Antibiogram"><meta property="og:description" content="Export Data Set as NCBI BioSample Antibiogram"><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Export Data Set as NCBI BioSample Antibiogram — export_ncbi_biosample • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Export Data Set as NCBI BioSample Antibiogram — export_ncbi_biosample"><meta name="description" content="Export Data Set as NCBI BioSample Antibiogram"><meta property="og:description" content="Export Data Set as NCBI BioSample Antibiogram"><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -55,9 +55,13 @@
<div class="section level2">
<h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">export_ncbi_biosample</span><span class="op">(</span><span class="va">x</span>, filename <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/paste.html" class="external-link">paste0</a></span><span class="op">(</span><span class="st">"biosample_"</span>, <span class="fu"><a href="https://rdrr.io/r/base/format.html" class="external-link">format</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/Sys.time.html" class="external-link">Sys.time</a></span><span class="op">(</span><span class="op">)</span>,</span>
<span> <span class="st">"%Y-%m-%d-%H%M%S"</span><span class="op">)</span>, <span class="st">".xlsx"</span><span class="op">)</span>, type <span class="op">=</span> <span class="st">"pathogen MIC"</span>,</span>
<span> columns <span class="op">=</span> <span class="fu"><a href="https://tidyselect.r-lib.org/reference/where.html" class="external-link">where</a></span><span class="op">(</span><span class="va">is.mic</span><span class="op">)</span>, save_as_xlsx <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></code></pre></div>
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">export_ncbi_biosample</span><span class="op">(</span></span>
<span> <span class="va">x</span>,</span>
<span> filename <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/paste.html" class="external-link">paste0</a></span><span class="op">(</span><span class="st">"biosample_"</span>, <span class="fu"><a href="https://rdrr.io/r/base/format.html" class="external-link">format</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/Sys.time.html" class="external-link">Sys.time</a></span><span class="op">(</span><span class="op">)</span>, <span class="st">"%Y-%m-%d-%H%M%S"</span><span class="op">)</span>, <span class="st">".xlsx"</span><span class="op">)</span>,</span>
<span> type <span class="op">=</span> <span class="st">"pathogen MIC"</span>,</span>
<span> columns <span class="op">=</span> <span class="fu"><a href="https://tidyselect.r-lib.org/reference/where.html" class="external-link">where</a></span><span class="op">(</span><span class="va">is.mic</span><span class="op">)</span>,</span>
<span> save_as_xlsx <span class="op">=</span> <span class="cn">TRUE</span></span>
<span><span class="op">)</span></span></code></pre></div>
</div>
<div class="section level2">

View File

@@ -5,9 +5,13 @@ Export Data Set as NCBI BioSample Antibiogram
## Usage
``` r
export_ncbi_biosample(x, filename = paste0("biosample_", format(Sys.time(),
"%Y-%m-%d-%H%M%S"), ".xlsx"), type = "pathogen MIC",
columns = where(is.mic), save_as_xlsx = TRUE)
export_ncbi_biosample(
x,
filename = paste0("biosample_", format(Sys.time(), "%Y-%m-%d-%H%M%S"), ".xlsx"),
type = "pathogen MIC",
columns = where(is.mic),
save_as_xlsx = TRUE
)
```
## Arguments

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Determine First Isolates — first_isolate • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Determine First Isolates — first_isolate"><meta name="description" content="Determine first isolates of all microorganisms of every patient per episode and (if needed) per specimen type. These functions support all four methods as summarised by Hindler et al. in 2007 (doi:10.1086/511864
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Determine First Isolates — first_isolate • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Determine First Isolates — first_isolate"><meta name="description" content="Determine first isolates of all microorganisms of every patient per episode and (if needed) per specimen type. These functions support all four methods as summarised by Hindler et al. in 2007 (doi:10.1086/511864
). To determine patient episodes not necessarily based on microorganisms, use is_new_episode() that also supports grouping with the dplyr package."><meta property="og:description" content="Determine first isolates of all microorganisms of every patient per episode and (if needed) per specimen type. These functions support all four methods as summarised by Hindler et al. in 2007 (doi:10.1086/511864
). To determine patient episodes not necessarily based on microorganisms, use is_new_episode() that also supports grouping with the dplyr package."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -9,7 +9,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -58,25 +58,40 @@
<div class="section level2">
<h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">first_isolate</span><span class="op">(</span>x <span class="op">=</span> <span class="cn">NULL</span>, col_date <span class="op">=</span> <span class="cn">NULL</span>, col_patient_id <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> col_mo <span class="op">=</span> <span class="cn">NULL</span>, col_testcode <span class="op">=</span> <span class="cn">NULL</span>, col_specimen <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> col_icu <span class="op">=</span> <span class="cn">NULL</span>, col_keyantimicrobials <span class="op">=</span> <span class="cn">NULL</span>, episode_days <span class="op">=</span> <span class="fl">365</span>,</span>
<span> testcodes_exclude <span class="op">=</span> <span class="cn">NULL</span>, icu_exclude <span class="op">=</span> <span class="cn">FALSE</span>, specimen_group <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> type <span class="op">=</span> <span class="st">"points"</span>, method <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"phenotype-based"</span>, <span class="st">"episode-based"</span>,</span>
<span> <span class="st">"patient-based"</span>, <span class="st">"isolate-based"</span><span class="op">)</span>, ignore_I <span class="op">=</span> <span class="cn">TRUE</span>, points_threshold <span class="op">=</span> <span class="fl">2</span>,</span>
<span> info <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/interactive.html" class="external-link">interactive</a></span><span class="op">(</span><span class="op">)</span>, include_unknown <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> include_untested_sir <span class="op">=</span> <span class="cn">TRUE</span>, <span class="va">...</span><span class="op">)</span></span>
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">first_isolate</span><span class="op">(</span></span>
<span> x <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> col_date <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> col_patient_id <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> col_mo <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> col_testcode <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> col_specimen <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> col_icu <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> col_keyantimicrobials <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> episode_days <span class="op">=</span> <span class="fl">365</span>,</span>
<span> testcodes_exclude <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> icu_exclude <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> specimen_group <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> type <span class="op">=</span> <span class="st">"points"</span>,</span>
<span> method <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"phenotype-based"</span>, <span class="st">"episode-based"</span>, <span class="st">"patient-based"</span>, <span class="st">"isolate-based"</span><span class="op">)</span>,</span>
<span> ignore_I <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> points_threshold <span class="op">=</span> <span class="fl">2</span>,</span>
<span> info <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/interactive.html" class="external-link">interactive</a></span><span class="op">(</span><span class="op">)</span>,</span>
<span> include_unknown <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> include_untested_sir <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> <span class="va">...</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="fu">filter_first_isolate</span><span class="op">(</span>x <span class="op">=</span> <span class="cn">NULL</span>, col_date <span class="op">=</span> <span class="cn">NULL</span>, col_patient_id <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> col_mo <span class="op">=</span> <span class="cn">NULL</span>, episode_days <span class="op">=</span> <span class="fl">365</span>, method <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"phenotype-based"</span>,</span>
<span> <span class="st">"episode-based"</span>, <span class="st">"patient-based"</span>, <span class="st">"isolate-based"</span><span class="op">)</span>, <span class="va">...</span><span class="op">)</span></span></code></pre></div>
<span><span class="fu">filter_first_isolate</span><span class="op">(</span></span>
<span> x <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> col_date <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> col_patient_id <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> col_mo <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> episode_days <span class="op">=</span> <span class="fl">365</span>,</span>
<span> method <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"phenotype-based"</span>, <span class="st">"episode-based"</span>, <span class="st">"patient-based"</span>, <span class="st">"isolate-based"</span><span class="op">)</span>,</span>
<span> <span class="va">...</span></span>
<span><span class="op">)</span></span></code></pre></div>
</div>
<div class="section level2">
<h2 id="source">Source<a class="anchor" aria-label="anchor" href="#source"></a></h2>
<p>Methodology of these functions is strictly based on:</p><ul><li><p><strong>M39 Analysis and Presentation of Cumulative Antimicrobial Susceptibility Test Data, 5th Edition</strong>, 2022, <em>Clinical and Laboratory Standards Institute (CLSI)</em>. <a href="https://clsi.org/standards/products/microbiology/documents/m39/" class="external-link">https://clsi.org/standards/products/microbiology/documents/m39/</a>.</p></li>
<li><p>Hindler JF and Stelling J (2007). <strong>Analysis and Presentation of Cumulative Antibiograms: A New Consensus Guideline from the Clinical and Laboratory Standards Institute.</strong> Clinical Infectious Diseases, 44(6), 867-873. <a href="https://doi.org/10.1086/511864" class="external-link">doi:10.1086/511864</a></p></li>
</ul></div>
<div class="section level2">
<h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2>
@@ -199,6 +214,11 @@
</div>
</div>
<div class="section level2">
<h2 id="references">References<a class="anchor" aria-label="anchor" href="#references"></a></h2>
<p>Methodology of these functions is strictly based on:</p><ul><li><p><strong>M39 Analysis and Presentation of Cumulative Antimicrobial Susceptibility Test Data, 5th Edition</strong>, 2022, <em>Clinical and Laboratory Standards Institute (CLSI)</em>. <a href="https://clsi.org/standards/products/microbiology/documents/m39/" class="external-link">https://clsi.org/standards/products/microbiology/documents/m39/</a>.</p></li>
<li><p>Hindler JF and Stelling J (2007). <strong>Analysis and Presentation of Cumulative Antibiograms: A New Consensus Guideline from the Clinical and Laboratory Standards Institute.</strong> Clinical Infectious Diseases, 44(6), 867-873. <a href="https://doi.org/10.1086/511864" class="external-link">doi:10.1086/511864</a></p></li>
</ul></div>
<div class="section level2">
<h2 id="see-also">See also<a class="anchor" aria-label="anchor" href="#see-also"></a></h2>
<div class="dont-index"><p><code><a href="key_antimicrobials.html">key_antimicrobials()</a></code></p></div>

View File

@@ -11,34 +11,40 @@ that also supports grouping with the `dplyr` package.
## Usage
``` r
first_isolate(x = NULL, col_date = NULL, col_patient_id = NULL,
col_mo = NULL, col_testcode = NULL, col_specimen = NULL,
col_icu = NULL, col_keyantimicrobials = NULL, episode_days = 365,
testcodes_exclude = NULL, icu_exclude = FALSE, specimen_group = NULL,
type = "points", method = c("phenotype-based", "episode-based",
"patient-based", "isolate-based"), ignore_I = TRUE, points_threshold = 2,
info = interactive(), include_unknown = FALSE,
include_untested_sir = TRUE, ...)
first_isolate(
x = NULL,
col_date = NULL,
col_patient_id = NULL,
col_mo = NULL,
col_testcode = NULL,
col_specimen = NULL,
col_icu = NULL,
col_keyantimicrobials = NULL,
episode_days = 365,
testcodes_exclude = NULL,
icu_exclude = FALSE,
specimen_group = NULL,
type = "points",
method = c("phenotype-based", "episode-based", "patient-based", "isolate-based"),
ignore_I = TRUE,
points_threshold = 2,
info = interactive(),
include_unknown = FALSE,
include_untested_sir = TRUE,
...
)
filter_first_isolate(x = NULL, col_date = NULL, col_patient_id = NULL,
col_mo = NULL, episode_days = 365, method = c("phenotype-based",
"episode-based", "patient-based", "isolate-based"), ...)
filter_first_isolate(
x = NULL,
col_date = NULL,
col_patient_id = NULL,
col_mo = NULL,
episode_days = 365,
method = c("phenotype-based", "episode-based", "patient-based", "isolate-based"),
...
)
```
## Source
Methodology of these functions is strictly based on:
- **M39 Analysis and Presentation of Cumulative Antimicrobial
Susceptibility Test Data, 5th Edition**, 2022, *Clinical and
Laboratory Standards Institute (CLSI)*.
<https://clsi.org/standards/products/microbiology/documents/m39/>.
- Hindler JF and Stelling J (2007). **Analysis and Presentation of
Cumulative Antibiograms: A New Consensus Guideline from the Clinical
and Laboratory Standards Institute.** Clinical Infectious Diseases,
44(6), 867-873. [doi:10.1086/511864](https://doi.org/10.1086/511864)
## Arguments
- x:
@@ -318,6 +324,20 @@ taking into account all antimicrobial test results. If no antimicrobial
test results are available in the data set, only the episode-based
method is applied at default.
## References
Methodology of these functions is strictly based on:
- **M39 Analysis and Presentation of Cumulative Antimicrobial
Susceptibility Test Data, 5th Edition**, 2022, *Clinical and
Laboratory Standards Institute (CLSI)*.
<https://clsi.org/standards/products/microbiology/documents/m39/>.
- Hindler JF and Stelling J (2007). **Analysis and Presentation of
Cumulative Antibiograms: A New Consensus Guideline from the Clinical
and Laboratory Standards Institute.** Clinical Infectious Diseases,
44(6), 867-873. [doi:10.1086/511864](https://doi.org/10.1086/511864)
## See also
[`key_antimicrobials()`](https://amr-for-r.org/reference/key_antimicrobials.md)

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>G-test for Count Data — g.test • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="G-test for Count Data — g.test"><meta name="description" content="g.test() performs chi-squared contingency table tests and goodness-of-fit tests, just like chisq.test() but is more reliable (1). A G-test can be used to see whether the number of observations in each category fits a theoretical expectation (called a G-test of goodness-of-fit), or to see whether the proportions of one variable are different for different values of the other variable (called a G-test of independence)."><meta property="og:description" content="g.test() performs chi-squared contingency table tests and goodness-of-fit tests, just like chisq.test() but is more reliable (1). A G-test can be used to see whether the number of observations in each category fits a theoretical expectation (called a G-test of goodness-of-fit), or to see whether the proportions of one variable are different for different values of the other variable (called a G-test of independence)."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>G-test for Count Data — g.test • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="G-test for Count Data — g.test"><meta name="description" content="g.test() performs chi-squared contingency table tests and goodness-of-fit tests, just like chisq.test() but is more reliable (1). A G-test can be used to see whether the number of observations in each category fits a theoretical expectation (called a G-test of goodness-of-fit), or to see whether the proportions of one variable are different for different values of the other variable (called a G-test of independence)."><meta property="og:description" content="g.test() performs chi-squared contingency table tests and goodness-of-fit tests, just like chisq.test() but is more reliable (1). A G-test can be used to see whether the number of observations in each category fits a theoretical expectation (called a G-test of goodness-of-fit), or to see whether the proportions of one variable are different for different values of the other variable (called a G-test of independence)."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -125,7 +125,7 @@
<dt>stdres</dt>
<dd><p>standardized residuals,
<code>(observed - expected) / sqrt(V)</code>, where <code>V</code> is the
residual cell variance (<a href="#reference+chisq.test.Rd+R+3AAgresti+3A2007" class="citation">Agresti 2007</a>, section 2.4.5)
residual cell variance (Agresti, 2007, section 2.4.5
for the case where <code>x</code> is a matrix, <code>n * p * (1 - p)</code> otherwise).</p></dd>
</dl></div>

View File

@@ -93,9 +93,8 @@ A list with class `"htest"` containing the following components:
- stdres:
standardized residuals, `(observed - expected) / sqrt(V)`, where `V`
is the residual cell variance ([Agresti
2007](#reference+chisq.test.Rd+R+3AAgresti+3A2007), section 2.4.5) for
the case where `x` is a matrix, `n * p * (1 - p)` otherwise).
is the residual cell variance (Agresti, 2007, section 2.4.5 for the
case where `x` is a matrix, `n * p * (1 - p)` otherwise).
## Details

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Determine Clinical or Epidemic Episodes — get_episode • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Determine Clinical or Epidemic Episodes — get_episode"><meta name="description" content="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."><meta property="og:description" content="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."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Determine Clinical or Epidemic Episodes — get_episode • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Determine Clinical or Epidemic Episodes — get_episode"><meta name="description" content="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."><meta property="og:description" content="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."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -154,27 +154,29 @@
<span class="r-in"><span><span class="va">df</span> <span class="op">&lt;-</span> <span class="va">example_isolates</span><span class="op">[</span><span class="fu"><a href="https://rdrr.io/r/base/sample.html" class="external-link">sample</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/seq.html" class="external-link">seq_len</a></span><span class="op">(</span><span class="fl">2000</span><span class="op">)</span>, size <span class="op">=</span> <span class="fl">100</span><span class="op">)</span>, <span class="op">]</span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="fu">get_episode</span><span class="op">(</span><span class="va">df</span><span class="op">$</span><span class="va">date</span>, episode_days <span class="op">=</span> <span class="fl">60</span><span class="op">)</span> <span class="co"># indices</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 21 7 4 46 15 6 11 27 44 25 20 8 30 25 43 33 13 46 2 44 40 15 33 46 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [26] 32 4 19 22 45 23 45 9 44 39 16 7 46 10 34 37 45 4 20 11 14 5 19 7 40</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [51] 6 47 31 4 31 42 7 13 29 38 31 18 28 9 43 17 23 41 12 8 35 13 2 45 4</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [76] 3 34 36 15 23 24 15 9 41 12 1 44 17 18 37 32 23 35 38 44 37 38 10 24 26</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 20 43 19 12 43 41 12 28 30 15 41 18 34 6 15 9 29 8 45 16 43 10 14 9 42</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [26] 48 8 28 24 4 31 45 20 43 47 4 30 2 15 22 15 19 32 27 4 11 12 3 2 28</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [51] 35 2 42 27 7 3 17 45 46 11 13 37 25 36 37 17 47 1 32 21 20 35 41 31 32</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [76] 24 21 33 48 25 40 42 39 6 23 5 11 35 13 33 16 38 18 49 44 2 48 26 9 3</span>
<span class="r-in"><span><span class="fu">is_new_episode</span><span class="op">(</span><span class="va">df</span><span class="op">$</span><span class="va">date</span>, episode_days <span class="op">=</span> <span class="fl">60</span><span class="op">)</span> <span class="co"># TRUE/FALSE</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [13] TRUE FALSE TRUE TRUE TRUE FALSE TRUE FALSE TRUE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [25] FALSE TRUE FALSE TRUE TRUE TRUE TRUE FALSE TRUE FALSE TRUE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [37] FALSE FALSE TRUE TRUE TRUE FALSE FALSE FALSE FALSE TRUE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [49] FALSE FALSE FALSE TRUE TRUE FALSE FALSE TRUE FALSE FALSE TRUE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [61] FALSE TRUE TRUE FALSE FALSE TRUE FALSE TRUE TRUE FALSE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [73] FALSE FALSE FALSE TRUE FALSE TRUE FALSE FALSE TRUE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [85] FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [97] FALSE FALSE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] TRUE TRUE TRUE TRUE FALSE TRUE FALSE TRUE TRUE TRUE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [13] TRUE TRUE FALSE TRUE TRUE TRUE TRUE TRUE FALSE TRUE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [25] TRUE TRUE FALSE FALSE TRUE TRUE TRUE FALSE FALSE FALSE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [37] FALSE TRUE FALSE TRUE FALSE FALSE TRUE TRUE FALSE TRUE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [49] FALSE FALSE TRUE FALSE FALSE FALSE TRUE FALSE TRUE FALSE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [61] TRUE TRUE TRUE TRUE FALSE FALSE FALSE TRUE FALSE TRUE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [73] FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE TRUE FALSE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [85] TRUE TRUE FALSE FALSE FALSE FALSE FALSE TRUE FALSE TRUE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [97] FALSE TRUE FALSE FALSE</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># filter on results from the third 60-day episode only, using base R</span></span></span>
<span class="r-in"><span><span class="va">df</span><span class="op">[</span><span class="fu"><a href="https://rdrr.io/r/base/which.html" class="external-link">which</a></span><span class="op">(</span><span class="fu">get_episode</span><span class="op">(</span><span class="va">df</span><span class="op">$</span><span class="va">date</span>, <span class="fl">60</span><span class="op">)</span> <span class="op">==</span> <span class="fl">3</span><span class="op">)</span>, <span class="op">]</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 1 × 46</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 3 × 46</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> date patient age gender ward mo PEN OXA FLC AMX </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;date&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dbl&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;mo&gt;</span> <span style="color: #949494; font-style: italic;">&lt;sir&gt;</span> <span style="color: #949494; font-style: italic;">&lt;sir&gt;</span> <span style="color: #949494; font-style: italic;">&lt;sir&gt;</span> <span style="color: #949494; font-style: italic;">&lt;sir&gt;</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> 2003-01-06 894506 83 M ICU <span style="color: #949494;">B_</span>STRPT<span style="color: #949494;">_</span>PNMN <span style="color: #080808; background-color: #5FD7AF;"> S </span> <span style="color: #949494;"> NA</span> <span style="color: #949494;"> NA</span> <span style="color: #080808; background-color: #5FD7AF;"> S </span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> 2002-10-20 F35553 51 M ICU <span style="color: #949494;">B_</span>STPHY<span style="color: #949494;">_</span>AURS <span style="color: #080808; background-color: #5FD7AF;"> S </span> <span style="color: #949494;"> NA</span> <span style="color: #080808; background-color: #5FD7AF;"> S </span> <span style="color: #949494;"> NA</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> 2002-09-24 CF9318 29 M ICU <span style="color: #949494;">B_</span>CMPYL<span style="color: #949494;">_</span>JEJN <span style="color: #949494;"> NA</span> <span style="color: #949494;"> NA</span> <span style="color: #949494;"> NA</span> <span style="color: #949494;"> NA</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">3</span> 2002-08-31 149442 80 F ICU <span style="color: #949494;">B_</span>STPHY<span style="color: #949494;">_</span>AURS <span style="color: #080808; background-color: #FF5F5F;"> R </span> <span style="color: #949494;"> NA</span> <span style="color: #080808; background-color: #5FD7AF;"> S </span> <span style="color: #080808; background-color: #FF5F5F;"> R </span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># 36 more variables: AMC &lt;sir&gt;, AMP &lt;sir&gt;, TZP &lt;sir&gt;, CZO &lt;sir&gt;, FEP &lt;sir&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># CXM &lt;sir&gt;, FOX &lt;sir&gt;, CTX &lt;sir&gt;, CAZ &lt;sir&gt;, CRO &lt;sir&gt;, GEN &lt;sir&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># TOB &lt;sir&gt;, AMK &lt;sir&gt;, KAN &lt;sir&gt;, TMP &lt;sir&gt;, SXT &lt;sir&gt;, NIT &lt;sir&gt;,</span></span>
@@ -208,19 +210,19 @@
<span class="r-in"><span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/arrange.html" class="external-link">arrange</a></span><span class="op">(</span><span class="va">patient</span>, <span class="va">condition</span>, <span class="va">date</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="op">}</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 100 × 4</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Groups: patient, condition [94]</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Groups: patient, condition [97]</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> patient date condition new_episode</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;date&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;lgl&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> 060287 2007-03-11 A TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> 0E2483 2007-11-10 A TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> 101305 2006-12-13 A TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> 141061 2014-10-22 A TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 151041 2006-02-10 A TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> 15D386 2004-08-01 B TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> 187841 2008-04-22 A TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 189363 2004-06-22 C TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 208305 2015-09-14 A TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> 257844 2011-05-22 A TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> 018637 2005-09-28 C TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> 022060 2004-05-04 C TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> 032343 2003-06-09 B TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> 080086 2010-08-08 C TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 126334 2009-11-26 A TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> 149442 2002-08-31 C TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> 14D826 2006-09-14 A TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 16F0F7 2010-01-17 C TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 179451 2007-09-15 B TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> 189795 2008-10-19 B TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># 90 more rows</span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">require</a></span><span class="op">(</span><span class="st"><a href="https://dplyr.tidyverse.org" class="external-link">"dplyr"</a></span><span class="op">)</span><span class="op">)</span> <span class="op">{</span></span></span>
@@ -234,19 +236,19 @@
<span class="r-in"><span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/arrange.html" class="external-link">arrange</a></span><span class="op">(</span><span class="va">patient</span>, <span class="va">ward</span>, <span class="va">date</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="op">}</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 100 × 5</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Groups: ward, patient [89]</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> ward date patient new_index new_logical</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;date&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;int&gt;</span> <span style="color: #949494; font-style: italic;">&lt;lgl&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> Clinical 2007-03-11 060287 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> Clinical 2007-11-10 0E2483 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> Clinical 2006-12-13 101305 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> Clinical 2014-10-22 141061 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> Clinical 2006-02-10 151041 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> ICU 2004-08-01 15D386 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> Clinical 2008-04-22 187841 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> Clinical 2004-06-22 189363 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> Clinical 2015-09-14 208305 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> Clinical 2011-05-22 257844 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Groups: ward, patient [94]</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> ward date patient new_index new_logical</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;date&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;int&gt;</span> <span style="color: #949494; font-style: italic;">&lt;lgl&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> Clinical 2005-09-28 018637 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> ICU 2004-05-04 022060 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> Clinical 2003-06-09 032343 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> Clinical 2010-08-08 080086 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> Outpatient 2009-11-26 126334 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> ICU 2002-08-31 149442 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> Clinical 2006-09-14 14D826 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> Clinical 2010-01-17 16F0F7 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> ICU 2007-09-15 179451 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> Clinical 2008-10-19 189795 1 TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># 90 more rows</span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">require</a></span><span class="op">(</span><span class="st"><a href="https://dplyr.tidyverse.org" class="external-link">"dplyr"</a></span><span class="op">)</span><span class="op">)</span> <span class="op">{</span></span></span>
@@ -262,9 +264,9 @@
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 3 × 5</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> ward n_patients n_episodes_365 n_episodes_60 n_episodes_30</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;int&gt;</span> <span style="color: #949494; font-style: italic;">&lt;int&gt;</span> <span style="color: #949494; font-style: italic;">&lt;int&gt;</span> <span style="color: #949494; font-style: italic;">&lt;int&gt;</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> Clinical 55 12 34 39</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> ICU 28 10 25 26</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">3</span> Outpatient 6 5 6 6</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> Clinical 55 14 33 43</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> ICU 33 11 23 27</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">3</span> Outpatient 6 5 5 5</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># grouping on patients and microorganisms leads to the same</span></span></span>
<span class="r-in"><span><span class="co"># results as first_isolate() when using 'episode-based':</span></span></span>
@@ -282,7 +284,7 @@
<span class="r-in"><span></span></span>
<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/identical.html" class="external-link">identical</a></span><span class="op">(</span><span class="va">x</span>, <span class="va">y</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="op">}</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] TRUE</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># but is_new_episode() has a lot more flexibility than first_isolate(),</span></span></span>
<span class="r-in"><span><span class="co"># since you can now group on anything that seems relevant:</span></span></span>
@@ -293,19 +295,19 @@
<span class="r-in"><span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/select.html" class="external-link">select</a></span><span class="op">(</span><span class="fu"><a href="https://dplyr.tidyverse.org/reference/group_data.html" class="external-link">group_vars</a></span><span class="op">(</span><span class="va">.</span><span class="op">)</span>, <span class="va">flag_episode</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="op">}</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 100 × 4</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Groups: patient, mo, ward [93]</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> patient mo ward flag_episode</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;mo&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;lgl&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> 0E2483 <span style="color: #949494;">B_</span>ESCHR<span style="color: #949494;">_</span>COLI Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> F24801 <span style="color: #949494;">B_</span>STRPT<span style="color: #949494;">_</span>AGLC ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> A26548 <span style="color: #949494;">B_</span>STPHY<span style="color: #949494;">_</span>CONS ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> 422833 <span style="color: #949494;">B_</span>ENTRC<span style="color: #949494;">_</span>FCLS Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> AFD3B1 <span style="color: #BB0000;"> UNKNOWN</span> Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> F35553 <span style="color: #949494;">B_</span>ENTRBC<span style="color: #949494;">_</span>CLOC ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> 316893 <span style="color: #949494;">B_</span>STPHY<span style="color: #949494;">_</span>CONS Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> B54813 <span style="color: #949494;">B_</span>ENTRC ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> E06844 <span style="color: #949494;">B_</span>STPHY<span style="color: #949494;">_</span>AURS Outpatient TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> B65162 <span style="color: #949494;">B_</span>STRPT<span style="color: #949494;">_</span>PNMN Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># Groups: patient, mo, ward [97]</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> patient mo ward flag_episode</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;mo&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;lgl&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> 189795 <span style="color: #949494;">B_</span>AERCC<span style="color: #949494;">_</span>URNQ Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 2</span> 5C1947 <span style="color: #949494;">B_</span>ESCHR<span style="color: #949494;">_</span>COLI Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 3</span> D22254 <span style="color: #949494;">B_</span>ESCHR<span style="color: #949494;">_</span>COLI Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 4</span> 018637 <span style="color: #949494;">B_</span>ESCHR<span style="color: #949494;">_</span>COLI Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 5</span> 483195 <span style="color: #949494;">B_</span>ESCHR<span style="color: #949494;">_</span>COLI ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 6</span> 324415 <span style="color: #949494;">B_</span>PROTS<span style="color: #949494;">_</span>MRBL ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 7</span> 671180 <span style="color: #949494;">B_</span>ESCHR<span style="color: #949494;">_</span>COLI Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 59B5BD <span style="color: #949494;">B_</span>ESCHR<span style="color: #949494;">_</span>COLI Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 443847 <span style="color: #949494;">B_</span>STPHY<span style="color: #949494;">_</span>CONS Clinical TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> 690B42 <span style="color: #949494;">B_</span>ESCHR<span style="color: #949494;">_</span>COLI ICU TRUE </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># 90 more rows</span></span>
<span class="r-in"><span><span class="co"># }</span></span></span>
</code></pre></div>

View File

@@ -178,27 +178,29 @@ x
df <- example_isolates[sample(seq_len(2000), size = 100), ]
get_episode(df$date, episode_days = 60) # indices
#> [1] 21 7 4 46 15 6 11 27 44 25 20 8 30 25 43 33 13 46 2 44 40 15 33 46 2
#> [26] 32 4 19 22 45 23 45 9 44 39 16 7 46 10 34 37 45 4 20 11 14 5 19 7 40
#> [51] 6 47 31 4 31 42 7 13 29 38 31 18 28 9 43 17 23 41 12 8 35 13 2 45 4
#> [76] 3 34 36 15 23 24 15 9 41 12 1 44 17 18 37 32 23 35 38 44 37 38 10 24 26
#> [1] 20 43 19 12 43 41 12 28 30 15 41 18 34 6 15 9 29 8 45 16 43 10 14 9 42
#> [26] 48 8 28 24 4 31 45 20 43 47 4 30 2 15 22 15 19 32 27 4 11 12 3 2 28
#> [51] 35 2 42 27 7 3 17 45 46 11 13 37 25 36 37 17 47 1 32 21 20 35 41 31 32
#> [76] 24 21 33 48 25 40 42 39 6 23 5 11 35 13 33 16 38 18 49 44 2 48 26 9 3
is_new_episode(df$date, episode_days = 60) # TRUE/FALSE
#> [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
#> [13] TRUE FALSE TRUE TRUE TRUE FALSE TRUE FALSE TRUE FALSE FALSE FALSE
#> [25] FALSE TRUE FALSE TRUE TRUE TRUE TRUE FALSE TRUE FALSE TRUE TRUE
#> [37] FALSE FALSE TRUE TRUE TRUE FALSE FALSE FALSE FALSE TRUE TRUE FALSE
#> [49] FALSE FALSE FALSE TRUE TRUE FALSE FALSE TRUE FALSE FALSE TRUE TRUE
#> [61] FALSE TRUE TRUE FALSE FALSE TRUE FALSE TRUE TRUE FALSE TRUE FALSE
#> [73] FALSE FALSE FALSE TRUE FALSE TRUE FALSE FALSE TRUE FALSE FALSE FALSE
#> [85] FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
#> [97] FALSE FALSE FALSE TRUE
#> [1] TRUE TRUE TRUE TRUE FALSE TRUE FALSE TRUE TRUE TRUE FALSE TRUE
#> [13] TRUE TRUE FALSE TRUE TRUE TRUE TRUE TRUE FALSE TRUE TRUE FALSE
#> [25] TRUE TRUE FALSE FALSE TRUE TRUE TRUE FALSE FALSE FALSE TRUE FALSE
#> [37] FALSE TRUE FALSE TRUE FALSE FALSE TRUE TRUE FALSE TRUE FALSE TRUE
#> [49] FALSE FALSE TRUE FALSE FALSE FALSE TRUE FALSE TRUE FALSE TRUE FALSE
#> [61] TRUE TRUE TRUE TRUE FALSE FALSE FALSE TRUE FALSE TRUE FALSE FALSE
#> [73] FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE TRUE FALSE TRUE FALSE
#> [85] TRUE TRUE FALSE FALSE FALSE FALSE FALSE TRUE FALSE TRUE TRUE FALSE
#> [97] FALSE TRUE FALSE FALSE
# filter on results from the third 60-day episode only, using base R
df[which(get_episode(df$date, 60) == 3), ]
#> # A tibble: 1 × 46
#> # A tibble: 3 × 46
#> date patient age gender ward mo PEN OXA FLC AMX
#> <date> <chr> <dbl> <chr> <chr> <mo> <sir> <sir> <sir> <sir>
#> 1 2003-01-06 894506 83 M ICU B_STRPT_PNMN S NA NA S
#> 1 2002-10-20 F35553 51 M ICU B_STPHY_AURS S NA S NA
#> 2 2002-09-24 CF9318 29 M ICU B_CMPYL_JEJN NA NA NA NA
#> 3 2002-08-31 149442 80 F ICU B_STPHY_AURS R NA S R
#> # 36 more variables: AMC <sir>, AMP <sir>, TZP <sir>, CZO <sir>, FEP <sir>,
#> # CXM <sir>, FOX <sir>, CTX <sir>, CAZ <sir>, CRO <sir>, GEN <sir>,
#> # TOB <sir>, AMK <sir>, KAN <sir>, TMP <sir>, SXT <sir>, NIT <sir>,
@@ -232,19 +234,19 @@ if (require("dplyr")) {
arrange(patient, condition, date)
}
#> # A tibble: 100 × 4
#> # Groups: patient, condition [94]
#> # Groups: patient, condition [97]
#> patient date condition new_episode
#> <chr> <date> <chr> <lgl>
#> 1 060287 2007-03-11 A TRUE
#> 2 0E2483 2007-11-10 A TRUE
#> 3 101305 2006-12-13 A TRUE
#> 4 141061 2014-10-22 A TRUE
#> 5 151041 2006-02-10 A TRUE
#> 6 15D386 2004-08-01 B TRUE
#> 7 187841 2008-04-22 A TRUE
#> 8 189363 2004-06-22 C TRUE
#> 9 208305 2015-09-14 A TRUE
#> 10 257844 2011-05-22 A TRUE
#> 1 018637 2005-09-28 C TRUE
#> 2 022060 2004-05-04 C TRUE
#> 3 032343 2003-06-09 B TRUE
#> 4 080086 2010-08-08 C TRUE
#> 5 126334 2009-11-26 A TRUE
#> 6 149442 2002-08-31 C TRUE
#> 7 14D826 2006-09-14 A TRUE
#> 8 16F0F7 2010-01-17 C TRUE
#> 9 179451 2007-09-15 B TRUE
#> 10 189795 2008-10-19 B TRUE
#> # 90 more rows
if (require("dplyr")) {
@@ -258,19 +260,19 @@ if (require("dplyr")) {
arrange(patient, ward, date)
}
#> # A tibble: 100 × 5
#> # Groups: ward, patient [89]
#> ward date patient new_index new_logical
#> <chr> <date> <chr> <int> <lgl>
#> 1 Clinical 2007-03-11 060287 1 TRUE
#> 2 Clinical 2007-11-10 0E2483 1 TRUE
#> 3 Clinical 2006-12-13 101305 1 TRUE
#> 4 Clinical 2014-10-22 141061 1 TRUE
#> 5 Clinical 2006-02-10 151041 1 TRUE
#> 6 ICU 2004-08-01 15D386 1 TRUE
#> 7 Clinical 2008-04-22 187841 1 TRUE
#> 8 Clinical 2004-06-22 189363 1 TRUE
#> 9 Clinical 2015-09-14 208305 1 TRUE
#> 10 Clinical 2011-05-22 257844 1 TRUE
#> # Groups: ward, patient [94]
#> ward date patient new_index new_logical
#> <chr> <date> <chr> <int> <lgl>
#> 1 Clinical 2005-09-28 018637 1 TRUE
#> 2 ICU 2004-05-04 022060 1 TRUE
#> 3 Clinical 2003-06-09 032343 1 TRUE
#> 4 Clinical 2010-08-08 080086 1 TRUE
#> 5 Outpatient 2009-11-26 126334 1 TRUE
#> 6 ICU 2002-08-31 149442 1 TRUE
#> 7 Clinical 2006-09-14 14D826 1 TRUE
#> 8 Clinical 2010-01-17 16F0F7 1 TRUE
#> 9 ICU 2007-09-15 179451 1 TRUE
#> 10 Clinical 2008-10-19 189795 1 TRUE
#> # 90 more rows
if (require("dplyr")) {
@@ -286,9 +288,9 @@ if (require("dplyr")) {
#> # A tibble: 3 × 5
#> ward n_patients n_episodes_365 n_episodes_60 n_episodes_30
#> <chr> <int> <int> <int> <int>
#> 1 Clinical 55 12 34 39
#> 2 ICU 28 10 25 26
#> 3 Outpatient 6 5 6 6
#> 1 Clinical 55 14 33 43
#> 2 ICU 33 11 23 27
#> 3 Outpatient 6 5 5 5
# grouping on patients and microorganisms leads to the same
# results as first_isolate() when using 'episode-based':
@@ -306,7 +308,7 @@ if (require("dplyr")) {
identical(x, y)
}
#> [1] FALSE
#> [1] TRUE
# but is_new_episode() has a lot more flexibility than first_isolate(),
# since you can now group on anything that seems relevant:
@@ -317,19 +319,19 @@ if (require("dplyr")) {
select(group_vars(.), flag_episode)
}
#> # A tibble: 100 × 4
#> # Groups: patient, mo, ward [93]
#> patient mo ward flag_episode
#> <chr> <mo> <chr> <lgl>
#> 1 0E2483 B_ESCHR_COLI Clinical TRUE
#> 2 F24801 B_STRPT_AGLC ICU TRUE
#> 3 A26548 B_STPHY_CONS ICU TRUE
#> 4 422833 B_ENTRC_FCLS Clinical TRUE
#> 5 AFD3B1 UNKNOWN Clinical TRUE
#> 6 F35553 B_ENTRBC_CLOC ICU TRUE
#> 7 316893 B_STPHY_CONS Clinical TRUE
#> 8 B54813 B_ENTRC ICU TRUE
#> 9 E06844 B_STPHY_AURS Outpatient TRUE
#> 10 B65162 B_STRPT_PNMN Clinical TRUE
#> # Groups: patient, mo, ward [97]
#> patient mo ward flag_episode
#> <chr> <mo> <chr> <lgl>
#> 1 189795 B_AERCC_URNQ Clinical TRUE
#> 2 5C1947 B_ESCHR_COLI Clinical TRUE
#> 3 D22254 B_ESCHR_COLI Clinical TRUE
#> 4 018637 B_ESCHR_COLI Clinical TRUE
#> 5 483195 B_ESCHR_COLI ICU TRUE
#> 6 324415 B_PROTS_MRBL ICU TRUE
#> 7 671180 B_ESCHR_COLI Clinical TRUE
#> 8 59B5BD B_ESCHR_COLI Clinical TRUE
#> 9 443847 B_STPHY_CONS Clinical TRUE
#> 10 690B42 B_ESCHR_COLI ICU TRUE
#> # 90 more rows
# }
```

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>PCA Biplot with ggplot2 — ggplot_pca • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="PCA Biplot with ggplot2 — ggplot_pca"><meta name="description" content="Produces a ggplot2 variant of a so-called biplot for PCA (principal component analysis), but is more flexible and more appealing than the base R biplot() function."><meta property="og:description" content="Produces a ggplot2 variant of a so-called biplot for PCA (principal component analysis), but is more flexible and more appealing than the base R biplot() function."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>PCA Biplot with ggplot2 — ggplot_pca • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="PCA Biplot with ggplot2 — ggplot_pca"><meta name="description" content="Produces a ggplot2 variant of a so-called biplot for PCA (principal component analysis), but is more flexible and more appealing than the base R biplot() function."><meta property="og:description" content="Produces a ggplot2 variant of a so-called biplot for PCA (principal component analysis), but is more flexible and more appealing than the base R biplot() function."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -55,13 +55,30 @@
<div class="section level2">
<h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">ggplot_pca</span><span class="op">(</span><span class="va">x</span>, choices <span class="op">=</span> <span class="fl">1</span><span class="op">:</span><span class="fl">2</span>, scale <span class="op">=</span> <span class="fl">1</span>, pc.biplot <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> labels <span class="op">=</span> <span class="cn">NULL</span>, labels_textsize <span class="op">=</span> <span class="fl">3</span>, labels_text_placement <span class="op">=</span> <span class="fl">1.5</span>,</span>
<span> groups <span class="op">=</span> <span class="cn">NULL</span>, ellipse <span class="op">=</span> <span class="cn">TRUE</span>, ellipse_prob <span class="op">=</span> <span class="fl">0.68</span>,</span>
<span> ellipse_size <span class="op">=</span> <span class="fl">0.5</span>, ellipse_alpha <span class="op">=</span> <span class="fl">0.5</span>, points_size <span class="op">=</span> <span class="fl">2</span>,</span>
<span> points_alpha <span class="op">=</span> <span class="fl">0.25</span>, arrows <span class="op">=</span> <span class="cn">TRUE</span>, arrows_colour <span class="op">=</span> <span class="st">"darkblue"</span>,</span>
<span> arrows_size <span class="op">=</span> <span class="fl">0.5</span>, arrows_textsize <span class="op">=</span> <span class="fl">3</span>, arrows_textangled <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> arrows_alpha <span class="op">=</span> <span class="fl">0.75</span>, base_textsize <span class="op">=</span> <span class="fl">10</span>, <span class="va">...</span><span class="op">)</span></span></code></pre></div>
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">ggplot_pca</span><span class="op">(</span></span>
<span> <span class="va">x</span>,</span>
<span> choices <span class="op">=</span> <span class="fl">1</span><span class="op">:</span><span class="fl">2</span>,</span>
<span> scale <span class="op">=</span> <span class="fl">1</span>,</span>
<span> pc.biplot <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> labels <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> labels_textsize <span class="op">=</span> <span class="fl">3</span>,</span>
<span> labels_text_placement <span class="op">=</span> <span class="fl">1.5</span>,</span>
<span> groups <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> ellipse <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> ellipse_prob <span class="op">=</span> <span class="fl">0.68</span>,</span>
<span> ellipse_size <span class="op">=</span> <span class="fl">0.5</span>,</span>
<span> ellipse_alpha <span class="op">=</span> <span class="fl">0.5</span>,</span>
<span> points_size <span class="op">=</span> <span class="fl">2</span>,</span>
<span> points_alpha <span class="op">=</span> <span class="fl">0.25</span>,</span>
<span> arrows <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> arrows_colour <span class="op">=</span> <span class="st">"darkblue"</span>,</span>
<span> arrows_size <span class="op">=</span> <span class="fl">0.5</span>,</span>
<span> arrows_textsize <span class="op">=</span> <span class="fl">3</span>,</span>
<span> arrows_textangled <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> arrows_alpha <span class="op">=</span> <span class="fl">0.75</span>,</span>
<span> base_textsize <span class="op">=</span> <span class="fl">10</span>,</span>
<span> <span class="va">...</span></span>
<span><span class="op">)</span></span></code></pre></div>
</div>
<div class="section level2">
@@ -96,9 +113,8 @@
<dt id="arg-pc-biplot">pc.biplot<a class="anchor" aria-label="anchor" href="#arg-pc-biplot"></a></dt>
<dd><p>If true, use what <cite></cite><a href="#reference+biplot.princomp.Rd+R+3AGabriel+3A1971" class="citation">Gabriel (1971)</a> refers to as a
“principal component biplot”,
with <code>lambda = 1</code> and observations scaled up by sqrt(n) and
<dd><p>If true, use what Gabriel (1971) refers to as a "principal component
biplot", with <code>lambda = 1</code> and observations scaled up by sqrt(n) and
variables scaled down by sqrt(n). Then inner products between
variables approximate covariances and distances between observations
approximate Mahalanobis distance.</p></dd>

View File

@@ -8,13 +8,30 @@ base R [`biplot()`](https://rdrr.io/r/stats/biplot.html) function.
## Usage
``` r
ggplot_pca(x, choices = 1:2, scale = 1, pc.biplot = TRUE,
labels = NULL, labels_textsize = 3, labels_text_placement = 1.5,
groups = NULL, ellipse = TRUE, ellipse_prob = 0.68,
ellipse_size = 0.5, ellipse_alpha = 0.5, points_size = 2,
points_alpha = 0.25, arrows = TRUE, arrows_colour = "darkblue",
arrows_size = 0.5, arrows_textsize = 3, arrows_textangled = TRUE,
arrows_alpha = 0.75, base_textsize = 10, ...)
ggplot_pca(
x,
choices = 1:2,
scale = 1,
pc.biplot = TRUE,
labels = NULL,
labels_textsize = 3,
labels_text_placement = 1.5,
groups = NULL,
ellipse = TRUE,
ellipse_prob = 0.68,
ellipse_size = 0.5,
ellipse_alpha = 0.5,
points_size = 2,
points_alpha = 0.25,
arrows = TRUE,
arrows_colour = "darkblue",
arrows_size = 0.5,
arrows_textsize = 3,
arrows_textangled = TRUE,
arrows_alpha = 0.75,
base_textsize = 10,
...
)
```
## Source
@@ -68,12 +85,11 @@ the changes made based on the source code were:
- pc.biplot:
If true, use what [Gabriel
(1971)](#reference+biplot.princomp.Rd+R+3AGabriel+3A1971) refers to as
a “principal component biplot”, with `lambda = 1` and observations
scaled up by sqrt(n) and variables scaled down by sqrt(n). Then inner
products between variables approximate covariances and distances
between observations approximate Mahalanobis distance.
If true, use what Gabriel (1971) refers to as a "principal component
biplot", with `lambda = 1` and observations scaled up by sqrt(n) and
variables scaled down by sqrt(n). Then inner products between
variables approximate covariances and distances between observations
approximate Mahalanobis distance.
- labels:

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>AMR Plots with ggplot2 — ggplot_sir • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="AMR Plots with ggplot2 — ggplot_sir"><meta name="description" content="Use these functions to create bar plots for AMR data analysis. All functions rely on ggplot2 functions."><meta property="og:description" content="Use these functions to create bar plots for AMR data analysis. All functions rely on ggplot2 functions."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>AMR Plots with ggplot2 — ggplot_sir • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="AMR Plots with ggplot2 — ggplot_sir"><meta name="description" content="Use these functions to create bar plots for AMR data analysis. All functions rely on ggplot2 functions."><meta property="og:description" content="Use these functions to create bar plots for AMR data analysis. All functions rely on ggplot2 functions."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -55,18 +55,42 @@
<div class="section level2">
<h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">ggplot_sir</span><span class="op">(</span><span class="va">data</span>, position <span class="op">=</span> <span class="cn">NULL</span>, x <span class="op">=</span> <span class="st">"antibiotic"</span>,</span>
<span> fill <span class="op">=</span> <span class="st">"interpretation"</span>, facet <span class="op">=</span> <span class="cn">NULL</span>, breaks <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/seq.html" class="external-link">seq</a></span><span class="op">(</span><span class="fl">0</span>, <span class="fl">1</span>, <span class="fl">0.1</span><span class="op">)</span>,</span>
<span> limits <span class="op">=</span> <span class="cn">NULL</span>, translate_ab <span class="op">=</span> <span class="st">"name"</span>, combine_SI <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> minimum <span class="op">=</span> <span class="fl">30</span>, language <span class="op">=</span> <span class="fu"><a href="translate.html">get_AMR_locale</a></span><span class="op">(</span><span class="op">)</span>, nrow <span class="op">=</span> <span class="cn">NULL</span>, colours <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span>S</span>
<span> <span class="op">=</span> <span class="st">"#3CAEA3"</span>, SDD <span class="op">=</span> <span class="st">"#8FD6C4"</span>, SI <span class="op">=</span> <span class="st">"#3CAEA3"</span>, I <span class="op">=</span> <span class="st">"#F6D55C"</span>, IR <span class="op">=</span> <span class="st">"#ED553B"</span>,</span>
<span> R <span class="op">=</span> <span class="st">"#ED553B"</span><span class="op">)</span>, datalabels <span class="op">=</span> <span class="cn">TRUE</span>, datalabels.size <span class="op">=</span> <span class="fl">2.5</span>,</span>
<span> datalabels.colour <span class="op">=</span> <span class="st">"grey15"</span>, title <span class="op">=</span> <span class="cn">NULL</span>, subtitle <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> caption <span class="op">=</span> <span class="cn">NULL</span>, x.title <span class="op">=</span> <span class="st">"Antimicrobial"</span>, y.title <span class="op">=</span> <span class="st">"Proportion"</span>, <span class="va">...</span><span class="op">)</span></span>
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">ggplot_sir</span><span class="op">(</span></span>
<span> <span class="va">data</span>,</span>
<span> position <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> x <span class="op">=</span> <span class="st">"antibiotic"</span>,</span>
<span> fill <span class="op">=</span> <span class="st">"interpretation"</span>,</span>
<span> facet <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> breaks <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/seq.html" class="external-link">seq</a></span><span class="op">(</span><span class="fl">0</span>, <span class="fl">1</span>, <span class="fl">0.1</span><span class="op">)</span>,</span>
<span> limits <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> translate_ab <span class="op">=</span> <span class="st">"name"</span>,</span>
<span> combine_SI <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> minimum <span class="op">=</span> <span class="fl">30</span>,</span>
<span> language <span class="op">=</span> <span class="fu"><a href="translate.html">get_AMR_locale</a></span><span class="op">(</span><span class="op">)</span>,</span>
<span> nrow <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> colours <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span>S <span class="op">=</span> <span class="st">"#3CAEA3"</span>, SDD <span class="op">=</span> <span class="st">"#8FD6C4"</span>, SI <span class="op">=</span> <span class="st">"#3CAEA3"</span>, I <span class="op">=</span> <span class="st">"#F6D55C"</span>, IR <span class="op">=</span></span>
<span> <span class="st">"#ED553B"</span>, R <span class="op">=</span> <span class="st">"#ED553B"</span><span class="op">)</span>,</span>
<span> datalabels <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> datalabels.size <span class="op">=</span> <span class="fl">2.5</span>,</span>
<span> datalabels.colour <span class="op">=</span> <span class="st">"grey15"</span>,</span>
<span> title <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> subtitle <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> caption <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> x.title <span class="op">=</span> <span class="st">"Antimicrobial"</span>,</span>
<span> y.title <span class="op">=</span> <span class="st">"Proportion"</span>,</span>
<span> <span class="va">...</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="fu">geom_sir</span><span class="op">(</span>position <span class="op">=</span> <span class="cn">NULL</span>, x <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"antibiotic"</span>, <span class="st">"interpretation"</span><span class="op">)</span>,</span>
<span> fill <span class="op">=</span> <span class="st">"interpretation"</span>, translate_ab <span class="op">=</span> <span class="st">"name"</span>, minimum <span class="op">=</span> <span class="fl">30</span>,</span>
<span> language <span class="op">=</span> <span class="fu"><a href="translate.html">get_AMR_locale</a></span><span class="op">(</span><span class="op">)</span>, combine_SI <span class="op">=</span> <span class="cn">TRUE</span>, <span class="va">...</span><span class="op">)</span></span></code></pre></div>
<span><span class="fu">geom_sir</span><span class="op">(</span></span>
<span> position <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> x <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"antibiotic"</span>, <span class="st">"interpretation"</span><span class="op">)</span>,</span>
<span> fill <span class="op">=</span> <span class="st">"interpretation"</span>,</span>
<span> translate_ab <span class="op">=</span> <span class="st">"name"</span>,</span>
<span> minimum <span class="op">=</span> <span class="fl">30</span>,</span>
<span> language <span class="op">=</span> <span class="fu"><a href="translate.html">get_AMR_locale</a></span><span class="op">(</span><span class="op">)</span>,</span>
<span> combine_SI <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> <span class="va">...</span></span>
<span><span class="op">)</span></span></code></pre></div>
</div>
<div class="section level2">

View File

@@ -8,18 +8,42 @@ functions.
## Usage
``` r
ggplot_sir(data, position = NULL, x = "antibiotic",
fill = "interpretation", facet = NULL, breaks = seq(0, 1, 0.1),
limits = NULL, translate_ab = "name", combine_SI = TRUE,
minimum = 30, language = get_AMR_locale(), nrow = NULL, colours = c(S
= "#3CAEA3", SDD = "#8FD6C4", SI = "#3CAEA3", I = "#F6D55C", IR = "#ED553B",
R = "#ED553B"), datalabels = TRUE, datalabels.size = 2.5,
datalabels.colour = "grey15", title = NULL, subtitle = NULL,
caption = NULL, x.title = "Antimicrobial", y.title = "Proportion", ...)
ggplot_sir(
data,
position = NULL,
x = "antibiotic",
fill = "interpretation",
facet = NULL,
breaks = seq(0, 1, 0.1),
limits = NULL,
translate_ab = "name",
combine_SI = TRUE,
minimum = 30,
language = get_AMR_locale(),
nrow = NULL,
colours = c(S = "#3CAEA3", SDD = "#8FD6C4", SI = "#3CAEA3", I = "#F6D55C", IR =
"#ED553B", R = "#ED553B"),
datalabels = TRUE,
datalabels.size = 2.5,
datalabels.colour = "grey15",
title = NULL,
subtitle = NULL,
caption = NULL,
x.title = "Antimicrobial",
y.title = "Proportion",
...
)
geom_sir(position = NULL, x = c("antibiotic", "interpretation"),
fill = "interpretation", translate_ab = "name", minimum = 30,
language = get_AMR_locale(), combine_SI = TRUE, ...)
geom_sir(
position = NULL,
x = c("antibiotic", "interpretation"),
fill = "interpretation",
translate_ab = "name",
minimum = 30,
language = get_AMR_locale(),
combine_SI = TRUE,
...
)
```
## Arguments

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Guess Antibiotic Column — guess_ab_col • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Guess Antibiotic Column — guess_ab_col"><meta name="description" content="This tries to find a column name in a data set based on information from the antimicrobials data set. Also supports WHONET abbreviations."><meta property="og:description" content="This tries to find a column name in a data set based on information from the antimicrobials data set. Also supports WHONET abbreviations."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Guess Antibiotic Column — guess_ab_col • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Guess Antibiotic Column — guess_ab_col"><meta name="description" content="This tries to find a column name in a data set based on information from the antimicrobials data set. Also supports WHONET abbreviations."><meta property="og:description" content="This tries to find a column name in a data set based on information from the antimicrobials data set. Also supports WHONET abbreviations."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -55,8 +55,12 @@
<div class="section level2">
<h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">guess_ab_col</span><span class="op">(</span>x <span class="op">=</span> <span class="cn">NULL</span>, search_string <span class="op">=</span> <span class="cn">NULL</span>, verbose <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> only_sir_columns <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></span></code></pre></div>
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">guess_ab_col</span><span class="op">(</span></span>
<span> x <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> search_string <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> verbose <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> only_sir_columns <span class="op">=</span> <span class="cn">FALSE</span></span>
<span><span class="op">)</span></span></code></pre></div>
</div>
<div class="section level2">

View File

@@ -7,8 +7,12 @@ data set. Also supports WHONET abbreviations.
## Usage
``` r
guess_ab_col(x = NULL, search_string = NULL, verbose = FALSE,
only_sir_columns = FALSE)
guess_ab_col(
x = NULL,
search_string = NULL,
verbose = FALSE,
only_sir_columns = FALSE
)
```
## Arguments

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Package index • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Package index"><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Package index • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Package index"><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -82,7 +82,7 @@
<dt>
<code><a href="mo_property.html">mo_name()</a></code> <code><a href="mo_property.html">mo_fullname()</a></code> <code><a href="mo_property.html">mo_shortname()</a></code> <code><a href="mo_property.html">mo_subspecies()</a></code> <code><a href="mo_property.html">mo_species()</a></code> <code><a href="mo_property.html">mo_genus()</a></code> <code><a href="mo_property.html">mo_family()</a></code> <code><a href="mo_property.html">mo_order()</a></code> <code><a href="mo_property.html">mo_class()</a></code> <code><a href="mo_property.html">mo_phylum()</a></code> <code><a href="mo_property.html">mo_kingdom()</a></code> <code><a href="mo_property.html">mo_domain()</a></code> <code><a href="mo_property.html">mo_type()</a></code> <code><a href="mo_property.html">mo_status()</a></code> <code><a href="mo_property.html">mo_pathogenicity()</a></code> <code><a href="mo_property.html">mo_gramstain()</a></code> <code><a href="mo_property.html">mo_is_gram_negative()</a></code> <code><a href="mo_property.html">mo_is_gram_positive()</a></code> <code><a href="mo_property.html">mo_is_yeast()</a></code> <code><a href="mo_property.html">mo_is_intrinsic_resistant()</a></code> <code><a href="mo_property.html">mo_oxygen_tolerance()</a></code> <code><a href="mo_property.html">mo_is_anaerobic()</a></code> <code><a href="mo_property.html">mo_snomed()</a></code> <code><a href="mo_property.html">mo_ref()</a></code> <code><a href="mo_property.html">mo_authors()</a></code> <code><a href="mo_property.html">mo_year()</a></code> <code><a href="mo_property.html">mo_lpsn()</a></code> <code><a href="mo_property.html">mo_mycobank()</a></code> <code><a href="mo_property.html">mo_gbif()</a></code> <code><a href="mo_property.html">mo_rank()</a></code> <code><a href="mo_property.html">mo_taxonomy()</a></code> <code><a href="mo_property.html">mo_synonyms()</a></code> <code><a href="mo_property.html">mo_current()</a></code> <code><a href="mo_property.html">mo_group_members()</a></code> <code><a href="mo_property.html">mo_info()</a></code> <code><a href="mo_property.html">mo_url()</a></code> <code><a href="mo_property.html">mo_property()</a></code>
<code><a href="mo_property.html">mo_name()</a></code> <code><a href="mo_property.html">mo_fullname()</a></code> <code><a href="mo_property.html">mo_shortname()</a></code> <code><a href="mo_property.html">mo_subspecies()</a></code> <code><a href="mo_property.html">mo_species()</a></code> <code><a href="mo_property.html">mo_genus()</a></code> <code><a href="mo_property.html">mo_family()</a></code> <code><a href="mo_property.html">mo_order()</a></code> <code><a href="mo_property.html">mo_class()</a></code> <code><a href="mo_property.html">mo_phylum()</a></code> <code><a href="mo_property.html">mo_kingdom()</a></code> <code><a href="mo_property.html">mo_domain()</a></code> <code><a href="mo_property.html">mo_type()</a></code> <code><a href="mo_property.html">mo_status()</a></code> <code><a href="mo_property.html">mo_pathogenicity()</a></code> <code><a href="mo_property.html">mo_gramstain()</a></code> <code><a href="mo_property.html">mo_is_gram_negative()</a></code> <code><a href="mo_property.html">mo_is_gram_positive()</a></code> <code><a href="mo_property.html">mo_is_yeast()</a></code> <code><a href="mo_property.html">mo_is_intrinsic_resistant()</a></code> <code><a href="mo_property.html">mo_oxygen_tolerance()</a></code> <code><a href="mo_property.html">mo_is_anaerobic()</a></code> <code><a href="mo_property.html">mo_morphology()</a></code> <code><a href="mo_property.html">mo_snomed()</a></code> <code><a href="mo_property.html">mo_ref()</a></code> <code><a href="mo_property.html">mo_authors()</a></code> <code><a href="mo_property.html">mo_year()</a></code> <code><a href="mo_property.html">mo_lpsn()</a></code> <code><a href="mo_property.html">mo_mycobank()</a></code> <code><a href="mo_property.html">mo_gbif()</a></code> <code><a href="mo_property.html">mo_rank()</a></code> <code><a href="mo_property.html">mo_taxonomy()</a></code> <code><a href="mo_property.html">mo_synonyms()</a></code> <code><a href="mo_property.html">mo_current()</a></code> <code><a href="mo_property.html">mo_group_members()</a></code> <code><a href="mo_property.html">mo_info()</a></code> <code><a href="mo_property.html">mo_url()</a></code> <code><a href="mo_property.html">mo_property()</a></code>
</dt>
<dd>Get Properties of a Microorganism</dd>
@@ -200,10 +200,10 @@
<dl><dt>
<code><a href="antibiogram.html">antibiogram()</a></code> <code><a href="antibiogram.html">wisca()</a></code> <code><a href="antibiogram.html">retrieve_wisca_parameters()</a></code> <code><a href="antibiogram.html">plot(<i>&lt;antibiogram&gt;</i>)</a></code> <code><a href="antibiogram.html">autoplot(<i>&lt;antibiogram&gt;</i>)</a></code> <code><a href="antibiogram.html">knit_print(<i>&lt;antibiogram&gt;</i>)</a></code>
<code><a href="antibiogram.html">wisca()</a></code> <code><a href="antibiogram.html">antibiogram()</a></code> <code><a href="antibiogram.html">retrieve_wisca_parameters()</a></code> <code><a href="antibiogram.html">plot(<i>&lt;antibiogram&gt;</i>)</a></code> <code><a href="antibiogram.html">autoplot(<i>&lt;antibiogram&gt;</i>)</a></code> <code><a href="antibiogram.html">wisca_plot()</a></code> <code><a href="antibiogram.html">knit_print(<i>&lt;antibiogram&gt;</i>)</a></code>
</dt>
<dd>Generate Traditional, Combination, Syndromic, or WISCA Antibiograms</dd>
<dd>Generate Antibiograms (WISCA, Traditional, Combination, or Syndromic)</dd>
<dt>
@@ -386,7 +386,7 @@
<code><a href="microorganisms.html">microorganisms</a></code>
</dt>
<dd>Data Set with 78 679 Taxonomic Records of Microorganisms</dd>
<dd>Data Set with 96 982 Taxonomic Records of Microorganisms</dd>
<dt>
@@ -421,14 +421,14 @@
<code><a href="microorganisms.codes.html">microorganisms.codes</a></code>
</dt>
<dd>Data Set with 6 050 Common Microorganism Codes</dd>
<dd>Data Set with 6 029 Common Microorganism Codes</dd>
<dt>
<code><a href="microorganisms.groups.html">microorganisms.groups</a></code>
</dt>
<dd>Data Set with 534 Microorganisms In Species Groups</dd>
<dd>Data Set with 530 Microorganisms In Species Groups</dd>
<dt>

View File

@@ -54,6 +54,7 @@ to add your own custom microorganisms to this package.
[`mo_is_intrinsic_resistant()`](https://amr-for-r.org/reference/mo_property.md)
[`mo_oxygen_tolerance()`](https://amr-for-r.org/reference/mo_property.md)
[`mo_is_anaerobic()`](https://amr-for-r.org/reference/mo_property.md)
[`mo_morphology()`](https://amr-for-r.org/reference/mo_property.md)
[`mo_snomed()`](https://amr-for-r.org/reference/mo_property.md)
[`mo_ref()`](https://amr-for-r.org/reference/mo_property.md)
[`mo_authors()`](https://amr-for-r.org/reference/mo_property.md)
@@ -176,13 +177,15 @@ antibiotic classes
or determine multi-drug resistant microorganisms (MDRO,
[`mdro()`](https://amr-for-r.org/reference/mdro.md)).
- [`antibiogram()`](https://amr-for-r.org/reference/antibiogram.md)
[`wisca()`](https://amr-for-r.org/reference/antibiogram.md)
- [`wisca()`](https://amr-for-r.org/reference/antibiogram.md)
[`antibiogram()`](https://amr-for-r.org/reference/antibiogram.md)
[`retrieve_wisca_parameters()`](https://amr-for-r.org/reference/antibiogram.md)
[`plot(`*`<antibiogram>`*`)`](https://amr-for-r.org/reference/antibiogram.md)
[`autoplot(`*`<antibiogram>`*`)`](https://amr-for-r.org/reference/antibiogram.md)
[`wisca_plot()`](https://amr-for-r.org/reference/antibiogram.md)
[`knit_print(`*`<antibiogram>`*`)`](https://amr-for-r.org/reference/antibiogram.md)
: Generate Traditional, Combination, Syndromic, or WISCA Antibiograms
: Generate Antibiograms (WISCA, Traditional, Combination, or
Syndromic)
- [`resistance()`](https://amr-for-r.org/reference/proportion.md)
[`susceptibility()`](https://amr-for-r.org/reference/proportion.md)
@@ -390,7 +393,7 @@ our [How Tos](https://amr-for-r.org/articles/index.md) for more
information about how to work with functions in this package.
- [`microorganisms`](https://amr-for-r.org/reference/microorganisms.md)
: Data Set with 78 679 Taxonomic Records of Microorganisms
: Data Set with 96 982 Taxonomic Records of Microorganisms
- [`antimicrobials`](https://amr-for-r.org/reference/antimicrobials.md)
[`antibiotics`](https://amr-for-r.org/reference/antimicrobials.md)
[`antivirals`](https://amr-for-r.org/reference/antimicrobials.md) :
@@ -402,9 +405,9 @@ information about how to work with functions in this package.
- [`esbl_isolates`](https://amr-for-r.org/reference/esbl_isolates.md) :
Data Set with 500 ESBL Isolates
- [`microorganisms.codes`](https://amr-for-r.org/reference/microorganisms.codes.md)
: Data Set with 6 050 Common Microorganism Codes
: Data Set with 6 029 Common Microorganism Codes
- [`microorganisms.groups`](https://amr-for-r.org/reference/microorganisms.groups.md)
: Data Set with 534 Microorganisms In Species Groups
: Data Set with 530 Microorganisms In Species Groups
- [`intrinsic_resistant`](https://amr-for-r.org/reference/intrinsic_resistant.md)
: Data Set Denoting Bacterial Intrinsic Resistance
- [`dosage`](https://amr-for-r.org/reference/dosage.md) : Data Set with

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Apply Interpretive Rules — interpretive_rules • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Apply Interpretive Rules — interpretive_rules"><meta name="description" content="Apply rules from clinical breakpoints notes and expected resistant phenotypes as defined by e.g. the European Committee on Antimicrobial Susceptibility Testing (EUCAST, https://www.eucast.org), see Source. Use eucast_dosage() to get a data.frame with advised dosages of a certain bug-drug combination, which is based on the dosage data set.
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Apply Interpretive Rules — interpretive_rules • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Apply Interpretive Rules — interpretive_rules"><meta name="description" content="Apply rules from clinical breakpoints notes and expected resistant phenotypes as defined by e.g. the European Committee on Antimicrobial Susceptibility Testing (EUCAST, https://www.eucast.org), see Source. Use eucast_dosage() to get a data.frame with advised dosages of a certain bug-drug combination, which is based on the dosage data set.
To improve the interpretation of the antibiogram before CLSI/EUCAST interpretive rules are applied, some AMR-specific rules can be applied at default, see Details."><meta property="og:description" content="Apply rules from clinical breakpoints notes and expected resistant phenotypes as defined by e.g. the European Committee on Antimicrobial Susceptibility Testing (EUCAST, https://www.eucast.org), see Source. Use eucast_dosage() to get a data.frame with advised dosages of a certain bug-drug combination, which is based on the dosage data set.
To improve the interpretation of the antibiogram before CLSI/EUCAST interpretive rules are applied, some AMR-specific rules can be applied at default, see Details."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -9,7 +9,7 @@ To improve the interpretation of the antibiogram before CLSI/EUCAST interpretive
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -58,38 +58,46 @@ To improve the interpretation of the antibiogram before CLSI/EUCAST interpretive
<div class="section level2">
<h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">interpretive_rules</span><span class="op">(</span><span class="va">x</span>, col_mo <span class="op">=</span> <span class="cn">NULL</span>, info <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/interactive.html" class="external-link">interactive</a></span><span class="op">(</span><span class="op">)</span>,</span>
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">interpretive_rules</span><span class="op">(</span></span>
<span> <span class="va">x</span>,</span>
<span> col_mo <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> info <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/interactive.html" class="external-link">interactive</a></span><span class="op">(</span><span class="op">)</span>,</span>
<span> rules <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"AMR_interpretive_rules"</span>, default <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"breakpoints"</span>,</span>
<span> <span class="st">"expected_phenotypes"</span><span class="op">)</span><span class="op">)</span>, guideline <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"AMR_guideline"</span>, <span class="st">"EUCAST"</span><span class="op">)</span>,</span>
<span> verbose <span class="op">=</span> <span class="cn">FALSE</span>, version_breakpoints <span class="op">=</span> <span class="fl">16</span>,</span>
<span> version_expected_phenotypes <span class="op">=</span> <span class="fl">1.2</span>, version_expertrules <span class="op">=</span> <span class="fl">3.3</span>,</span>
<span> ampc_cephalosporin_resistance <span class="op">=</span> <span class="cn">NA</span>, only_sir_columns <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/any.html" class="external-link">any</a></span><span class="op">(</span><span class="fu"><a href="as.sir.html">is.sir</a></span><span class="op">(</span><span class="va">x</span><span class="op">)</span><span class="op">)</span>,</span>
<span> custom_rules <span class="op">=</span> <span class="cn">NULL</span>, overwrite <span class="op">=</span> <span class="cn">FALSE</span>, add_if_missing <span class="op">=</span> <span class="cn">TRUE</span>, <span class="va">...</span><span class="op">)</span></span>
<span> <span class="st">"expected_phenotypes"</span><span class="op">)</span><span class="op">)</span>,</span>
<span> guideline <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"AMR_guideline"</span>, <span class="st">"EUCAST"</span><span class="op">)</span>,</span>
<span> verbose <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> version_breakpoints <span class="op">=</span> <span class="fl">16</span>,</span>
<span> version_expected_phenotypes <span class="op">=</span> <span class="fl">1.2</span>,</span>
<span> version_expertrules <span class="op">=</span> <span class="fl">3.3</span>,</span>
<span> ampc_cephalosporin_resistance <span class="op">=</span> <span class="cn">NA</span>,</span>
<span> only_sir_columns <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/any.html" class="external-link">any</a></span><span class="op">(</span><span class="fu"><a href="as.sir.html">is.sir</a></span><span class="op">(</span><span class="va">x</span><span class="op">)</span><span class="op">)</span>,</span>
<span> custom_rules <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> overwrite <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> add_if_missing <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> <span class="va">...</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="fu">eucast_rules</span><span class="op">(</span><span class="va">x</span>, col_mo <span class="op">=</span> <span class="cn">NULL</span>, info <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/interactive.html" class="external-link">interactive</a></span><span class="op">(</span><span class="op">)</span>,</span>
<span><span class="fu">eucast_rules</span><span class="op">(</span></span>
<span> <span class="va">x</span>,</span>
<span> col_mo <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> info <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/interactive.html" class="external-link">interactive</a></span><span class="op">(</span><span class="op">)</span>,</span>
<span> rules <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"AMR_interpretive_rules"</span>, default <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"breakpoints"</span>,</span>
<span> <span class="st">"expected_phenotypes"</span><span class="op">)</span><span class="op">)</span>, <span class="va">...</span><span class="op">)</span></span>
<span> <span class="st">"expected_phenotypes"</span><span class="op">)</span><span class="op">)</span>,</span>
<span> <span class="va">...</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="fu">clsi_rules</span><span class="op">(</span><span class="va">x</span>, col_mo <span class="op">=</span> <span class="cn">NULL</span>, info <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/interactive.html" class="external-link">interactive</a></span><span class="op">(</span><span class="op">)</span>,</span>
<span><span class="fu">clsi_rules</span><span class="op">(</span></span>
<span> <span class="va">x</span>,</span>
<span> col_mo <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> info <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/interactive.html" class="external-link">interactive</a></span><span class="op">(</span><span class="op">)</span>,</span>
<span> rules <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"AMR_interpretive_rules"</span>, default <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"breakpoints"</span>,</span>
<span> <span class="st">"expected_phenotypes"</span><span class="op">)</span><span class="op">)</span>, <span class="va">...</span><span class="op">)</span></span>
<span> <span class="st">"expected_phenotypes"</span><span class="op">)</span><span class="op">)</span>,</span>
<span> <span class="va">...</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="fu">eucast_dosage</span><span class="op">(</span><span class="va">ab</span>, administration <span class="op">=</span> <span class="st">"iv"</span>, version_breakpoints <span class="op">=</span> <span class="fl">15</span><span class="op">)</span></span></code></pre></div>
</div>
<div class="section level2">
<h2 id="source">Source<a class="anchor" aria-label="anchor" href="#source"></a></h2>
<ul><li><p>EUCAST Expert Rules. Version 2.0, 2012.<br>
Leclercq et al. <strong>EUCAST expert rules in antimicrobial susceptibility testing.</strong> <em>Clin Microbiol Infect.</em> 2013;19(2):141-60; <a href="https://doi.org/10.1111/j.1469-0691.2011.03703.x" class="external-link">doi:10.1111/j.1469-0691.2011.03703.x</a></p></li>
<li><p>EUCAST Expert Rules, Intrinsic Resistance and Exceptional Phenotypes Tables. Version 3.1, 2016. <a href="https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Expert_Rules/Expert_rules_intrinsic_exceptional_V3.1.pdf" class="external-link">(link)</a></p></li>
<li><p>EUCAST Intrinsic Resistance and Unusual Phenotypes. Version 3.2, 2020. <a href="https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Expert_Rules/2020/Intrinsic_Resistance_and_Unusual_Phenotypes_Tables_v3.2_20200225.pdf" class="external-link">(link)</a></p></li>
<li><p>EUCAST Intrinsic Resistance and Unusual Phenotypes. Version 3.3, 2021. <a href="https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Expert_Rules/2021/Intrinsic_Resistance_and_Unusual_Phenotypes_Tables_v3.3_20211018.pdf" class="external-link">(link)</a></p></li>
<li><p>EUCAST Breakpoint tables for interpretation of MICs and zone diameters. Version 9.0, 2019. <a href="https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Breakpoint_tables/v_9.0_Breakpoint_Tables.xlsx" class="external-link">(link)</a></p></li>
<li><p>EUCAST Breakpoint tables for interpretation of MICs and zone diameters. Version 10.0, 2020. <a href="https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Breakpoint_tables/v_10.0_Breakpoint_Tables.xlsx" class="external-link">(link)</a></p></li>
<li><p>EUCAST Breakpoint tables for interpretation of MICs and zone diameters. Version 11.0, 2021. <a href="https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Breakpoint_tables/v_11.0_Breakpoint_Tables.xlsx" class="external-link">(link)</a></p></li>
<li><p>EUCAST Breakpoint tables for interpretation of MICs and zone diameters. Version 12.0, 2022. <a href="https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Breakpoint_tables/v_12.0_Breakpoint_Tables.xlsx" class="external-link">(link)</a></p></li>
</ul></div>
<div class="section level2">
<h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2>
@@ -169,7 +177,7 @@ Leclercq et al. <strong>EUCAST expert rules in antimicrobial susceptibility test
<div class="section level2">
<h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2>
<p><strong>Note:</strong> This function does not translate MIC or disk values to SIR values. Use <code><a href="as.sir.html">as.sir()</a></code> for that. <br><strong>Note:</strong> 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. <br></p>
<p>The file containing all interpretive rules is located here: <a href="https://github.com/msberends/AMR/blob/main/data-raw/interpretive_rules.tsv" class="external-link">https://github.com/msberends/AMR/blob/main/data-raw/interpretive_rules.tsv</a>. <strong>Note:</strong> Old taxonomic names are replaced with the current taxonomy where applicable. For example, <em>Ochrobactrum anthropi</em> was renamed to <em>Brucella anthropi</em> in 2020; the original EUCAST rules v3.1 and v3.2 did not yet contain this new taxonomic name. The <code>AMR</code> package contains the full microbial taxonomy updated until June 24th, 2024, see <a href="microorganisms.html">microorganisms</a>.</p><div class="section">
<p>The file containing all interpretive rules is located here: <a href="https://github.com/msberends/AMR/blob/main/data-raw/interpretive_rules.tsv" class="external-link">https://github.com/msberends/AMR/blob/main/data-raw/interpretive_rules.tsv</a>. <strong>Note:</strong> Old taxonomic names are replaced with the current taxonomy where applicable. For example, <em>Ochrobactrum anthropi</em> was renamed to <em>Brucella anthropi</em> in 2020; the original EUCAST rules v3.1 and v3.2 did not yet contain this new taxonomic name. The <code>AMR</code> package contains the full microbial taxonomy updated until 7th of May, 2026, see <a href="microorganisms.html">microorganisms</a>.</p><div class="section">
<h3 id="custom-rules">Custom Rules<a class="anchor" aria-label="anchor" href="#custom-rules"></a></h3>
@@ -199,6 +207,19 @@ Leclercq et al. <strong>EUCAST expert rules in antimicrobial susceptibility test
<p>For maximum compatibility, we also provide machine-readable, tab-separated plain text files suitable for use in any software, including laboratory information systems.</p>
<p>Visit <a href="https://amr-for-r.org/articles/datasets.html">our website for direct download links</a>, or explore the actual files in <a href="https://github.com/msberends/AMR/tree/main/data-raw/datasets" class="external-link">our GitHub repository</a>.</p>
</div>
<div class="section level2">
<h2 id="references">References<a class="anchor" aria-label="anchor" href="#references"></a></h2>
<ul><li><p>EUCAST Expert Rules. Version 2.0, 2012.<br>
Leclercq et al. <strong>EUCAST expert rules in antimicrobial susceptibility testing.</strong> <em>Clin Microbiol Infect.</em> 2013;19(2):141-60; <a href="https://doi.org/10.1111/j.1469-0691.2011.03703.x" class="external-link">doi:10.1111/j.1469-0691.2011.03703.x</a></p></li>
<li><p>EUCAST Expert Rules, Intrinsic Resistance and Exceptional Phenotypes Tables. Version 3.1, 2016. <a href="https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Expert_Rules/Expert_rules_intrinsic_exceptional_V3.1.pdf" class="external-link">(link)</a></p></li>
<li><p>EUCAST Intrinsic Resistance and Unusual Phenotypes. Version 3.2, 2020. <a href="https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Expert_Rules/2020/Intrinsic_Resistance_and_Unusual_Phenotypes_Tables_v3.2_20200225.pdf" class="external-link">(link)</a></p></li>
<li><p>EUCAST Intrinsic Resistance and Unusual Phenotypes. Version 3.3, 2021. <a href="https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Expert_Rules/2021/Intrinsic_Resistance_and_Unusual_Phenotypes_Tables_v3.3_20211018.pdf" class="external-link">(link)</a></p></li>
<li><p>EUCAST Breakpoint tables for interpretation of MICs and zone diameters. Version 9.0, 2019. <a href="https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Breakpoint_tables/v_9.0_Breakpoint_Tables.xlsx" class="external-link">(link)</a></p></li>
<li><p>EUCAST Breakpoint tables for interpretation of MICs and zone diameters. Version 10.0, 2020. <a href="https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Breakpoint_tables/v_10.0_Breakpoint_Tables.xlsx" class="external-link">(link)</a></p></li>
<li><p>EUCAST Breakpoint tables for interpretation of MICs and zone diameters. Version 11.0, 2021. <a href="https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Breakpoint_tables/v_11.0_Breakpoint_Tables.xlsx" class="external-link">(link)</a></p></li>
<li><p>EUCAST Breakpoint tables for interpretation of MICs and zone diameters. Version 12.0, 2022. <a href="https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Breakpoint_tables/v_12.0_Breakpoint_Tables.xlsx" class="external-link">(link)</a></p></li>
</ul></div>
<div class="section level2">
<h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>

View File

@@ -15,58 +15,46 @@ at default, see *Details*.
## Usage
``` r
interpretive_rules(x, col_mo = NULL, info = interactive(),
interpretive_rules(
x,
col_mo = NULL,
info = interactive(),
rules = getOption("AMR_interpretive_rules", default = c("breakpoints",
"expected_phenotypes")), guideline = getOption("AMR_guideline", "EUCAST"),
verbose = FALSE, version_breakpoints = 16,
version_expected_phenotypes = 1.2, version_expertrules = 3.3,
ampc_cephalosporin_resistance = NA, only_sir_columns = any(is.sir(x)),
custom_rules = NULL, overwrite = FALSE, add_if_missing = TRUE, ...)
"expected_phenotypes")),
guideline = getOption("AMR_guideline", "EUCAST"),
verbose = FALSE,
version_breakpoints = 16,
version_expected_phenotypes = 1.2,
version_expertrules = 3.3,
ampc_cephalosporin_resistance = NA,
only_sir_columns = any(is.sir(x)),
custom_rules = NULL,
overwrite = FALSE,
add_if_missing = TRUE,
...
)
eucast_rules(x, col_mo = NULL, info = interactive(),
eucast_rules(
x,
col_mo = NULL,
info = interactive(),
rules = getOption("AMR_interpretive_rules", default = c("breakpoints",
"expected_phenotypes")), ...)
"expected_phenotypes")),
...
)
clsi_rules(x, col_mo = NULL, info = interactive(),
clsi_rules(
x,
col_mo = NULL,
info = interactive(),
rules = getOption("AMR_interpretive_rules", default = c("breakpoints",
"expected_phenotypes")), ...)
"expected_phenotypes")),
...
)
eucast_dosage(ab, administration = "iv", version_breakpoints = 15)
```
## Source
- EUCAST Expert Rules. Version 2.0, 2012.
Leclercq et al. **EUCAST expert rules in antimicrobial susceptibility
testing.** *Clin Microbiol Infect.* 2013;19(2):141-60;
[doi:10.1111/j.1469-0691.2011.03703.x](https://doi.org/10.1111/j.1469-0691.2011.03703.x)
- EUCAST Expert Rules, Intrinsic Resistance and Exceptional Phenotypes
Tables. Version 3.1, 2016.
[(link)](https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Expert_Rules/Expert_rules_intrinsic_exceptional_V3.1.pdf)
- EUCAST Intrinsic Resistance and Unusual Phenotypes. Version 3.2, 2020.
[(link)](https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Expert_Rules/2020/Intrinsic_Resistance_and_Unusual_Phenotypes_Tables_v3.2_20200225.pdf)
- EUCAST Intrinsic Resistance and Unusual Phenotypes. Version 3.3, 2021.
[(link)](https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Expert_Rules/2021/Intrinsic_Resistance_and_Unusual_Phenotypes_Tables_v3.3_20211018.pdf)
- EUCAST Breakpoint tables for interpretation of MICs and zone
diameters. Version 9.0, 2019.
[(link)](https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Breakpoint_tables/v_9.0_Breakpoint_Tables.xlsx)
- EUCAST Breakpoint tables for interpretation of MICs and zone
diameters. Version 10.0, 2020.
[(link)](https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Breakpoint_tables/v_10.0_Breakpoint_Tables.xlsx)
- EUCAST Breakpoint tables for interpretation of MICs and zone
diameters. Version 11.0, 2021.
[(link)](https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Breakpoint_tables/v_11.0_Breakpoint_Tables.xlsx)
- EUCAST Breakpoint tables for interpretation of MICs and zone
diameters. Version 12.0, 2022.
[(link)](https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Breakpoint_tables/v_12.0_Breakpoint_Tables.xlsx)
## Arguments
- x:
@@ -232,7 +220,7 @@ The file containing all interpretive rules is located here:
where applicable. For example, *Ochrobactrum anthropi* was renamed to
*Brucella anthropi* in 2020; the original EUCAST rules v3.1 and v3.2 did
not yet contain this new taxonomic name. The `AMR` package contains the
full microbial taxonomy updated until June 24th, 2024, see
full microbial taxonomy updated until 7th of May, 2026, see
[microorganisms](https://amr-for-r.org/reference/microorganisms.md).
### Custom Rules
@@ -285,6 +273,39 @@ links](https://amr-for-r.org/articles/datasets.html), or explore the
actual files in [our GitHub
repository](https://github.com/msberends/AMR/tree/main/data-raw/datasets).
## References
- EUCAST Expert Rules. Version 2.0, 2012.
Leclercq et al. **EUCAST expert rules in antimicrobial susceptibility
testing.** *Clin Microbiol Infect.* 2013;19(2):141-60;
[doi:10.1111/j.1469-0691.2011.03703.x](https://doi.org/10.1111/j.1469-0691.2011.03703.x)
- EUCAST Expert Rules, Intrinsic Resistance and Exceptional Phenotypes
Tables. Version 3.1, 2016.
[(link)](https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Expert_Rules/Expert_rules_intrinsic_exceptional_V3.1.pdf)
- EUCAST Intrinsic Resistance and Unusual Phenotypes. Version 3.2, 2020.
[(link)](https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Expert_Rules/2020/Intrinsic_Resistance_and_Unusual_Phenotypes_Tables_v3.2_20200225.pdf)
- EUCAST Intrinsic Resistance and Unusual Phenotypes. Version 3.3, 2021.
[(link)](https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Expert_Rules/2021/Intrinsic_Resistance_and_Unusual_Phenotypes_Tables_v3.3_20211018.pdf)
- EUCAST Breakpoint tables for interpretation of MICs and zone
diameters. Version 9.0, 2019.
[(link)](https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Breakpoint_tables/v_9.0_Breakpoint_Tables.xlsx)
- EUCAST Breakpoint tables for interpretation of MICs and zone
diameters. Version 10.0, 2020.
[(link)](https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Breakpoint_tables/v_10.0_Breakpoint_Tables.xlsx)
- EUCAST Breakpoint tables for interpretation of MICs and zone
diameters. Version 11.0, 2021.
[(link)](https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Breakpoint_tables/v_11.0_Breakpoint_Tables.xlsx)
- EUCAST Breakpoint tables for interpretation of MICs and zone
diameters. Version 12.0, 2022.
[(link)](https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Breakpoint_tables/v_12.0_Breakpoint_Tables.xlsx)
## Examples
``` r

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Data Set Denoting Bacterial Intrinsic Resistance — intrinsic_resistant • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Data Set Denoting Bacterial Intrinsic Resistance — intrinsic_resistant"><meta name="description" content="Data set containing 'EUCAST Expected Resistant Phenotypes' of all bug-drug combinations between the microorganisms and antimicrobials data sets."><meta property="og:description" content="Data set containing 'EUCAST Expected Resistant Phenotypes' of all bug-drug combinations between the microorganisms and antimicrobials data sets."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Data Set Denoting Bacterial Intrinsic Resistance — intrinsic_resistant • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Data Set Denoting Bacterial Intrinsic Resistance — intrinsic_resistant"><meta name="description" content="Data set containing 'EUCAST Expected Resistant Phenotypes' of all bug-drug combinations between the microorganisms and antimicrobials data sets."><meta property="og:description" content="Data set containing 'EUCAST Expected Resistant Phenotypes' of all bug-drug combinations between the microorganisms and antimicrobials data sets."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -60,7 +60,7 @@
<div class="section level2">
<h2 id="format">Format<a class="anchor" aria-label="anchor" href="#format"></a></h2>
<p>A <a href="https://tibble.tidyverse.org/reference/tibble.html" class="external-link">tibble</a> with 285 928 observations and 2 variables:</p><ul><li><p><code>mo</code><br> Microorganism ID which occurs in <code><a href="microorganisms.html">microorganisms$mo</a></code>. Names can be retrieved using <code><a href="mo_property.html">mo_name()</a></code>.</p></li>
<p>A <a href="https://tibble.tidyverse.org/reference/tibble.html" class="external-link">tibble</a> with 294 079 observations and 2 variables:</p><ul><li><p><code>mo</code><br> Microorganism ID which occurs in <code><a href="microorganisms.html">microorganisms$mo</a></code>. Names can be retrieved using <code><a href="mo_property.html">mo_name()</a></code>.</p></li>
<li><p><code>ab</code><br> Antimicrobial ID which occurs in <code><a href="antimicrobials.html">antimicrobials$ab</a></code>. Names can be retrieved using <code><a href="ab_property.html">ab_name()</a></code>.</p></li>
</ul></div>
<div class="section level2">
@@ -68,6 +68,7 @@
<p>This data set is currently based on <a href="https://www.eucast.org/bacteria/important-additional-information/expert-rules/" class="external-link">'EUCAST Expected Resistant Phenotypes' v1.2</a> (2023).</p>
<p>This data set is internally used by:</p><ul><li><p><code><a href="antimicrobial_selectors.html">not_intrinsic_resistant()</a></code> (an <a href="antimicrobial_selectors.html">antimicrobial selector</a>)</p></li>
<li><p><code><a href="mo_property.html">mo_is_intrinsic_resistant()</a></code></p></li>
<li><p><code><a href="antibiogram.html">wisca()</a></code> to model \(\beta(1, 9999)\) for resistant bug-drug combinations, per <a href="https://doi.org/10.1093/jac/dkv397" class="external-link">doi:10.1093/jac/dkv397</a></p></li>
</ul></div>
<div class="section level2">
<h2 id="download-our-reference-data">Download Our Reference Data<a class="anchor" aria-label="anchor" href="#download-our-reference-data"></a></h2>
@@ -81,7 +82,7 @@
<div class="section level2">
<h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="va">intrinsic_resistant</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 285,928 × 2</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 294,079 × 2</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> mo ab </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;mo&gt;</span> <span style="color: #949494; font-style: italic;">&lt;ab&gt;</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> <span style="color: #949494;">B_</span>GRAMP ATM </span>
@@ -94,7 +95,7 @@
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> <span style="color: #949494;">B_</span>ANAER-POS NAL </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> <span style="color: #949494;">B_</span>ANAER-POS PLB </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> <span style="color: #949494;">B_</span>ANAER-POS TEM </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># 285,918 more rows</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># 294,069 more rows</span></span>
</code></pre></div>
</div>
</main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2>

View File

@@ -14,8 +14,8 @@ intrinsic_resistant
## Format
A [tibble](https://tibble.tidyverse.org/reference/tibble.html) with 285
928 observations and 2 variables:
A [tibble](https://tibble.tidyverse.org/reference/tibble.html) with 294
079 observations and 2 variables:
- `mo`
Microorganism ID which occurs in
@@ -44,6 +44,10 @@ This data set is internally used by:
- [`mo_is_intrinsic_resistant()`](https://amr-for-r.org/reference/mo_property.md)
- [`wisca()`](https://amr-for-r.org/reference/antibiogram.md) to model
\\\beta(1, 9999)\\ for resistant bug-drug combinations, per
[doi:10.1093/jac/dkv397](https://doi.org/10.1093/jac/dkv397)
## Download Our Reference Data
All reference data sets in the AMR package - including information on
@@ -64,7 +68,7 @@ repository](https://github.com/msberends/AMR/tree/main/data-raw/datasets).
``` r
intrinsic_resistant
#> # A tibble: 285,928 × 2
#> # A tibble: 294,079 × 2
#> mo ab
#> <mo> <ab>
#> 1 B_GRAMP ATM
@@ -77,5 +81,5 @@ intrinsic_resistant
#> 8 B_ANAER-POS NAL
#> 9 B_ANAER-POS PLB
#> 10 B_ANAER-POS TEM
#> # 285,918 more rows
#> # 294,069 more rows
```

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Italicise Taxonomic Families, Genera, Species, Subspecies — italicise_taxonomy • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Italicise Taxonomic Families, Genera, Species, Subspecies — italicise_taxonomy"><meta name="description" content="According to the binomial nomenclature, the lowest four taxonomic levels (family, genus, species, subspecies) should be printed in italics. This function finds taxonomic names within strings and makes them italic."><meta property="og:description" content="According to the binomial nomenclature, the lowest four taxonomic levels (family, genus, species, subspecies) should be printed in italics. This function finds taxonomic names within strings and makes them italic."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Italicise Taxonomic Families, Genera, Species, Subspecies — italicise_taxonomy • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Italicise Taxonomic Families, Genera, Species, Subspecies — italicise_taxonomy"><meta name="description" content="According to the binomial nomenclature, the lowest four taxonomic levels (family, genus, species, subspecies) should be printed in italics. This function finds taxonomic names within strings and makes them italic."><meta property="og:description" content="According to the binomial nomenclature, the lowest four taxonomic levels (family, genus, species, subspecies) should be printed in italics. This function finds taxonomic names within strings and makes them italic."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Join microorganisms to a Data Set — join • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Join microorganisms to a Data Set — join"><meta name="description" content="Join the data set microorganisms easily to an existing data set or to a character vector."><meta property="og:description" content="Join the data set microorganisms easily to an existing data set or to a character vector."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Join microorganisms to a Data Set — join • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Join microorganisms to a Data Set — join"><meta name="description" content="Join the data set microorganisms easily to an existing data set or to a character vector."><meta property="og:description" content="Join the data set microorganisms easily to an existing data set or to a character vector."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -94,32 +94,32 @@
</div>
<div class="section level2">
<h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2>
<p>**Note:** As opposed to the `join()` functions of `dplyr`, [character] vectors are supported and at default existing columns will get a suffix `"2"` and the newly joined columns will not get a suffix.</p>
<p>If the `dplyr` package is installed, their join functions will be used. Otherwise, the much slower [merge()] and [interaction()] functions from base <span style="R">R</span> will be used.</p>
<p><strong>Note:</strong> As opposed to the <code>join()</code> functions of <code>dplyr</code>, <a href="https://rdrr.io/r/base/character.html" class="external-link">character</a> vectors are supported and at default existing columns will get a suffix <code>"2"</code> and the newly joined columns will not get a suffix.</p>
<p>If the <code>dplyr</code> package is installed, their join functions will be used. Otherwise, the much slower <code><a href="https://rdrr.io/pkg/data.table/man/merge.html" class="external-link">merge()</a></code> and <code><a href="https://rdrr.io/r/base/interaction.html" class="external-link">interaction()</a></code> functions from base <span style="R">R</span> will be used.</p>
</div>
<div class="section level2">
<h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="fu">left_join_microorganisms</span><span class="op">(</span><span class="fu"><a href="as.mo.html">as.mo</a></span><span class="op">(</span><span class="st">"K. pneumoniae"</span><span class="op">)</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 1 × 26</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> mo fullname status kingdom phylum class order family genus species</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;mo&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> <span style="color: #949494;">B_</span>KLBSL<span style="color: #949494;">_</span>PNMN Klebsiell… accep… Bacter… Pseud… Gamm… Ente… Enter… Kleb… pneumo…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># 16 more variables: subspecies &lt;chr&gt;, rank &lt;chr&gt;, ref &lt;chr&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># oxygen_tolerance &lt;chr&gt;, source &lt;chr&gt;, lpsn &lt;chr&gt;, lpsn_parent &lt;chr&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># lpsn_renamed_to &lt;chr&gt;, mycobank &lt;chr&gt;, mycobank_parent &lt;chr&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># mycobank_renamed_to &lt;chr&gt;, gbif &lt;chr&gt;, gbif_parent &lt;chr&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># gbif_renamed_to &lt;chr&gt;, prevalence &lt;dbl&gt;, snomed &lt;list&gt;</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 1 × 28</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> mo fullname status domain kingdom phylum class order family genus</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;mo&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> <span style="color: #949494;">B_</span>KLBSL<span style="color: #949494;">_</span>PNMN Klebsiella… accep… Bacte… Pseudo… Pseud… Gamm… Ente… Enter… Kleb…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># 18 more variables: species &lt;chr&gt;, subspecies &lt;chr&gt;, rank &lt;chr&gt;, ref &lt;chr&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># oxygen_tolerance &lt;chr&gt;, morphology &lt;chr&gt;, source &lt;chr&gt;, lpsn &lt;chr&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># lpsn_parent &lt;chr&gt;, lpsn_renamed_to &lt;chr&gt;, mycobank &lt;chr&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># mycobank_parent &lt;chr&gt;, mycobank_renamed_to &lt;chr&gt;, gbif &lt;chr&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># gbif_parent &lt;chr&gt;, gbif_renamed_to &lt;chr&gt;, prevalence &lt;dbl&gt;, snomed &lt;list&gt;</span></span>
<span class="r-in"><span><span class="fu">left_join_microorganisms</span><span class="op">(</span><span class="st">"B_KLBSL_PNMN"</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 1 × 26</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> mo fullname status kingdom phylum class order family genus species</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;mo&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> <span style="color: #949494;">B_</span>KLBSL<span style="color: #949494;">_</span>PNMN Klebsiell… accep… Bacter… Pseud… Gamm… Ente… Enter… Kleb… pneumo…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># 16 more variables: subspecies &lt;chr&gt;, rank &lt;chr&gt;, ref &lt;chr&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># oxygen_tolerance &lt;chr&gt;, source &lt;chr&gt;, lpsn &lt;chr&gt;, lpsn_parent &lt;chr&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># lpsn_renamed_to &lt;chr&gt;, mycobank &lt;chr&gt;, mycobank_parent &lt;chr&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># mycobank_renamed_to &lt;chr&gt;, gbif &lt;chr&gt;, gbif_parent &lt;chr&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># gbif_renamed_to &lt;chr&gt;, prevalence &lt;dbl&gt;, snomed &lt;list&gt;</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 1 × 28</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> mo fullname status domain kingdom phylum class order family genus</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;mo&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> <span style="color: #949494;">B_</span>KLBSL<span style="color: #949494;">_</span>PNMN Klebsiella… accep… Bacte… Pseudo… Pseud… Gamm… Ente… Enter… Kleb…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># 18 more variables: species &lt;chr&gt;, subspecies &lt;chr&gt;, rank &lt;chr&gt;, ref &lt;chr&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># oxygen_tolerance &lt;chr&gt;, morphology &lt;chr&gt;, source &lt;chr&gt;, lpsn &lt;chr&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># lpsn_parent &lt;chr&gt;, lpsn_renamed_to &lt;chr&gt;, mycobank &lt;chr&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># mycobank_parent &lt;chr&gt;, mycobank_renamed_to &lt;chr&gt;, gbif &lt;chr&gt;,</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># gbif_parent &lt;chr&gt;, gbif_renamed_to &lt;chr&gt;, prevalence &lt;dbl&gt;, snomed &lt;list&gt;</span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="va">df</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/data.frame.html" class="external-link">data.frame</a></span><span class="op">(</span></span></span>
<span class="r-in"><span> date <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/seq.html" class="external-link">seq</a></span><span class="op">(</span></span></span>
@@ -139,14 +139,15 @@
<span class="r-in"><span><span class="va">df_joined</span> <span class="op">&lt;-</span> <span class="fu">left_join_microorganisms</span><span class="op">(</span><span class="va">df</span>, <span class="st">"bacteria"</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/colnames.html" class="external-link">colnames</a></span><span class="op">(</span><span class="va">df_joined</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "date" "bacteria" "fullname" </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [4] "status" "kingdom" "phylum" </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] "class" "order" "family" </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [10] "genus" "species" "subspecies" </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [13] "rank" "ref" "oxygen_tolerance" </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [16] "source" "lpsn" "lpsn_parent" </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [19] "lpsn_renamed_to" "mycobank" "mycobank_parent" </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [22] "mycobank_renamed_to" "gbif" "gbif_parent" </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [25] "gbif_renamed_to" "prevalence" "snomed" </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [4] "status" "domain" "kingdom" </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] "phylum" "class" "order" </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [10] "family" "genus" "species" </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [13] "subspecies" "rank" "ref" </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [16] "oxygen_tolerance" "morphology" "source" </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [19] "lpsn" "lpsn_parent" "lpsn_renamed_to" </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [22] "mycobank" "mycobank_parent" "mycobank_renamed_to"</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [25] "gbif" "gbif_parent" "gbif_renamed_to" </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [28] "prevalence" "snomed" </span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># \donttest{</span></span></span>
<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">require</a></span><span class="op">(</span><span class="st"><a href="https://dplyr.tidyverse.org" class="external-link">"dplyr"</a></span><span class="op">)</span><span class="op">)</span> <span class="op">{</span></span></span>
@@ -171,14 +172,15 @@
<span class="r-out co"><span class="r-pr">#&gt;</span> [40] "IPM" "MEM" "MTR" </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [43] "CHL" "COL" "MUP" </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [46] "RIF" "fullname" "status" </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [49] "kingdom" "phylum" "class" </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [52] "order" "family" "genus" </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [55] "species" "subspecies" "rank" </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [58] "ref" "oxygen_tolerance" "source" </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [61] "lpsn" "lpsn_parent" "lpsn_renamed_to" </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [64] "mycobank" "mycobank_parent" "mycobank_renamed_to"</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [67] "gbif" "gbif_parent" "gbif_renamed_to" </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [70] "prevalence" "snomed" </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [49] "domain" "kingdom" "phylum" </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [52] "class" "order" "family" </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [55] "genus" "species" "subspecies" </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [58] "rank" "ref" "oxygen_tolerance" </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [61] "morphology" "source" "lpsn" </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [64] "lpsn_parent" "lpsn_renamed_to" "mycobank" </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [67] "mycobank_parent" "mycobank_renamed_to" "gbif" </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [70] "gbif_parent" "gbif_renamed_to" "prevalence" </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [73] "snomed" </span>
<span class="r-in"><span><span class="co"># }</span></span></span>
</code></pre></div>
</div>

View File

@@ -59,37 +59,40 @@ a [data.frame](https://rdrr.io/r/base/data.frame.html)
## Details
\*\*Note:\*\* As opposed to the \`join()\` functions of \`dplyr\`,
\[character\] vectors are supported and at default existing columns will
get a suffix \`"2"\` and the newly joined columns will not get a suffix.
**Note:** As opposed to the `join()` functions of `dplyr`,
[character](https://rdrr.io/r/base/character.html) vectors are supported
and at default existing columns will get a suffix `"2"` and the newly
joined columns will not get a suffix.
If the \`dplyr\` package is installed, their join functions will be
used. Otherwise, the much slower \[merge()\] and \[interaction()\]
functions from base R will be used.
If the `dplyr` package is installed, their join functions will be used.
Otherwise, the much slower
[`merge()`](https://rdrr.io/pkg/data.table/man/merge.html) and
[`interaction()`](https://rdrr.io/r/base/interaction.html) functions
from base R will be used.
## Examples
``` r
left_join_microorganisms(as.mo("K. pneumoniae"))
#> # A tibble: 1 × 26
#> mo fullname status kingdom phylum class order family genus species
#> <mo> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 B_KLBSL_PNMN Klebsiell… accep… Bacter… Pseud… Gamm… Ente… Enter… Kleb… pneumo…
#> # 16 more variables: subspecies <chr>, rank <chr>, ref <chr>,
#> # oxygen_tolerance <chr>, source <chr>, lpsn <chr>, lpsn_parent <chr>,
#> # lpsn_renamed_to <chr>, mycobank <chr>, mycobank_parent <chr>,
#> # mycobank_renamed_to <chr>, gbif <chr>, gbif_parent <chr>,
#> # gbif_renamed_to <chr>, prevalence <dbl>, snomed <list>
#> # A tibble: 1 × 28
#> mo fullname status domain kingdom phylum class order family genus
#> <mo> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 B_KLBSL_PNMN Klebsiella… accep… Bacte… Pseudo… Pseud… Gamm… Ente… Enter… Kleb…
#> # 18 more variables: species <chr>, subspecies <chr>, rank <chr>, ref <chr>,
#> # oxygen_tolerance <chr>, morphology <chr>, source <chr>, lpsn <chr>,
#> # lpsn_parent <chr>, lpsn_renamed_to <chr>, mycobank <chr>,
#> # mycobank_parent <chr>, mycobank_renamed_to <chr>, gbif <chr>,
#> # gbif_parent <chr>, gbif_renamed_to <chr>, prevalence <dbl>, snomed <list>
left_join_microorganisms("B_KLBSL_PNMN")
#> # A tibble: 1 × 26
#> mo fullname status kingdom phylum class order family genus species
#> <mo> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 B_KLBSL_PNMN Klebsiell… accep… Bacter… Pseud… Gamm… Ente… Enter… Kleb… pneumo…
#> # 16 more variables: subspecies <chr>, rank <chr>, ref <chr>,
#> # oxygen_tolerance <chr>, source <chr>, lpsn <chr>, lpsn_parent <chr>,
#> # lpsn_renamed_to <chr>, mycobank <chr>, mycobank_parent <chr>,
#> # mycobank_renamed_to <chr>, gbif <chr>, gbif_parent <chr>,
#> # gbif_renamed_to <chr>, prevalence <dbl>, snomed <list>
#> # A tibble: 1 × 28
#> mo fullname status domain kingdom phylum class order family genus
#> <mo> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 B_KLBSL_PNMN Klebsiella… accep… Bacte… Pseudo… Pseud… Gamm… Ente… Enter… Kleb…
#> # 18 more variables: species <chr>, subspecies <chr>, rank <chr>, ref <chr>,
#> # oxygen_tolerance <chr>, morphology <chr>, source <chr>, lpsn <chr>,
#> # lpsn_parent <chr>, lpsn_renamed_to <chr>, mycobank <chr>,
#> # mycobank_parent <chr>, mycobank_renamed_to <chr>, gbif <chr>,
#> # gbif_parent <chr>, gbif_renamed_to <chr>, prevalence <dbl>, snomed <list>
df <- data.frame(
date = seq(
@@ -109,14 +112,15 @@ colnames(df)
df_joined <- left_join_microorganisms(df, "bacteria")
colnames(df_joined)
#> [1] "date" "bacteria" "fullname"
#> [4] "status" "kingdom" "phylum"
#> [7] "class" "order" "family"
#> [10] "genus" "species" "subspecies"
#> [13] "rank" "ref" "oxygen_tolerance"
#> [16] "source" "lpsn" "lpsn_parent"
#> [19] "lpsn_renamed_to" "mycobank" "mycobank_parent"
#> [22] "mycobank_renamed_to" "gbif" "gbif_parent"
#> [25] "gbif_renamed_to" "prevalence" "snomed"
#> [4] "status" "domain" "kingdom"
#> [7] "phylum" "class" "order"
#> [10] "family" "genus" "species"
#> [13] "subspecies" "rank" "ref"
#> [16] "oxygen_tolerance" "morphology" "source"
#> [19] "lpsn" "lpsn_parent" "lpsn_renamed_to"
#> [22] "mycobank" "mycobank_parent" "mycobank_renamed_to"
#> [25] "gbif" "gbif_parent" "gbif_renamed_to"
#> [28] "prevalence" "snomed"
# \donttest{
if (require("dplyr")) {
@@ -141,13 +145,14 @@ if (require("dplyr")) {
#> [40] "IPM" "MEM" "MTR"
#> [43] "CHL" "COL" "MUP"
#> [46] "RIF" "fullname" "status"
#> [49] "kingdom" "phylum" "class"
#> [52] "order" "family" "genus"
#> [55] "species" "subspecies" "rank"
#> [58] "ref" "oxygen_tolerance" "source"
#> [61] "lpsn" "lpsn_parent" "lpsn_renamed_to"
#> [64] "mycobank" "mycobank_parent" "mycobank_renamed_to"
#> [67] "gbif" "gbif_parent" "gbif_renamed_to"
#> [70] "prevalence" "snomed"
#> [49] "domain" "kingdom" "phylum"
#> [52] "class" "order" "family"
#> [55] "genus" "species" "subspecies"
#> [58] "rank" "ref" "oxygen_tolerance"
#> [61] "morphology" "source" "lpsn"
#> [64] "lpsn_parent" "lpsn_renamed_to" "mycobank"
#> [67] "mycobank_parent" "mycobank_renamed_to" "gbif"
#> [70] "gbif_parent" "gbif_renamed_to" "prevalence"
#> [73] "snomed"
# }
```

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>(Key) Antimicrobials for First Weighted Isolates — key_antimicrobials • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="(Key) Antimicrobials for First Weighted Isolates — key_antimicrobials"><meta name="description" content="These functions can be used to determine first weighted isolates by considering the phenotype for isolate selection (see first_isolate()). Using a phenotype-based method to determine first isolates is more reliable than methods that disregard phenotypes."><meta property="og:description" content="These functions can be used to determine first weighted isolates by considering the phenotype for isolate selection (see first_isolate()). Using a phenotype-based method to determine first isolates is more reliable than methods that disregard phenotypes."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>(Key) Antimicrobials for First Weighted Isolates — key_antimicrobials • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="(Key) Antimicrobials for First Weighted Isolates — key_antimicrobials"><meta name="description" content="These functions can be used to determine first weighted isolates by considering the phenotype for isolate selection (see first_isolate()). Using a phenotype-based method to determine first isolates is more reliable than methods that disregard phenotypes."><meta property="og:description" content="These functions can be used to determine first weighted isolates by considering the phenotype for isolate selection (see first_isolate()). Using a phenotype-based method to determine first isolates is more reliable than methods that disregard phenotypes."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -55,19 +55,31 @@
<div class="section level2">
<h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">key_antimicrobials</span><span class="op">(</span>x <span class="op">=</span> <span class="cn">NULL</span>, col_mo <span class="op">=</span> <span class="cn">NULL</span>, universal <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"ampicillin"</span>,</span>
<span> <span class="st">"amoxicillin/clavulanic acid"</span>, <span class="st">"cefuroxime"</span>, <span class="st">"piperacillin/tazobactam"</span>,</span>
<span> <span class="st">"ciprofloxacin"</span>, <span class="st">"trimethoprim/sulfamethoxazole"</span><span class="op">)</span>,</span>
<span> gram_negative <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"gentamicin"</span>, <span class="st">"tobramycin"</span>, <span class="st">"colistin"</span>, <span class="st">"cefotaxime"</span>,</span>
<span> <span class="st">"ceftazidime"</span>, <span class="st">"meropenem"</span><span class="op">)</span>, gram_positive <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"vancomycin"</span>, <span class="st">"teicoplanin"</span>,</span>
<span> <span class="st">"tetracycline"</span>, <span class="st">"erythromycin"</span>, <span class="st">"oxacillin"</span>, <span class="st">"rifampin"</span><span class="op">)</span>,</span>
<span> antifungal <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"anidulafungin"</span>, <span class="st">"caspofungin"</span>, <span class="st">"fluconazole"</span>, <span class="st">"miconazole"</span>,</span>
<span> <span class="st">"nystatin"</span>, <span class="st">"voriconazole"</span><span class="op">)</span>, only_sir_columns <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/any.html" class="external-link">any</a></span><span class="op">(</span><span class="fu"><a href="as.sir.html">is.sir</a></span><span class="op">(</span><span class="va">x</span><span class="op">)</span><span class="op">)</span>, <span class="va">...</span><span class="op">)</span></span>
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">key_antimicrobials</span><span class="op">(</span></span>
<span> x <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> col_mo <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> universal <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"ampicillin"</span>, <span class="st">"amoxicillin/clavulanic acid"</span>, <span class="st">"cefuroxime"</span>,</span>
<span> <span class="st">"piperacillin/tazobactam"</span>, <span class="st">"ciprofloxacin"</span>, <span class="st">"trimethoprim/sulfamethoxazole"</span><span class="op">)</span>,</span>
<span> gram_negative <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"gentamicin"</span>, <span class="st">"tobramycin"</span>, <span class="st">"colistin"</span>, <span class="st">"cefotaxime"</span>, <span class="st">"ceftazidime"</span>,</span>
<span> <span class="st">"meropenem"</span><span class="op">)</span>,</span>
<span> gram_positive <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"vancomycin"</span>, <span class="st">"teicoplanin"</span>, <span class="st">"tetracycline"</span>, <span class="st">"erythromycin"</span>,</span>
<span> <span class="st">"oxacillin"</span>, <span class="st">"rifampin"</span><span class="op">)</span>,</span>
<span> antifungal <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"anidulafungin"</span>, <span class="st">"caspofungin"</span>, <span class="st">"fluconazole"</span>, <span class="st">"miconazole"</span>, <span class="st">"nystatin"</span>,</span>
<span> <span class="st">"voriconazole"</span><span class="op">)</span>,</span>
<span> only_sir_columns <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/any.html" class="external-link">any</a></span><span class="op">(</span><span class="fu"><a href="as.sir.html">is.sir</a></span><span class="op">(</span><span class="va">x</span><span class="op">)</span><span class="op">)</span>,</span>
<span> <span class="va">...</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="fu">all_antimicrobials</span><span class="op">(</span>x <span class="op">=</span> <span class="cn">NULL</span>, only_sir_columns <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/any.html" class="external-link">any</a></span><span class="op">(</span><span class="fu"><a href="as.sir.html">is.sir</a></span><span class="op">(</span><span class="va">x</span><span class="op">)</span><span class="op">)</span>, <span class="va">...</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">antimicrobials_equal</span><span class="op">(</span><span class="va">y</span>, <span class="va">z</span>, type <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"points"</span>, <span class="st">"keyantimicrobials"</span><span class="op">)</span>,</span>
<span> ignore_I <span class="op">=</span> <span class="cn">TRUE</span>, points_threshold <span class="op">=</span> <span class="fl">2</span>, <span class="va">...</span><span class="op">)</span></span></code></pre></div>
<span><span class="fu">antimicrobials_equal</span><span class="op">(</span></span>
<span> <span class="va">y</span>,</span>
<span> <span class="va">z</span>,</span>
<span> type <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"points"</span>, <span class="st">"keyantimicrobials"</span><span class="op">)</span>,</span>
<span> ignore_I <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> points_threshold <span class="op">=</span> <span class="fl">2</span>,</span>
<span> <span class="va">...</span></span>
<span><span class="op">)</span></span></code></pre></div>
</div>
<div class="section level2">

View File

@@ -9,19 +9,31 @@ reliable than methods that disregard phenotypes.
## Usage
``` r
key_antimicrobials(x = NULL, col_mo = NULL, universal = c("ampicillin",
"amoxicillin/clavulanic acid", "cefuroxime", "piperacillin/tazobactam",
"ciprofloxacin", "trimethoprim/sulfamethoxazole"),
gram_negative = c("gentamicin", "tobramycin", "colistin", "cefotaxime",
"ceftazidime", "meropenem"), gram_positive = c("vancomycin", "teicoplanin",
"tetracycline", "erythromycin", "oxacillin", "rifampin"),
antifungal = c("anidulafungin", "caspofungin", "fluconazole", "miconazole",
"nystatin", "voriconazole"), only_sir_columns = any(is.sir(x)), ...)
key_antimicrobials(
x = NULL,
col_mo = NULL,
universal = c("ampicillin", "amoxicillin/clavulanic acid", "cefuroxime",
"piperacillin/tazobactam", "ciprofloxacin", "trimethoprim/sulfamethoxazole"),
gram_negative = c("gentamicin", "tobramycin", "colistin", "cefotaxime", "ceftazidime",
"meropenem"),
gram_positive = c("vancomycin", "teicoplanin", "tetracycline", "erythromycin",
"oxacillin", "rifampin"),
antifungal = c("anidulafungin", "caspofungin", "fluconazole", "miconazole", "nystatin",
"voriconazole"),
only_sir_columns = any(is.sir(x)),
...
)
all_antimicrobials(x = NULL, only_sir_columns = any(is.sir(x)), ...)
antimicrobials_equal(y, z, type = c("points", "keyantimicrobials"),
ignore_I = TRUE, points_threshold = 2, ...)
antimicrobials_equal(
y,
z,
type = c("points", "keyantimicrobials"),
ignore_I = TRUE,
points_threshold = 2,
...
)
```
## Arguments

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Kurtosis of the Sample — kurtosis • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Kurtosis of the Sample — kurtosis"><meta name="description" content='Kurtosis is a measure of the "tailedness" of the probability distribution of a real-valued random variable. A normal distribution has a kurtosis of 3 and a excess kurtosis of 0.'><meta property="og:description" content='Kurtosis is a measure of the "tailedness" of the probability distribution of a real-valued random variable. A normal distribution has a kurtosis of 3 and a excess kurtosis of 0.'><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Kurtosis of the Sample — kurtosis • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Kurtosis of the Sample — kurtosis"><meta name="description" content='Kurtosis is a measure of the "tailedness" of the probability distribution of a real-valued random variable. A normal distribution has a kurtosis of 3 and a excess kurtosis of 0.'><meta property="og:description" content='Kurtosis is a measure of the "tailedness" of the probability distribution of a real-valued random variable. A normal distribution has a kurtosis of 3 and a excess kurtosis of 0.'><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -91,9 +91,9 @@
<div class="section level2">
<h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="fu">kurtosis</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/stats/Normal.html" class="external-link">rnorm</a></span><span class="op">(</span><span class="fl">10000</span><span class="op">)</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 2.985614</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 2.948511</span>
<span class="r-in"><span><span class="fu">kurtosis</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/stats/Normal.html" class="external-link">rnorm</a></span><span class="op">(</span><span class="fl">10000</span><span class="op">)</span>, excess <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 0.01547453</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] -0.06510041</span>
</code></pre></div>
</div>
</main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2>

View File

@@ -45,7 +45,7 @@ kurtosis(x, na.rm = FALSE, excess = FALSE)
``` r
kurtosis(rnorm(10000))
#> [1] 2.985614
#> [1] 2.948511
kurtosis(rnorm(10000), excess = TRUE)
#> [1] 0.01547453
#> [1] -0.06510041
```

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Vectorised Pattern Matching with Keyboard Shortcut — like • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Vectorised Pattern Matching with Keyboard Shortcut — like"><meta name="description" content="Convenient wrapper around grepl() to match a pattern: x %like% pattern. It always returns a logical vector and is always case-insensitive (use x %like_case% pattern for case-sensitive matching). Also, pattern can be as long as x to compare items of each index in both vectors, or they both can have the same length to iterate over all cases."><meta property="og:description" content="Convenient wrapper around grepl() to match a pattern: x %like% pattern. It always returns a logical vector and is always case-insensitive (use x %like_case% pattern for case-sensitive matching). Also, pattern can be as long as x to compare items of each index in both vectors, or they both can have the same length to iterate over all cases."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Vectorised Pattern Matching with Keyboard Shortcut — like • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Vectorised Pattern Matching with Keyboard Shortcut — like"><meta name="description" content="Convenient wrapper around grepl() to match a pattern: x %like% pattern. It always returns a logical vector and is always case-insensitive (use x %like_case% pattern for case-sensitive matching). Also, pattern can be as long as x to compare items of each index in both vectors, or they both can have the same length to iterate over all cases."><meta property="og:description" content="Convenient wrapper around grepl() to match a pattern: x %like% pattern. It always returns a logical vector and is always case-insensitive (use x %like_case% pattern for case-sensitive matching). Also, pattern can be as long as x to compare items of each index in both vectors, or they both can have the same length to iterate over all cases."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Determine Multidrug-Resistant Organisms (MDRO) — mdro • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Determine Multidrug-Resistant Organisms (MDRO) — mdro"><meta name="description" content="Determine which isolates are multidrug-resistant organisms (MDRO) according to international, national, or custom guidelines."><meta property="og:description" content="Determine which isolates are multidrug-resistant organisms (MDRO) according to international, national, or custom guidelines."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Determine Multidrug-Resistant Organisms (MDRO) — mdro • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Determine Multidrug-Resistant Organisms (MDRO) — mdro"><meta name="description" content="Determine which isolates are multidrug-resistant organisms (MDRO) according to international, national, or custom guidelines."><meta property="og:description" content="Determine which isolates are multidrug-resistant organisms (MDRO) according to international, national, or custom guidelines."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -55,11 +55,24 @@
<div class="section level2">
<h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">mdro</span><span class="op">(</span>x <span class="op">=</span> <span class="cn">NULL</span>, guideline <span class="op">=</span> <span class="st">"CMI 2012"</span>, col_mo <span class="op">=</span> <span class="cn">NULL</span>, esbl <span class="op">=</span> <span class="cn">NA</span>,</span>
<span> carbapenemase <span class="op">=</span> <span class="cn">NA</span>, mecA <span class="op">=</span> <span class="cn">NA</span>, mecC <span class="op">=</span> <span class="cn">NA</span>, vanA <span class="op">=</span> <span class="cn">NA</span>, vanB <span class="op">=</span> <span class="cn">NA</span>,</span>
<span> info <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/interactive.html" class="external-link">interactive</a></span><span class="op">(</span><span class="op">)</span>, pct_required_classes <span class="op">=</span> <span class="fl">0.5</span>, combine_SI <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> verbose <span class="op">=</span> <span class="cn">FALSE</span>, only_sir_columns <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/any.html" class="external-link">any</a></span><span class="op">(</span><span class="fu"><a href="as.sir.html">is.sir</a></span><span class="op">(</span><span class="va">x</span><span class="op">)</span><span class="op">)</span>,</span>
<span> infer_from_combinations <span class="op">=</span> <span class="cn">TRUE</span>, <span class="va">...</span><span class="op">)</span></span>
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">mdro</span><span class="op">(</span></span>
<span> x <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> guideline <span class="op">=</span> <span class="st">"CMI 2012"</span>,</span>
<span> col_mo <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> esbl <span class="op">=</span> <span class="cn">NA</span>,</span>
<span> carbapenemase <span class="op">=</span> <span class="cn">NA</span>,</span>
<span> mecA <span class="op">=</span> <span class="cn">NA</span>,</span>
<span> mecC <span class="op">=</span> <span class="cn">NA</span>,</span>
<span> vanA <span class="op">=</span> <span class="cn">NA</span>,</span>
<span> vanB <span class="op">=</span> <span class="cn">NA</span>,</span>
<span> info <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/interactive.html" class="external-link">interactive</a></span><span class="op">(</span><span class="op">)</span>,</span>
<span> pct_required_classes <span class="op">=</span> <span class="fl">0.5</span>,</span>
<span> combine_SI <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> verbose <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> only_sir_columns <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/any.html" class="external-link">any</a></span><span class="op">(</span><span class="fu"><a href="as.sir.html">is.sir</a></span><span class="op">(</span><span class="va">x</span><span class="op">)</span><span class="op">)</span>,</span>
<span> infer_from_combinations <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> <span class="va">...</span></span>
<span><span class="op">)</span></span>
<span></span>
<span><span class="fu">brmo</span><span class="op">(</span>x <span class="op">=</span> <span class="cn">NULL</span>, only_sir_columns <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/any.html" class="external-link">any</a></span><span class="op">(</span><span class="fu"><a href="as.sir.html">is.sir</a></span><span class="op">(</span><span class="va">x</span><span class="op">)</span><span class="op">)</span>, <span class="va">...</span><span class="op">)</span></span>
<span></span>
@@ -67,11 +80,14 @@
<span></span>
<span><span class="fu">mdr_tb</span><span class="op">(</span>x <span class="op">=</span> <span class="cn">NULL</span>, only_sir_columns <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/any.html" class="external-link">any</a></span><span class="op">(</span><span class="fu"><a href="as.sir.html">is.sir</a></span><span class="op">(</span><span class="va">x</span><span class="op">)</span><span class="op">)</span>, verbose <span class="op">=</span> <span class="cn">FALSE</span>, <span class="va">...</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">mdr_cmi2012</span><span class="op">(</span>x <span class="op">=</span> <span class="cn">NULL</span>, only_sir_columns <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/any.html" class="external-link">any</a></span><span class="op">(</span><span class="fu"><a href="as.sir.html">is.sir</a></span><span class="op">(</span><span class="va">x</span><span class="op">)</span><span class="op">)</span>, verbose <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> <span class="va">...</span><span class="op">)</span></span>
<span><span class="fu">mdr_cmi2012</span><span class="op">(</span>x <span class="op">=</span> <span class="cn">NULL</span>, only_sir_columns <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/any.html" class="external-link">any</a></span><span class="op">(</span><span class="fu"><a href="as.sir.html">is.sir</a></span><span class="op">(</span><span class="va">x</span><span class="op">)</span><span class="op">)</span>, verbose <span class="op">=</span> <span class="cn">FALSE</span>, <span class="va">...</span><span class="op">)</span></span>
<span></span>
<span><span class="fu">eucast_exceptional_phenotypes</span><span class="op">(</span>x <span class="op">=</span> <span class="cn">NULL</span>, only_sir_columns <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/any.html" class="external-link">any</a></span><span class="op">(</span><span class="fu"><a href="as.sir.html">is.sir</a></span><span class="op">(</span><span class="va">x</span><span class="op">)</span><span class="op">)</span>,</span>
<span> verbose <span class="op">=</span> <span class="cn">FALSE</span>, <span class="va">...</span><span class="op">)</span></span></code></pre></div>
<span><span class="fu">eucast_exceptional_phenotypes</span><span class="op">(</span></span>
<span> x <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> only_sir_columns <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/any.html" class="external-link">any</a></span><span class="op">(</span><span class="fu"><a href="as.sir.html">is.sir</a></span><span class="op">(</span><span class="va">x</span><span class="op">)</span><span class="op">)</span>,</span>
<span> verbose <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> <span class="va">...</span></span>
<span><span class="op">)</span></span></code></pre></div>
</div>
<div class="section level2">
@@ -144,17 +160,18 @@
</dl></div>
<div class="section level2">
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
<p>- If `verbose` is set to `TRUE`:<br>
A [data.frame] containing columns `row_number`, `microorganism`, `MDRO`, `reason`, `all_nonsusceptible_columns`, `guideline`
- CMI 2012 paper - function [mdr_cmi2012()] or [mdro()]:<br>
Ordered [factor] with levels `Negative` &lt; `Multi-drug-resistant (MDR)` &lt; `Extensively drug-resistant (XDR)` &lt; `Pandrug-resistant (PDR)`
- TB guideline - function [mdr_tb()] or [`mdro(..., guideline = "TB")`][mdro()]:<br>
Ordered [factor] with levels `Negative` &lt; `Mono-resistant` &lt; `Poly-resistant` &lt; `Multi-drug-resistant` &lt; `Extensively drug-resistant`
- German guideline - function [mrgn()] or [`mdro(..., guideline = "MRGN")`][mdro()]:<br>
Ordered [factor] with levels `Negative` &lt; `3MRGN` &lt; `4MRGN`
- Everything else, except for custom guidelines:<br>
Ordered [factor] with levels `Negative` &lt; `Positive, unconfirmed` &lt; `Positive`. The value `"Positive, unconfirmed"` means that, according to the guideline, it is not entirely sure if the isolate is multi-drug resistant and this should be confirmed with additional (e.g. genotypic) tests</p>
</div>
<ul><li><p>If <code>verbose</code> is set to <code>TRUE</code>:<br>
A <a href="https://rdrr.io/r/base/data.frame.html" class="external-link">data.frame</a> containing columns <code>row_number</code>, <code>microorganism</code>, <code>MDRO</code>, <code>reason</code>, <code>all_nonsusceptible_columns</code>, <code>guideline</code></p></li>
<li><p>CMI 2012 paper - function <code>mdr_cmi2012()</code> or <code>mdro()</code>:<br>
Ordered <a href="https://rdrr.io/pkg/data.table/man/fctr.html" class="external-link">factor</a> with levels <code>Negative</code> &lt; <code>Multi-drug-resistant (MDR)</code> &lt; <code>Extensively drug-resistant (XDR)</code> &lt; <code>Pandrug-resistant (PDR)</code></p></li>
<li><p>TB guideline - function <code>mdr_tb()</code> or <code>mdro(..., guideline = "TB")</code>:<br>
Ordered <a href="https://rdrr.io/pkg/data.table/man/fctr.html" class="external-link">factor</a> with levels <code>Negative</code> &lt; <code>Mono-resistant</code> &lt; <code>Poly-resistant</code> &lt; <code>Multi-drug-resistant</code> &lt; <code>Extensively drug-resistant</code></p></li>
<li><p>German guideline - function <code>mrgn()</code> or <code>mdro(..., guideline = "MRGN")</code>:<br>
Ordered <a href="https://rdrr.io/pkg/data.table/man/fctr.html" class="external-link">factor</a> with levels <code>Negative</code> &lt; <code>3MRGN</code> &lt; <code>4MRGN</code></p></li>
<li><p>Everything else, except for custom guidelines:<br>
Ordered <a href="https://rdrr.io/pkg/data.table/man/fctr.html" class="external-link">factor</a> with levels <code>Negative</code> &lt; <code>Positive, unconfirmed</code> &lt; <code>Positive</code>. The value <code>"Positive, unconfirmed"</code> means that, according to the guideline, it is not entirely sure if the isolate is multi-drug resistant and this should be confirmed with additional (e.g. genotypic) tests</p></li>
</ul></div>
<div class="section level2">
<h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2>
<p>These functions are context-aware. This means that the <code>x</code> argument can be left blank if used inside a <a href="https://rdrr.io/r/base/data.frame.html" class="external-link">data.frame</a> call, see <em>Examples</em>.</p>

View File

@@ -6,11 +6,24 @@ according to international, national, or custom guidelines.
## Usage
``` r
mdro(x = NULL, guideline = "CMI 2012", col_mo = NULL, esbl = NA,
carbapenemase = NA, mecA = NA, mecC = NA, vanA = NA, vanB = NA,
info = interactive(), pct_required_classes = 0.5, combine_SI = TRUE,
verbose = FALSE, only_sir_columns = any(is.sir(x)),
infer_from_combinations = TRUE, ...)
mdro(
x = NULL,
guideline = "CMI 2012",
col_mo = NULL,
esbl = NA,
carbapenemase = NA,
mecA = NA,
mecC = NA,
vanA = NA,
vanB = NA,
info = interactive(),
pct_required_classes = 0.5,
combine_SI = TRUE,
verbose = FALSE,
only_sir_columns = any(is.sir(x)),
infer_from_combinations = TRUE,
...
)
brmo(x = NULL, only_sir_columns = any(is.sir(x)), ...)
@@ -18,11 +31,14 @@ mrgn(x = NULL, only_sir_columns = any(is.sir(x)), verbose = FALSE, ...)
mdr_tb(x = NULL, only_sir_columns = any(is.sir(x)), verbose = FALSE, ...)
mdr_cmi2012(x = NULL, only_sir_columns = any(is.sir(x)), verbose = FALSE,
...)
mdr_cmi2012(x = NULL, only_sir_columns = any(is.sir(x)), verbose = FALSE, ...)
eucast_exceptional_phenotypes(x = NULL, only_sir_columns = any(is.sir(x)),
verbose = FALSE, ...)
eucast_exceptional_phenotypes(
x = NULL,
only_sir_columns = any(is.sir(x)),
verbose = FALSE,
...
)
```
## Arguments
@@ -152,25 +168,32 @@ eucast_exceptional_phenotypes(x = NULL, only_sir_columns = any(is.sir(x)),
## Value
\- If \`verbose\` is set to \`TRUE\`:
A \[data.frame\] containing columns \`row_number\`, \`microorganism\`,
\`MDRO\`, \`reason\`, \`all_nonsusceptible_columns\`, \`guideline\` -
CMI 2012 paper - function \[mdr_cmi2012()\] or \[mdro()\]:
Ordered \[factor\] with levels \`Negative\` \< \`Multi-drug-resistant
(MDR)\` \< \`Extensively drug-resistant (XDR)\` \< \`Pandrug-resistant
(PDR)\` - TB guideline - function \[mdr_tb()\] or \[\`mdro(...,
guideline = "TB")\`\]\[mdro()\]:
Ordered \[factor\] with levels \`Negative\` \< \`Mono-resistant\` \<
\`Poly-resistant\` \< \`Multi-drug-resistant\` \< \`Extensively
drug-resistant\` - German guideline - function \[mrgn()\] or
\[\`mdro(..., guideline = "MRGN")\`\]\[mdro()\]:
Ordered \[factor\] with levels \`Negative\` \< \`3MRGN\` \< \`4MRGN\` -
Everything else, except for custom guidelines:
Ordered \[factor\] with levels \`Negative\` \< \`Positive, unconfirmed\`
\< \`Positive\`. The value \`"Positive, unconfirmed"\` means that,
according to the guideline, it is not entirely sure if the isolate is
multi-drug resistant and this should be confirmed with additional (e.g.
genotypic) tests
- If `verbose` is set to `TRUE`:
A [data.frame](https://rdrr.io/r/base/data.frame.html) containing
columns `row_number`, `microorganism`, `MDRO`, `reason`,
`all_nonsusceptible_columns`, `guideline`
- CMI 2012 paper - function `mdr_cmi2012()` or `mdro()`:
Ordered [factor](https://rdrr.io/pkg/data.table/man/fctr.html) with
levels `Negative` \< `Multi-drug-resistant (MDR)` \<
`Extensively drug-resistant (XDR)` \< `Pandrug-resistant (PDR)`
- TB guideline - function `mdr_tb()` or `mdro(..., guideline = "TB")`:
Ordered [factor](https://rdrr.io/pkg/data.table/man/fctr.html) with
levels `Negative` \< `Mono-resistant` \< `Poly-resistant` \<
`Multi-drug-resistant` \< `Extensively drug-resistant`
- German guideline - function `mrgn()` or
`mdro(..., guideline = "MRGN")`:
Ordered [factor](https://rdrr.io/pkg/data.table/man/fctr.html) with
levels `Negative` \< `3MRGN` \< `4MRGN`
- Everything else, except for custom guidelines:
Ordered [factor](https://rdrr.io/pkg/data.table/man/fctr.html) with
levels `Negative` \< `Positive, unconfirmed` \< `Positive`. The value
`"Positive, unconfirmed"` means that, according to the guideline, it
is not entirely sure if the isolate is multi-drug resistant and this
should be confirmed with additional (e.g. genotypic) tests
## Details

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Calculate the Mean AMR Distance — mean_amr_distance • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Calculate the Mean AMR Distance — mean_amr_distance"><meta name="description" content="Calculates a normalised mean for antimicrobial resistance between multiple observations, to help to identify similar isolates without comparing antibiograms by hand."><meta property="og:description" content="Calculates a normalised mean for antimicrobial resistance between multiple observations, to help to identify similar isolates without comparing antibiograms by hand."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Calculate the Mean AMR Distance — mean_amr_distance • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Calculate the Mean AMR Distance — mean_amr_distance"><meta name="description" content="Calculates a normalised mean for antimicrobial resistance between multiple observations, to help to identify similar isolates without comparing antibiograms by hand."><meta property="og:description" content="Calculates a normalised mean for antimicrobial resistance between multiple observations, to help to identify similar isolates without comparing antibiograms by hand."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -110,31 +110,31 @@
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="va">sir</span> <span class="op">&lt;-</span> <span class="fu"><a href="random.html">random_sir</a></span><span class="op">(</span><span class="fl">10</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="va">sir</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class <span style="color: #0000BB;">&lt;sir&gt;</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] S R S R I I R R R S</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] S S I S I S I S I R</span>
<span class="r-in"><span><span class="fu">mean_amr_distance</span><span class="op">(</span><span class="va">sir</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] -0.9486833 0.9486833 -0.9486833 0.9486833 -0.9486833 -0.9486833</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] 0.9486833 0.9486833 0.9486833 -0.9486833</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] -0.3162278 -0.3162278 -0.3162278 -0.3162278 -0.3162278 -0.3162278</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] -0.3162278 -0.3162278 -0.3162278 2.8460499</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="va">mic</span> <span class="op">&lt;-</span> <span class="fu"><a href="random.html">random_mic</a></span><span class="op">(</span><span class="fl">10</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="va">mic</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class <span style="color: #0000BB;">&lt;mic&gt;</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 0.5 &lt;=0.0001 0.25 0.0005 0.001 0.0002 8 &lt;=0.0001</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [9] &lt;=0.0001 0.004 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] &lt;=0.0001 0.0002 0.5 0.0005 0.004 0.001 0.016 0.0002 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [9] 0.032 1 </span>
<span class="r-in"><span><span class="fu">mean_amr_distance</span><span class="op">(</span><span class="va">mic</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 1.18999891 -0.86809178 1.02250714 -0.47918793 -0.31169616 -0.70060001</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] 1.85996599 -0.86809178 -0.86809178 0.02328738</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] -1.13933320 -0.92906618 1.44436742 -0.65110831 -0.02030726 -0.44084129</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] 0.40022677 -0.92906618 0.61049379 1.65463443</span>
<span class="r-in"><span><span class="co"># equal to the Z-score of their log2:</span></span></span>
<span class="r-in"><span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/Log.html" class="external-link">log2</a></span><span class="op">(</span><span class="va">mic</span><span class="op">)</span> <span class="op">-</span> <span class="fu"><a href="https://rdrr.io/r/base/mean.html" class="external-link">mean</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/Log.html" class="external-link">log2</a></span><span class="op">(</span><span class="va">mic</span><span class="op">)</span><span class="op">)</span><span class="op">)</span> <span class="op">/</span> <span class="fu"><a href="https://rdrr.io/r/stats/sd.html" class="external-link">sd</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/Log.html" class="external-link">log2</a></span><span class="op">(</span><span class="va">mic</span><span class="op">)</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 1.18999891 -0.86809178 1.02250714 -0.47918793 -0.31169616 -0.70060001</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] 1.85996599 -0.86809178 -0.86809178 0.02328738</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] -1.13933320 -0.92906618 1.44436742 -0.65110831 -0.02030726 -0.44084129</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] 0.40022677 -0.92906618 0.61049379 1.65463443</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="va">disk</span> <span class="op">&lt;-</span> <span class="fu"><a href="random.html">random_disk</a></span><span class="op">(</span><span class="fl">10</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="va">disk</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Class <span style="color: #0000BB;">&lt;disk&gt;</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 20 45 31 26 23 38 44 41 20 49</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 49 30 42 50 16 27 12 13 28 32</span>
<span class="r-in"><span><span class="fu">mean_amr_distance</span><span class="op">(</span><span class="va">disk</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] -1.2414143 1.0239402 -0.2446583 -0.6977292 -0.9695717 0.3896410</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] 0.9333261 0.6614835 -1.2414143 1.3863970</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 1.37726856 0.00721083 0.87251045 1.44937686 -1.00230539 -0.20911407</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] -1.29073860 -1.21863029 -0.13700577 0.15142743</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="va">y</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/data.frame.html" class="external-link">data.frame</a></span><span class="op">(</span></span></span>
<span class="r-in"><span> id <span class="op">=</span> <span class="va">LETTERS</span><span class="op">[</span><span class="fl">1</span><span class="op">:</span><span class="fl">10</span><span class="op">]</span>,</span></span>
@@ -145,35 +145,35 @@
<span class="r-in"><span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="va">y</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> id amox cipr gent tobr</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 A R 33 16 &lt;=1</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 B S 32 &lt;=8 32</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 C S 27 16 32</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 D I 33 &lt;=8 8</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 E I 22 &lt;=8 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 F R 32 &lt;=8 4</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 G S 31 16 8</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 H I 31 &lt;=8 &lt;=1</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 I R 28 16 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 J S 22 16 4</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 A I 32 4 8</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 B R 32 4 8</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 C I 30 8 8</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 D S 16 4 8</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 E S 33 4 16</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 F R 32 4 8</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 G I 29 8 8</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 H I 31 8 16</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 I I 30 4 16</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 J R 20 8 8</span>
<span class="r-in"><span><span class="fu">mean_amr_distance</span><span class="op">(</span><span class="va">y</span><span class="op">)</span></span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> <span style="color: #00BBBB;"></span> Calculating mean AMR distance based on columns <span style="color: #0000BB;">"amox"</span>, <span style="color: #0000BB;">"cipr"</span>, <span style="color: #0000BB;">"gent"</span>, and</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> <span style="color: #0000BB;">"tobr"</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 0.52677313 0.16501937 0.34372779 -0.05155946 -0.97765805 0.26901032</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [7] 0.30452889 -0.58337098 0.36899264 -0.36546366</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] -0.351732344 0.165816825 0.045278388 -1.048629829 0.209372918</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [6] 0.165816825 0.001722296 0.606383651 0.078704640 0.127266630</span>
<span class="r-in"><span><span class="va">y</span><span class="op">$</span><span class="va">amr_distance</span> <span class="op">&lt;-</span> <span class="fu">mean_amr_distance</span><span class="op">(</span><span class="va">y</span>, <span class="fu"><a href="as.mic.html">is.mic</a></span><span class="op">(</span><span class="va">y</span><span class="op">)</span><span class="op">)</span></span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> <span style="color: #00BBBB;"></span> Calculating mean AMR distance based on columns <span style="color: #0000BB;">"gent"</span> and <span style="color: #0000BB;">"tobr"</span></span>
<span class="r-in"><span><span class="va">y</span><span class="op">[</span><span class="fu"><a href="https://rdrr.io/r/base/order.html" class="external-link">order</a></span><span class="op">(</span><span class="va">y</span><span class="op">$</span><span class="va">amr_distance</span><span class="op">)</span>, <span class="op">]</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> id amox cipr gent tobr amr_distance</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 H I 31 &lt;=8 &lt;=1 -1.0808937</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 E I 22 &lt;=8 2 -0.8051882</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 F R 32 &lt;=8 4 -0.5294827</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 D I 33 &lt;=8 8 -0.2537773</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 A R 33 16 &lt;=1 -0.1322104</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 I R 28 16 2 0.1434951</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 B S 32 &lt;=8 32 0.2976337</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 J S 22 16 4 0.4192006</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 G S 31 16 8 0.6949060</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 C S 27 16 32 1.2463170</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 A I 32 4 8 -0.6978278</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 B R 32 4 8 -0.6978278</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 D S 16 4 8 -0.6978278</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 F R 32 4 8 -0.6978278</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 C I 30 8 8 0.2704180</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 G I 29 8 8 0.2704180</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 J R 20 8 8 0.2704180</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 E S 33 4 16 0.3372705</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 I I 30 4 16 0.3372705</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 H I 31 8 16 1.3055163</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">require</a></span><span class="op">(</span><span class="st"><a href="https://dplyr.tidyverse.org" class="external-link">"dplyr"</a></span><span class="op">)</span><span class="op">)</span> <span class="op">{</span></span></span>
<span class="r-in"><span> <span class="va">y</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span></span>
@@ -186,16 +186,16 @@
<span class="r-msg co"><span class="r-pr">#&gt;</span> <span style="color: #00BBBB;"></span> Calculating mean AMR distance based on columns <span style="color: #0000BB;">"amox"</span>, <span style="color: #0000BB;">"cipr"</span>, <span style="color: #0000BB;">"gent"</span>, and</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> <span style="color: #0000BB;">"tobr"</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> id amox cipr gent tobr amr_distance check_id_C</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 C S 27 16 32 0.34372779 0.00000000</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 I R 28 16 2 0.36899264 0.02526485</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 G S 31 16 8 0.30452889 0.03919890</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 F R 32 &lt;=8 4 0.26901032 0.07471748</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 B S 32 &lt;=8 32 0.16501937 0.17870842</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 A R 33 16 &lt;=1 0.52677313 0.18304534</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 D I 33 &lt;=8 8 -0.05155946 0.39528726</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 J S 22 16 4 -0.36546366 0.70919145</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 H I 31 &lt;=8 &lt;=1 -0.58337098 0.92709877</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 E I 22 &lt;=8 2 -0.97765805 1.32138584</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 C I 30 8 8 0.045278388 0.00000000</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 I I 30 4 16 0.078704640 0.03342625</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 G I 29 8 8 0.001722296 0.04355609</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 J R 20 8 8 0.127266630 0.08198824</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 B R 32 4 8 0.165816825 0.12053844</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 F R 32 4 8 0.165816825 0.12053844</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 E S 33 4 16 0.209372918 0.16409453</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 8 A I 32 4 8 -0.351732344 0.39701073</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 9 H I 31 8 16 0.606383651 0.56110526</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 10 D S 16 4 8 -1.048629829 1.09390822</span>
<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">require</a></span><span class="op">(</span><span class="st"><a href="https://dplyr.tidyverse.org" class="external-link">"dplyr"</a></span><span class="op">)</span><span class="op">)</span> <span class="op">{</span></span></span>
<span class="r-in"><span> <span class="co"># support for groups</span></span></span>
<span class="r-in"><span> <span class="va">example_isolates</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%&gt;%</a></span></span></span>

View File

@@ -85,31 +85,31 @@ suspicious.
sir <- random_sir(10)
sir
#> Class <sir>
#> [1] S R S R I I R R R S
#> [1] S S I S I S I S I R
mean_amr_distance(sir)
#> [1] -0.9486833 0.9486833 -0.9486833 0.9486833 -0.9486833 -0.9486833
#> [7] 0.9486833 0.9486833 0.9486833 -0.9486833
#> [1] -0.3162278 -0.3162278 -0.3162278 -0.3162278 -0.3162278 -0.3162278
#> [7] -0.3162278 -0.3162278 -0.3162278 2.8460499
mic <- random_mic(10)
mic
#> Class <mic>
#> [1] 0.5 <=0.0001 0.25 0.0005 0.001 0.0002 8 <=0.0001
#> [9] <=0.0001 0.004
#> [1] <=0.0001 0.0002 0.5 0.0005 0.004 0.001 0.016 0.0002
#> [9] 0.032 1
mean_amr_distance(mic)
#> [1] 1.18999891 -0.86809178 1.02250714 -0.47918793 -0.31169616 -0.70060001
#> [7] 1.85996599 -0.86809178 -0.86809178 0.02328738
#> [1] -1.13933320 -0.92906618 1.44436742 -0.65110831 -0.02030726 -0.44084129
#> [7] 0.40022677 -0.92906618 0.61049379 1.65463443
# equal to the Z-score of their log2:
(log2(mic) - mean(log2(mic))) / sd(log2(mic))
#> [1] 1.18999891 -0.86809178 1.02250714 -0.47918793 -0.31169616 -0.70060001
#> [7] 1.85996599 -0.86809178 -0.86809178 0.02328738
#> [1] -1.13933320 -0.92906618 1.44436742 -0.65110831 -0.02030726 -0.44084129
#> [7] 0.40022677 -0.92906618 0.61049379 1.65463443
disk <- random_disk(10)
disk
#> Class <disk>
#> [1] 20 45 31 26 23 38 44 41 20 49
#> [1] 49 30 42 50 16 27 12 13 28 32
mean_amr_distance(disk)
#> [1] -1.2414143 1.0239402 -0.2446583 -0.6977292 -0.9695717 0.3896410
#> [7] 0.9333261 0.6614835 -1.2414143 1.3863970
#> [1] 1.37726856 0.00721083 0.87251045 1.44937686 -1.00230539 -0.20911407
#> [7] -1.29073860 -1.21863029 -0.13700577 0.15142743
y <- data.frame(
id = LETTERS[1:10],
@@ -120,35 +120,35 @@ y <- data.frame(
)
y
#> id amox cipr gent tobr
#> 1 A R 33 16 <=1
#> 2 B S 32 <=8 32
#> 3 C S 27 16 32
#> 4 D I 33 <=8 8
#> 5 E I 22 <=8 2
#> 6 F R 32 <=8 4
#> 7 G S 31 16 8
#> 8 H I 31 <=8 <=1
#> 9 I R 28 16 2
#> 10 J S 22 16 4
#> 1 A I 32 4 8
#> 2 B R 32 4 8
#> 3 C I 30 8 8
#> 4 D S 16 4 8
#> 5 E S 33 4 16
#> 6 F R 32 4 8
#> 7 G I 29 8 8
#> 8 H I 31 8 16
#> 9 I I 30 4 16
#> 10 J R 20 8 8
mean_amr_distance(y)
#> Calculating mean AMR distance based on columns "amox", "cipr", "gent", and
#> "tobr"
#> [1] 0.52677313 0.16501937 0.34372779 -0.05155946 -0.97765805 0.26901032
#> [7] 0.30452889 -0.58337098 0.36899264 -0.36546366
#> [1] -0.351732344 0.165816825 0.045278388 -1.048629829 0.209372918
#> [6] 0.165816825 0.001722296 0.606383651 0.078704640 0.127266630
y$amr_distance <- mean_amr_distance(y, is.mic(y))
#> Calculating mean AMR distance based on columns "gent" and "tobr"
y[order(y$amr_distance), ]
#> id amox cipr gent tobr amr_distance
#> 8 H I 31 <=8 <=1 -1.0808937
#> 5 E I 22 <=8 2 -0.8051882
#> 6 F R 32 <=8 4 -0.5294827
#> 4 D I 33 <=8 8 -0.2537773
#> 1 A R 33 16 <=1 -0.1322104
#> 9 I R 28 16 2 0.1434951
#> 2 B S 32 <=8 32 0.2976337
#> 10 J S 22 16 4 0.4192006
#> 7 G S 31 16 8 0.6949060
#> 3 C S 27 16 32 1.2463170
#> 1 A I 32 4 8 -0.6978278
#> 2 B R 32 4 8 -0.6978278
#> 4 D S 16 4 8 -0.6978278
#> 6 F R 32 4 8 -0.6978278
#> 3 C I 30 8 8 0.2704180
#> 7 G I 29 8 8 0.2704180
#> 10 J R 20 8 8 0.2704180
#> 5 E S 33 4 16 0.3372705
#> 9 I I 30 4 16 0.3372705
#> 8 H I 31 8 16 1.3055163
if (require("dplyr")) {
y %>%
@@ -161,16 +161,16 @@ if (require("dplyr")) {
#> Calculating mean AMR distance based on columns "amox", "cipr", "gent", and
#> "tobr"
#> id amox cipr gent tobr amr_distance check_id_C
#> 1 C S 27 16 32 0.34372779 0.00000000
#> 2 I R 28 16 2 0.36899264 0.02526485
#> 3 G S 31 16 8 0.30452889 0.03919890
#> 4 F R 32 <=8 4 0.26901032 0.07471748
#> 5 B S 32 <=8 32 0.16501937 0.17870842
#> 6 A R 33 16 <=1 0.52677313 0.18304534
#> 7 D I 33 <=8 8 -0.05155946 0.39528726
#> 8 J S 22 16 4 -0.36546366 0.70919145
#> 9 H I 31 <=8 <=1 -0.58337098 0.92709877
#> 10 E I 22 <=8 2 -0.97765805 1.32138584
#> 1 C I 30 8 8 0.045278388 0.00000000
#> 2 I I 30 4 16 0.078704640 0.03342625
#> 3 G I 29 8 8 0.001722296 0.04355609
#> 4 J R 20 8 8 0.127266630 0.08198824
#> 5 B R 32 4 8 0.165816825 0.12053844
#> 6 F R 32 4 8 0.165816825 0.12053844
#> 7 E S 33 4 16 0.209372918 0.16409453
#> 8 A I 32 4 8 -0.351732344 0.39701073
#> 9 H I 31 8 16 0.606383651 0.56110526
#> 10 D S 16 4 8 -1.048629829 1.09390822
if (require("dplyr")) {
# support for groups
example_isolates %>%

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Data Set with 6 050 Common Microorganism Codes — microorganisms.codes • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Data Set with 6 050 Common Microorganism Codes — microorganisms.codes"><meta name="description" content="A data set containing commonly used codes for microorganisms, from laboratory systems and WHONET. Define your own with set_mo_source(). They will all be searched when using as.mo() and consequently all the mo_* functions."><meta property="og:description" content="A data set containing commonly used codes for microorganisms, from laboratory systems and WHONET. Define your own with set_mo_source(). They will all be searched when using as.mo() and consequently all the mo_* functions."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Data Set with 6 029 Common Microorganism Codes — microorganisms.codes • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Data Set with 6 029 Common Microorganism Codes — microorganisms.codes"><meta name="description" content="A data set containing commonly used codes for microorganisms, from laboratory systems and WHONET. Define your own with set_mo_source(). They will all be searched when using as.mo() and consequently all the mo_* functions."><meta property="og:description" content="A data set containing commonly used codes for microorganisms, from laboratory systems and WHONET. Define your own with set_mo_source(). They will all be searched when using as.mo() and consequently all the mo_* functions."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -44,7 +44,7 @@
</nav><div class="container template-reference-topic">
<div class="row">
<main id="main" class="col-md-9"><div class="page-header">
<img src="../logo.svg" class="logo" alt=""><h1>Data Set with 6 050 Common Microorganism Codes</h1>
<img src="../logo.svg" class="logo" alt=""><h1>Data Set with 6 029 Common Microorganism Codes</h1>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/main/R/data.R" class="external-link"><code>R/data.R</code></a></small>
<div class="d-none name"><code>microorganisms.codes.Rd</code></div>
</div>
@@ -60,7 +60,7 @@
<div class="section level2">
<h2 id="format">Format<a class="anchor" aria-label="anchor" href="#format"></a></h2>
<p>A <a href="https://tibble.tidyverse.org/reference/tibble.html" class="external-link">tibble</a> with 6 050 observations and 2 variables:</p><ul><li><p><code>code</code><br> Commonly used code of a microorganism. <em><strong>This is a unique identifier.</strong></em></p></li>
<p>A <a href="https://tibble.tidyverse.org/reference/tibble.html" class="external-link">tibble</a> with 6 029 observations and 2 variables:</p><ul><li><p><code>code</code><br> Commonly used code of a microorganism. <em><strong>This is a unique identifier.</strong></em></p></li>
<li><p><code>mo</code><br> ID of the microorganism in the <a href="microorganisms.html">microorganisms</a> data set</p></li>
</ul></div>
<div class="section level2">
@@ -79,7 +79,7 @@
<div class="section level2">
<h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="va">microorganisms.codes</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 6,050 × 2</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 6,029 × 2</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> code mo </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;mo&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> 1011 <span style="color: #949494;">B_</span>GRAMP </span>
@@ -92,7 +92,7 @@
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> 1100 <span style="color: #949494;">B_</span>STRPT </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> 1101 <span style="color: #949494;">B_</span>STRPT<span style="color: #949494;">_</span>VIRI </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> 1102 <span style="color: #949494;">B_</span>STRPT<span style="color: #949494;">_</span>HAEM </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># 6,040 more rows</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># 6,019 more rows</span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># 'ECO' or 'eco' is the WHONET code for E. coli:</span></span></span>
<span class="r-in"><span><span class="va">microorganisms.codes</span><span class="op">[</span><span class="va">microorganisms.codes</span><span class="op">$</span><span class="va">code</span> <span class="op">==</span> <span class="st">"ECO"</span>, <span class="op">]</span></span></span>
@@ -109,9 +109,12 @@
<span class="r-out co"><span class="r-pr">#&gt;</span> $rank</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "species"</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> $kingdom</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> $domain</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "Bacteria"</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> $kingdom</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "Pseudomonadati"</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> $phylum</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "Pseudomonadota"</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
@@ -142,6 +145,9 @@
<span class="r-out co"><span class="r-pr">#&gt;</span> $gramstain</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "Gram-negative"</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> $morphology</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "Rods"</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> $oxygen_tolerance</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "facultative anaerobe"</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
@@ -168,7 +174,7 @@
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] NA</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> $gbif</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "11286021"</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "NT3L7"</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> $group_members</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> character(0)</span>

View File

@@ -1,4 +1,4 @@
# Data Set with 6 050 Common Microorganism Codes
# Data Set with 6 029 Common Microorganism Codes
A data set containing commonly used codes for microorganisms, from
laboratory systems and [WHONET](https://whonet.org). Define your own
@@ -17,7 +17,7 @@ microorganisms.codes
## Format
A [tibble](https://tibble.tidyverse.org/reference/tibble.html) with 6
050 observations and 2 variables:
029 observations and 2 variables:
- `code`
Commonly used code of a microorganism. ***This is a unique
@@ -53,7 +53,7 @@ repository](https://github.com/msberends/AMR/tree/main/data-raw/datasets).
``` r
microorganisms.codes
#> # A tibble: 6,050 × 2
#> # A tibble: 6,029 × 2
#> code mo
#> <chr> <mo>
#> 1 1011 B_GRAMP
@@ -66,7 +66,7 @@ microorganisms.codes
#> 8 1100 B_STRPT
#> 9 1101 B_STRPT_VIRI
#> 10 1102 B_STRPT_HAEM
#> # 6,040 more rows
#> # 6,019 more rows
# 'ECO' or 'eco' is the WHONET code for E. coli:
microorganisms.codes[microorganisms.codes$code == "ECO", ]
@@ -83,9 +83,12 @@ mo_info("eco")
#> $rank
#> [1] "species"
#>
#> $kingdom
#> $domain
#> [1] "Bacteria"
#>
#> $kingdom
#> [1] "Pseudomonadati"
#>
#> $phylum
#> [1] "Pseudomonadota"
#>
@@ -116,6 +119,9 @@ mo_info("eco")
#> $gramstain
#> [1] "Gram-negative"
#>
#> $morphology
#> [1] "Rods"
#>
#> $oxygen_tolerance
#> [1] "facultative anaerobe"
#>
@@ -142,7 +148,7 @@ mo_info("eco")
#> [1] NA
#>
#> $gbif
#> [1] "11286021"
#> [1] "NT3L7"
#>
#> $group_members
#> character(0)

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Data Set with 534 Microorganisms In Species Groups — microorganisms.groups • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Data Set with 534 Microorganisms In Species Groups — microorganisms.groups"><meta name="description" content="A data set containing species groups and microbiological complexes, which are used in the clinical breakpoints table."><meta property="og:description" content="A data set containing species groups and microbiological complexes, which are used in the clinical breakpoints table."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Data Set with 530 Microorganisms In Species Groups — microorganisms.groups • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet"><link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Data Set with 530 Microorganisms In Species Groups — microorganisms.groups"><meta name="description" content="A data set containing species groups and microbiological complexes, which are used in the clinical breakpoints table."><meta property="og:description" content="A data set containing species groups and microbiological complexes, which are used in the clinical breakpoints table."><meta property="og:image" content="https://amr-for-r.org/logo.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous"><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></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
@@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -44,7 +44,7 @@
</nav><div class="container template-reference-topic">
<div class="row">
<main id="main" class="col-md-9"><div class="page-header">
<img src="../logo.svg" class="logo" alt=""><h1>Data Set with 534 Microorganisms In Species Groups</h1>
<img src="../logo.svg" class="logo" alt=""><h1>Data Set with 530 Microorganisms In Species Groups</h1>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/main/R/data.R" class="external-link"><code>R/data.R</code></a></small>
<div class="d-none name"><code>microorganisms.groups.Rd</code></div>
</div>
@@ -60,7 +60,7 @@
<div class="section level2">
<h2 id="format">Format<a class="anchor" aria-label="anchor" href="#format"></a></h2>
<p>A <a href="https://tibble.tidyverse.org/reference/tibble.html" class="external-link">tibble</a> with 534 observations and 4 variables:</p><ul><li><p><code>mo_group</code><br> ID of the species group / microbiological complex</p></li>
<p>A <a href="https://tibble.tidyverse.org/reference/tibble.html" class="external-link">tibble</a> with 530 observations and 4 variables:</p><ul><li><p><code>mo_group</code><br> ID of the species group / microbiological complex</p></li>
<li><p><code>mo</code><br> ID of the microorganism belonging in the species group / microbiological complex</p></li>
<li><p><code>mo_group_name</code><br> Name of the species group / microbiological complex, as retrieved with <code><a href="mo_property.html">mo_name()</a></code></p></li>
<li><p><code>mo_name</code><br> Name of the microorganism belonging in the species group / microbiological complex, as retrieved with <code><a href="mo_property.html">mo_name()</a></code></p></li>
@@ -81,7 +81,7 @@
<div class="section level2">
<h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="va">microorganisms.groups</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 534 × 4</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 530 × 4</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> mo_group mo mo_group_name mo_name </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;mo&gt;</span> <span style="color: #949494; font-style: italic;">&lt;mo&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 1</span> <span style="color: #949494;">B_</span>ACNTB<span style="color: #949494;">_</span>BMNN-C <span style="color: #949494;">B_</span>ACNTB<span style="color: #949494;">_</span>BMNN Acinetobacter baumannii complex Acinetobacter ba…</span>
@@ -94,7 +94,7 @@
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 8</span> <span style="color: #949494;">B_</span>BCTRD<span style="color: #949494;">_</span>FRGL-C <span style="color: #949494;">B_</span>BCTRD<span style="color: #949494;">_</span>OVTS Bacteroides fragilis complex Bacteroides ovat…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;"> 9</span> <span style="color: #949494;">B_</span>BCTRD<span style="color: #949494;">_</span>FRGL-C <span style="color: #949494;">B_</span>BCTRD<span style="color: #949494;">_</span>THTT Bacteroides fragilis complex Bacteroides thet…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">10</span> <span style="color: #949494;">B_</span>BCTRD<span style="color: #949494;">_</span>FRGL-C <span style="color: #949494;">B_</span>PHCCL<span style="color: #949494;">_</span>VLGT Bacteroides fragilis complex Bacteroides vulg…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># 524 more rows</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># 520 more rows</span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># these are all species in the Bacteroides fragilis group, as per WHONET:</span></span></span>
<span class="r-in"><span><span class="va">microorganisms.groups</span><span class="op">[</span><span class="va">microorganisms.groups</span><span class="op">$</span><span class="va">mo_group</span> <span class="op">==</span> <span class="st">"B_BCTRD_FRGL-C"</span>, <span class="op">]</span></span></span>

View File

@@ -1,4 +1,4 @@
# Data Set with 534 Microorganisms In Species Groups
# Data Set with 530 Microorganisms In Species Groups
A data set containing species groups and microbiological complexes,
which are used in [the clinical breakpoints
@@ -12,7 +12,7 @@ microorganisms.groups
## Format
A [tibble](https://tibble.tidyverse.org/reference/tibble.html) with 534
A [tibble](https://tibble.tidyverse.org/reference/tibble.html) with 530
observations and 4 variables:
- `mo_group`
@@ -56,7 +56,7 @@ repository](https://github.com/msberends/AMR/tree/main/data-raw/datasets).
``` r
microorganisms.groups
#> # A tibble: 534 × 4
#> # A tibble: 530 × 4
#> mo_group mo mo_group_name mo_name
#> <mo> <mo> <chr> <chr>
#> 1 B_ACNTB_BMNN-C B_ACNTB_BMNN Acinetobacter baumannii complex Acinetobacter ba…
@@ -69,7 +69,7 @@ microorganisms.groups
#> 8 B_BCTRD_FRGL-C B_BCTRD_OVTS Bacteroides fragilis complex Bacteroides ovat…
#> 9 B_BCTRD_FRGL-C B_BCTRD_THTT Bacteroides fragilis complex Bacteroides thet…
#> 10 B_BCTRD_FRGL-C B_PHCCL_VLGT Bacteroides fragilis complex Bacteroides vulg…
#> # 524 more rows
#> # 520 more rows
# these are all species in the Bacteroides fragilis group, as per WHONET:
microorganisms.groups[microorganisms.groups$mo_group == "B_BCTRD_FRGL-C", ]

Some files were not shown because too many files have changed in this diff Show More