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

(v0.8.0.9029) cleanup

This commit is contained in:
dr. M.S. (Matthijs) Berends 2019-11-10 15:50:18 +01:00
parent 54b6322056
commit d22834c5b8
37 changed files with 351 additions and 348 deletions

View File

@ -1,5 +1,5 @@
Package: AMR Package: AMR
Version: 0.8.0.9028 Version: 0.8.0.9029
Date: 2019-11-10 Date: 2019-11-10
Title: Antimicrobial Resistance Analysis Title: Antimicrobial Resistance Analysis
Authors@R: c( Authors@R: c(

View File

@ -1,4 +1,4 @@
# AMR 0.8.0.9028 # AMR 0.8.0.9029
<small>Last updated: 10-Nov-2019</small> <small>Last updated: 10-Nov-2019</small>
### New ### New
@ -8,7 +8,7 @@
* The new Verbose mode (`mdro(...., verbose = TRUE)`) returns an informative data set where the reason for MDRO determination is given for every isolate, and an list of the resistant antimicrobial agents * The new Verbose mode (`mdro(...., verbose = TRUE)`) returns an informative data set where the reason for MDRO determination is given for every isolate, and an list of the resistant antimicrobial agents
### Changes ### Changes
* Removed previously deprecated function `as.rsi()` - this function was replaced by `ab_atc()` * Removed previously deprecated function `as.atc()` - this function was replaced by `ab_atc()`
* Renamed all `portion_*` functions to `proportion_*`. All `portion_*` functions are still available as deprecated functions, and will return a warning when used. * Renamed all `portion_*` functions to `proportion_*`. All `portion_*` functions are still available as deprecated functions, and will return a warning when used.
* When running `as.rsi()` over a data set, it will now print the guideline that will be used if it is not specified by the user * When running `as.rsi()` over a data set, it will now print the guideline that will be used if it is not specified by the user
* Fix for `eucast_rules()`: *Stenotrophomonas maltophilia* not interpreted "R" to ceftazidime anymore (following EUCAST v3.1) * Fix for `eucast_rules()`: *Stenotrophomonas maltophilia* not interpreted "R" to ceftazidime anymore (following EUCAST v3.1)

View File

@ -52,6 +52,7 @@
#' University Medical Center Groningen \cr #' University Medical Center Groningen \cr
#' Post Office Box 30001 \cr #' Post Office Box 30001 \cr
#' 9700 RB Groningen #' 9700 RB Groningen
#' The Netherlands
#' #'
#' If you have found a bug, please file a new issue at: \cr #' If you have found a bug, please file a new issue at: \cr
#' \url{https://gitlab.com/msberends/AMR/issues} #' \url{https://gitlab.com/msberends/AMR/issues}

View File

@ -23,17 +23,17 @@
#' #'
#' @description These functions can be used to count resistant/susceptible microbial isolates. All functions support quasiquotation with pipes, can be used in \code{dplyr}s \code{\link[dplyr]{summarise}} and support grouped variables, see \emph{Examples}. #' @description These functions can be used to count resistant/susceptible microbial isolates. All functions support quasiquotation with pipes, can be used in \code{dplyr}s \code{\link[dplyr]{summarise}} and support grouped variables, see \emph{Examples}.
#' #'
#' \code{count_resistant} should be used to count resistant isolates, \code{count_susceptible} should be used to count susceptible isolates.\cr #' \code{count_resistant()} should be used to count resistant isolates, \code{count_susceptible()} should be used to count susceptible isolates.\cr
#' @param ... one or more vectors (or columns) with antibiotic interpretations. They will be transformed internally with \code{\link{as.rsi}} if needed. #' @param ... one or more vectors (or columns) with antibiotic interpretations. They will be transformed internally with \code{\link{as.rsi}} if needed.
#' @inheritParams proportion #' @inheritParams proportion
#' @inheritSection as.rsi Interpretation of S, I and R #' @inheritSection as.rsi Interpretation of S, I and R
#' @details These functions are meant to count isolates. Use the \code{\link{resistance}}/\code{\link{susceptibility}} functions to calculate microbial resistance/susceptibility. #' @details These functions are meant to count isolates. Use the \code{\link{resistance}}/\code{\link{susceptibility}} functions to calculate microbial resistance/susceptibility.
#' #'
#' The function \code{count_resistant} is equal to the function \code{count_R}. The function \code{count_susceptible} is equal to the function \code{count_SI}. #' The function \code{count_resistant()} is equal to the function \code{count_R()}. The function \code{count_susceptible()} is equal to the function \code{count_SI()}.
#' #'
#' The function \code{n_rsi} is an alias of \code{count_all}. They can be used to count all available isolates, i.e. where all input antibiotics have an available result (S, I or R). Their use is equal to \code{\link{n_distinct}}. Their function is equal to \code{count_susceptible(...) + count_resistant(...)}. #' The function \code{n_rsi()} is an alias of \code{count_all()}. They can be used to count all available isolates, i.e. where all input antibiotics have an available result (S, I or R). Their use is equal to \code{\link{n_distinct}()}. Their function is equal to \code{count_susceptible(...) + count_resistant(...)}.
#' #'
#' The function \code{count_df} takes any variable from \code{data} that has an \code{"rsi"} class (created with \code{\link{as.rsi}}) and counts the number of S's, I's and R's. The function \code{rsi_df} works exactly like \code{count_df}, but adds the percentage of S, I and R. #' The function \code{count_df()} takes any variable from \code{data} that has an \code{"rsi"} class (created with \code{\link{as.rsi}()}) and counts the number of S's, I's and R's. The function \code{rsi_df()} works exactly like \code{count_df()}, but adds the percentage of S, I and R.
#' @inheritSection proportion Combination therapy #' @inheritSection proportion Combination therapy
#' @seealso \code{\link{proportion}_*} to calculate microbial resistance and susceptibility. #' @seealso \code{\link{proportion}_*} to calculate microbial resistance and susceptibility.
#' @return Integer #' @return Integer

View File

@ -21,7 +21,7 @@
#' Determine multidrug-resistant organisms (MDRO) #' Determine multidrug-resistant organisms (MDRO)
#' #'
#' Determine which isolates are multidrug-resistant organisms (MDRO) according to (country-specific) guidelines. #' Determine which isolates are multidrug-resistant organisms (MDRO) according to international and national guidelines.
#' @param guideline a specific guideline to follow. When left empty, the publication by Magiorakos \emph{et al.} (2012, Clinical Microbiology and Infection) will be followed, see Details. #' @param guideline a specific guideline to follow. When left empty, the publication by Magiorakos \emph{et al.} (2012, Clinical Microbiology and Infection) will be followed, see Details.
#' @param info print progress #' @param info print progress
#' @inheritParams eucast_rules #' @inheritParams eucast_rules
@ -637,7 +637,7 @@ mdro <- function(x,
which(x$genus == "Staphylococcus" & x$species == "aureus"), which(x$genus == "Staphylococcus" & x$species == "aureus"),
c(OXA, FOX), c(OXA, FOX),
"any") "any")
trans_tbl2(paste("Table 1 -", italic("S. aureus")), trans_tbl2(paste("Table 1 -", italic("Staphylococcus aureus")),
which(x$genus == "Staphylococcus" & x$species == "aureus"), which(x$genus == "Staphylococcus" & x$species == "aureus"),
list(GEN, list(GEN,
RIF, RIF,

View File

@ -23,7 +23,7 @@
#' #'
#' @description These functions can be used to calculate the (co-)resistance or susceptibility of microbial isolates (i.e. percentage of S, SI, I, IR or R). All functions support quasiquotation with pipes, can be used in \code{dplyr}s \code{\link[dplyr]{summarise}} and support grouped variables, see \emph{Examples}. #' @description These functions can be used to calculate the (co-)resistance or susceptibility of microbial isolates (i.e. percentage of S, SI, I, IR or R). All functions support quasiquotation with pipes, can be used in \code{dplyr}s \code{\link[dplyr]{summarise}} and support grouped variables, see \emph{Examples}.
#' #'
#' \code{resistance} should be used to calculate resistance, \code{susceptibility} should be used to calculate susceptibility.\cr #' \code{resistance()} should be used to calculate resistance, \code{susceptibility()} should be used to calculate susceptibility.\cr
#' @param ... one or more vectors (or columns) with antibiotic interpretations. They will be transformed internally with \code{\link{as.rsi}} if needed. Use multiple columns to calculate (the lack of) co-resistance: the probability where one of two drugs have a resistant or susceptible result. See Examples. #' @param ... one or more vectors (or columns) with antibiotic interpretations. They will be transformed internally with \code{\link{as.rsi}} if needed. Use multiple columns to calculate (the lack of) co-resistance: the probability where one of two drugs have a resistant or susceptible result. See Examples.
#' @param minimum the minimum allowed number of available (tested) isolates. Any isolate count lower than \code{minimum} will return \code{NA} with a warning. The default number of \code{30} isolates is advised by the Clinical and Laboratory Standards Institute (CLSI) as best practice, see Source. #' @param minimum the minimum allowed number of available (tested) isolates. Any isolate count lower than \code{minimum} will return \code{NA} with a warning. The default number of \code{30} isolates is advised by the Clinical and Laboratory Standards Institute (CLSI) as best practice, see Source.
#' @param as_percent a logical to indicate whether the output must be returned as a hundred fold with \% sign (a character). A value of \code{0.123456} will then be returned as \code{"12.3\%"}. #' @param as_percent a logical to indicate whether the output must be returned as a hundred fold with \% sign (a character). A value of \code{0.123456} will then be returned as \code{"12.3\%"}.
@ -35,13 +35,13 @@
#' @param combine_IR a logical to indicate whether all values of I and R must be merged into one, so the output only consists of S vs. I+R (susceptible vs. non-susceptible). This is outdated, see parameter \code{combine_SI}. #' @param combine_IR a logical to indicate whether all values of I and R must be merged into one, so the output only consists of S vs. I+R (susceptible vs. non-susceptible). This is outdated, see parameter \code{combine_SI}.
#' @inheritSection as.rsi Interpretation of S, I and R #' @inheritSection as.rsi Interpretation of S, I and R
#' @details #' @details
#' The function \code{resistance} is equal to the function \code{proportion_R}. The function \code{susceptibility} is equal to the function \code{proportion_SI}. #' The function \code{resistance()} is equal to the function \code{proportion_R()}. The function \code{susceptibility()} is equal to the function \code{proportion_SI()}.
#' #'
#' \strong{Remember that you should filter your table to let it contain only first isolates!} This is needed to exclude duplicates and to reduce selection bias. Use \code{\link{first_isolate}} to determine them in your data set. #' \strong{Remember that you should filter your table to let it contain only first isolates!} This is needed to exclude duplicates and to reduce selection bias. Use \code{\link{first_isolate}} to determine them in your data set.
#' #'
#' These functions are not meant to count isolates, but to calculate the proportion of resistance/susceptibility. Use the \code{\link[AMR]{count}} functions to count isolates. The function \code{susceptibility()} is essentially equal to \code{count_susceptible() / count_all()}. \emph{Low counts can infuence the outcome - the \code{proportion} functions may camouflage this, since they only return the proportion (albeit being dependent on the \code{minimum} parameter).} #' These functions are not meant to count isolates, but to calculate the proportion of resistance/susceptibility. Use the \code{\link[AMR]{count}} functions to count isolates. The function \code{susceptibility()} is essentially equal to \code{count_susceptible() / count_all()}. \emph{Low counts can infuence the outcome - the \code{proportion} functions may camouflage this, since they only return the proportion (albeit being dependent on the \code{minimum} parameter).}
#' #'
#' The function \code{proportion_df} takes any variable from \code{data} that has an \code{"rsi"} class (created with \code{\link{as.rsi}}) and calculates the proportions R, I and S. The function \code{rsi_df} works exactly like \code{proportion_df}, but adds the number of isolates. #' The function \code{proportion_df()} takes any variable from \code{data} that has an \code{"rsi"} class (created with \code{\link{as.rsi}()}) and calculates the proportions R, I and S. The function \code{rsi_df()} works exactly like \code{proportion_df()}, but adds the number of isolates.
#' @section Combination therapy: #' @section Combination therapy:
#' When using more than one variable for \code{...} (= combination therapy)), use \code{only_all_tested} to only count isolates that are tested for all antibiotics/variables that you test them for. See this example for two antibiotics, Antibiotic A and Antibiotic B, about how \code{susceptibility} works to calculate the \%SI: #' When using more than one variable for \code{...} (= combination therapy)), use \code{only_all_tested} to only count isolates that are tested for all antibiotics/variables that you test them for. See this example for two antibiotics, Antibiotic A and Antibiotic B, about how \code{susceptibility} works to calculate the \%SI:
#' #'

View File

@ -46,7 +46,7 @@
#' #'
#' Exposure is a function of how the mode of administration, dose, dosing interval, infusion time, as well as distribution and excretion of the antimicrobial agent will influence the infecting organism at the site of infection. #' Exposure is a function of how the mode of administration, dose, dosing interval, infusion time, as well as distribution and excretion of the antimicrobial agent will influence the infecting organism at the site of infection.
#' #'
#' This AMR package honours this new insight. Use \code{\link{susceptibility}} (equal to \code{\link{proportion_SI}}) to determine antimicrobial susceptibility and \code{\link{count_susceptible}} (equal to \code{\link{count_SI}}) to count susceptible isolates. #' This AMR package honours this new insight. Use \code{\link{susceptibility}()} (equal to \code{\link{proportion_SI}()}) to determine antimicrobial susceptibility and \code{\link{count_susceptible}()} (equal to \code{\link{count_SI}()}) to count susceptible isolates.
#' @return Ordered factor with new class \code{rsi} #' @return Ordered factor with new class \code{rsi}
#' @aliases RSI #' @aliases RSI
#' @export #' @export

View File

@ -19,11 +19,11 @@
# Visit our website for more info: https://msberends.gitlab.io/AMR. # # Visit our website for more info: https://msberends.gitlab.io/AMR. #
# ==================================================================== # # ==================================================================== #
# Download script file from GitHub # Download script file from this GitLab repo
init: init:
ps: | ps: |
$ErrorActionPreference = "Stop" $ErrorActionPreference = "Stop"
Invoke-WebRequest https://gitlab.com/msberends/AMR/raw/premaster/tests/appveyor/appveyor_tool.ps1 -OutFile "..\appveyor-tool.ps1" Invoke-WebRequest https://gitlab.com/msberends/AMR/raw/master/tests/appveyor/appveyor_tool.ps1 -OutFile "..\appveyor-tool.ps1"
Import-Module '..\appveyor-tool.ps1' Import-Module '..\appveyor-tool.ps1'
install: install:
@ -44,11 +44,11 @@ environment:
matrix: matrix:
- R_VERSION: oldrel - R_VERSION: oldrel
- R_VERSION: release - R_VERSION: release
- R_VERSION: devel # 9 nov 19: searches for R 4.0 and now fails... - R_VERSION: devel
matrix: matrix:
allow_failures: allow_failures:
- R_VERSION: "devel" - R_VERSION: "devel" # 9 nov 19: searches for R 4.0 and now fails...
build_script: build_script:
- travis_tool.sh install_deps - travis_tool.sh install_deps

View File

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

View File

@ -84,7 +84,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="index.html">AMR (for R)</a> <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">0.8.0.9028</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9029</span>
</span> </span>
</div> </div>

View File

@ -41,7 +41,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <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">0.8.0.9027</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9029</span>
</span> </span>
</div> </div>
@ -321,71 +321,71 @@
</tr></thead> </tr></thead>
<tbody> <tbody>
<tr class="odd"> <tr class="odd">
<td align="center">2016-01-11</td> <td align="center">2015-05-08</td>
<td align="center">N1</td> <td align="center">P3</td>
<td align="center">Hospital C</td> <td align="center">Hospital A</td>
<td align="center">Staphylococcus aureus</td> <td align="center">Escherichia coli</td>
<td align="center">R</td>
<td align="center">I</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td>
<td align="center">F</td>
</tr>
<tr class="even">
<td align="center">2017-11-03</td>
<td align="center">Y8</td>
<td align="center">Hospital C</td>
<td align="center">Escherichia coli</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">S</td>
<td align="center">M</td>
</tr>
<tr class="even">
<td align="center">2010-12-17</td>
<td align="center">D2</td>
<td align="center">Hospital D</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">F</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">2016-07-05</td> <td align="center">2013-09-06</td>
<td align="center">L5</td> <td align="center">U9</td>
<td align="center">Hospital B</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">F</td>
</tr>
<tr class="even">
<td align="center">2015-11-16</td>
<td align="center">E7</td>
<td align="center">Hospital B</td> <td align="center">Hospital B</td>
<td align="center">Escherichia coli</td> <td align="center">Escherichia coli</td>
<td align="center">I</td> <td align="center">I</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-04-18</td>
<td align="center">F4</td>
<td align="center">Hospital B</td>
<td align="center">Streptococcus pneumoniae</td>
<td align="center">S</td>
<td align="center">I</td> <td align="center">I</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">M</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">2016-12-23</td> <td align="center">2010-04-22</td>
<td align="center">C5</td> <td align="center">L4</td>
<td align="center">Hospital A</td> <td align="center">Hospital D</td>
<td align="center">Klebsiella pneumoniae</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">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">M</td> <td align="center">M</td>
</tr> </tr>
<tr class="odd">
<td align="center">2011-06-29</td>
<td align="center">F3</td>
<td align="center">Hospital A</td>
<td align="center">Escherichia coli</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">M</td>
</tr>
<tr class="even">
<td align="center">2011-07-01</td>
<td align="center">N10</td>
<td align="center">Hospital A</td>
<td align="center">Escherichia coli</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">F</td>
</tr>
</tbody> </tbody>
</table> </table>
<p>Now, lets start the cleaning and the analysis!</p> <p>Now, lets start the cleaning and the analysis!</p>
@ -406,8 +406,8 @@
# #
# Item Count Percent Cum. Count Cum. Percent # Item Count Percent Cum. Count Cum. Percent
# --- ----- ------- -------- ----------- ------------- # --- ----- ------- -------- ----------- -------------
# 1 M 10,264 51.32% 10,264 51.32% # 1 M 10,417 52.09% 10,417 52.09%
# 2 F 9,736 48.68% 20,000 100.00%</code></pre> # 2 F 9,583 47.92% 20,000 100.00%</code></pre>
<p>So, we can draw at least two conclusions immediately. From a data scientists perspective, the data looks clean: only values <code>M</code> and <code>F</code>. From a researchers perspective: there are slightly more men. Nothing we didnt already know.</p> <p>So, we can draw at least two conclusions immediately. From a data scientists perspective, the data looks clean: only values <code>M</code> and <code>F</code>. From a researchers perspective: there are slightly more men. Nothing we didnt already know.</p>
<p>The data is already quite clean, but we still need to transform some variables. The <code>bacteria</code> column now consists of text, and we want to add more variables based on microbial IDs later on. So, we will transform this column to valid IDs. The <code><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate()</a></code> function of the <code>dplyr</code> package makes this really easy:</p> <p>The data is already quite clean, but we still need to transform some variables. The <code>bacteria</code> column now consists of text, and we want to add more variables based on microbial IDs later on. So, we will transform this column to valid IDs. The <code><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate()</a></code> function of the <code>dplyr</code> package makes this really easy:</p>
<div class="sourceCode" id="cb12"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb12-1" data-line-number="1">data &lt;-<span class="st"> </span>data <span class="op">%&gt;%</span></a> <div class="sourceCode" id="cb12"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb12-1" data-line-number="1">data &lt;-<span class="st"> </span>data <span class="op">%&gt;%</span></a>
@ -437,14 +437,14 @@
<a class="sourceLine" id="cb14-18" data-line-number="18"><span class="co"># Pasteurella multocida (no changes)</span></a> <a class="sourceLine" id="cb14-18" data-line-number="18"><span class="co"># Pasteurella multocida (no changes)</span></a>
<a class="sourceLine" id="cb14-19" data-line-number="19"><span class="co"># Staphylococcus (no changes)</span></a> <a class="sourceLine" id="cb14-19" data-line-number="19"><span class="co"># Staphylococcus (no changes)</span></a>
<a class="sourceLine" id="cb14-20" data-line-number="20"><span class="co"># Streptococcus groups A, B, C, G (no changes)</span></a> <a class="sourceLine" id="cb14-20" data-line-number="20"><span class="co"># Streptococcus groups A, B, C, G (no changes)</span></a>
<a class="sourceLine" id="cb14-21" data-line-number="21"><span class="co"># Streptococcus pneumoniae (1,477 values changed)</span></a> <a class="sourceLine" id="cb14-21" data-line-number="21"><span class="co"># Streptococcus pneumoniae (1,545 values changed)</span></a>
<a class="sourceLine" id="cb14-22" data-line-number="22"><span class="co"># Viridans group streptococci (no changes)</span></a> <a class="sourceLine" id="cb14-22" data-line-number="22"><span class="co"># Viridans group streptococci (no changes)</span></a>
<a class="sourceLine" id="cb14-23" data-line-number="23"><span class="co"># </span></a> <a class="sourceLine" id="cb14-23" data-line-number="23"><span class="co"># </span></a>
<a class="sourceLine" id="cb14-24" data-line-number="24"><span class="co"># EUCAST Expert Rules, Intrinsic Resistance and Exceptional Phenotypes (v3.1, 2016)</span></a> <a class="sourceLine" id="cb14-24" data-line-number="24"><span class="co"># EUCAST Expert Rules, Intrinsic Resistance and Exceptional Phenotypes (v3.1, 2016)</span></a>
<a class="sourceLine" id="cb14-25" data-line-number="25"><span class="co"># Table 01: Intrinsic resistance in Enterobacteriaceae (1,306 values changed)</span></a> <a class="sourceLine" id="cb14-25" data-line-number="25"><span class="co"># Table 01: Intrinsic resistance in Enterobacteriaceae (1,309 values changed)</span></a>
<a class="sourceLine" id="cb14-26" data-line-number="26"><span class="co"># Table 02: Intrinsic resistance in non-fermentative Gram-negative bacteria (no changes)</span></a> <a class="sourceLine" id="cb14-26" data-line-number="26"><span class="co"># Table 02: Intrinsic resistance in non-fermentative Gram-negative bacteria (no changes)</span></a>
<a class="sourceLine" id="cb14-27" data-line-number="27"><span class="co"># Table 03: Intrinsic resistance in other Gram-negative bacteria (no changes)</span></a> <a class="sourceLine" id="cb14-27" data-line-number="27"><span class="co"># Table 03: Intrinsic resistance in other Gram-negative bacteria (no changes)</span></a>
<a class="sourceLine" id="cb14-28" data-line-number="28"><span class="co"># Table 04: Intrinsic resistance in Gram-positive bacteria (2,791 values changed)</span></a> <a class="sourceLine" id="cb14-28" data-line-number="28"><span class="co"># Table 04: Intrinsic resistance in Gram-positive bacteria (2,733 values changed)</span></a>
<a class="sourceLine" id="cb14-29" data-line-number="29"><span class="co"># Table 08: Interpretive rules for B-lactam agents and Gram-positive cocci (no changes)</span></a> <a class="sourceLine" id="cb14-29" data-line-number="29"><span class="co"># Table 08: Interpretive rules for B-lactam agents and Gram-positive cocci (no changes)</span></a>
<a class="sourceLine" id="cb14-30" data-line-number="30"><span class="co"># Table 09: Interpretive rules for B-lactam agents and Gram-negative rods (no changes)</span></a> <a class="sourceLine" id="cb14-30" data-line-number="30"><span class="co"># Table 09: Interpretive rules for B-lactam agents and Gram-negative rods (no changes)</span></a>
<a class="sourceLine" id="cb14-31" data-line-number="31"><span class="co"># Table 11: Interpretive rules for macrolides, lincosamides, and streptogramins (no changes)</span></a> <a class="sourceLine" id="cb14-31" data-line-number="31"><span class="co"># Table 11: Interpretive rules for macrolides, lincosamides, and streptogramins (no changes)</span></a>
@ -452,24 +452,24 @@
<a class="sourceLine" id="cb14-33" data-line-number="33"><span class="co"># Table 13: Interpretive rules for quinolones (no changes)</span></a> <a class="sourceLine" id="cb14-33" data-line-number="33"><span class="co"># Table 13: Interpretive rules for quinolones (no changes)</span></a>
<a class="sourceLine" id="cb14-34" data-line-number="34"><span class="co"># </span></a> <a class="sourceLine" id="cb14-34" data-line-number="34"><span class="co"># </span></a>
<a class="sourceLine" id="cb14-35" data-line-number="35"><span class="co"># Other rules</span></a> <a class="sourceLine" id="cb14-35" data-line-number="35"><span class="co"># Other rules</span></a>
<a class="sourceLine" id="cb14-36" data-line-number="36"><span class="co"># Non-EUCAST: amoxicillin/clav acid = S where ampicillin = S (2,203 values changed)</span></a> <a class="sourceLine" id="cb14-36" data-line-number="36"><span class="co"># Non-EUCAST: amoxicillin/clav acid = S where ampicillin = S (2,194 values changed)</span></a>
<a class="sourceLine" id="cb14-37" data-line-number="37"><span class="co"># Non-EUCAST: ampicillin = R where amoxicillin/clav acid = R (104 values changed)</span></a> <a class="sourceLine" id="cb14-37" data-line-number="37"><span class="co"># Non-EUCAST: ampicillin = R where amoxicillin/clav acid = R (121 values changed)</span></a>
<a class="sourceLine" id="cb14-38" data-line-number="38"><span class="co"># Non-EUCAST: piperacillin = R where piperacillin/tazobactam = R (no changes)</span></a> <a class="sourceLine" id="cb14-38" data-line-number="38"><span class="co"># Non-EUCAST: piperacillin = R where piperacillin/tazobactam = R (no changes)</span></a>
<a class="sourceLine" id="cb14-39" data-line-number="39"><span class="co"># Non-EUCAST: piperacillin/tazobactam = S where piperacillin = S (no changes)</span></a> <a class="sourceLine" id="cb14-39" data-line-number="39"><span class="co"># Non-EUCAST: piperacillin/tazobactam = S where piperacillin = S (no changes)</span></a>
<a class="sourceLine" id="cb14-40" data-line-number="40"><span class="co"># Non-EUCAST: trimethoprim = R where trimethoprim/sulfa = R (no changes)</span></a> <a class="sourceLine" id="cb14-40" data-line-number="40"><span class="co"># Non-EUCAST: trimethoprim = R where trimethoprim/sulfa = R (no changes)</span></a>
<a class="sourceLine" id="cb14-41" data-line-number="41"><span class="co"># Non-EUCAST: trimethoprim/sulfa = S where trimethoprim = S (no changes)</span></a> <a class="sourceLine" id="cb14-41" data-line-number="41"><span class="co"># Non-EUCAST: trimethoprim/sulfa = S where trimethoprim = S (no changes)</span></a>
<a class="sourceLine" id="cb14-42" data-line-number="42"><span class="co"># </span></a> <a class="sourceLine" id="cb14-42" data-line-number="42"><span class="co"># </span></a>
<a class="sourceLine" id="cb14-43" data-line-number="43"><span class="co"># --------------------------------------------------------------------------</span></a> <a class="sourceLine" id="cb14-43" data-line-number="43"><span class="co"># --------------------------------------------------------------------------</span></a>
<a class="sourceLine" id="cb14-44" data-line-number="44"><span class="co"># EUCAST rules affected 6,529 out of 20,000 rows, making a total of 7,881 edits</span></a> <a class="sourceLine" id="cb14-44" data-line-number="44"><span class="co"># EUCAST rules affected 6,489 out of 20,000 rows, making a total of 7,902 edits</span></a>
<a class="sourceLine" id="cb14-45" data-line-number="45"><span class="co"># =&gt; added 0 test results</span></a> <a class="sourceLine" id="cb14-45" data-line-number="45"><span class="co"># =&gt; added 0 test results</span></a>
<a class="sourceLine" id="cb14-46" data-line-number="46"><span class="co"># </span></a> <a class="sourceLine" id="cb14-46" data-line-number="46"><span class="co"># </span></a>
<a class="sourceLine" id="cb14-47" data-line-number="47"><span class="co"># =&gt; changed 7,881 test results</span></a> <a class="sourceLine" id="cb14-47" data-line-number="47"><span class="co"># =&gt; changed 7,902 test results</span></a>
<a class="sourceLine" id="cb14-48" data-line-number="48"><span class="co"># - 102 test results changed from S to I</span></a> <a class="sourceLine" id="cb14-48" data-line-number="48"><span class="co"># - 118 test results changed from S to I</span></a>
<a class="sourceLine" id="cb14-49" data-line-number="49"><span class="co"># - 4,800 test results changed from S to R</span></a> <a class="sourceLine" id="cb14-49" data-line-number="49"><span class="co"># - 4,776 test results changed from S to R</span></a>
<a class="sourceLine" id="cb14-50" data-line-number="50"><span class="co"># - 1,035 test results changed from I to S</span></a> <a class="sourceLine" id="cb14-50" data-line-number="50"><span class="co"># - 1,063 test results changed from I to S</span></a>
<a class="sourceLine" id="cb14-51" data-line-number="51"><span class="co"># - 291 test results changed from I to R</span></a> <a class="sourceLine" id="cb14-51" data-line-number="51"><span class="co"># - 318 test results changed from I to R</span></a>
<a class="sourceLine" id="cb14-52" data-line-number="52"><span class="co"># - 1,625 test results changed from R to S</span></a> <a class="sourceLine" id="cb14-52" data-line-number="52"><span class="co"># - 1,603 test results changed from R to S</span></a>
<a class="sourceLine" id="cb14-53" data-line-number="53"><span class="co"># - 28 test results changed from R to I</span></a> <a class="sourceLine" id="cb14-53" data-line-number="53"><span class="co"># - 24 test results changed from R to I</span></a>
<a class="sourceLine" id="cb14-54" data-line-number="54"><span class="co"># --------------------------------------------------------------------------</span></a> <a class="sourceLine" id="cb14-54" data-line-number="54"><span class="co"># --------------------------------------------------------------------------</span></a>
<a class="sourceLine" id="cb14-55" data-line-number="55"><span class="co"># </span></a> <a class="sourceLine" id="cb14-55" data-line-number="55"><span class="co"># </span></a>
<a class="sourceLine" id="cb14-56" data-line-number="56"><span class="co"># Use eucast_rules(..., verbose = TRUE) (on your original data) to get a data.frame with all specified edits instead.</span></a></code></pre></div> <a class="sourceLine" id="cb14-56" data-line-number="56"><span class="co"># Use eucast_rules(..., verbose = TRUE) (on your original data) to get a data.frame with all specified edits instead.</span></a></code></pre></div>
@ -497,8 +497,8 @@
<a class="sourceLine" id="cb16-3" data-line-number="3"><span class="co"># </span><span class="al">NOTE</span><span class="co">: Using column `bacteria` as input for `col_mo`.</span></a> <a class="sourceLine" id="cb16-3" data-line-number="3"><span class="co"># </span><span class="al">NOTE</span><span class="co">: Using column `bacteria` as input for `col_mo`.</span></a>
<a class="sourceLine" id="cb16-4" data-line-number="4"><span class="co"># </span><span class="al">NOTE</span><span class="co">: Using column `date` as input for `col_date`.</span></a> <a class="sourceLine" id="cb16-4" data-line-number="4"><span class="co"># </span><span class="al">NOTE</span><span class="co">: Using column `date` as input for `col_date`.</span></a>
<a class="sourceLine" id="cb16-5" data-line-number="5"><span class="co"># </span><span class="al">NOTE</span><span class="co">: Using column `patient_id` as input for `col_patient_id`.</span></a> <a class="sourceLine" id="cb16-5" data-line-number="5"><span class="co"># </span><span class="al">NOTE</span><span class="co">: Using column `patient_id` as input for `col_patient_id`.</span></a>
<a class="sourceLine" id="cb16-6" data-line-number="6"><span class="co"># =&gt; Found 5,674 first isolates (28.4% of total)</span></a></code></pre></div> <a class="sourceLine" id="cb16-6" data-line-number="6"><span class="co"># =&gt; Found 5,696 first isolates (28.5% of total)</span></a></code></pre></div>
<p>So only 28.4% 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 28.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>
<div class="sourceCode" id="cb17"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb17-1" data-line-number="1">data_1st &lt;-<span class="st"> </span>data <span class="op">%&gt;%</span><span class="st"> </span></a> <div class="sourceCode" id="cb17"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb17-1" data-line-number="1">data_1st &lt;-<span class="st"> </span>data <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb17-2" data-line-number="2"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span>(first <span class="op">==</span><span class="st"> </span><span class="ot">TRUE</span>)</a></code></pre></div> <a class="sourceLine" id="cb17-2" data-line-number="2"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span>(first <span class="op">==</span><span class="st"> </span><span class="ot">TRUE</span>)</a></code></pre></div>
<p>For future use, the above two syntaxes can be shortened with the <code><a href="../reference/first_isolate.html">filter_first_isolate()</a></code> function:</p> <p>For future use, the above two syntaxes can be shortened with the <code><a href="../reference/first_isolate.html">filter_first_isolate()</a></code> function:</p>
@ -508,7 +508,7 @@
<div id="first-weighted-isolates" class="section level2"> <div id="first-weighted-isolates" class="section level2">
<h2 class="hasAnchor"> <h2 class="hasAnchor">
<a href="#first-weighted-isolates" class="anchor"></a>First <em>weighted</em> isolates</h2> <a href="#first-weighted-isolates" class="anchor"></a>First <em>weighted</em> isolates</h2>
<p>We made a slight twist to the CLSI algorithm, to take into account the antimicrobial susceptibility profile. Have a look at all isolates of patient S8, sorted on date:</p> <p>We made a slight twist to the CLSI algorithm, to take into account the antimicrobial susceptibility profile. Have a look at all isolates of patient P1, sorted on date:</p>
<table class="table"> <table class="table">
<thead><tr class="header"> <thead><tr class="header">
<th align="center">isolate</th> <th align="center">isolate</th>
@ -524,19 +524,19 @@
<tbody> <tbody>
<tr class="odd"> <tr class="odd">
<td align="center">1</td> <td align="center">1</td>
<td align="center">2010-01-27</td> <td align="center">2010-01-26</td>
<td align="center">S8</td> <td align="center">P1</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_ESCHR_COLI</td>
<td align="center">I</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">R</td>
<td align="center">S</td>
<td align="center">TRUE</td> <td align="center">TRUE</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">2</td> <td align="center">2</td>
<td align="center">2010-06-01</td> <td align="center">2010-04-19</td>
<td align="center">S8</td> <td align="center">P1</td>
<td align="center">B_ESCHR_COLI</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>
@ -546,30 +546,30 @@
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">3</td> <td align="center">3</td>
<td align="center">2010-09-13</td> <td align="center">2010-04-24</td>
<td align="center">S8</td> <td align="center">P1</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_ESCHR_COLI</td>
<td align="center">I</td> <td align="center">R</td>
<td align="center">I</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">FALSE</td> <td align="center">FALSE</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">4</td> <td align="center">4</td>
<td align="center">2010-09-27</td> <td align="center">2010-06-11</td>
<td align="center">S8</td> <td align="center">P1</td>
<td align="center">B_ESCHR_COLI</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">R</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">R</td>
<td align="center">FALSE</td> <td align="center">FALSE</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">5</td> <td align="center">5</td>
<td align="center">2010-10-15</td> <td align="center">2010-11-24</td>
<td align="center">S8</td> <td align="center">P1</td>
<td align="center">B_ESCHR_COLI</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>
@ -579,8 +579,8 @@
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">6</td> <td align="center">6</td>
<td align="center">2010-12-25</td> <td align="center">2010-12-11</td>
<td align="center">S8</td> <td align="center">P1</td>
<td align="center">B_ESCHR_COLI</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">S</td>
@ -590,19 +590,19 @@
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">7</td> <td align="center">7</td>
<td align="center">2011-02-06</td> <td align="center">2010-12-23</td>
<td align="center">S8</td> <td align="center">P1</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_ESCHR_COLI</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">S</td>
<td align="center">S</td> <td align="center">FALSE</td>
<td align="center">S</td>
<td align="center">TRUE</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">8</td> <td align="center">8</td>
<td align="center">2011-03-27</td> <td align="center">2011-01-14</td>
<td align="center">S8</td> <td align="center">P1</td>
<td align="center">B_ESCHR_COLI</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">S</td>
@ -612,25 +612,25 @@
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">9</td> <td align="center">9</td>
<td align="center">2011-05-14</td> <td align="center">2011-01-19</td>
<td align="center">S8</td> <td align="center">P1</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_ESCHR_COLI</td>
<td align="center">S</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">S</td>
<td align="center">FALSE</td> <td align="center">FALSE</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">10</td> <td align="center">10</td>
<td align="center">2011-09-12</td> <td align="center">2011-01-26</td>
<td align="center">S8</td> <td align="center">P1</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">I</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">TRUE</td>
<td align="center">S</td>
<td align="center">FALSE</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -645,7 +645,7 @@
<a class="sourceLine" id="cb19-7" data-line-number="7"><span class="co"># </span><span class="al">NOTE</span><span class="co">: Using column `patient_id` as input for `col_patient_id`.</span></a> <a class="sourceLine" id="cb19-7" data-line-number="7"><span class="co"># </span><span class="al">NOTE</span><span class="co">: Using column `patient_id` as input for `col_patient_id`.</span></a>
<a class="sourceLine" id="cb19-8" data-line-number="8"><span class="co"># </span><span class="al">NOTE</span><span class="co">: Using column `keyab` as input for `col_keyantibiotics`. Use col_keyantibiotics = FALSE to prevent this.</span></a> <a class="sourceLine" id="cb19-8" data-line-number="8"><span class="co"># </span><span class="al">NOTE</span><span class="co">: Using column `keyab` as input for `col_keyantibiotics`. Use col_keyantibiotics = FALSE to prevent this.</span></a>
<a class="sourceLine" id="cb19-9" data-line-number="9"><span class="co"># [Criterion] Inclusion based on key antibiotics, ignoring I</span></a> <a class="sourceLine" id="cb19-9" data-line-number="9"><span class="co"># [Criterion] Inclusion based on key antibiotics, ignoring I</span></a>
<a class="sourceLine" id="cb19-10" data-line-number="10"><span class="co"># =&gt; Found 15,253 first weighted isolates (76.3% of total)</span></a></code></pre></div> <a class="sourceLine" id="cb19-10" data-line-number="10"><span class="co"># =&gt; Found 15,241 first weighted isolates (76.2% of total)</span></a></code></pre></div>
<table class="table"> <table class="table">
<thead><tr class="header"> <thead><tr class="header">
<th align="center">isolate</th> <th align="center">isolate</th>
@ -662,56 +662,56 @@
<tbody> <tbody>
<tr class="odd"> <tr class="odd">
<td align="center">1</td> <td align="center">1</td>
<td align="center">2010-01-27</td> <td align="center">2010-01-26</td>
<td align="center">S8</td> <td align="center">P1</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_ESCHR_COLI</td>
<td align="center">I</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">R</td>
<td align="center">S</td>
<td align="center">TRUE</td> <td align="center">TRUE</td>
<td align="center">TRUE</td> <td align="center">TRUE</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">2</td> <td align="center">2</td>
<td align="center">2010-06-01</td> <td align="center">2010-04-19</td>
<td align="center">S8</td> <td align="center">P1</td>
<td align="center">B_ESCHR_COLI</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">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">FALSE</td> <td align="center">FALSE</td>
<td align="center">FALSE</td> <td align="center">TRUE</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">3</td> <td align="center">3</td>
<td align="center">2010-09-13</td> <td align="center">2010-04-24</td>
<td align="center">S8</td> <td align="center">P1</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_ESCHR_COLI</td>
<td align="center">I</td> <td align="center">R</td>
<td align="center">I</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">FALSE</td> <td align="center">FALSE</td>
<td align="center">FALSE</td> <td align="center">TRUE</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">4</td> <td align="center">4</td>
<td align="center">2010-09-27</td> <td align="center">2010-06-11</td>
<td align="center">S8</td> <td align="center">P1</td>
<td align="center">B_ESCHR_COLI</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">R</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">R</td>
<td align="center">FALSE</td> <td align="center">FALSE</td>
<td align="center">TRUE</td> <td align="center">TRUE</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">5</td> <td align="center">5</td>
<td align="center">2010-10-15</td> <td align="center">2010-11-24</td>
<td align="center">S8</td> <td align="center">P1</td>
<td align="center">B_ESCHR_COLI</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>
@ -722,8 +722,8 @@
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">6</td> <td align="center">6</td>
<td align="center">2010-12-25</td> <td align="center">2010-12-11</td>
<td align="center">S8</td> <td align="center">P1</td>
<td align="center">B_ESCHR_COLI</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">S</td>
@ -734,35 +734,35 @@
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">7</td> <td align="center">7</td>
<td align="center">2011-02-06</td> <td align="center">2010-12-23</td>
<td align="center">S8</td> <td align="center">P1</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_ESCHR_COLI</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">S</td>
<td align="center">S</td> <td align="center">FALSE</td>
<td align="center">S</td>
<td align="center">TRUE</td>
<td align="center">TRUE</td> <td align="center">TRUE</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">8</td> <td align="center">8</td>
<td align="center">2011-03-27</td> <td align="center">2011-01-14</td>
<td align="center">S8</td> <td align="center">P1</td>
<td align="center">B_ESCHR_COLI</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">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">FALSE</td> <td align="center">FALSE</td>
<td align="center">FALSE</td> <td align="center">TRUE</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">9</td> <td align="center">9</td>
<td align="center">2011-05-14</td> <td align="center">2011-01-19</td>
<td align="center">S8</td> <td align="center">P1</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_ESCHR_COLI</td>
<td align="center">S</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">S</td>
<td align="center">FALSE</td> <td align="center">FALSE</td>
@ -770,23 +770,23 @@
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">10</td> <td align="center">10</td>
<td align="center">2011-09-12</td> <td align="center">2011-01-26</td>
<td align="center">S8</td> <td align="center">P1</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">I</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">TRUE</td>
<td align="center">S</td> <td align="center">TRUE</td>
<td align="center">FALSE</td>
<td align="center">FALSE</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<p>Instead of 2, now 6 isolates are flagged. In total, 76.3% of all isolates are marked first weighted - 47.9% more than when using the CLSI guideline. In real life, this novel algorithm will yield 5-10% more isolates than the classic CLSI guideline.</p> <p>Instead of 2, now 10 isolates are flagged. In total, 76.2% of all isolates are marked first weighted - 47.7% more than when using the CLSI guideline. In real life, this novel algorithm will yield 5-10% more isolates than the classic CLSI guideline.</p>
<p>As with <code><a href="../reference/first_isolate.html">filter_first_isolate()</a></code>, theres a shortcut for this new algorithm too:</p> <p>As with <code><a href="../reference/first_isolate.html">filter_first_isolate()</a></code>, theres a shortcut for this new algorithm too:</p>
<div class="sourceCode" id="cb20"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb20-1" data-line-number="1">data_1st &lt;-<span class="st"> </span>data <span class="op">%&gt;%</span><span class="st"> </span></a> <div class="sourceCode" id="cb20"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb20-1" data-line-number="1">data_1st &lt;-<span class="st"> </span>data <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb20-2" data-line-number="2"><span class="st"> </span><span class="kw"><a href="../reference/first_isolate.html">filter_first_weighted_isolate</a></span>()</a></code></pre></div> <a class="sourceLine" id="cb20-2" data-line-number="2"><span class="st"> </span><span class="kw"><a href="../reference/first_isolate.html">filter_first_weighted_isolate</a></span>()</a></code></pre></div>
<p>So we end up with 15,253 isolates for analysis.</p> <p>So we end up with 15,241 isolates for analysis.</p>
<p>We can remove unneeded columns:</p> <p>We can remove unneeded columns:</p>
<div class="sourceCode" id="cb21"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb21-1" data-line-number="1">data_1st &lt;-<span class="st"> </span>data_1st <span class="op">%&gt;%</span><span class="st"> </span></a> <div class="sourceCode" id="cb21"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb21-1" data-line-number="1">data_1st &lt;-<span class="st"> </span>data_1st <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb21-2" data-line-number="2"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span>(<span class="op">-</span><span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></span>(first, keyab))</a></code></pre></div> <a class="sourceLine" id="cb21-2" data-line-number="2"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span>(<span class="op">-</span><span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></span>(first, keyab))</a></code></pre></div>
@ -811,16 +811,16 @@
</tr></thead> </tr></thead>
<tbody> <tbody>
<tr class="odd"> <tr class="odd">
<td>2</td> <td>1</td>
<td align="center">2010-12-17</td> <td align="center">2015-05-08</td>
<td align="center">D2</td> <td align="center">P3</td>
<td align="center">Hospital D</td> <td align="center">Hospital A</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">I</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">F</td>
<td align="center">S</td>
<td align="center">M</td>
<td align="center">Gram-negative</td> <td align="center">Gram-negative</td>
<td align="center">Escherichia</td> <td align="center">Escherichia</td>
<td align="center">coli</td> <td align="center">coli</td>
@ -828,82 +828,82 @@
</tr> </tr>
<tr class="even"> <tr class="even">
<td>3</td> <td>3</td>
<td align="center">2016-07-05</td> <td align="center">2013-09-06</td>
<td align="center">L5</td> <td align="center">U9</td>
<td align="center">Hospital B</td> <td align="center">Hospital B</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_ESCHR_COLI</td>
<td align="center">I</td> <td align="center">R</td>
<td align="center">I</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">S</td>
<td align="center">F</td>
<td align="center">Gram-negative</td> <td align="center">Gram-negative</td>
<td align="center">Escherichia</td> <td align="center">Escherichia</td>
<td align="center">coli</td> <td align="center">coli</td>
<td align="center">TRUE</td> <td align="center">TRUE</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td>4</td> <td>5</td>
<td align="center">2016-12-23</td> <td align="center">2011-04-18</td>
<td align="center">C5</td> <td align="center">F4</td>
<td align="center">Hospital A</td> <td align="center">Hospital B</td>
<td align="center">B_KLBSL_PNMN</td> <td align="center">B_STRPT_PNMN</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">R</td> <td align="center">R</td>
<td align="center">S</td>
<td align="center">M</td> <td align="center">M</td>
<td align="center">Gram-negative</td> <td align="center">Gram-positive</td>
<td align="center">Klebsiella</td> <td align="center">Streptococcus</td>
<td align="center">pneumoniae</td> <td align="center">pneumoniae</td>
<td align="center">TRUE</td> <td align="center">TRUE</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td>5</td> <td>7</td>
<td align="center">2011-06-29</td> <td align="center">2016-10-10</td>
<td align="center">F3</td> <td align="center">S10</td>
<td align="center">Hospital A</td> <td align="center">Hospital D</td>
<td align="center">B_ESCHR_COLI</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">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">F</td>
<td align="center">Gram-negative</td> <td align="center">Gram-positive</td>
<td align="center">Escherichia</td> <td align="center">Staphylococcus</td>
<td align="center">coli</td> <td align="center">aureus</td>
<td align="center">TRUE</td> <td align="center">TRUE</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td>6</td> <td>8</td>
<td align="center">2011-07-01</td> <td align="center">2010-01-21</td>
<td align="center">N10</td> <td align="center">R3</td>
<td align="center">Hospital A</td> <td align="center">Hospital B</td>
<td align="center">B_ESCHR_COLI</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">R</td>
<td align="center">F</td> <td align="center">F</td>
<td align="center">Gram-negative</td> <td align="center">Gram-positive</td>
<td align="center">Escherichia</td> <td align="center">Streptococcus</td>
<td align="center">coli</td> <td align="center">pneumoniae</td>
<td align="center">TRUE</td> <td align="center">TRUE</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td>8</td> <td>9</td>
<td align="center">2010-01-02</td> <td align="center">2011-11-23</td>
<td align="center">X9</td> <td align="center">B7</td>
<td align="center">Hospital B</td> <td align="center">Hospital B</td>
<td align="center">B_ESCHR_COLI</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">S</td> <td align="center">R</td>
<td align="center">S</td> <td align="center">M</td>
<td align="center">S</td> <td align="center">Gram-positive</td>
<td align="center">F</td> <td align="center">Streptococcus</td>
<td align="center">Gram-negative</td> <td align="center">pneumoniae</td>
<td align="center">Escherichia</td>
<td align="center">coli</td>
<td align="center">TRUE</td> <td align="center">TRUE</td>
</tr> </tr>
</tbody> </tbody>
@ -925,7 +925,7 @@
<div class="sourceCode" id="cb24"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb24-1" data-line-number="1">data_1st <span class="op">%&gt;%</span><span class="st"> </span><span class="kw"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span>(genus, species)</a></code></pre></div> <div class="sourceCode" id="cb24"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb24-1" data-line-number="1">data_1st <span class="op">%&gt;%</span><span class="st"> </span><span class="kw"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span>(genus, species)</a></code></pre></div>
<p><strong>Frequency table</strong></p> <p><strong>Frequency table</strong></p>
<p>Class: character<br> <p>Class: character<br>
Length: 15,253 (of which NA: 0 = 0%)<br> Length: 15,241 (of which NA: 0 = 0%)<br>
Unique: 4</p> Unique: 4</p>
<p>Shortest: 16<br> <p>Shortest: 16<br>
Longest: 24</p> Longest: 24</p>
@ -942,33 +942,33 @@ Longest: 24</p>
<tr class="odd"> <tr class="odd">
<td align="left">1</td> <td align="left">1</td>
<td align="left">Escherichia coli</td> <td align="left">Escherichia coli</td>
<td align="right">7,529</td> <td align="right">7,593</td>
<td align="right">49.36%</td> <td align="right">49.82%</td>
<td align="right">7,529</td> <td align="right">7,593</td>
<td align="right">49.36%</td> <td align="right">49.82%</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="left">2</td> <td align="left">2</td>
<td align="left">Staphylococcus aureus</td> <td align="left">Staphylococcus aureus</td>
<td align="right">3,765</td> <td align="right">3,734</td>
<td align="right">24.68%</td> <td align="right">24.50%</td>
<td align="right">11,294</td> <td align="right">11,327</td>
<td align="right">74.04%</td> <td align="right">74.32%</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="left">3</td> <td align="left">3</td>
<td align="left">Streptococcus pneumoniae</td> <td align="left">Streptococcus pneumoniae</td>
<td align="right">2,350</td> <td align="right">2,327</td>
<td align="right">15.41%</td> <td align="right">15.27%</td>
<td align="right">13,644</td> <td align="right">13,654</td>
<td align="right">89.45%</td> <td align="right">89.59%</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="left">4</td> <td align="left">4</td>
<td align="left">Klebsiella pneumoniae</td> <td align="left">Klebsiella pneumoniae</td>
<td align="right">1,609</td> <td align="right">1,587</td>
<td align="right">10.55%</td> <td align="right">10.41%</td>
<td align="right">15,253</td> <td align="right">15,241</td>
<td align="right">100.00%</td> <td align="right">100.00%</td>
</tr> </tr>
</tbody> </tbody>
@ -980,7 +980,7 @@ Longest: 24</p>
<p>The functions <code><a href="../reference/proportion.html">resistance()</a></code> and <code><a href="../reference/proportion.html">susceptibility()</a></code> can be used to calculate antimicrobial resistance or susceptibility. For more specific analyses, the functions <code><a href="../reference/proportion.html">proportion_S()</a></code>, <code><a href="../reference/proportion.html">proportion_SI()</a></code>, <code><a href="../reference/proportion.html">proportion_I()</a></code>, <code><a href="../reference/proportion.html">proportion_IR()</a></code> and <code><a href="../reference/proportion.html">proportion_R()</a></code> can be used to determine the proportion of a specific antimicrobial outcome.</p> <p>The functions <code><a href="../reference/proportion.html">resistance()</a></code> and <code><a href="../reference/proportion.html">susceptibility()</a></code> can be used to calculate antimicrobial resistance or susceptibility. For more specific analyses, the functions <code><a href="../reference/proportion.html">proportion_S()</a></code>, <code><a href="../reference/proportion.html">proportion_SI()</a></code>, <code><a href="../reference/proportion.html">proportion_I()</a></code>, <code><a href="../reference/proportion.html">proportion_IR()</a></code> and <code><a href="../reference/proportion.html">proportion_R()</a></code> can be used to determine the proportion of a specific antimicrobial outcome.</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> <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="cb25"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb25-1" data-line-number="1">data_1st <span class="op">%&gt;%</span><span class="st"> </span><span class="kw"><a href="../reference/proportion.html">resistance</a></span>(AMX)</a> <div class="sourceCode" id="cb25"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb25-1" data-line-number="1">data_1st <span class="op">%&gt;%</span><span class="st"> </span><span class="kw"><a href="../reference/proportion.html">resistance</a></span>(AMX)</a>
<a class="sourceLine" id="cb25-2" data-line-number="2"><span class="co"># [1] 0.4715794</span></a></code></pre></div> <a class="sourceLine" id="cb25-2" data-line-number="2"><span class="co"># [1] 0.4724099</span></a></code></pre></div>
<p>Or can be used in conjuction 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> <p>Or can be used in conjuction 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="cb26"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb26-1" data-line-number="1">data_1st <span class="op">%&gt;%</span><span class="st"> </span></a> <div class="sourceCode" id="cb26"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb26-1" data-line-number="1">data_1st <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb26-2" data-line-number="2"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span>(hospital) <span class="op">%&gt;%</span><span class="st"> </span></a> <a class="sourceLine" id="cb26-2" data-line-number="2"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span>(hospital) <span class="op">%&gt;%</span><span class="st"> </span></a>
@ -993,19 +993,19 @@ Longest: 24</p>
<tbody> <tbody>
<tr class="odd"> <tr class="odd">
<td align="center">Hospital A</td> <td align="center">Hospital A</td>
<td align="center">0.4697103</td> <td align="center">0.4637681</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">Hospital B</td> <td align="center">Hospital B</td>
<td align="center">0.4727821</td> <td align="center">0.4776811</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">Hospital C</td> <td align="center">Hospital C</td>
<td align="center">0.4739112</td> <td align="center">0.4811697</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">Hospital D</td> <td align="center">Hospital D</td>
<td align="center">0.4705116</td> <td align="center">0.4694820</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -1023,23 +1023,23 @@ Longest: 24</p>
<tbody> <tbody>
<tr class="odd"> <tr class="odd">
<td align="center">Hospital A</td> <td align="center">Hospital A</td>
<td align="center">0.4697103</td> <td align="center">0.4637681</td>
<td align="center">4556</td> <td align="center">4554</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">Hospital B</td> <td align="center">Hospital B</td>
<td align="center">0.4727821</td> <td align="center">0.4776811</td>
<td align="center">5309</td> <td align="center">5399</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">Hospital C</td> <td align="center">Hospital C</td>
<td align="center">0.4739112</td> <td align="center">0.4811697</td>
<td align="center">2319</td> <td align="center">2257</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">Hospital D</td> <td align="center">Hospital D</td>
<td align="center">0.4705116</td> <td align="center">0.4694820</td>
<td align="center">3069</td> <td align="center">3031</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -1059,27 +1059,27 @@ Longest: 24</p>
<tbody> <tbody>
<tr class="odd"> <tr class="odd">
<td align="center">Escherichia</td> <td align="center">Escherichia</td>
<td align="center">0.9246912</td> <td align="center">0.9212433</td>
<td align="center">0.8918847</td> <td align="center">0.8984591</td>
<td align="center">0.9929606</td> <td align="center">0.9927565</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">Klebsiella</td> <td align="center">Klebsiella</td>
<td align="center">0.8309509</td> <td align="center">0.8298677</td>
<td align="center">0.9030454</td> <td align="center">0.8897290</td>
<td align="center">0.9869484</td> <td align="center">0.9836169</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">Staphylococcus</td> <td align="center">Staphylococcus</td>
<td align="center">0.9301461</td> <td align="center">0.9290305</td>
<td align="center">0.9189907</td> <td align="center">0.9258168</td>
<td align="center">0.9933599</td> <td align="center">0.9946438</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">Streptococcus</td> <td align="center">Streptococcus</td>
<td align="center">0.6251064</td> <td align="center">0.6067899</td>
<td align="center">0.0000000</td> <td align="center">0.0000000</td>
<td align="center">0.6251064</td> <td align="center">0.6067899</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 83 KiB

View File

@ -41,7 +41,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <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">0.8.0.9021</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9029</span>
</span> </span>
</div> </div>
@ -187,7 +187,7 @@
<h1>How to apply EUCAST rules</h1> <h1>How to apply EUCAST rules</h1>
<h4 class="author">Matthijs S. Berends</h4> <h4 class="author">Matthijs S. Berends</h4>
<h4 class="date">09 November 2019</h4> <h4 class="date">10 November 2019</h4>
<div class="hidden name"><code>EUCAST.Rmd</code></div> <div class="hidden name"><code>EUCAST.Rmd</code></div>

View File

@ -41,7 +41,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <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">0.8.0.9021</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9029</span>
</span> </span>
</div> </div>
@ -187,7 +187,7 @@
<h1>How to determine multi-drug resistance (MDR)</h1> <h1>How to determine multi-drug resistance (MDR)</h1>
<h4 class="author">Matthijs S. Berends</h4> <h4 class="author">Matthijs S. Berends</h4>
<h4 class="date">09 November 2019</h4> <h4 class="date">10 November 2019</h4>
<div class="hidden name"><code>MDR.Rmd</code></div> <div class="hidden name"><code>MDR.Rmd</code></div>
@ -237,7 +237,7 @@ The German national guideline - Mueller et al. (2015) Antimicrobial Resistance a
<a class="sourceLine" id="cb2-4" data-line-number="4"><span class="co"># </span><span class="al">NOTE</span><span class="co">: Using column `mo` as input for `col_mo`.</span></a> <a class="sourceLine" id="cb2-4" data-line-number="4"><span class="co"># </span><span class="al">NOTE</span><span class="co">: Using column `mo` as input for `col_mo`.</span></a>
<a class="sourceLine" id="cb2-5" data-line-number="5"><span class="co"># </span><span class="al">NOTE</span><span class="co">: Auto-guessing columns suitable for analysis...OK.</span></a> <a class="sourceLine" id="cb2-5" data-line-number="5"><span class="co"># </span><span class="al">NOTE</span><span class="co">: Auto-guessing columns suitable for analysis...OK.</span></a>
<a class="sourceLine" id="cb2-6" data-line-number="6"><span class="co"># </span><span class="al">NOTE</span><span class="co">: Reliability will be improved if these antimicrobial results would be available too: SAM (ampicillin/sulbactam), ATM (aztreonam), CTT (cefotetan), CPT (ceftaroline), DAP (daptomycin), DOR (doripenem), ETP (ertapenem), FUS (fusidic acid), GEH (gentamicin-high), LVX (levofloxacin), MNO (minocycline), NET (netilmicin), PLB (polymyxin B), QDA (quinupristin/dalfopristin), STH (streptomycin-high), TLV (telavancin), TCC (ticarcillin/clavulanic acid)</span></a> <a class="sourceLine" id="cb2-6" data-line-number="6"><span class="co"># </span><span class="al">NOTE</span><span class="co">: Reliability will be improved if these antimicrobial results would be available too: SAM (ampicillin/sulbactam), ATM (aztreonam), CTT (cefotetan), CPT (ceftaroline), DAP (daptomycin), DOR (doripenem), ETP (ertapenem), FUS (fusidic acid), GEH (gentamicin-high), LVX (levofloxacin), MNO (minocycline), NET (netilmicin), PLB (polymyxin B), QDA (quinupristin/dalfopristin), STH (streptomycin-high), TLV (telavancin), TCC (ticarcillin/clavulanic acid)</span></a>
<a class="sourceLine" id="cb2-7" data-line-number="7"><span class="co"># Table 1 - S. aureus ... OK</span></a> <a class="sourceLine" id="cb2-7" data-line-number="7"><span class="co"># Table 1 - Staphylococcus aureus ... OK</span></a>
<a class="sourceLine" id="cb2-8" data-line-number="8"><span class="co"># Table 2 - Enterococcus spp. ... OK</span></a> <a class="sourceLine" id="cb2-8" data-line-number="8"><span class="co"># Table 2 - Enterococcus spp. ... OK</span></a>
<a class="sourceLine" id="cb2-9" data-line-number="9"><span class="co"># Table 3 - Enterobacteriaceae ... OK</span></a> <a class="sourceLine" id="cb2-9" data-line-number="9"><span class="co"># Table 3 - Enterobacteriaceae ... OK</span></a>
<a class="sourceLine" id="cb2-10" data-line-number="10"><span class="co"># Table 4 - Pseudomonas aeruginosa ... OK</span></a> <a class="sourceLine" id="cb2-10" data-line-number="10"><span class="co"># Table 4 - Pseudomonas aeruginosa ... OK</span></a>
@ -306,19 +306,19 @@ Unique: 2</p>
<p>The data set now looks like this:</p> <p>The data set now looks like this:</p>
<div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb5-1" data-line-number="1"><span class="kw"><a href="https://rdrr.io/r/utils/head.html">head</a></span>(my_TB_data)</a> <div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb5-1" data-line-number="1"><span class="kw"><a href="https://rdrr.io/r/utils/head.html">head</a></span>(my_TB_data)</a>
<a class="sourceLine" id="cb5-2" data-line-number="2"><span class="co"># rifampicin isoniazid gatifloxacin ethambutol pyrazinamide moxifloxacin</span></a> <a class="sourceLine" id="cb5-2" data-line-number="2"><span class="co"># rifampicin isoniazid gatifloxacin ethambutol pyrazinamide moxifloxacin</span></a>
<a class="sourceLine" id="cb5-3" data-line-number="3"><span class="co"># 1 S S R R S R</span></a> <a class="sourceLine" id="cb5-3" data-line-number="3"><span class="co"># 1 S R S R I R</span></a>
<a class="sourceLine" id="cb5-4" data-line-number="4"><span class="co"># 2 S R S S R S</span></a> <a class="sourceLine" id="cb5-4" data-line-number="4"><span class="co"># 2 I S R I R R</span></a>
<a class="sourceLine" id="cb5-5" data-line-number="5"><span class="co"># 3 R S R S R R</span></a> <a class="sourceLine" id="cb5-5" data-line-number="5"><span class="co"># 3 S R S S S R</span></a>
<a class="sourceLine" id="cb5-6" data-line-number="6"><span class="co"># 4 S S R S S I</span></a> <a class="sourceLine" id="cb5-6" data-line-number="6"><span class="co"># 4 R S S S R S</span></a>
<a class="sourceLine" id="cb5-7" data-line-number="7"><span class="co"># 5 R R S R S S</span></a> <a class="sourceLine" id="cb5-7" data-line-number="7"><span class="co"># 5 S S S S I R</span></a>
<a class="sourceLine" id="cb5-8" data-line-number="8"><span class="co"># 6 S S R R R S</span></a> <a class="sourceLine" id="cb5-8" data-line-number="8"><span class="co"># 6 I S R I S S</span></a>
<a class="sourceLine" id="cb5-9" data-line-number="9"><span class="co"># kanamycin</span></a> <a class="sourceLine" id="cb5-9" data-line-number="9"><span class="co"># kanamycin</span></a>
<a class="sourceLine" id="cb5-10" data-line-number="10"><span class="co"># 1 S</span></a> <a class="sourceLine" id="cb5-10" data-line-number="10"><span class="co"># 1 S</span></a>
<a class="sourceLine" id="cb5-11" data-line-number="11"><span class="co"># 2 S</span></a> <a class="sourceLine" id="cb5-11" data-line-number="11"><span class="co"># 2 R</span></a>
<a class="sourceLine" id="cb5-12" data-line-number="12"><span class="co"># 3 R</span></a> <a class="sourceLine" id="cb5-12" data-line-number="12"><span class="co"># 3 R</span></a>
<a class="sourceLine" id="cb5-13" data-line-number="13"><span class="co"># 4 R</span></a> <a class="sourceLine" id="cb5-13" data-line-number="13"><span class="co"># 4 S</span></a>
<a class="sourceLine" id="cb5-14" data-line-number="14"><span class="co"># 5 S</span></a> <a class="sourceLine" id="cb5-14" data-line-number="14"><span class="co"># 5 S</span></a>
<a class="sourceLine" id="cb5-15" data-line-number="15"><span class="co"># 6 R</span></a></code></pre></div> <a class="sourceLine" id="cb5-15" data-line-number="15"><span class="co"># 6 S</span></a></code></pre></div>
<p>We can now add the interpretation of MDR-TB to our data set. You can use:</p> <p>We can now add the interpretation of MDR-TB to our data set. You can use:</p>
<div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb6-1" data-line-number="1"><span class="kw"><a href="../reference/mdro.html">mdro</a></span>(my_TB_data, <span class="dt">guideline =</span> <span class="st">"TB"</span>)</a></code></pre></div> <div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb6-1" data-line-number="1"><span class="kw"><a href="../reference/mdro.html">mdro</a></span>(my_TB_data, <span class="dt">guideline =</span> <span class="st">"TB"</span>)</a></code></pre></div>
<p>or its shortcut <code><a href="../reference/mdro.html">mdr_tb()</a></code>:</p> <p>or its shortcut <code><a href="../reference/mdro.html">mdr_tb()</a></code>:</p>
@ -335,7 +335,7 @@ Unique: 2</p>
<a class="sourceLine" id="cb7-11" data-line-number="11"><span class="co"># Author: WHO (World Health Organization)</span></a> <a class="sourceLine" id="cb7-11" data-line-number="11"><span class="co"># Author: WHO (World Health Organization)</span></a>
<a class="sourceLine" id="cb7-12" data-line-number="12"><span class="co"># Source: https://www.who.int/tb/publications/pmdt_companionhandbook/en/</span></a> <a class="sourceLine" id="cb7-12" data-line-number="12"><span class="co"># Source: https://www.who.int/tb/publications/pmdt_companionhandbook/en/</span></a>
<a class="sourceLine" id="cb7-13" data-line-number="13"><span class="co"># </span></a> <a class="sourceLine" id="cb7-13" data-line-number="13"><span class="co"># </span></a>
<a class="sourceLine" id="cb7-14" data-line-number="14"><span class="co"># =&gt; Found 4371 MDROs out of 5000 tested isolates (87.4%)</span></a></code></pre></div> <a class="sourceLine" id="cb7-14" data-line-number="14"><span class="co"># =&gt; Found 4320 MDROs out of 5000 tested isolates (86.4%)</span></a></code></pre></div>
<p>Create a frequency table of the results:</p> <p>Create a frequency table of the results:</p>
<div class="sourceCode" id="cb8"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb8-1" data-line-number="1"><span class="kw"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span>(my_TB_data<span class="op">$</span>mdr)</a></code></pre></div> <div class="sourceCode" id="cb8"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb8-1" data-line-number="1"><span class="kw"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span>(my_TB_data<span class="op">$</span>mdr)</a></code></pre></div>
<p><strong>Frequency table</strong></p> <p><strong>Frequency table</strong></p>
@ -356,40 +356,40 @@ Unique: 5</p>
<tr class="odd"> <tr class="odd">
<td align="left">1</td> <td align="left">1</td>
<td align="left">Mono-resistant</td> <td align="left">Mono-resistant</td>
<td align="right">3301</td> <td align="right">3243</td>
<td align="right">66.02%</td> <td align="right">64.86%</td>
<td align="right">3301</td> <td align="right">3243</td>
<td align="right">66.02%</td> <td align="right">64.86%</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="left">2</td> <td align="left">2</td>
<td align="left">Negative</td> <td align="left">Negative</td>
<td align="right">629</td> <td align="right">680</td>
<td align="right">12.58%</td> <td align="right">13.60%</td>
<td align="right">3930</td> <td align="right">3923</td>
<td align="right">78.60%</td> <td align="right">78.46%</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="left">3</td> <td align="left">3</td>
<td align="left">Multi-drug-resistant</td> <td align="left">Multi-drug-resistant</td>
<td align="right">596</td> <td align="right">587</td>
<td align="right">11.92%</td> <td align="right">11.74%</td>
<td align="right">4526</td> <td align="right">4510</td>
<td align="right">90.52%</td> <td align="right">90.20%</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="left">4</td> <td align="left">4</td>
<td align="left">Poly-resistant</td> <td align="left">Poly-resistant</td>
<td align="right">282</td> <td align="right">302</td>
<td align="right">5.64%</td> <td align="right">6.04%</td>
<td align="right">4808</td> <td align="right">4812</td>
<td align="right">96.16%</td> <td align="right">96.24%</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="left">5</td> <td align="left">5</td>
<td align="left">Extensively drug-resistant</td> <td align="left">Extensively drug-resistant</td>
<td align="right">192</td> <td align="right">188</td>
<td align="right">3.84%</td> <td align="right">3.76%</td>
<td align="right">5000</td> <td align="right">5000</td>
<td align="right">100.00%</td> <td align="right">100.00%</td>
</tr> </tr>

View File

@ -41,7 +41,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <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">0.8.0.9021</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9029</span>
</span> </span>
</div> </div>
@ -187,7 +187,7 @@
<h1>How to work with WHONET data</h1> <h1>How to work with WHONET data</h1>
<h4 class="author">Matthijs S. Berends</h4> <h4 class="author">Matthijs S. Berends</h4>
<h4 class="date">09 November 2019</h4> <h4 class="date">10 November 2019</h4>
<div class="hidden name"><code>WHONET.Rmd</code></div> <div class="hidden name"><code>WHONET.Rmd</code></div>

View File

@ -84,7 +84,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <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">0.8.0.9028</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9029</span>
</span> </span>
</div> </div>

View File

@ -84,7 +84,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="index.html">AMR (for R)</a> <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">0.8.0.9028</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9029</span>
</span> </span>
</div> </div>

View File

@ -45,7 +45,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="index.html">AMR (for R)</a> <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">0.8.0.9028</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9029</span>
</span> </span>
</div> </div>

View File

@ -84,7 +84,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <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">0.8.0.9028</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9029</span>
</span> </span>
</div> </div>
@ -231,9 +231,9 @@
</div> </div>
<div id="amr-0-8-0-9028" class="section level1"> <div id="amr-0-8-0-9029" class="section level1">
<h1 class="page-header"> <h1 class="page-header">
<a href="#amr-0-8-0-9028" class="anchor"></a>AMR 0.8.0.9028<small> Unreleased </small> <a href="#amr-0-8-0-9029" class="anchor"></a>AMR 0.8.0.9029<small> Unreleased </small>
</h1> </h1>
<p><small>Last updated: 10-Nov-2019</small></p> <p><small>Last updated: 10-Nov-2019</small></p>
<div id="new" class="section level3"> <div id="new" class="section level3">
@ -253,7 +253,7 @@
<h3 class="hasAnchor"> <h3 class="hasAnchor">
<a href="#changes" class="anchor"></a>Changes</h3> <a href="#changes" class="anchor"></a>Changes</h3>
<ul> <ul>
<li>Removed previously deprecated function <code><a href="../reference/as.rsi.html">as.rsi()</a></code> - this function was replaced by <code><a href="../reference/ab_property.html">ab_atc()</a></code> <li>Removed previously deprecated function <code>as.atc()</code> - this function was replaced by <code><a href="../reference/ab_property.html">ab_atc()</a></code>
</li> </li>
<li>Renamed all <code>portion_*</code> functions to <code>proportion_*</code>. All <code>portion_*</code> functions are still available as deprecated functions, and will return a warning when used.</li> <li>Renamed all <code>portion_*</code> functions to <code>proportion_*</code>. All <code>portion_*</code> functions are still available as deprecated functions, and will return a warning when used.</li>
<li>When running <code><a href="../reference/as.rsi.html">as.rsi()</a></code> over a data set, it will now print the guideline that will be used if it is not specified by the user</li> <li>When running <code><a href="../reference/as.rsi.html">as.rsi()</a></code> over a data set, it will now print the guideline that will be used if it is not specified by the user</li>
@ -1337,7 +1337,7 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
<div id="tocnav"> <div id="tocnav">
<h2>Contents</h2> <h2>Contents</h2>
<ul class="nav nav-pills nav-stacked"> <ul class="nav nav-pills nav-stacked">
<li><a href="#amr-0-8-0-9028">0.8.0.9028</a></li> <li><a href="#amr-0-8-0-9029">0.8.0.9029</a></li>
<li><a href="#amr-0-8-0">0.8.0</a></li> <li><a href="#amr-0-8-0">0.8.0</a></li>
<li><a href="#amr-0-7-1">0.7.1</a></li> <li><a href="#amr-0-7-1">0.7.1</a></li>
<li><a href="#amr-0-7-0">0.7.0</a></li> <li><a href="#amr-0-7-0">0.7.0</a></li>

View File

@ -85,7 +85,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <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">0.8.0.9027</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9029</span>
</span> </span>
</div> </div>

View File

@ -85,7 +85,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <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">0.8.0.9027</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9029</span>
</span> </span>
</div> </div>
@ -272,7 +272,8 @@ m.s.berends [at] umcg [dot] nl <br />
Department of Medical Microbiology, University of Groningen <br /> Department of Medical Microbiology, University of Groningen <br />
University Medical Center Groningen <br /> University Medical Center Groningen <br />
Post Office Box 30001 <br /> Post Office Box 30001 <br />
9700 RB Groningen</p> 9700 RB Groningen
The Netherlands</p>
<p>If you have found a bug, please file a new issue at: <br /> <p>If you have found a bug, please file a new issue at: <br />
<a href='https://gitlab.com/msberends/AMR/issues'>https://gitlab.com/msberends/AMR/issues</a></p> <a href='https://gitlab.com/msberends/AMR/issues'>https://gitlab.com/msberends/AMR/issues</a></p>

View File

@ -85,7 +85,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <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">0.8.0.9027</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9029</span>
</span> </span>
</div> </div>
@ -306,7 +306,7 @@
</ul> </ul>
<p>Exposure is a function of how the mode of administration, dose, dosing interval, infusion time, as well as distribution and excretion of the antimicrobial agent will influence the infecting organism at the site of infection.</p> <p>Exposure is a function of how the mode of administration, dose, dosing interval, infusion time, as well as distribution and excretion of the antimicrobial agent will influence the infecting organism at the site of infection.</p>
<p>This AMR package honours this new insight. Use <code><a href='proportion.html'>susceptibility</a></code> (equal to <code><a href='proportion.html'>proportion_SI</a></code>) to determine antimicrobial susceptibility and <code><a href='count.html'>count_susceptible</a></code> (equal to <code><a href='count.html'>count_SI</a></code>) to count susceptible isolates.</p> <p>This AMR package honours this new insight. Use <code><a href='proportion.html'>susceptibility</a>()</code> (equal to <code><a href='proportion.html'>proportion_SI</a>()</code>) to determine antimicrobial susceptibility and <code><a href='count.html'>count_susceptible</a>()</code> (equal to <code><a href='count.html'>count_SI</a>()</code>) to count susceptible isolates.</p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2> <h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>

View File

@ -85,7 +85,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <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">0.8.0.9027</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9029</span>
</span> </span>
</div> </div>

View File

@ -52,7 +52,7 @@
<meta property="og:title" content="Count isolates — count" /> <meta property="og:title" content="Count isolates — count" />
<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 dplyrs summarise and support grouped variables, see Examples. <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 dplyrs summarise and support grouped variables, see Examples.
count_resistant should be used to count resistant isolates, count_susceptible should be used to count susceptible isolates." /> count_resistant() should be used to count resistant isolates, count_susceptible() should be used to count susceptible isolates." />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" /> <meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" /> <meta name="twitter:card" content="summary" />
@ -86,7 +86,7 @@ count_resistant should be used to count resistant isolates, count_susceptible sh
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <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">0.8.0.9027</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9029</span>
</span> </span>
</div> </div>
@ -236,7 +236,7 @@ count_resistant should be used to count resistant isolates, count_susceptible sh
<div class="ref-description"> <div class="ref-description">
<p>These functions can be used to count resistant/susceptible microbial isolates. All functions support quasiquotation with pipes, can be used in <code>dplyr</code>s <code><a href='https://dplyr.tidyverse.org/reference/summarise.html'>summarise</a></code> and support grouped variables, see <em>Examples</em>.</p> <p>These functions can be used to count resistant/susceptible microbial isolates. All functions support quasiquotation with pipes, can be used in <code>dplyr</code>s <code><a href='https://dplyr.tidyverse.org/reference/summarise.html'>summarise</a></code> and support grouped variables, see <em>Examples</em>.</p>
<p><code>count_resistant</code> should be used to count resistant isolates, <code>count_susceptible</code> should be used to count susceptible isolates.<br /></p> <p><code>count_resistant()</code> should be used to count resistant isolates, <code>count_susceptible()</code> should be used to count susceptible isolates.<br /></p>
</div> </div>
<pre class="usage"><span class='fu'>count_resistant</span>(<span class='no'>...</span>, <span class='kw'>only_all_tested</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>) <pre class="usage"><span class='fu'>count_resistant</span>(<span class='no'>...</span>, <span class='kw'>only_all_tested</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)
@ -299,9 +299,9 @@ count_resistant should be used to count resistant isolates, count_susceptible sh
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2> <h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
<p>These functions are meant to count isolates. Use the <code><a href='proportion.html'>resistance</a></code>/<code><a href='proportion.html'>susceptibility</a></code> functions to calculate microbial resistance/susceptibility.</p> <p>These functions are meant to count isolates. Use the <code><a href='proportion.html'>resistance</a></code>/<code><a href='proportion.html'>susceptibility</a></code> functions to calculate microbial resistance/susceptibility.</p>
<p>The function <code>count_resistant</code> is equal to the function <code>count_R</code>. The function <code>count_susceptible</code> is equal to the function <code>count_SI</code>.</p> <p>The function <code>count_resistant()</code> is equal to the function <code>count_R()</code>. The function <code>count_susceptible()</code> is equal to the function <code>count_SI()</code>.</p>
<p>The function <code>n_rsi</code> is an alias of <code>count_all</code>. They can be used to count all available isolates, i.e. where all input antibiotics have an available result (S, I or R). Their use is equal to <code><a href='https://dplyr.tidyverse.org/reference/n_distinct.html'>n_distinct</a></code>. Their function is equal to <code>count_susceptible(...) + count_resistant(...)</code>.</p> <p>The function <code>n_rsi()</code> is an alias of <code>count_all()</code>. They can be used to count all available isolates, i.e. where all input antibiotics have an available result (S, I or R). Their use is equal to <code><a href='https://dplyr.tidyverse.org/reference/n_distinct.html'>n_distinct</a>()</code>. Their function is equal to <code>count_susceptible(...) + count_resistant(...)</code>.</p>
<p>The function <code>count_df</code> takes any variable from <code>data</code> that has an <code>"rsi"</code> class (created with <code><a href='as.rsi.html'>as.rsi</a></code>) and counts the number of S's, I's and R's. The function <code>rsi_df</code> works exactly like <code>count_df</code>, but adds the percentage of S, I and R.</p> <p>The function <code>count_df()</code> takes any variable from <code>data</code> that has an <code>"rsi"</code> class (created with <code><a href='as.rsi.html'>as.rsi</a>()</code>) and counts the number of S's, I's and R's. The function <code><a href='proportion.html'>rsi_df()</a></code> works exactly like <code>count_df()</code>, but adds the percentage of S, I and R.</p>
<h2 class="hasAnchor" id="interpretation-of-s-i-and-r"><a class="anchor" href="#interpretation-of-s-i-and-r"></a>Interpretation of S, I and R</h2> <h2 class="hasAnchor" id="interpretation-of-s-i-and-r"><a class="anchor" href="#interpretation-of-s-i-and-r"></a>Interpretation of S, I and R</h2>
@ -314,7 +314,7 @@ count_resistant should be used to count resistant isolates, count_susceptible sh
</ul> </ul>
<p>Exposure is a function of how the mode of administration, dose, dosing interval, infusion time, as well as distribution and excretion of the antimicrobial agent will influence the infecting organism at the site of infection.</p> <p>Exposure is a function of how the mode of administration, dose, dosing interval, infusion time, as well as distribution and excretion of the antimicrobial agent will influence the infecting organism at the site of infection.</p>
<p>This AMR package honours this new insight. Use <code><a href='proportion.html'>susceptibility</a></code> (equal to <code><a href='proportion.html'>proportion_SI</a></code>) to determine antimicrobial susceptibility and <code>count_susceptible</code> (equal to <code>count_SI</code>) to count susceptible isolates.</p> <p>This AMR package honours this new insight. Use <code><a href='proportion.html'>susceptibility</a>()</code> (equal to <code><a href='proportion.html'>proportion_SI</a>()</code>) to determine antimicrobial susceptibility and <code>count_susceptible()</code> (equal to <code>count_SI()</code>) to count susceptible isolates.</p>
<h2 class="hasAnchor" id="combination-therapy"><a class="anchor" href="#combination-therapy"></a>Combination therapy</h2> <h2 class="hasAnchor" id="combination-therapy"><a class="anchor" href="#combination-therapy"></a>Combination therapy</h2>

View File

@ -85,7 +85,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <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">0.8.0.9028</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9029</span>
</span> </span>
</div> </div>

View File

@ -85,7 +85,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <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">0.8.0.9027</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9029</span>
</span> </span>
</div> </div>

View File

@ -84,7 +84,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <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">0.8.0.9028</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9029</span>
</span> </span>
</div> </div>

View File

@ -51,7 +51,7 @@
<script src="../extra.js"></script> <script src="../extra.js"></script>
<meta property="og:title" content="Determine multidrug-resistant organisms (MDRO) — mdro" /> <meta property="og:title" content="Determine multidrug-resistant organisms (MDRO) — mdro" />
<meta property="og:description" content="Determine which isolates are multidrug-resistant organisms (MDRO) according to (country-specific) guidelines." /> <meta property="og:description" content="Determine which isolates are multidrug-resistant organisms (MDRO) according to international and national guidelines." />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" /> <meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" /> <meta name="twitter:card" content="summary" />
@ -85,7 +85,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <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">0.8.0.9027</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9029</span>
</span> </span>
</div> </div>
@ -234,7 +234,7 @@
</div> </div>
<div class="ref-description"> <div class="ref-description">
<p>Determine which isolates are multidrug-resistant organisms (MDRO) according to (country-specific) guidelines.</p> <p>Determine which isolates are multidrug-resistant organisms (MDRO) according to international and national guidelines.</p>
</div> </div>
<pre class="usage"><span class='fu'>mdro</span>(<span class='no'>x</span>, <span class='kw'>guideline</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>col_mo</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>info</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <pre class="usage"><span class='fu'>mdro</span>(<span class='no'>x</span>, <span class='kw'>guideline</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>col_mo</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>info</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
@ -411,7 +411,7 @@
</ul> </ul>
<p>Exposure is a function of how the mode of administration, dose, dosing interval, infusion time, as well as distribution and excretion of the antimicrobial agent will influence the infecting organism at the site of infection.</p> <p>Exposure is a function of how the mode of administration, dose, dosing interval, infusion time, as well as distribution and excretion of the antimicrobial agent will influence the infecting organism at the site of infection.</p>
<p>This AMR package honours this new insight. Use <code><a href='proportion.html'>susceptibility</a></code> (equal to <code><a href='proportion.html'>proportion_SI</a></code>) to determine antimicrobial susceptibility and <code><a href='count.html'>count_susceptible</a></code> (equal to <code><a href='count.html'>count_SI</a></code>) to count susceptible isolates.</p> <p>This AMR package honours this new insight. Use <code><a href='proportion.html'>susceptibility</a>()</code> (equal to <code><a href='proportion.html'>proportion_SI</a>()</code>) to determine antimicrobial susceptibility and <code><a href='count.html'>count_susceptible</a>()</code> (equal to <code><a href='count.html'>count_SI</a>()</code>) to count susceptible isolates.</p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2> <h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>

View File

@ -52,7 +52,7 @@
<meta property="og:title" content="Calculate microbial resistance — proportion" /> <meta property="og:title" content="Calculate microbial resistance — proportion" />
<meta property="og:description" content="These functions can be used to calculate the (co-)resistance or susceptibility of microbial isolates (i.e. percentage of S, SI, I, IR or R). All functions support quasiquotation with pipes, can be used in dplyrs summarise and support grouped variables, see Examples. <meta property="og:description" content="These functions can be used to calculate the (co-)resistance or susceptibility of microbial isolates (i.e. percentage of S, SI, I, IR or R). All functions support quasiquotation with pipes, can be used in dplyrs summarise and support grouped variables, see Examples.
resistance should be used to calculate resistance, susceptibility should be used to calculate susceptibility." /> resistance() should be used to calculate resistance, susceptibility() should be used to calculate susceptibility." />
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" /> <meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
<meta name="twitter:card" content="summary" /> <meta name="twitter:card" content="summary" />
@ -86,7 +86,7 @@ resistance should be used to calculate resistance, susceptibility should be used
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <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">0.8.0.9027</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9029</span>
</span> </span>
</div> </div>
@ -236,7 +236,7 @@ resistance should be used to calculate resistance, susceptibility should be used
<div class="ref-description"> <div class="ref-description">
<p>These functions can be used to calculate the (co-)resistance or susceptibility of microbial isolates (i.e. percentage of S, SI, I, IR or R). All functions support quasiquotation with pipes, can be used in <code>dplyr</code>s <code><a href='https://dplyr.tidyverse.org/reference/summarise.html'>summarise</a></code> and support grouped variables, see <em>Examples</em>.</p> <p>These functions can be used to calculate the (co-)resistance or susceptibility of microbial isolates (i.e. percentage of S, SI, I, IR or R). All functions support quasiquotation with pipes, can be used in <code>dplyr</code>s <code><a href='https://dplyr.tidyverse.org/reference/summarise.html'>summarise</a></code> and support grouped variables, see <em>Examples</em>.</p>
<p><code>resistance</code> should be used to calculate resistance, <code>susceptibility</code> should be used to calculate susceptibility.<br /></p> <p><code>resistance()</code> should be used to calculate resistance, <code>susceptibility()</code> should be used to calculate susceptibility.<br /></p>
</div> </div>
<pre class="usage"><span class='fu'>resistance</span>(<span class='no'>...</span>, <span class='kw'>minimum</span> <span class='kw'>=</span> <span class='fl'>30</span>, <span class='kw'>as_percent</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <pre class="usage"><span class='fu'>resistance</span>(<span class='no'>...</span>, <span class='kw'>minimum</span> <span class='kw'>=</span> <span class='fl'>30</span>, <span class='kw'>as_percent</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
@ -317,10 +317,10 @@ resistance should be used to calculate resistance, susceptibility should be used
<p>Double or, when <code>as_percent = TRUE</code>, a character.</p> <p>Double or, when <code>as_percent = TRUE</code>, a character.</p>
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2> <h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
<p>The function <code>resistance</code> is equal to the function <code>proportion_R</code>. The function <code>susceptibility</code> is equal to the function <code>proportion_SI</code>.</p> <p>The function <code>resistance()</code> is equal to the function <code>proportion_R()</code>. The function <code>susceptibility()</code> is equal to the function <code>proportion_SI()</code>.</p>
<p><strong>Remember that you should filter your table to let it contain only first isolates!</strong> This is needed to exclude duplicates and to reduce selection bias. Use <code><a href='first_isolate.html'>first_isolate</a></code> to determine them in your data set.</p> <p><strong>Remember that you should filter your table to let it contain only first isolates!</strong> This is needed to exclude duplicates and to reduce selection bias. Use <code><a href='first_isolate.html'>first_isolate</a></code> to determine them in your data set.</p>
<p>These functions are not meant to count isolates, but to calculate the proportion of resistance/susceptibility. Use the <code><a href='count.html'>count</a></code> functions to count isolates. The function <code>susceptibility()</code> is essentially equal to <code>count_susceptible() / count_all()</code>. <em>Low counts can infuence the outcome - the <code>proportion</code> functions may camouflage this, since they only return the proportion (albeit being dependent on the <code>minimum</code> parameter).</em></p> <p>These functions are not meant to count isolates, but to calculate the proportion of resistance/susceptibility. Use the <code><a href='count.html'>count</a></code> functions to count isolates. The function <code>susceptibility()</code> is essentially equal to <code>count_susceptible() / count_all()</code>. <em>Low counts can infuence the outcome - the <code>proportion</code> functions may camouflage this, since they only return the proportion (albeit being dependent on the <code>minimum</code> parameter).</em></p>
<p>The function <code>proportion_df</code> takes any variable from <code>data</code> that has an <code>"rsi"</code> class (created with <code><a href='as.rsi.html'>as.rsi</a></code>) and calculates the proportions R, I and S. The function <code>rsi_df</code> works exactly like <code>proportion_df</code>, but adds the number of isolates.</p> <p>The function <code>proportion_df()</code> takes any variable from <code>data</code> that has an <code>"rsi"</code> class (created with <code><a href='as.rsi.html'>as.rsi</a>()</code>) and calculates the proportions R, I and S. The function <code>rsi_df()</code> works exactly like <code>proportion_df()</code>, but adds the number of isolates.</p>
<h2 class="hasAnchor" id="combination-therapy"><a class="anchor" href="#combination-therapy"></a>Combination therapy</h2> <h2 class="hasAnchor" id="combination-therapy"><a class="anchor" href="#combination-therapy"></a>Combination therapy</h2>
@ -366,7 +366,7 @@ resistance should be used to calculate resistance, susceptibility should be used
</ul> </ul>
<p>Exposure is a function of how the mode of administration, dose, dosing interval, infusion time, as well as distribution and excretion of the antimicrobial agent will influence the infecting organism at the site of infection.</p> <p>Exposure is a function of how the mode of administration, dose, dosing interval, infusion time, as well as distribution and excretion of the antimicrobial agent will influence the infecting organism at the site of infection.</p>
<p>This AMR package honours this new insight. Use <code>susceptibility</code> (equal to <code>proportion_SI</code>) to determine antimicrobial susceptibility and <code><a href='count.html'>count_susceptible</a></code> (equal to <code><a href='count.html'>count_SI</a></code>) to count susceptible isolates.</p> <p>This AMR package honours this new insight. Use <code>susceptibility()</code> (equal to <code>proportion_SI()</code>) to determine antimicrobial susceptibility and <code><a href='count.html'>count_susceptible</a>()</code> (equal to <code><a href='count.html'>count_SI</a>()</code>) to count susceptible isolates.</p>
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2> <h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>

View File

@ -41,6 +41,7 @@ Department of Medical Microbiology, University of Groningen \cr
University Medical Center Groningen \cr University Medical Center Groningen \cr
Post Office Box 30001 \cr Post Office Box 30001 \cr
9700 RB Groningen 9700 RB Groningen
The Netherlands
If you have found a bug, please file a new issue at: \cr If you have found a bug, please file a new issue at: \cr
\url{https://gitlab.com/msberends/AMR/issues} \url{https://gitlab.com/msberends/AMR/issues}

View File

@ -63,7 +63,7 @@ In 2019, the European Committee on Antimicrobial Susceptibility Testing (EUCAST)
Exposure is a function of how the mode of administration, dose, dosing interval, infusion time, as well as distribution and excretion of the antimicrobial agent will influence the infecting organism at the site of infection. Exposure is a function of how the mode of administration, dose, dosing interval, infusion time, as well as distribution and excretion of the antimicrobial agent will influence the infecting organism at the site of infection.
This AMR package honours this new insight. Use \code{\link{susceptibility}} (equal to \code{\link{proportion_SI}}) to determine antimicrobial susceptibility and \code{\link{count_susceptible}} (equal to \code{\link{count_SI}}) to count susceptible isolates. This AMR package honours this new insight. Use \code{\link{susceptibility}()} (equal to \code{\link{proportion_SI}()}) to determine antimicrobial susceptibility and \code{\link{count_susceptible}()} (equal to \code{\link{count_SI}()}) to count susceptible isolates.
} }
\section{Read more on our website!}{ \section{Read more on our website!}{

View File

@ -56,16 +56,16 @@ Integer
\description{ \description{
These functions can be used to count resistant/susceptible microbial isolates. All functions support quasiquotation with pipes, can be used in \code{dplyr}s \code{\link[dplyr]{summarise}} and support grouped variables, see \emph{Examples}. These functions can be used to count resistant/susceptible microbial isolates. All functions support quasiquotation with pipes, can be used in \code{dplyr}s \code{\link[dplyr]{summarise}} and support grouped variables, see \emph{Examples}.
\code{count_resistant} should be used to count resistant isolates, \code{count_susceptible} should be used to count susceptible isolates.\cr \code{count_resistant()} should be used to count resistant isolates, \code{count_susceptible()} should be used to count susceptible isolates.\cr
} }
\details{ \details{
These functions are meant to count isolates. Use the \code{\link{resistance}}/\code{\link{susceptibility}} functions to calculate microbial resistance/susceptibility. These functions are meant to count isolates. Use the \code{\link{resistance}}/\code{\link{susceptibility}} functions to calculate microbial resistance/susceptibility.
The function \code{count_resistant} is equal to the function \code{count_R}. The function \code{count_susceptible} is equal to the function \code{count_SI}. The function \code{count_resistant()} is equal to the function \code{count_R()}. The function \code{count_susceptible()} is equal to the function \code{count_SI()}.
The function \code{n_rsi} is an alias of \code{count_all}. They can be used to count all available isolates, i.e. where all input antibiotics have an available result (S, I or R). Their use is equal to \code{\link{n_distinct}}. Their function is equal to \code{count_susceptible(...) + count_resistant(...)}. The function \code{n_rsi()} is an alias of \code{count_all()}. They can be used to count all available isolates, i.e. where all input antibiotics have an available result (S, I or R). Their use is equal to \code{\link{n_distinct}()}. Their function is equal to \code{count_susceptible(...) + count_resistant(...)}.
The function \code{count_df} takes any variable from \code{data} that has an \code{"rsi"} class (created with \code{\link{as.rsi}}) and counts the number of S's, I's and R's. The function \code{rsi_df} works exactly like \code{count_df}, but adds the percentage of S, I and R. The function \code{count_df()} takes any variable from \code{data} that has an \code{"rsi"} class (created with \code{\link{as.rsi}()}) and counts the number of S's, I's and R's. The function \code{rsi_df()} works exactly like \code{count_df()}, but adds the percentage of S, I and R.
} }
\section{Interpretation of S, I and R}{ \section{Interpretation of S, I and R}{
@ -79,7 +79,7 @@ In 2019, the European Committee on Antimicrobial Susceptibility Testing (EUCAST)
Exposure is a function of how the mode of administration, dose, dosing interval, infusion time, as well as distribution and excretion of the antimicrobial agent will influence the infecting organism at the site of infection. Exposure is a function of how the mode of administration, dose, dosing interval, infusion time, as well as distribution and excretion of the antimicrobial agent will influence the infecting organism at the site of infection.
This AMR package honours this new insight. Use \code{\link{susceptibility}} (equal to \code{\link{proportion_SI}}) to determine antimicrobial susceptibility and \code{\link{count_susceptible}} (equal to \code{\link{count_SI}}) to count susceptible isolates. This AMR package honours this new insight. Use \code{\link{susceptibility}()} (equal to \code{\link{proportion_SI}()}) to determine antimicrobial susceptibility and \code{\link{count_susceptible}()} (equal to \code{\link{count_SI}()}) to count susceptible isolates.
} }
\section{Combination therapy}{ \section{Combination therapy}{

View File

@ -58,7 +58,7 @@ eucast_exceptional_phenotypes(x, guideline = "EUCAST", ...)
} }
} }
\description{ \description{
Determine which isolates are multidrug-resistant organisms (MDRO) according to (country-specific) guidelines. Determine which isolates are multidrug-resistant organisms (MDRO) according to international and national guidelines.
} }
\details{ \details{
For the \code{pct_required_classes} argument, values above 1 will be divided by 100. This is to support both fractions (\code{0.75} or \code{3/4}) and percentages (\code{75}). For the \code{pct_required_classes} argument, values above 1 will be divided by 100. This is to support both fractions (\code{0.75} or \code{3/4}) and percentages (\code{75}).
@ -175,7 +175,7 @@ In 2019, the European Committee on Antimicrobial Susceptibility Testing (EUCAST)
Exposure is a function of how the mode of administration, dose, dosing interval, infusion time, as well as distribution and excretion of the antimicrobial agent will influence the infecting organism at the site of infection. Exposure is a function of how the mode of administration, dose, dosing interval, infusion time, as well as distribution and excretion of the antimicrobial agent will influence the infecting organism at the site of infection.
This AMR package honours this new insight. Use \code{\link{susceptibility}} (equal to \code{\link{proportion_SI}}) to determine antimicrobial susceptibility and \code{\link{count_susceptible}} (equal to \code{\link{count_SI}}) to count susceptible isolates. This AMR package honours this new insight. Use \code{\link{susceptibility}()} (equal to \code{\link{proportion_SI}()}) to determine antimicrobial susceptibility and \code{\link{count_susceptible}()} (equal to \code{\link{count_SI}()}) to count susceptible isolates.
} }
\section{Read more on our website!}{ \section{Read more on our website!}{

View File

@ -71,16 +71,16 @@ Double or, when \code{as_percent = TRUE}, a character.
\description{ \description{
These functions can be used to calculate the (co-)resistance or susceptibility of microbial isolates (i.e. percentage of S, SI, I, IR or R). All functions support quasiquotation with pipes, can be used in \code{dplyr}s \code{\link[dplyr]{summarise}} and support grouped variables, see \emph{Examples}. These functions can be used to calculate the (co-)resistance or susceptibility of microbial isolates (i.e. percentage of S, SI, I, IR or R). All functions support quasiquotation with pipes, can be used in \code{dplyr}s \code{\link[dplyr]{summarise}} and support grouped variables, see \emph{Examples}.
\code{resistance} should be used to calculate resistance, \code{susceptibility} should be used to calculate susceptibility.\cr \code{resistance()} should be used to calculate resistance, \code{susceptibility()} should be used to calculate susceptibility.\cr
} }
\details{ \details{
The function \code{resistance} is equal to the function \code{proportion_R}. The function \code{susceptibility} is equal to the function \code{proportion_SI}. The function \code{resistance()} is equal to the function \code{proportion_R()}. The function \code{susceptibility()} is equal to the function \code{proportion_SI()}.
\strong{Remember that you should filter your table to let it contain only first isolates!} This is needed to exclude duplicates and to reduce selection bias. Use \code{\link{first_isolate}} to determine them in your data set. \strong{Remember that you should filter your table to let it contain only first isolates!} This is needed to exclude duplicates and to reduce selection bias. Use \code{\link{first_isolate}} to determine them in your data set.
These functions are not meant to count isolates, but to calculate the proportion of resistance/susceptibility. Use the \code{\link[AMR]{count}} functions to count isolates. The function \code{susceptibility()} is essentially equal to \code{count_susceptible() / count_all()}. \emph{Low counts can infuence the outcome - the \code{proportion} functions may camouflage this, since they only return the proportion (albeit being dependent on the \code{minimum} parameter).} These functions are not meant to count isolates, but to calculate the proportion of resistance/susceptibility. Use the \code{\link[AMR]{count}} functions to count isolates. The function \code{susceptibility()} is essentially equal to \code{count_susceptible() / count_all()}. \emph{Low counts can infuence the outcome - the \code{proportion} functions may camouflage this, since they only return the proportion (albeit being dependent on the \code{minimum} parameter).}
The function \code{proportion_df} takes any variable from \code{data} that has an \code{"rsi"} class (created with \code{\link{as.rsi}}) and calculates the proportions R, I and S. The function \code{rsi_df} works exactly like \code{proportion_df}, but adds the number of isolates. The function \code{proportion_df()} takes any variable from \code{data} that has an \code{"rsi"} class (created with \code{\link{as.rsi}()}) and calculates the proportions R, I and S. The function \code{rsi_df()} works exactly like \code{proportion_df()}, but adds the number of isolates.
} }
\section{Combination therapy}{ \section{Combination therapy}{
@ -131,7 +131,7 @@ In 2019, the European Committee on Antimicrobial Susceptibility Testing (EUCAST)
Exposure is a function of how the mode of administration, dose, dosing interval, infusion time, as well as distribution and excretion of the antimicrobial agent will influence the infecting organism at the site of infection. Exposure is a function of how the mode of administration, dose, dosing interval, infusion time, as well as distribution and excretion of the antimicrobial agent will influence the infecting organism at the site of infection.
This AMR package honours this new insight. Use \code{\link{susceptibility}} (equal to \code{\link{proportion_SI}}) to determine antimicrobial susceptibility and \code{\link{count_susceptible}} (equal to \code{\link{count_SI}}) to count susceptible isolates. This AMR package honours this new insight. Use \code{\link{susceptibility}()} (equal to \code{\link{proportion_SI}()}) to determine antimicrobial susceptibility and \code{\link{count_susceptible}()} (equal to \code{\link{count_SI}()}) to count susceptible isolates.
} }
\section{Read more on our website!}{ \section{Read more on our website!}{