mirror of
https://github.com/msberends/AMR.git
synced 2024-12-26 05:26:13 +01:00
(v0.8.0.9009) unit test
This commit is contained in:
parent
29e448883d
commit
0bb531f3e0
@ -1,5 +1,5 @@
|
|||||||
Package: AMR
|
Package: AMR
|
||||||
Version: 0.8.0.9008
|
Version: 0.8.0.9009
|
||||||
Date: 2019-11-03
|
Date: 2019-11-03
|
||||||
Title: Antimicrobial Resistance Analysis
|
Title: Antimicrobial Resistance Analysis
|
||||||
Authors@R: c(
|
Authors@R: c(
|
||||||
|
2
NEWS.md
2
NEWS.md
@ -1,4 +1,4 @@
|
|||||||
# AMR 0.8.0.9008
|
# AMR 0.8.0.9009
|
||||||
<small>Last updated: 03-Nov-2019</small>
|
<small>Last updated: 03-Nov-2019</small>
|
||||||
|
|
||||||
### New
|
### New
|
||||||
|
2
R/age.R
2
R/age.R
@ -133,6 +133,7 @@ age <- function(x, reference = Sys.Date(), exact = FALSE, na.rm = FALSE) {
|
|||||||
#' # same:
|
#' # same:
|
||||||
#' age_groups(ages, c(1, 2, 4, 6, 13, 17))
|
#' age_groups(ages, c(1, 2, 4, 6, 13, 17))
|
||||||
#'
|
#'
|
||||||
|
#' \dontrun{
|
||||||
#' # resistance of ciprofloxacine per age group
|
#' # resistance of ciprofloxacine per age group
|
||||||
#' library(dplyr)
|
#' library(dplyr)
|
||||||
#' example_isolates %>%
|
#' example_isolates %>%
|
||||||
@ -141,6 +142,7 @@ age <- function(x, reference = Sys.Date(), exact = FALSE, na.rm = FALSE) {
|
|||||||
#' group_by(age_group = age_groups(age)) %>%
|
#' group_by(age_group = age_groups(age)) %>%
|
||||||
#' select(age_group, CIP) %>%
|
#' select(age_group, CIP) %>%
|
||||||
#' ggplot_rsi(x = "age_group")
|
#' ggplot_rsi(x = "age_group")
|
||||||
|
#' }
|
||||||
age_groups <- function(x, split_at = c(12, 25, 55, 75), na.rm = FALSE) {
|
age_groups <- function(x, split_at = c(12, 25, 55, 75), na.rm = FALSE) {
|
||||||
if (!is.numeric(x)) {
|
if (!is.numeric(x)) {
|
||||||
stop("`x` and must be numeric, not a ", paste0(class(x), collapse = "/"), ".")
|
stop("`x` and must be numeric, not a ", paste0(class(x), collapse = "/"), ".")
|
||||||
|
@ -100,6 +100,8 @@
|
|||||||
#' select(AMX) %>%
|
#' select(AMX) %>%
|
||||||
#' ggplot_rsi(colours = c(SI = "yellow"))
|
#' ggplot_rsi(colours = c(SI = "yellow"))
|
||||||
#'
|
#'
|
||||||
|
#' \dontrun{
|
||||||
|
#'
|
||||||
#' # resistance of ciprofloxacine per age group
|
#' # resistance of ciprofloxacine per age group
|
||||||
#' example_isolates %>%
|
#' example_isolates %>%
|
||||||
#' mutate(first_isolate = first_isolate(.)) %>%
|
#' mutate(first_isolate = first_isolate(.)) %>%
|
||||||
@ -110,7 +112,6 @@
|
|||||||
#' select(age_group,
|
#' select(age_group,
|
||||||
#' CIP) %>%
|
#' CIP) %>%
|
||||||
#' ggplot_rsi(x = "age_group")
|
#' ggplot_rsi(x = "age_group")
|
||||||
#' \donttest{
|
|
||||||
#'
|
#'
|
||||||
#' # for colourblind mode, use divergent colours from the viridis package:
|
#' # for colourblind mode, use divergent colours from the viridis package:
|
||||||
#' example_isolates %>%
|
#' example_isolates %>%
|
||||||
|
1
R/mdro.R
1
R/mdro.R
@ -25,7 +25,6 @@
|
|||||||
#' @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
|
||||||
#' @param verbose print additional info: missing antibiotic columns per parameter
|
|
||||||
#' @param pct_required_classes minimal required percentage of antimicrobial classes that must be available per isolate, rounded down. For example, with the default guideline, 17 antimicrobial classes must be available for \emph{S. aureus}. Setting this \code{pct_required_classes} argument to \code{0.5} (default) means that for every \emph{S. aureus} isolate at least 8 different classes must be available. Any lower number of available classes will return \code{NA} for that isolate.
|
#' @param pct_required_classes minimal required percentage of antimicrobial classes that must be available per isolate, rounded down. For example, with the default guideline, 17 antimicrobial classes must be available for \emph{S. aureus}. Setting this \code{pct_required_classes} argument to \code{0.5} (default) means that for every \emph{S. aureus} isolate at least 8 different classes must be available. Any lower number of available classes will return \code{NA} for that isolate.
|
||||||
#' @param verbose a logical to turn Verbose mode on and off (default is off). In Verbose mode, the function does not return the MDRO results, but instead returns a data set in logbook form with extensive info about which isolates would be MDRO-positive, or why they are not.
|
#' @param verbose a logical to turn Verbose mode on and off (default is off). In Verbose mode, the function does not return the MDRO results, but instead returns a data set in logbook form with extensive info about which isolates would be MDRO-positive, or why they are not.
|
||||||
#' @inheritSection eucast_rules Antibiotics
|
#' @inheritSection eucast_rules Antibiotics
|
||||||
|
@ -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.9008</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9009</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -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.9008</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9009</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -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.9008</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9009</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -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.9008</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9009</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -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.9008</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9009</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -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.9008</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9009</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -231,9 +231,9 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="amr-0-8-0-9008" class="section level1">
|
<div id="amr-0-8-0-9009" class="section level1">
|
||||||
<h1 class="page-header">
|
<h1 class="page-header">
|
||||||
<a href="#amr-0-8-0-9008" class="anchor"></a>AMR 0.8.0.9008<small> Unreleased </small>
|
<a href="#amr-0-8-0-9009" class="anchor"></a>AMR 0.8.0.9009<small> Unreleased </small>
|
||||||
</h1>
|
</h1>
|
||||||
<p><small>Last updated: 03-Nov-2019</small></p>
|
<p><small>Last updated: 03-Nov-2019</small></p>
|
||||||
<div id="new" class="section level3">
|
<div id="new" class="section level3">
|
||||||
@ -1332,7 +1332,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-9008">0.8.0.9008</a></li>
|
<li><a href="#amr-0-8-0-9009">0.8.0.9009</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>
|
||||||
|
@ -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</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9009</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -303,6 +303,7 @@
|
|||||||
<span class='co'># same:</span>
|
<span class='co'># same:</span>
|
||||||
<span class='fu'>age_groups</span>(<span class='no'>ages</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>1</span>, <span class='fl'>2</span>, <span class='fl'>4</span>, <span class='fl'>6</span>, <span class='fl'>13</span>, <span class='fl'>17</span>))
|
<span class='fu'>age_groups</span>(<span class='no'>ages</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>1</span>, <span class='fl'>2</span>, <span class='fl'>4</span>, <span class='fl'>6</span>, <span class='fl'>13</span>, <span class='fl'>17</span>))
|
||||||
|
|
||||||
|
<span class='kw'>if</span> (<span class='fl'>FALSE</span>) {
|
||||||
<span class='co'># resistance of ciprofloxacine per age group</span>
|
<span class='co'># resistance of ciprofloxacine per age group</span>
|
||||||
<span class='fu'><a href='https://rdrr.io/r/base/library.html'>library</a></span>(<span class='no'>dplyr</span>)
|
<span class='fu'><a href='https://rdrr.io/r/base/library.html'>library</a></span>(<span class='no'>dplyr</span>)
|
||||||
<span class='no'>example_isolates</span> <span class='kw'>%>%</span>
|
<span class='no'>example_isolates</span> <span class='kw'>%>%</span>
|
||||||
@ -310,7 +311,8 @@
|
|||||||
<span class='fu'><a href='https://dplyr.tidyverse.org/reference/filter.html'>filter</a></span>(<span class='no'>mo</span> <span class='kw'>==</span> <span class='fu'><a href='as.mo.html'>as.mo</a></span>(<span class='st'>"E. coli"</span>)) <span class='kw'>%>%</span>
|
<span class='fu'><a href='https://dplyr.tidyverse.org/reference/filter.html'>filter</a></span>(<span class='no'>mo</span> <span class='kw'>==</span> <span class='fu'><a href='as.mo.html'>as.mo</a></span>(<span class='st'>"E. coli"</span>)) <span class='kw'>%>%</span>
|
||||||
<span class='fu'><a href='https://dplyr.tidyverse.org/reference/group_by.html'>group_by</a></span>(<span class='kw'>age_group</span> <span class='kw'>=</span> <span class='fu'>age_groups</span>(<span class='no'>age</span>)) <span class='kw'>%>%</span>
|
<span class='fu'><a href='https://dplyr.tidyverse.org/reference/group_by.html'>group_by</a></span>(<span class='kw'>age_group</span> <span class='kw'>=</span> <span class='fu'>age_groups</span>(<span class='no'>age</span>)) <span class='kw'>%>%</span>
|
||||||
<span class='fu'><a href='https://dplyr.tidyverse.org/reference/select.html'>select</a></span>(<span class='no'>age_group</span>, <span class='no'>CIP</span>) <span class='kw'>%>%</span>
|
<span class='fu'><a href='https://dplyr.tidyverse.org/reference/select.html'>select</a></span>(<span class='no'>age_group</span>, <span class='no'>CIP</span>) <span class='kw'>%>%</span>
|
||||||
<span class='fu'><a href='ggplot_rsi.html'>ggplot_rsi</a></span>(<span class='kw'>x</span> <span class='kw'>=</span> <span class='st'>"age_group"</span>)</pre>
|
<span class='fu'><a href='ggplot_rsi.html'>ggplot_rsi</a></span>(<span class='kw'>x</span> <span class='kw'>=</span> <span class='st'>"age_group"</span>)
|
||||||
|
}</pre>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
|
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
|
||||||
<h2>Contents</h2>
|
<h2>Contents</h2>
|
||||||
|
@ -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</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9009</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -415,6 +415,8 @@
|
|||||||
<span class='fu'><a href='https://dplyr.tidyverse.org/reference/select.html'>select</a></span>(<span class='no'>AMX</span>) <span class='kw'>%>%</span>
|
<span class='fu'><a href='https://dplyr.tidyverse.org/reference/select.html'>select</a></span>(<span class='no'>AMX</span>) <span class='kw'>%>%</span>
|
||||||
<span class='fu'>ggplot_rsi</span>(<span class='kw'>colours</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>SI</span> <span class='kw'>=</span> <span class='st'>"yellow"</span>))
|
<span class='fu'>ggplot_rsi</span>(<span class='kw'>colours</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>SI</span> <span class='kw'>=</span> <span class='st'>"yellow"</span>))
|
||||||
|
|
||||||
|
<span class='kw'>if</span> (<span class='fl'>FALSE</span>) {
|
||||||
|
|
||||||
<span class='co'># resistance of ciprofloxacine per age group</span>
|
<span class='co'># resistance of ciprofloxacine per age group</span>
|
||||||
<span class='no'>example_isolates</span> <span class='kw'>%>%</span>
|
<span class='no'>example_isolates</span> <span class='kw'>%>%</span>
|
||||||
<span class='fu'><a href='https://dplyr.tidyverse.org/reference/mutate.html'>mutate</a></span>(<span class='kw'>first_isolate</span> <span class='kw'>=</span> <span class='fu'><a href='first_isolate.html'>first_isolate</a></span>(<span class='no'>.</span>)) <span class='kw'>%>%</span>
|
<span class='fu'><a href='https://dplyr.tidyverse.org/reference/mutate.html'>mutate</a></span>(<span class='kw'>first_isolate</span> <span class='kw'>=</span> <span class='fu'><a href='first_isolate.html'>first_isolate</a></span>(<span class='no'>.</span>)) <span class='kw'>%>%</span>
|
||||||
@ -425,7 +427,6 @@
|
|||||||
<span class='fu'><a href='https://dplyr.tidyverse.org/reference/select.html'>select</a></span>(<span class='no'>age_group</span>,
|
<span class='fu'><a href='https://dplyr.tidyverse.org/reference/select.html'>select</a></span>(<span class='no'>age_group</span>,
|
||||||
<span class='no'>CIP</span>) <span class='kw'>%>%</span>
|
<span class='no'>CIP</span>) <span class='kw'>%>%</span>
|
||||||
<span class='fu'>ggplot_rsi</span>(<span class='kw'>x</span> <span class='kw'>=</span> <span class='st'>"age_group"</span>)
|
<span class='fu'>ggplot_rsi</span>(<span class='kw'>x</span> <span class='kw'>=</span> <span class='st'>"age_group"</span>)
|
||||||
<span class='co'># \donttest{</span>
|
|
||||||
|
|
||||||
<span class='co'># for colourblind mode, use divergent colours from the viridis package:</span>
|
<span class='co'># for colourblind mode, use divergent colours from the viridis package:</span>
|
||||||
<span class='no'>example_isolates</span> <span class='kw'>%>%</span>
|
<span class='no'>example_isolates</span> <span class='kw'>%>%</span>
|
||||||
@ -453,7 +454,7 @@
|
|||||||
<span class='co'># create new bacterial ID's, with all CoNS under the same group (Becker et al.)</span>
|
<span class='co'># create new bacterial ID's, with all CoNS under the same group (Becker et al.)</span>
|
||||||
<span class='fu'><a href='https://dplyr.tidyverse.org/reference/mutate.html'>mutate</a></span>(<span class='kw'>mo</span> <span class='kw'>=</span> <span class='fu'><a href='as.mo.html'>as.mo</a></span>(<span class='no'>mo</span>, <span class='kw'>Becker</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)) <span class='kw'>%>%</span>
|
<span class='fu'><a href='https://dplyr.tidyverse.org/reference/mutate.html'>mutate</a></span>(<span class='kw'>mo</span> <span class='kw'>=</span> <span class='fu'><a href='as.mo.html'>as.mo</a></span>(<span class='no'>mo</span>, <span class='kw'>Becker</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)) <span class='kw'>%>%</span>
|
||||||
<span class='co'># filter on top three bacterial ID's</span>
|
<span class='co'># filter on top three bacterial ID's</span>
|
||||||
<span class='fu'><a href='https://dplyr.tidyverse.org/reference/filter.html'>filter</a></span>(<span class='no'>mo</span> <span class='kw'>%in%</span> <span class='fu'>top_freq</span>(<span class='fu'><a href='https://rdrr.io/pkg/clean/man/freq.html'>freq</a></span>(<span class='no'>.</span>$<span class='no'>mo</span>), <span class='fl'>3</span>)) <span class='kw'>%>%</span>
|
<span class='fu'><a href='https://dplyr.tidyverse.org/reference/filter.html'>filter</a></span>(<span class='no'>mo</span> <span class='kw'>%in%</span> <span class='fu'>top_freq</span>(<span class='fu'><a href='https://rdrr.io/pkg/cleaner/man/freq.html'>freq</a></span>(<span class='no'>.</span>$<span class='no'>mo</span>), <span class='fl'>3</span>)) <span class='kw'>%>%</span>
|
||||||
<span class='co'># filter on first isolates</span>
|
<span class='co'># filter on first isolates</span>
|
||||||
<span class='fu'><a href='first_isolate.html'>filter_first_isolate</a></span>() <span class='kw'>%>%</span>
|
<span class='fu'><a href='first_isolate.html'>filter_first_isolate</a></span>() <span class='kw'>%>%</span>
|
||||||
<span class='co'># get short MO names (like "E. coli")</span>
|
<span class='co'># get short MO names (like "E. coli")</span>
|
||||||
@ -471,7 +472,7 @@
|
|||||||
<span class='kw'>subtitle</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/expression.html'>expression</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/paste.html'>paste</a></span>(<span class='st'>"Only First Isolates, CoNS grouped according to Becker "</span>,
|
<span class='kw'>subtitle</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/expression.html'>expression</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/paste.html'>paste</a></span>(<span class='st'>"Only First Isolates, CoNS grouped according to Becker "</span>,
|
||||||
<span class='fu'><a href='https://rdrr.io/r/grDevices/plotmath.html'>italic</a></span>(<span class='st'>"et al."</span>), <span class='st'>" (2014)"</span>)),
|
<span class='fu'><a href='https://rdrr.io/r/grDevices/plotmath.html'>italic</a></span>(<span class='st'>"et al."</span>), <span class='st'>" (2014)"</span>)),
|
||||||
<span class='kw'>x.title</span> <span class='kw'>=</span> <span class='st'>"Antibiotic (EARS-Net code)"</span>)
|
<span class='kw'>x.title</span> <span class='kw'>=</span> <span class='st'>"Antibiotic (EARS-Net code)"</span>)
|
||||||
<span class='co'># }</span></pre>
|
}</pre>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
|
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
|
||||||
<h2>Contents</h2>
|
<h2>Contents</h2>
|
||||||
|
@ -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.9008</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9009</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -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.9008</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.8.0.9009</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -271,7 +271,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>verbose</th>
|
<th>verbose</th>
|
||||||
<td><p>print additional info: missing antibiotic columns per parameter</p></td>
|
<td><p>a logical to turn Verbose mode on and off (default is off). In Verbose mode, the function does not return the MDRO results, but instead returns a data set in logbook form with extensive info about which isolates would be MDRO-positive, or why they are not.</p></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>pct_required_classes</th>
|
<th>pct_required_classes</th>
|
||||||
@ -281,10 +281,6 @@
|
|||||||
<th>...</th>
|
<th>...</th>
|
||||||
<td><p>column name of an antibiotic, see section Antibiotics</p></td>
|
<td><p>column name of an antibiotic, see section Antibiotics</p></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<th>verbose</th>
|
|
||||||
<td><p>a logical to turn Verbose mode on and off (default is off). In Verbose mode, the function does not return the MDRO results, but instead returns a data set in logbook form with extensive info about which isolates would be MDRO-positive, or why they are not.</p></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h2 class="hasAnchor" id="source"><a class="anchor" href="#source"></a>Source</h2>
|
<h2 class="hasAnchor" id="source"><a class="anchor" href="#source"></a>Source</h2>
|
||||||
|
@ -60,6 +60,7 @@ age_groups(ages, "children")
|
|||||||
# same:
|
# same:
|
||||||
age_groups(ages, c(1, 2, 4, 6, 13, 17))
|
age_groups(ages, c(1, 2, 4, 6, 13, 17))
|
||||||
|
|
||||||
|
\dontrun{
|
||||||
# resistance of ciprofloxacine per age group
|
# resistance of ciprofloxacine per age group
|
||||||
library(dplyr)
|
library(dplyr)
|
||||||
example_isolates \%>\%
|
example_isolates \%>\%
|
||||||
@ -69,6 +70,7 @@ example_isolates \%>\%
|
|||||||
select(age_group, CIP) \%>\%
|
select(age_group, CIP) \%>\%
|
||||||
ggplot_rsi(x = "age_group")
|
ggplot_rsi(x = "age_group")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
\seealso{
|
\seealso{
|
||||||
To determine ages, based on one or more reference dates, use the \code{\link{age}} function.
|
To determine ages, based on one or more reference dates, use the \code{\link{age}} function.
|
||||||
}
|
}
|
||||||
|
@ -149,6 +149,8 @@ example_isolates \%>\%
|
|||||||
select(AMX) \%>\%
|
select(AMX) \%>\%
|
||||||
ggplot_rsi(colours = c(SI = "yellow"))
|
ggplot_rsi(colours = c(SI = "yellow"))
|
||||||
|
|
||||||
|
\dontrun{
|
||||||
|
|
||||||
# resistance of ciprofloxacine per age group
|
# resistance of ciprofloxacine per age group
|
||||||
example_isolates \%>\%
|
example_isolates \%>\%
|
||||||
mutate(first_isolate = first_isolate(.)) \%>\%
|
mutate(first_isolate = first_isolate(.)) \%>\%
|
||||||
@ -159,7 +161,6 @@ example_isolates \%>\%
|
|||||||
select(age_group,
|
select(age_group,
|
||||||
CIP) \%>\%
|
CIP) \%>\%
|
||||||
ggplot_rsi(x = "age_group")
|
ggplot_rsi(x = "age_group")
|
||||||
\donttest{
|
|
||||||
|
|
||||||
# for colourblind mode, use divergent colours from the viridis package:
|
# for colourblind mode, use divergent colours from the viridis package:
|
||||||
example_isolates \%>\%
|
example_isolates \%>\%
|
||||||
|
@ -34,13 +34,11 @@ eucast_exceptional_phenotypes(x, guideline = "EUCAST", ...)
|
|||||||
|
|
||||||
\item{info}{print progress}
|
\item{info}{print progress}
|
||||||
|
|
||||||
\item{verbose}{print additional info: missing antibiotic columns per parameter}
|
\item{verbose}{a logical to turn Verbose mode on and off (default is off). In Verbose mode, the function does not return the MDRO results, but instead returns a data set in logbook form with extensive info about which isolates would be MDRO-positive, or why they are not.}
|
||||||
|
|
||||||
\item{pct_required_classes}{minimal required percentage of antimicrobial classes that must be available per isolate, rounded down. For example, with the default guideline, 17 antimicrobial classes must be available for \emph{S. aureus}. Setting this \code{pct_required_classes} argument to \code{0.5} (default) means that for every \emph{S. aureus} isolate at least 8 different classes must be available. Any lower number of available classes will return \code{NA} for that isolate.}
|
\item{pct_required_classes}{minimal required percentage of antimicrobial classes that must be available per isolate, rounded down. For example, with the default guideline, 17 antimicrobial classes must be available for \emph{S. aureus}. Setting this \code{pct_required_classes} argument to \code{0.5} (default) means that for every \emph{S. aureus} isolate at least 8 different classes must be available. Any lower number of available classes will return \code{NA} for that isolate.}
|
||||||
|
|
||||||
\item{...}{column name of an antibiotic, see section Antibiotics}
|
\item{...}{column name of an antibiotic, see section Antibiotics}
|
||||||
|
|
||||||
\item{verbose}{a logical to turn Verbose mode on and off (default is off). In Verbose mode, the function does not return the MDRO results, but instead returns a data set in logbook form with extensive info about which isolates would be MDRO-positive, or why they are not.}
|
|
||||||
}
|
}
|
||||||
\value{
|
\value{
|
||||||
\itemize{
|
\itemize{
|
||||||
|
Loading…
Reference in New Issue
Block a user