1
0
mirror of https://github.com/msberends/AMR.git synced 2024-12-25 17:26:12 +01:00

(v1.7.1.9014) rep() for S3 classes

This commit is contained in:
dr. M.S. (Matthijs) Berends 2021-07-06 16:35:14 +02:00
parent 16b4c74d44
commit ad10693a1a
38 changed files with 383 additions and 320 deletions

View File

@ -1,6 +1,6 @@
Package: AMR
Version: 1.7.1.9013
Date: 2021-07-04
Version: 1.7.1.9014
Date: 2021-07-06
Title: Antimicrobial Resistance Data Analysis
Authors@R: c(
person(role = c("aut", "cre"),

View File

@ -93,6 +93,7 @@ S3method(exp,mic)
S3method(expm1,mic)
S3method(floor,mic)
S3method(format,bug_drug_combinations)
S3method(format,taxonomic_name)
S3method(gamma,mic)
S3method(hist,mic)
S3method(kurtosis,data.frame)
@ -127,7 +128,12 @@ S3method(print,taxonomic_name)
S3method(prod,mic)
S3method(quantile,mic)
S3method(range,mic)
S3method(rep,ab)
S3method(rep,disk)
S3method(rep,mic)
S3method(rep,mo)
S3method(rep,rsi)
S3method(rep,taxonomic_name)
S3method(round,mic)
S3method(sign,mic)
S3method(signif,mic)

View File

@ -1,5 +1,5 @@
# `AMR` 1.7.1.9013
## <small>Last updated: 4 July 2021</small>
# `AMR` 1.7.1.9014
## <small>Last updated: 6 July 2021</small>
### Changed
* Antibiotic class selectors (see `ab_class()`)

9
R/ab.R
View File

@ -580,6 +580,15 @@ unique.ab <- function(x, incomparables = FALSE, ...) {
y
}
#' @method rep ab
#' @export
#' @noRd
rep.ab <- function(x, ...) {
y <- NextMethod()
attributes(y) <- attributes(x)
y
}
generalise_antibiotic_name <- function(x) {
x <- toupper(x)
# remove suffices

View File

@ -113,7 +113,7 @@ bug_drug_combinations <- function(x,
data.frame(S = m["S", ], I = m["I", ], R = m["R", ], stringsAsFactors = FALSE)
})
merged <- do.call(rbind, pivot)
out_group <- data.frame(mo = unique_mo[i],
out_group <- data.frame(mo = rep(unique_mo[i], NROW(merged)),
ab = rownames(merged),
S = merged$S,
I = merged$I,

View File

@ -195,6 +195,15 @@ unique.disk <- function(x, incomparables = FALSE, ...) {
y
}
#' @method rep disk
#' @export
#' @noRd
rep.disk <- function(x, ...) {
y <- NextMethod()
attributes(y) <- attributes(x)
y
}
# will be exported using s3_register() in R/zzz.R
get_skimmers.disk <- function(column) {
skimr::sfl(

11
R/mic.R
View File

@ -320,6 +320,15 @@ unique.mic <- function(x, incomparables = FALSE, ...) {
y
}
#' @method rep mic
#' @export
#' @noRd
rep.mic <- function(x, ...) {
y <- NextMethod()
attributes(y) <- attributes(x)
y
}
#' @method sort mic
#' @export
#' @noRd
@ -337,7 +346,7 @@ sort.mic <- function(x, decreasing = FALSE, ...) {
#' @export
#' @noRd
hist.mic <- function(x, ...) {
warning_("Use `plot()` or `ggplot()` for optimal plotting of MIC values", call = FALSE)
warning_("Use `plot()` or ggplot2's `autoplot()` for optimal plotting of MIC values", call = FALSE)
hist(log2(x))
}

View File

@ -48,7 +48,7 @@
#'
#' Intrinsic resistance - [mo_is_intrinsic_resistant()] - will be determined based on the [intrinsic_resistant] data set, which is based on `r format_eucast_version_nr(3.2)`. The [mo_is_intrinsic_resistant()] functions can be vectorised over arguments `x` (input for microorganisms) and over `ab` (input for antibiotics).
#'
#' The functions [mo_family()], [mo_genus()], [mo_name()], [mo_fullname()] and [mo_shortname()] are returned with an additional class `taxonomic_name`, which allows italic printing in [tibbles][tibble::tibble()].
#' The functions [mo_family()], [mo_genus()], [mo_name()], [mo_fullname()] and [mo_shortname()] are returned with an additional class `taxonomic_name`, which allows italic printing in [tibbles][tibble::tibble()] and markdown tables such as with [knitr::kable()].
#'
#' All output [will be translated][translate] where possible.
#'
@ -786,9 +786,9 @@ print.taxonomic_name <- function(x, ...) {
as.data.frame.taxonomic_name <- function(x, ...) {
nm <- deparse1(substitute(x))
if (!"nm" %in% names(list(...))) {
as.data.frame(unclass(x), ..., nm = nm)
as.data.frame.vector(x, ..., nm = nm)
} else {
as.data.frame(unclass(x), ...)
as.data.frame.vector(x, ...)
}
}
@ -801,12 +801,27 @@ type_sum.taxonomic_name <- function(x, ...) {
pillar_shaft.taxonomic_name <- function(x, ...) {
out <- format(x)
hits <- tolower(x) %in% MO_lookup$fullname_lower | tolower(gsub("[^a-zA-Z ]", "", x)) %in% c(MO_lookup$g_species)
# grey out the kingdom (part until first "_")
out[hits] <- font_italic(x[hits], collapse = NULL)
out[is.na(x)] <- font_na(out[is.na(x)], collapse = NULL)
create_pillar_column(out, align = "left")
}
#' @method format taxonomic_name
#' @export
#' @noRd
format.taxonomic_name <- function(x, ...) {
# format only in case of markdown knitting
x <- unclass(x)
if (any(as.character(sys.calls()) %like% "(^|:| )kable\\(") ||
tryCatch(!is.null(knitr::opts_knit$get("out.format")), error = function(e) FALSE) ||
tryCatch(isTRUE(getOption('knitr.in.progress')), error = function(e) FALSE)) {
# perhaps this could be extended or better specified in the future?
hits <- tolower(x) %in% MO_lookup$fullname_lower | tolower(gsub("[^a-zA-Z ]", "", x)) %in% c(MO_lookup$g_species)
x[hits] <- paste0("*", x[hits], "*")
}
x
}
#' @method [ taxonomic_name
#' @export
#' @noRd
@ -856,3 +871,12 @@ unique.taxonomic_name <- function(x, incomparables = FALSE, ...) {
attributes(y) <- attributes(x)
y
}
#' @method rep taxonomic_name
#' @export
#' @noRd
rep.taxonomic_name <- function(x, ...) {
y <- NextMethod()
attributes(y) <- attributes(x)
y
}

View File

@ -1054,6 +1054,15 @@ unique.rsi <- function(x, incomparables = FALSE, ...) {
y
}
#' @method rep rsi
#' @export
#' @noRd
rep.rsi <- function(x, ...) {
y <- NextMethod()
attributes(y) <- attributes(x)
y
}
check_reference_data <- function(reference_data) {
if (!identical(reference_data, AMR::rsi_translation)) {
class_rsi <- vapply(FUN.VALUE = character(1), rsi_translation, function(x) paste0("<", class(x), ">", collapse = " and "))

Binary file not shown.

Binary file not shown.

View File

@ -18,17 +18,17 @@ unknown subspecies TRUE TRUE FALSE TRUE unbekannte Unterart onbekende ondersoort
unknown rank TRUE TRUE FALSE TRUE unbekannter Rang onbekende rang rango desconocido grado sconosciuto rang inconnu classificação desconhecido
CoNS FALSE TRUE FALSE TRUE KNS CNS SCN
CoPS FALSE TRUE FALSE TRUE KPS CPS SCP
Gram-negative TRUE TRUE FALSE FALSE Gramnegativ Gram-negatief Gram negativo Gram negativo Gram négatif Gram negativo
Gram-positive TRUE TRUE FALSE FALSE Grampositiv Gram-positief Gram positivo Gram positivo Gram positif Gram positivo
^Bacteria$ TRUE TRUE FALSE FALSE Bakterien Bacteriën Bacterias Batteri Bactéries Bactérias
^Fungi$ TRUE TRUE FALSE FALSE Pilze Schimmels Hongos Funghi Champignons Fungos
^Yeasts$ TRUE TRUE FALSE FALSE Hefen Gisten Levaduras Lieviti Levures Leveduras
^Protozoa$ TRUE TRUE FALSE FALSE Protozoen Protozoën Protozoarios Protozoi Protozoaires Protozoários
biogroup TRUE TRUE FALSE FALSE Biogruppe biogroep biogrupo biogruppo biogroupe biogrupo
biotype TRUE TRUE FALSE FALSE Biotyp biotipo biotipo biótipo
vegetative TRUE TRUE FALSE FALSE vegetativ vegetatief vegetativo vegetativo végétatif vegetativo
([([ ]*?)group TRUE TRUE FALSE FALSE \\1Gruppe \\1groep \\1grupo \\1gruppo \\1groupe \\1grupo
([([ ]*?)Group TRUE TRUE FALSE FALSE \\1Gruppe \\1Groep \\1Grupo \\1Gruppo \\1Groupe \\1Grupo
Gram-negative TRUE TRUE FALSE TRUE Gramnegativ Gram-negatief Gram negativo Gram negativo Gram négatif Gram negativo
Gram-positive TRUE TRUE FALSE TRUE Grampositiv Gram-positief Gram positivo Gram positivo Gram positif Gram positivo
^Bacteria$ TRUE TRUE FALSE TRUE Bakterien Bacteriën Bacterias Batteri Bactéries Bactérias
^Fungi$ TRUE TRUE FALSE TRUE Pilze Schimmels Hongos Funghi Champignons Fungos
^Yeasts$ TRUE TRUE FALSE TRUE Hefen Gisten Levaduras Lieviti Levures Leveduras
^Protozoa$ TRUE TRUE FALSE TRUE Protozoen Protozoën Protozoarios Protozoi Protozoaires Protozoários
biogroup TRUE TRUE FALSE TRUE Biogruppe biogroep biogrupo biogruppo biogroupe biogrupo
biotype TRUE TRUE FALSE TRUE Biotyp biotipo biotipo biótipo
vegetative TRUE TRUE FALSE TRUE vegetativ vegetatief vegetativo vegetativo végétatif vegetativo
([([ ]*?)group TRUE TRUE FALSE TRUE \\1Gruppe \\1groep \\1grupo \\1gruppo \\1groupe \\1grupo
([([ ]*?)Group TRUE TRUE FALSE TRUE \\1Gruppe \\1Groep \\1Grupo \\1Gruppo \\1Groupe \\1Grupo
no .*growth TRUE FALSE FALSE FALSE keine? .*wachstum geen .*groei no .*crecimientonon sem .*crescimento pas .*croissance sem .*crescimento
no|not TRUE FALSE FALSE FALSE keine? geen|niet no|sin sem non sem
Susceptible TRUE FALSE FALSE FALSE Empfindlich Gevoelig Susceptible

1 pattern regular_expr case_sensitive affect_ab_name affect_mo_name de nl es it fr pt
18 unknown rank TRUE TRUE FALSE TRUE unbekannter Rang onbekende rang rango desconocido grado sconosciuto rang inconnu classificação desconhecido
19 CoNS FALSE TRUE FALSE TRUE KNS CNS SCN
20 CoPS FALSE TRUE FALSE TRUE KPS CPS SCP
21 Gram-negative TRUE TRUE FALSE FALSE TRUE Gramnegativ Gram-negatief Gram negativo Gram negativo Gram négatif Gram negativo
22 Gram-positive TRUE TRUE FALSE FALSE TRUE Grampositiv Gram-positief Gram positivo Gram positivo Gram positif Gram positivo
23 ^Bacteria$ TRUE TRUE FALSE FALSE TRUE Bakterien Bacteriën Bacterias Batteri Bactéries Bactérias
24 ^Fungi$ TRUE TRUE FALSE FALSE TRUE Pilze Schimmels Hongos Funghi Champignons Fungos
25 ^Yeasts$ TRUE TRUE FALSE FALSE TRUE Hefen Gisten Levaduras Lieviti Levures Leveduras
26 ^Protozoa$ TRUE TRUE FALSE FALSE TRUE Protozoen Protozoën Protozoarios Protozoi Protozoaires Protozoários
27 biogroup TRUE TRUE FALSE FALSE TRUE Biogruppe biogroep biogrupo biogruppo biogroupe biogrupo
28 biotype TRUE TRUE FALSE FALSE TRUE Biotyp biotipo biotipo biótipo
29 vegetative TRUE TRUE FALSE FALSE TRUE vegetativ vegetatief vegetativo vegetativo végétatif vegetativo
30 ([([ ]*?)group TRUE TRUE FALSE FALSE TRUE \\1Gruppe \\1groep \\1grupo \\1gruppo \\1groupe \\1grupo
31 ([([ ]*?)Group TRUE TRUE FALSE FALSE TRUE \\1Gruppe \\1Groep \\1Grupo \\1Gruppo \\1Groupe \\1Grupo
32 no .*growth TRUE FALSE FALSE FALSE keine? .*wachstum geen .*groei no .*crecimientonon sem .*crescimento pas .*croissance sem .*crescimento
33 no|not TRUE FALSE FALSE FALSE keine? geen|niet no|sin sem non sem
34 Susceptible TRUE FALSE FALSE FALSE Empfindlich Gevoelig Susceptible

View File

@ -81,7 +81,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="https://msberends.github.io/AMR//index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9013</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9014</span>
</span>
</div>

View File

@ -81,7 +81,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9013</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9014</span>
</span>
</div>

View File

@ -39,7 +39,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9013</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9014</span>
</span>
</div>
@ -193,7 +193,7 @@
<h1 data-toc-skip>How to conduct AMR data analysis</h1>
<h4 class="author">Matthijs S. Berends</h4>
<h4 class="date">04 July 2021</h4>
<h4 class="date">06 July 2021</h4>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/master/vignettes/AMR.Rmd"><code>vignettes/AMR.Rmd</code></a></small>
<div class="hidden name"><code>AMR.Rmd</code></div>
@ -202,7 +202,7 @@
<p><strong>Note:</strong> values on this page will change with every website update since they are based on randomly created values and the page was written in <a href="https://rmarkdown.rstudio.com/">R Markdown</a>. However, the methodology remains unchanged. This page was generated on 04 July 2021.</p>
<p><strong>Note:</strong> values on this page will change with every website update since they are based on randomly created values and the page was written in <a href="https://rmarkdown.rstudio.com/">R Markdown</a>. However, the methodology remains unchanged. This page was generated on 06 July 2021.</p>
<div id="introduction" class="section level1">
<h1 class="hasAnchor">
<a href="#introduction" class="anchor"></a>Introduction</h1>
@ -233,21 +233,21 @@
</tr></thead>
<tbody>
<tr class="odd">
<td align="center">2021-07-04</td>
<td align="center">2021-07-06</td>
<td align="center">abcd</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
<td align="center">S</td>
</tr>
<tr class="even">
<td align="center">2021-07-04</td>
<td align="center">2021-07-06</td>
<td align="center">abcd</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
<td align="center">R</td>
</tr>
<tr class="odd">
<td align="center">2021-07-04</td>
<td align="center">2021-07-06</td>
<td align="center">efgh</td>
<td align="center">Escherichia coli</td>
<td align="center">R</td>
@ -344,32 +344,32 @@
</tr></thead>
<tbody>
<tr class="odd">
<td align="center">2016-09-28</td>
<td align="center">A1</td>
<td align="center">Hospital A</td>
<td align="center">2016-02-04</td>
<td align="center">V9</td>
<td align="center">Hospital B</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">M</td>
<td align="center">S</td>
<td align="center">F</td>
</tr>
<tr class="even">
<td align="center">2012-09-28</td>
<td align="center">J9</td>
<td align="center">2011-09-24</td>
<td align="center">D2</td>
<td align="center">Hospital A</td>
<td align="center">Streptococcus pneumoniae</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
</tr>
<tr class="odd">
<td align="center">2011-10-02</td>
<td align="center">S7</td>
<td align="center">Hospital B</td>
<td align="center">Klebsiella pneumoniae</td>
<td align="center">2014-06-20</td>
<td align="center">Z9</td>
<td align="center">Hospital C</td>
<td align="center">Staphylococcus aureus</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
@ -377,9 +377,9 @@
<td align="center">F</td>
</tr>
<tr class="even">
<td align="center">2016-11-15</td>
<td align="center">U6</td>
<td align="center">Hospital A</td>
<td align="center">2018-01-01</td>
<td align="center">P4</td>
<td align="center">Hospital C</td>
<td align="center">Escherichia coli</td>
<td align="center">R</td>
<td align="center">S</td>
@ -388,26 +388,26 @@
<td align="center">F</td>
</tr>
<tr class="odd">
<td align="center">2016-12-08</td>
<td align="center">B10</td>
<td align="center">2014-12-14</td>
<td align="center">W2</td>
<td align="center">Hospital A</td>
<td align="center">Escherichia coli</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
<td align="center">F</td>
</tr>
<tr class="even">
<td align="center">2010-05-10</td>
<td align="center">M2</td>
<td align="center">Hospital D</td>
<td align="center">Escherichia coli</td>
<td align="center">2016-07-27</td>
<td align="center">R6</td>
<td align="center">Hospital B</td>
<td align="center">Staphylococcus aureus</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
<td align="center">F</td>
</tr>
</tbody>
</table>
@ -441,16 +441,16 @@ Longest: 1</p>
<tr class="odd">
<td align="left">1</td>
<td align="left">M</td>
<td align="right">10,434</td>
<td align="right">52.17%</td>
<td align="right">10,434</td>
<td align="right">52.17%</td>
<td align="right">10,365</td>
<td align="right">51.83%</td>
<td align="right">10,365</td>
<td align="right">51.83%</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="left">F</td>
<td align="right">9,566</td>
<td align="right">47.83%</td>
<td align="right">9,635</td>
<td align="right">48.18%</td>
<td align="right">20,000</td>
<td align="right">100.00%</td>
</tr>
@ -505,9 +505,9 @@ Longest: 1</p>
<span class="co"># Using column 'patient_id' as input for `col_patient_id`.</span>
<span class="co"># Basing inclusion on all antimicrobial results, using a points threshold of</span>
<span class="co"># 2</span>
<span class="co"># =&gt; Found 10,702 first weighted isolates (phenotype-based, 53.5% of total</span>
<span class="co"># =&gt; Found 10,656 first weighted isolates (phenotype-based, 53.3% of total</span>
<span class="co"># where a microbial ID was available)</span></code></pre></div>
<p>So only 53.5% is suitable for resistance analysis! We can now filter on it with the <code><a href="https://dplyr.tidyverse.org/reference/filter.html">filter()</a></code> function, also from the <code>dplyr</code> package:</p>
<p>So only 53.3% is suitable for resistance analysis! We can now filter on it with the <code><a href="https://dplyr.tidyverse.org/reference/filter.html">filter()</a></code> function, also from the <code>dplyr</code> package:</p>
<div class="sourceCode" id="cb15"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="va">data_1st</span> <span class="op">&lt;-</span> <span class="va">data</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op">(</span><span class="va">first</span> <span class="op">==</span> <span class="cn">TRUE</span><span class="op">)</span></code></pre></div>
@ -515,7 +515,7 @@ Longest: 1</p>
<div class="sourceCode" id="cb16"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="va">data_1st</span> <span class="op">&lt;-</span> <span class="va">data</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="../reference/first_isolate.html">filter_first_isolate</a></span><span class="op">(</span><span class="op">)</span></code></pre></div>
<p>So we end up with 10,702 isolates for analysis. Now our data looks like:</p>
<p>So we end up with 10,656 isolates for analysis. Now our data looks like:</p>
<div class="sourceCode" id="cb17"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="fu"><a href="https://rdrr.io/r/utils/head.html">head</a></span><span class="op">(</span><span class="va">data_1st</span><span class="op">)</span></code></pre></div>
<table class="table">
@ -531,7 +531,7 @@ Longest: 1</p>
<col width="3%">
<col width="6%">
<col width="11%">
<col width="12%">
<col width="13%">
<col width="9%">
<col width="5%">
</colgroup>
@ -553,73 +553,25 @@ Longest: 1</p>
</tr></thead>
<tbody>
<tr class="odd">
<td align="left">1</td>
<td align="center">2016-09-28</td>
<td align="center">A1</td>
<td align="center">Hospital A</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">M</td>
<td align="center">Gram-negative</td>
<td align="center">Escherichia</td>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="center">2012-09-28</td>
<td align="center">J9</td>
<td align="center">2011-09-24</td>
<td align="center">D2</td>
<td align="center">Hospital A</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">M</td>
<td align="center">Gram-positive</td>
<td align="center">Streptococcus</td>
<td align="center"><em>Streptococcus</em></td>
<td align="center">pneumoniae</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="left">5</td>
<td align="center">2016-12-08</td>
<td align="center">B10</td>
<td align="center">Hospital A</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
<td align="center">Gram-negative</td>
<td align="center">Escherichia</td>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="left">7</td>
<td align="center">2015-04-29</td>
<td align="center">W8</td>
<td align="center">Hospital A</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">F</td>
<td align="center">Gram-negative</td>
<td align="center">Escherichia</td>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="left">8</td>
<td align="center">2010-06-19</td>
<td align="center">Q5</td>
<td align="left">3</td>
<td align="center">2014-06-20</td>
<td align="center">Z9</td>
<td align="center">Hospital C</td>
<td align="center">B_STPHY_AURS</td>
<td align="center">S</td>
@ -628,26 +580,74 @@ Longest: 1</p>
<td align="center">S</td>
<td align="center">F</td>
<td align="center">Gram-positive</td>
<td align="center">Staphylococcus</td>
<td align="center"><em>Staphylococcus</em></td>
<td align="center">aureus</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="left">6</td>
<td align="center">2016-07-27</td>
<td align="center">R6</td>
<td align="center">Hospital B</td>
<td align="center">B_STPHY_AURS</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">F</td>
<td align="center">Gram-positive</td>
<td align="center"><em>Staphylococcus</em></td>
<td align="center">aureus</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="left">9</td>
<td align="center">2010-08-20</td>
<td align="center">A8</td>
<td align="center">Hospital B</td>
<td align="left">7</td>
<td align="center">2011-07-24</td>
<td align="center">W2</td>
<td align="center">Hospital A</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">I</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">F</td>
<td align="center">Gram-negative</td>
<td align="center"><em>Escherichia</em></td>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="left">9</td>
<td align="center">2012-01-12</td>
<td align="center">K9</td>
<td align="center">Hospital C</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
<td align="center">Gram-negative</td>
<td align="center">Escherichia</td>
<td align="center"><em>Escherichia</em></td>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="left">11</td>
<td align="center">2013-03-11</td>
<td align="center">B6</td>
<td align="center">Hospital D</td>
<td align="center">B_KLBSL_PNMN</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">M</td>
<td align="center">Gram-negative</td>
<td align="center"><em>Klebsiella</em></td>
<td align="center">pneumoniae</td>
<td align="center">TRUE</td>
</tr>
</tbody>
</table>
<p>Time for the analysis!</p>
@ -669,8 +669,8 @@ Longest: 1</p>
<code class="sourceCode R"><span class="va">data_1st</span> <span class="op">%&gt;%</span> <span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span><span class="op">(</span><span class="va">genus</span>, <span class="va">species</span><span class="op">)</span></code></pre></div>
<p><strong>Frequency table</strong></p>
<p>Class: character<br>
Length: 10,702<br>
Available: 10,702 (100.0%, NA: 0 = 0.0%)<br>
Length: 10,656<br>
Available: 10,656 (100.0%, NA: 0 = 0.0%)<br>
Unique: 4</p>
<p>Shortest: 16<br>
Longest: 24</p>
@ -687,33 +687,33 @@ Longest: 24</p>
<tr class="odd">
<td align="left">1</td>
<td align="left">Escherichia coli</td>
<td align="right">4,661</td>
<td align="right">43.55%</td>
<td align="right">4,661</td>
<td align="right">43.55%</td>
<td align="right">4,664</td>
<td align="right">43.77%</td>
<td align="right">4,664</td>
<td align="right">43.77%</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="left">Staphylococcus aureus</td>
<td align="right">2,697</td>
<td align="right">25.20%</td>
<td align="right">7,358</td>
<td align="right">68.75%</td>
<td align="right">2,730</td>
<td align="right">25.62%</td>
<td align="right">7,394</td>
<td align="right">69.39%</td>
</tr>
<tr class="odd">
<td align="left">3</td>
<td align="left">Streptococcus pneumoniae</td>
<td align="right">2,145</td>
<td align="right">20.04%</td>
<td align="right">9,503</td>
<td align="right">88.80%</td>
<td align="right">2,093</td>
<td align="right">19.64%</td>
<td align="right">9,487</td>
<td align="right">89.03%</td>
</tr>
<tr class="even">
<td align="left">4</td>
<td align="left">Klebsiella pneumoniae</td>
<td align="right">1,199</td>
<td align="right">11.20%</td>
<td align="right">10,702</td>
<td align="right">1,169</td>
<td align="right">10.97%</td>
<td align="right">10,656</td>
<td align="right">100.00%</td>
</tr>
</tbody>
@ -732,14 +732,14 @@ Longest: 24</p>
<col width="9%">
<col width="9%">
<col width="9%">
<col width="11%">
<col width="10%">
<col width="3%">
<col width="3%">
<col width="3%">
<col width="3%">
<col width="6%">
<col width="11%">
<col width="11%">
<col width="13%">
<col width="9%">
<col width="5%">
</colgroup>
@ -760,23 +760,38 @@ Longest: 24</p>
</tr></thead>
<tbody>
<tr class="odd">
<td align="center">2016-09-28</td>
<td align="center">A1</td>
<td align="center">2011-09-24</td>
<td align="center">D2</td>
<td align="center">Hospital A</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">M</td>
<td align="center">Gram-negative</td>
<td align="center">Escherichia</td>
<td align="center">coli</td>
<td align="center">Gram-positive</td>
<td align="center"><em>Streptococcus</em></td>
<td align="center">pneumoniae</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">2012-09-28</td>
<td align="center">J9</td>
<td align="center">2011-07-24</td>
<td align="center">W2</td>
<td align="center">Hospital A</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">F</td>
<td align="center">Gram-negative</td>
<td align="center"><em>Escherichia</em></td>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="center">2011-03-17</td>
<td align="center">D5</td>
<td align="center">Hospital A</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">S</td>
@ -785,67 +800,52 @@ Longest: 24</p>
<td align="center">R</td>
<td align="center">M</td>
<td align="center">Gram-positive</td>
<td align="center">Streptococcus</td>
<td align="center"><em>Streptococcus</em></td>
<td align="center">pneumoniae</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="center">2015-04-29</td>
<td align="center">W8</td>
<td align="center">Hospital A</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">F</td>
<td align="center">Gram-negative</td>
<td align="center">Escherichia</td>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">2017-02-20</td>
<td align="center">P2</td>
<td align="center">Hospital C</td>
<td align="center">2011-06-13</td>
<td align="center">X10</td>
<td align="center">Hospital D</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">F</td>
<td align="center">Gram-positive</td>
<td align="center">Streptococcus</td>
<td align="center"><em>Streptococcus</em></td>
<td align="center">pneumoniae</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="center">2010-09-14</td>
<td align="center">T8</td>
<td align="center">Hospital A</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">F</td>
<td align="center">Gram-negative</td>
<td align="center">Escherichia</td>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">2011-01-26</td>
<td align="center">K8</td>
<td align="center">2010-04-12</td>
<td align="center">Z4</td>
<td align="center">Hospital B</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">F</td>
<td align="center">Gram-positive</td>
<td align="center"><em>Streptococcus</em></td>
<td align="center">pneumoniae</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="center">2017-02-25</td>
<td align="center">B5</td>
<td align="center">Hospital B</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">I</td>
<td align="center">I</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">M</td>
<td align="center">Gram-positive</td>
<td align="center">Streptococcus</td>
<td align="center"><em>Streptococcus</em></td>
<td align="center">pneumoniae</td>
<td align="center">TRUE</td>
</tr>
@ -868,52 +868,52 @@ Longest: 24</p>
</tr></thead>
<tbody>
<tr class="odd">
<td align="center">E. coli</td>
<td align="center"><em>E. coli</em></td>
<td align="center">AMX</td>
<td align="center">2209</td>
<td align="center">123</td>
<td align="center">2329</td>
<td align="center">4661</td>
<td align="center">2180</td>
<td align="center">145</td>
<td align="center">2339</td>
<td align="center">4664</td>
</tr>
<tr class="even">
<td align="center">E. coli</td>
<td align="center"><em>E. coli</em></td>
<td align="center">AMC</td>
<td align="center">3406</td>
<td align="center">165</td>
<td align="center">1090</td>
<td align="center">4661</td>
<td align="center">3360</td>
<td align="center">176</td>
<td align="center">1128</td>
<td align="center">4664</td>
</tr>
<tr class="odd">
<td align="center">E. coli</td>
<td align="center"><em>E. coli</em></td>
<td align="center">CIP</td>
<td align="center">3416</td>
<td align="center">3405</td>
<td align="center">0</td>
<td align="center">1245</td>
<td align="center">4661</td>
<td align="center">1259</td>
<td align="center">4664</td>
</tr>
<tr class="even">
<td align="center">E. coli</td>
<td align="center"><em>E. coli</em></td>
<td align="center">GEN</td>
<td align="center">4086</td>
<td align="center">4078</td>
<td align="center">0</td>
<td align="center">575</td>
<td align="center">4661</td>
<td align="center">586</td>
<td align="center">4664</td>
</tr>
<tr class="odd">
<td align="center">K. pneumoniae</td>
<td align="center"><em>K. pneumoniae</em></td>
<td align="center">AMX</td>
<td align="center">0</td>
<td align="center">0</td>
<td align="center">1199</td>
<td align="center">1199</td>
<td align="center">1169</td>
<td align="center">1169</td>
</tr>
<tr class="even">
<td align="center">K. pneumoniae</td>
<td align="center"><em>K. pneumoniae</em></td>
<td align="center">AMC</td>
<td align="center">933</td>
<td align="center">39</td>
<td align="center">227</td>
<td align="center">1199</td>
<td align="center">924</td>
<td align="center">49</td>
<td align="center">196</td>
<td align="center">1169</td>
</tr>
</tbody>
</table>
@ -934,36 +934,36 @@ Longest: 24</p>
</tr></thead>
<tbody>
<tr class="odd">
<td align="center">E. coli</td>
<td align="center"><em>E. coli</em></td>
<td align="center">GEN</td>
<td align="center">4086</td>
<td align="center">4078</td>
<td align="center">0</td>
<td align="center">575</td>
<td align="center">4661</td>
<td align="center">586</td>
<td align="center">4664</td>
</tr>
<tr class="even">
<td align="center">K. pneumoniae</td>
<td align="center"><em>K. pneumoniae</em></td>
<td align="center">GEN</td>
<td align="center">1068</td>
<td align="center">1042</td>
<td align="center">0</td>
<td align="center">131</td>
<td align="center">1199</td>
<td align="center">127</td>
<td align="center">1169</td>
</tr>
<tr class="odd">
<td align="center">S. aureus</td>
<td align="center"><em>S. aureus</em></td>
<td align="center">GEN</td>
<td align="center">2407</td>
<td align="center">2440</td>
<td align="center">0</td>
<td align="center">290</td>
<td align="center">2697</td>
<td align="center">2730</td>
</tr>
<tr class="even">
<td align="center">S. pneumoniae</td>
<td align="center"><em>S. pneumoniae</em></td>
<td align="center">GEN</td>
<td align="center">0</td>
<td align="center">0</td>
<td align="center">2145</td>
<td align="center">2145</td>
<td align="center">2093</td>
<td align="center">2093</td>
</tr>
</tbody>
</table>
@ -977,7 +977,7 @@ Longest: 24</p>
<p>As per the EUCAST guideline of 2019, we calculate resistance as the proportion of R (<code><a href="../reference/proportion.html">proportion_R()</a></code>, equal to <code><a href="../reference/proportion.html">resistance()</a></code>) and susceptibility as the proportion of S and I (<code><a href="../reference/proportion.html">proportion_SI()</a></code>, equal to <code><a href="../reference/proportion.html">susceptibility()</a></code>). These functions can be used on their own:</p>
<div class="sourceCode" id="cb26"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="va">data_1st</span> <span class="op">%&gt;%</span> <span class="fu"><a href="../reference/proportion.html">resistance</a></span><span class="op">(</span><span class="va">AMX</span><span class="op">)</span>
<span class="co"># [1] 0.5418613</span></code></pre></div>
<span class="co"># [1] 0.5442005</span></code></pre></div>
<p>Or can be used in conjunction with <code><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by()</a></code> and <code><a href="https://dplyr.tidyverse.org/reference/summarise.html">summarise()</a></code>, both from the <code>dplyr</code> package:</p>
<div class="sourceCode" id="cb27"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="va">data_1st</span> <span class="op">%&gt;%</span>
@ -991,19 +991,19 @@ Longest: 24</p>
<tbody>
<tr class="odd">
<td align="center">Hospital A</td>
<td align="center">0.5276730</td>
<td align="center">0.5512301</td>
</tr>
<tr class="even">
<td align="center">Hospital B</td>
<td align="center">0.5422819</td>
<td align="center">0.5383792</td>
</tr>
<tr class="odd">
<td align="center">Hospital C</td>
<td align="center">0.5609308</td>
<td align="center">0.5587121</td>
</tr>
<tr class="even">
<td align="center">Hospital D</td>
<td align="center">0.5475970</td>
<td align="center">0.5329877</td>
</tr>
</tbody>
</table>
@ -1022,23 +1022,23 @@ Longest: 24</p>
<tbody>
<tr class="odd">
<td align="center">Hospital A</td>
<td align="center">0.5276730</td>
<td align="center">3180</td>
<td align="center">0.5512301</td>
<td align="center">3211</td>
</tr>
<tr class="even">
<td align="center">Hospital B</td>
<td align="center">0.5422819</td>
<td align="center">3725</td>
<td align="center">0.5383792</td>
<td align="center">3739</td>
</tr>
<tr class="odd">
<td align="center">Hospital C</td>
<td align="center">0.5609308</td>
<td align="center">1633</td>
<td align="center">0.5587121</td>
<td align="center">1584</td>
</tr>
<tr class="even">
<td align="center">Hospital D</td>
<td align="center">0.5475970</td>
<td align="center">2164</td>
<td align="center">0.5329877</td>
<td align="center">2122</td>
</tr>
</tbody>
</table>
@ -1058,28 +1058,28 @@ Longest: 24</p>
</tr></thead>
<tbody>
<tr class="odd">
<td align="center">Escherichia</td>
<td align="center">0.7661446</td>
<td align="center">0.8766359</td>
<td align="center">0.9759708</td>
<td align="center"><em>Escherichia</em></td>
<td align="center">0.7581475</td>
<td align="center">0.8743568</td>
<td align="center">0.9762007</td>
</tr>
<tr class="even">
<td align="center">Klebsiella</td>
<td align="center">0.8106756</td>
<td align="center">0.8907423</td>
<td align="center">0.9833194</td>
<td align="center"><em>Klebsiella</em></td>
<td align="center">0.8323353</td>
<td align="center">0.8913601</td>
<td align="center">0.9760479</td>
</tr>
<tr class="odd">
<td align="center">Staphylococcus</td>
<td align="center">0.7942158</td>
<td align="center">0.8924731</td>
<td align="center">0.9818317</td>
<td align="center"><em>Staphylococcus</em></td>
<td align="center">0.7945055</td>
<td align="center">0.8937729</td>
<td align="center">0.9831502</td>
</tr>
<tr class="even">
<td align="center">Streptococcus</td>
<td align="center">0.5501166</td>
<td align="center"><em>Streptococcus</em></td>
<td align="center">0.5351171</td>
<td align="center">0.0000000</td>
<td align="center">0.5501166</td>
<td align="center">0.5351171</td>
</tr>
</tbody>
</table>
@ -1104,23 +1104,23 @@ Longest: 24</p>
<tbody>
<tr class="odd">
<td align="left">Hospital A</td>
<td align="right">52.8%</td>
<td align="right">26.0%</td>
<td align="right">55.1%</td>
<td align="right">27.0%</td>
</tr>
<tr class="even">
<td align="left">Hospital B</td>
<td align="right">54.2%</td>
<td align="right">26.5%</td>
<td align="right">53.8%</td>
<td align="right">26.2%</td>
</tr>
<tr class="odd">
<td align="left">Hospital C</td>
<td align="right">56.1%</td>
<td align="right">26.7%</td>
<td align="right">55.9%</td>
<td align="right">27.7%</td>
</tr>
<tr class="even">
<td align="left">Hospital D</td>
<td align="right">54.8%</td>
<td align="right">27.1%</td>
<td align="right">53.3%</td>
<td align="right">27.0%</td>
</tr>
</tbody>
</table>
@ -1204,19 +1204,16 @@ Longest: 24</p>
<code class="sourceCode R"><span class="va">mic_values</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/random.html">random_mic</a></span><span class="op">(</span>size <span class="op">=</span> <span class="fl">100</span><span class="op">)</span>
<span class="va">mic_values</span>
<span class="co"># Class &lt;mic&gt;</span>
<span class="co"># [1] 32 2 4 &gt;=128 8 1 &lt;=0.0625 &gt;=128 </span>
<span class="co"># [9] &lt;=0.0625 &lt;=0.0625 64 2 0.125 8 &lt;=0.0625 0.125 </span>
<span class="co"># [17] 64 &gt;=128 &gt;=128 16 32 2 8 32 </span>
<span class="co"># [25] 0.5 0.5 16 8 &gt;=128 2 16 &gt;=128 </span>
<span class="co"># [33] 0.5 2 64 64 16 &lt;=0.0625 1 4 </span>
<span class="co"># [41] 0.125 16 &lt;=0.0625 0.125 0.25 0.125 8 4 </span>
<span class="co"># [49] &lt;=0.0625 32 1 &lt;=0.0625 1 0.5 0.5 64 </span>
<span class="co"># [57] 2 &lt;=0.0625 8 &lt;=0.0625 32 4 32 64 </span>
<span class="co"># [65] 0.125 0.5 4 0.125 0.5 4 8 8 </span>
<span class="co"># [73] 0.5 64 &gt;=128 32 0.25 32 4 4 </span>
<span class="co"># [81] 0.25 64 0.125 &lt;=0.0625 2 1 2 &lt;=0.0625</span>
<span class="co"># [89] 1 &gt;=128 0.125 2 64 16 1 64 </span>
<span class="co"># [97] 32 64 0.125 &lt;=0.0625</span></code></pre></div>
<span class="co"># [1] 1 16 8 0.5 64 0.125 4 2 0.25 16 </span>
<span class="co"># [11] 8 64 0.25 64 0.25 0.25 0.125 1 0.5 4 </span>
<span class="co"># [21] 64 0.0625 &gt;=128 0.5 0.5 &gt;=128 0.25 0.125 16 32 </span>
<span class="co"># [31] 16 0.0625 4 8 4 &gt;=128 4 0.25 0.0625 0.5 </span>
<span class="co"># [41] 2 0.125 0.25 1 16 2 0.125 1 2 2 </span>
<span class="co"># [51] 0.25 0.5 8 4 8 1 4 64 2 32 </span>
<span class="co"># [61] 0.5 2 1 8 8 32 64 4 2 32 </span>
<span class="co"># [71] &gt;=128 1 64 4 64 8 8 64 0.125 0.0625</span>
<span class="co"># [81] 8 &gt;=128 0.0625 0.0625 0.25 8 8 0.0625 32 0.25 </span>
<span class="co"># [91] 32 0.0625 0.125 1 &gt;=128 16 0.0625 8 0.0625 2</span></code></pre></div>
<div class="sourceCode" id="cb37"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="co"># base R:</span>
<span class="fu"><a href="../reference/plot.html">plot</a></span><span class="op">(</span><span class="va">mic_values</span><span class="op">)</span></code></pre></div>
@ -1245,10 +1242,10 @@ Longest: 24</p>
<span class="co"># to review it.</span>
<span class="va">disk_values</span>
<span class="co"># Class &lt;disk&gt;</span>
<span class="co"># [1] 23 19 31 23 17 26 25 27 18 29 30 27 25 23 28 27 28 26 20 22 28 21 22 25 23</span>
<span class="co"># [26] 18 20 22 19 30 22 20 23 21 20 24 28 25 31 29 24 21 31 21 23 24 30 17 27 23</span>
<span class="co"># [51] 18 24 27 27 22 17 20 26 22 28 28 26 27 26 21 17 28 27 19 21 22 26 17 21 18</span>
<span class="co"># [76] 28 22 25 30 29 19 17 29 29 24 29 30 28 17 23 25 28 17 27 28 25 23 22 19 24</span></code></pre></div>
<span class="co"># [1] 25 19 26 17 25 27 22 17 29 29 27 28 21 18 26 29 21 27 24 17 18 19 23 19 21</span>
<span class="co"># [26] 18 23 21 27 29 18 25 24 17 31 18 22 25 30 19 29 26 27 22 22 28 21 23 22 20</span>
<span class="co"># [51] 30 19 23 21 30 17 19 22 18 25 29 28 25 31 20 23 20 22 27 24 21 21 24 19 31</span>
<span class="co"># [76] 19 18 27 20 27 21 25 26 29 27 29 21 27 27 25 20 22 25 26 29 19 19 23 19 20</span></code></pre></div>
<div class="sourceCode" id="cb43"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="co"># base R:</span>
<span class="fu"><a href="../reference/plot.html">plot</a></span><span class="op">(</span><span class="va">disk_values</span>, mo <span class="op">=</span> <span class="st">"E. coli"</span>, ab <span class="op">=</span> <span class="st">"cipro"</span><span class="op">)</span></code></pre></div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB

View File

@ -39,7 +39,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9013</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9014</span>
</span>
</div>
@ -192,7 +192,7 @@
<div class="page-header toc-ignore">
<h1 data-toc-skip>Data sets for download / own use</h1>
<h4 class="date">04 July 2021</h4>
<h4 class="date">06 July 2021</h4>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/master/vignettes/datasets.Rmd"><code>vignettes/datasets.Rmd</code></a></small>
<div class="hidden name"><code>datasets.Rmd</code></div>
@ -1035,8 +1035,8 @@ If you are reading this page from within R, please <a href="https://msberends.gi
<col width="8%">
<col width="5%">
<col width="4%">
<col width="12%">
<col width="20%">
<col width="13%">
<col width="19%">
<col width="17%">
<col width="7%">
<col width="9%">
@ -1060,7 +1060,7 @@ If you are reading this page from within R, please <a href="https://msberends.gi
<td align="center">EUCAST 2021</td>
<td align="center">DISK</td>
<td align="center"></td>
<td align="center">Enterobacterales</td>
<td align="center"><em>Enterobacterales</em></td>
<td align="center">Amoxicillin/clavulanic acid</td>
<td align="center">Enterobacterales</td>
<td align="center">20-10ug</td>
@ -1072,7 +1072,7 @@ If you are reading this page from within R, please <a href="https://msberends.gi
<td align="center">EUCAST 2021</td>
<td align="center">DISK</td>
<td align="center">UTI</td>
<td align="center">Enterobacterales</td>
<td align="center"><em>Enterobacterales</em></td>
<td align="center">Amoxicillin/clavulanic acid</td>
<td align="center">Enterobacterales</td>
<td align="center">20-10ug</td>
@ -1084,7 +1084,7 @@ If you are reading this page from within R, please <a href="https://msberends.gi
<td align="center">EUCAST 2021</td>
<td align="center">MIC</td>
<td align="center"></td>
<td align="center">Enterobacterales</td>
<td align="center"><em>Enterobacterales</em></td>
<td align="center">Amoxicillin/clavulanic acid</td>
<td align="center">Enterobacterales</td>
<td align="center"></td>
@ -1096,7 +1096,7 @@ If you are reading this page from within R, please <a href="https://msberends.gi
<td align="center">EUCAST 2021</td>
<td align="center">MIC</td>
<td align="center">UTI</td>
<td align="center">Enterobacterales</td>
<td align="center"><em>Enterobacterales</em></td>
<td align="center">Amoxicillin/clavulanic acid</td>
<td align="center">Enterobacterales</td>
<td align="center"></td>
@ -1108,7 +1108,7 @@ If you are reading this page from within R, please <a href="https://msberends.gi
<td align="center">EUCAST 2021</td>
<td align="center">MIC</td>
<td align="center"></td>
<td align="center">Actinomyces</td>
<td align="center"><em>Actinomyces</em></td>
<td align="center">Amoxicillin/clavulanic acid</td>
<td align="center">Anaerobes, Grampositive</td>
<td align="center"></td>
@ -1120,7 +1120,7 @@ If you are reading this page from within R, please <a href="https://msberends.gi
<td align="center">EUCAST 2021</td>
<td align="center">MIC</td>
<td align="center"></td>
<td align="center">Bacteroides</td>
<td align="center"><em>Bacteroides</em></td>
<td align="center">Amoxicillin/clavulanic acid</td>
<td align="center">Anaerobes, Gramnegative</td>
<td align="center"></td>

View File

@ -81,7 +81,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9013</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9014</span>
</span>
</div>

View File

@ -81,7 +81,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9013</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9014</span>
</span>
</div>

View File

@ -42,7 +42,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9013</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9014</span>
</span>
</div>

View File

@ -81,7 +81,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9013</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9014</span>
</span>
</div>
@ -236,12 +236,12 @@
<small>Source: <a href='https://github.com/msberends/AMR/blob/master/NEWS.md'><code>NEWS.md</code></a></small>
</div>
<div id="amr-1719013" class="section level1">
<h1 class="page-header" data-toc-text="1.7.1.9013">
<a href="#amr-1719013" class="anchor"></a><small> Unreleased </small><code>AMR</code> 1.7.1.9013</h1>
<div id="last-updated-4-july-2021" class="section level2">
<div id="amr-1719014" class="section level1">
<h1 class="page-header" data-toc-text="1.7.1.9014">
<a href="#amr-1719014" class="anchor"></a><small> Unreleased </small><code>AMR</code> 1.7.1.9014</h1>
<div id="last-updated-6-july-2021" class="section level2">
<h2 class="hasAnchor">
<a href="#last-updated-4-july-2021" class="anchor"></a><small>Last updated: 4 July 2021</small>
<a href="#last-updated-6-july-2021" class="anchor"></a><small>Last updated: 6 July 2021</small>
</h2>
<div id="changed" class="section level3">
<h3 class="hasAnchor">

View File

@ -12,7 +12,7 @@ articles:
datasets: datasets.html
resistance_predict: resistance_predict.html
welcome_to_AMR: welcome_to_AMR.html
last_built: 2021-07-04T20:09Z
last_built: 2021-07-06T14:34Z
urls:
reference: https://msberends.github.io/AMR//reference
article: https://msberends.github.io/AMR//articles

View File

@ -82,7 +82,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9013</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9014</span>
</span>
</div>

View File

@ -82,7 +82,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9013</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9014</span>
</span>
</div>

View File

@ -82,7 +82,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9011</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9014</span>
</span>
</div>

View File

@ -81,7 +81,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9013</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9014</span>
</span>
</div>

View File

@ -82,7 +82,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9011</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9014</span>
</span>
</div>
@ -352,7 +352,7 @@
<p>The Gram stain - <code>mo_gramstain()</code> - will be determined based on the taxonomic kingdom and phylum. According to Cavalier-Smith (2002, <a href='https://pubmed.ncbi.nlm.nih.gov/11837318'>PMID 11837318</a>), who defined subkingdoms Negibacteria and Posibacteria, only these phyla are Posibacteria: Actinobacteria, Chloroflexi, Firmicutes and Tenericutes. These bacteria are considered Gram-positive - all other bacteria are considered Gram-negative. Species outside the kingdom of Bacteria will return a value <code>NA</code>. Functions <code>mo_is_gram_negative()</code> and <code>mo_is_gram_positive()</code> always return <code>TRUE</code> or <code>FALSE</code> (except when the input is <code>NA</code> or the MO code is <code>UNKNOWN</code>), thus always return <code>FALSE</code> for species outside the taxonomic kingdom of Bacteria.</p>
<p>Determination of yeasts - <code>mo_is_yeast()</code> - will be based on the taxonomic kingdom and class. <em>Budding yeasts</em> are fungi of the phylum Ascomycetes, class Saccharomycetes (also called Hemiascomycetes). <em>True yeasts</em> are aggregated into the underlying order Saccharomycetales. Thus, for all microorganisms that are fungi and member of the taxonomic class Saccharomycetes, the function will return <code>TRUE</code>. It returns <code>FALSE</code> otherwise (except when the input is <code>NA</code> or the MO code is <code>UNKNOWN</code>).</p>
<p>Intrinsic resistance - <code>mo_is_intrinsic_resistant()</code> - will be determined based on the <a href='intrinsic_resistant.html'>intrinsic_resistant</a> data set, which is based on <a href='https://www.eucast.org/expert_rules_and_intrinsic_resistance/'>'EUCAST Expert Rules' and 'EUCAST Intrinsic Resistance and Unusual Phenotypes' v3.2</a> (2020). The <code>mo_is_intrinsic_resistant()</code> functions can be vectorised over arguments <code>x</code> (input for microorganisms) and over <code>ab</code> (input for antibiotics).</p>
<p>The functions <code>mo_family()</code>, <code>mo_genus()</code>, <code>mo_name()</code>, <code>mo_fullname()</code> and <code>mo_shortname()</code> are returned with an additional class <code>taxonomic_name</code>, which allows italic printing in <a href='https://tibble.tidyverse.org/reference/tibble.html'>tibbles</a>.</p>
<p>The functions <code>mo_family()</code>, <code>mo_genus()</code>, <code>mo_name()</code>, <code>mo_fullname()</code> and <code>mo_shortname()</code> are returned with an additional class <code>taxonomic_name</code>, which allows italic printing in <a href='https://tibble.tidyverse.org/reference/tibble.html'>tibbles</a> and markdown tables such as with <code><a href='https://rdrr.io/pkg/knitr/man/kable.html'>knitr::kable()</a></code>.</p>
<p>All output <a href='translate.html'>will be translated</a> where possible.</p>
<p>The function <code>mo_url()</code> will return the direct URL to the online database entry, which also shows the scientific reference of the concerned species.</p>
<p>SNOMED codes - <code>mo_snomed()</code> - are from the US Edition of SNOMED CT from 1 September 2020. See <em>Source</em> and the <a href='microorganisms.html'>microorganisms</a> data set for more info.</p>

View File

@ -81,7 +81,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9013</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9014</span>
</span>
</div>

View File

@ -131,7 +131,7 @@ Determination of yeasts - \code{\link[=mo_is_yeast]{mo_is_yeast()}} - will be ba
Intrinsic resistance - \code{\link[=mo_is_intrinsic_resistant]{mo_is_intrinsic_resistant()}} - will be determined based on the \link{intrinsic_resistant} data set, which is based on \href{https://www.eucast.org/expert_rules_and_intrinsic_resistance/}{'EUCAST Expert Rules' and 'EUCAST Intrinsic Resistance and Unusual Phenotypes' v3.2} (2020). The \code{\link[=mo_is_intrinsic_resistant]{mo_is_intrinsic_resistant()}} functions can be vectorised over arguments \code{x} (input for microorganisms) and over \code{ab} (input for antibiotics).
The functions \code{\link[=mo_family]{mo_family()}}, \code{\link[=mo_genus]{mo_genus()}}, \code{\link[=mo_name]{mo_name()}}, \code{\link[=mo_fullname]{mo_fullname()}} and \code{\link[=mo_shortname]{mo_shortname()}} are returned with an additional class \code{taxonomic_name}, which allows italic printing in \link[tibble:tibble]{tibbles}.
The functions \code{\link[=mo_family]{mo_family()}}, \code{\link[=mo_genus]{mo_genus()}}, \code{\link[=mo_name]{mo_name()}}, \code{\link[=mo_fullname]{mo_fullname()}} and \code{\link[=mo_shortname]{mo_shortname()}} are returned with an additional class \code{taxonomic_name}, which allows italic printing in \link[tibble:tibble]{tibbles} and markdown tables such as with \code{\link[knitr:kable]{knitr::kable()}}.
All output \link[=translate]{will be translated} where possible.