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

(v1.4.0.9033) documentation update

This commit is contained in:
dr. M.S. (Matthijs) Berends 2020-12-08 12:37:25 +01:00
parent 1bdb136b3a
commit 2145f1d1ba
110 changed files with 839 additions and 576 deletions

View File

@ -1,6 +1,6 @@
Package: AMR Package: AMR
Version: 1.4.0.9032 Version: 1.4.0.9033
Date: 2020-12-07 Date: 2020-12-08
Title: Antimicrobial Resistance Analysis Title: Antimicrobial Resistance Analysis
Authors@R: c( Authors@R: c(
person(role = c("aut", "cre"), person(role = c("aut", "cre"),

View File

@ -1,5 +1,5 @@
# AMR 1.4.0.9032 # AMR 1.4.0.9033
## <small>Last updated: 7 December 2020</small> ## <small>Last updated: 8 December 2020</small>
### New ### New
* Function `is_new_episode()` to determine patient episodes which are not necessarily based on microorganisms. It also supports grouped variables with e.g. `mutate()`, `filter()` and `summarise()` of the `dplyr` package: * Function `is_new_episode()` to determine patient episodes which are not necessarily based on microorganisms. It also supports grouped variables with e.g. `mutate()`, `filter()` and `summarise()` of the `dplyr` package:

View File

@ -25,11 +25,11 @@
#' Antibiotic class selectors #' Antibiotic class selectors
#' #'
#' Use these selection helpers inside any function that allows [Tidyverse selection helpers](https://tidyselect.r-lib.org/reference/language.html), like `dplyr::select()` or `tidyr::pivot_longer()`. They help to select the columns of antibiotics that are of a specific antibiotic class, without the need to define the columns or antibiotic abbreviations. #' Use these selection helpers inside any function that allows [Tidyverse selection helpers](https://tidyselect.r-lib.org/reference/language.html), such as [`select()`][dplyr::select()] and [`pivot_longer()`][tidyr::pivot_longer()]. They help to select the columns of antibiotics that are of a specific antibiotic class, without the need to define the columns or antibiotic abbreviations.
#' @inheritParams filter_ab_class #' @inheritParams filter_ab_class
#' @details All columns will be searched for known antibiotic names, abbreviations, brand names and codes (ATC, EARS-Net, WHO, etc.) in the [antibiotics] data set. This means that a selector like e.g. [aminoglycosides()] will pick up column names like 'gen', 'genta', 'J01GB03', 'tobra', 'Tobracin', etc. #' @details All columns will be searched for known antibiotic names, abbreviations, brand names and codes (ATC, EARS-Net, WHO, etc.) in the [antibiotics] data set. This means that a selector like e.g. [aminoglycosides()] will pick up column names like 'gen', 'genta', 'J01GB03', 'tobra', 'Tobracin', etc.
#' #'
#' **N.B. These functions only work if the `tidyselect` package is installed**, that comes with the `dplyr` package. An error will be thrown if the `tidyselect` package is not installed, or if the functions are used outside a function that allows Tidyverse selections like `select()` or `pivot_longer()`. #' **N.B. These functions require the `tidyselect` package to be installed**, that comes with the `dplyr` package. An error will be thrown if the `tidyselect` package is not installed, or if the functions are used outside a function that allows [Tidyverse selection helpers](https://tidyselect.r-lib.org/reference/language.html) such as [`select()`][dplyr::select()] and [`pivot_longer()`][tidyr::pivot_longer()]`.
#' @rdname antibiotic_class_selectors #' @rdname antibiotic_class_selectors
#' @seealso [filter_ab_class()] for the `filter()` equivalent. #' @seealso [filter_ab_class()] for the `filter()` equivalent.
#' @name antibiotic_class_selectors #' @name antibiotic_class_selectors

View File

@ -23,20 +23,36 @@
# how to conduct AMR analysis: https://msberends.github.io/AMR/ # # how to conduct AMR analysis: https://msberends.github.io/AMR/ #
# ==================================================================== # # ==================================================================== #
format_included_data_number <- function(data) {
if (is.data.frame(data)) {
n <- nrow(data)
} else {
n <- length(unique(data))
}
if (n > 10000) {
rounder <- -3 # round on thousands
} else if (n > 1000) {
rounder <- -2 # round on hundreds
} else {
rounder <- -1 # round on tens
}
paste0("~", format(round(n, rounder), decimal.mark = ".", big.mark = ","))
}
#' The Catalogue of Life #' The Catalogue of Life
#' #'
#' This package contains the complete taxonomic tree of almost all microorganisms from the authoritative and comprehensive Catalogue of Life. #' This package contains the complete taxonomic tree of almost all microorganisms from the authoritative and comprehensive Catalogue of Life.
#' @section Catalogue of Life: #' @section Catalogue of Life:
#' \if{html}{\figure{logo_col.png}{options: height=40px style=margin-bottom:5px} \cr} #' \if{html}{\figure{logo_col.png}{options: height=40px style=margin-bottom:5px} \cr}
#' This package contains the complete taxonomic tree of almost all microorganisms (~70,000 species) from the authoritative and comprehensive Catalogue of Life (<http://www.catalogueoflife.org>). The Catalogue of Life is the most comprehensive and authoritative global index of species currently available. #' This package contains the complete taxonomic tree of almost all microorganisms (~70,000 species) from the authoritative and comprehensive Catalogue of Life (CoL, <http://www.catalogueoflife.org>). The CoL is the most comprehensive and authoritative global index of species currently available. Nonetheless, we supplemented the CoL data with data from the List of Prokaryotic names with Standing in Nomenclature (LPSN, [lpsn.dsmz.de](https://lpsn.dsmz.de)). This supplementation is needed until the [CoL+ project](https://github.com/Sp2000/colplus) is finished, which we await.
#' #'
#' [Click here][catalogue_of_life] for more information about the included taxa. Check which version of the Catalogue of Life was included in this package with [catalogue_of_life_version()]. #' [Click here][catalogue_of_life] for more information about the included taxa. Check which versions of the CoL and LSPN were included in this package with [catalogue_of_life_version()].
#' @section Included taxa: #' @section Included taxa:
#' Included are: #' Included are:
#' - All ~61,000 (sub)species from the kingdoms of Archaea, Bacteria, Chromista and Protozoa #' - All `r format_included_data_number(microorganisms[which(microorganisms$kingdom %in% c("Archeae", "Bacteria", "Chromista", "Protozoa")), ])` (sub)species from the kingdoms of Archaea, Bacteria, Chromista and Protozoa
#' - All ~8,500 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Microascales, Mucorales, Onygenales, Pneumocystales, Saccharomycetales, Schizosaccharomycetales and Tremellales. The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant fungi are covered (like all species of *Aspergillus*, *Candida*, *Cryptococcus*, *Histplasma*, *Pneumocystis*, *Saccharomyces* and *Trichophyton*). #' - All `r format_included_data_number(microorganisms[which(microorganisms$kingdom == "Fungi" & microorganisms$order %in% c("Eurotiales", "Microascales", "Mucorales", "Onygenales", "Pneumocystales", "Saccharomycetales", "Schizosaccharomycetales", "Tremellales")), ])` (sub)species from these orders of the kingdom of Fungi: Eurotiales, Microascales, Mucorales, Onygenales, Pneumocystales, Saccharomycetales, Schizosaccharomycetales and Tremellales, as well as `r format_included_data_number(microorganisms[which(microorganisms$kingdom == "Fungi" & !microorganisms$order %in% c("Eurotiales", "Microascales", "Mucorales", "Onygenales", "Pneumocystales", "Saccharomycetales", "Schizosaccharomycetales", "Tremellales")), ])` other fungal (sub)species. The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant fungi are covered (like all species of *Aspergillus*, *Candida*, *Cryptococcus*, *Histplasma*, *Pneumocystis*, *Saccharomyces* and *Trichophyton*).
#' - All ~150 (sub)species from ~100 other relevant genera from the kingdom of Animalia (like *Strongyloides* and *Taenia*) #' - All `r format_included_data_number(microorganisms[which(microorganisms$kingdom == "Animalia"), ])` (sub)species from `r format_included_data_number(microorganisms[which(microorganisms$kingdom == "Animalia"), "genus"])` other relevant genera from the kingdom of Animalia (like *Strongyloides* and *Taenia*)
#' - All ~23,000 previously accepted names of all included (sub)species (these were taxonomically renamed) #' - All `r format_included_data_number(microorganisms.old)` previously accepted names of all included (sub)species (these were taxonomically renamed)
#' - The complete taxonomic tree of all included (sub)species: from kingdom to subspecies #' - The complete taxonomic tree of all included (sub)species: from kingdom to subspecies
#' - The responsible author(s) and year of scientific publication #' - The responsible author(s) and year of scientific publication
#' #'
@ -57,26 +73,26 @@
#' mo_shortname("Chlamydophila psittaci") #' mo_shortname("Chlamydophila psittaci")
#' # Note: 'Chlamydophila psittaci' (Everett et al., 1999) was renamed back to #' # Note: 'Chlamydophila psittaci' (Everett et al., 1999) was renamed back to
#' # 'Chlamydia psittaci' (Page, 1968) #' # 'Chlamydia psittaci' (Page, 1968)
#' # [1] "C. psittaci" #' #> [1] "C. psittaci"
#' #'
#' # Get any property from the entire taxonomic tree for all included species #' # Get any property from the entire taxonomic tree for all included species
#' mo_class("E. coli") #' mo_class("E. coli")
#' # [1] "Gammaproteobacteria" #' #> [1] "Gammaproteobacteria"
#' #'
#' mo_family("E. coli") #' mo_family("E. coli")
#' # [1] "Enterobacteriaceae" #' #> [1] "Enterobacteriaceae"
#' #'
#' mo_gramstain("E. coli") # based on kingdom and phylum, see ?mo_gramstain #' mo_gramstain("E. coli") # based on kingdom and phylum, see ?mo_gramstain
#' # [1] "Gram negative" #' #> [1] "Gram-negative"
#' #'
#' mo_ref("E. coli") #' mo_ref("E. coli")
#' # [1] "Castellani et al., 1919" #' #> [1] "Castellani et al., 1919"
#' #'
#' # Do not get mistaken - this package is about microorganisms #' # Do not get mistaken - this package is about microorganisms
#' mo_kingdom("C. elegans") #' mo_kingdom("C. elegans")
#' # [1] "Fungi" # Fungi?! #' #> [1] "Fungi" # Fungi?!
#' mo_name("C. elegans") #' mo_name("C. elegans")
#' # [1] "Cladosporium elegans" # Because a microorganism was found #' #> [1] "Cladosporium elegans" # Because a microorganism was found
NULL NULL
#' Version info of included Catalogue of Life #' Version info of included Catalogue of Life

View File

@ -27,7 +27,7 @@
#' #'
#' Determine first (weighted) isolates of all microorganisms of every patient per episode and (if needed) per specimen type. To determine patient episodes not necessarily based on microorganisms, use [is_new_episode()] that also supports grouping with the `dplyr` package. #' Determine first (weighted) isolates of all microorganisms of every patient per episode and (if needed) per specimen type. To determine patient episodes not necessarily based on microorganisms, use [is_new_episode()] that also supports grouping with the `dplyr` package.
#' @inheritSection lifecycle Stable lifecycle #' @inheritSection lifecycle Stable lifecycle
#' @param x a [data.frame] containing isolates. Can be omitted when used inside `dplyr` verbs, such as `filter()`, `mutate()` and `summarise()`. #' @param x a [data.frame] containing isolates. Can be omitted when used inside `dplyr` verbs, such as [`filter()`][dplyr::filter()], [`mutate()`][dplyr::mutate()] and [`summarise()`][dplyr::summarise()].
#' @param col_date column name of the result date (or date that is was received on the lab), defaults to the first column with a date class #' @param col_date column name of the result date (or date that is was received on the lab), defaults to the first column with a date class
#' @param col_patient_id column name of the unique IDs of the patients, defaults to the first column that starts with 'patient' or 'patid' (case insensitive) #' @param col_patient_id column name of the unique IDs of the patients, defaults to the first column that starts with 'patient' or 'patid' (case insensitive)
#' @param col_mo column name of the IDs of the microorganisms (see [as.mo()]), defaults to the first column of class [`mo`]. Values will be coerced using [as.mo()]. #' @param col_mo column name of the IDs of the microorganisms (see [as.mo()]), defaults to the first column of class [`mo`]. Values will be coerced using [as.mo()].

View File

@ -43,7 +43,7 @@
#' #'
#' is_new_episode(example_isolates$date) #' is_new_episode(example_isolates$date)
#' is_new_episode(example_isolates$date, episode_days = 60) #' is_new_episode(example_isolates$date, episode_days = 60)
#' #' \donttest{ #' \donttest{
#' if (require("dplyr")) { #' if (require("dplyr")) {
#' # is_new_episode() can also be used in dplyr verbs to determine patient #' # is_new_episode() can also be used in dplyr verbs to determine patient
#' # episodes based on any (combination of) grouping variables: #' # episodes based on any (combination of) grouping variables:

View File

@ -27,7 +27,7 @@
#' #'
#' Determine which isolates are multidrug-resistant organisms (MDRO) according to international and national guidelines. #' Determine which isolates are multidrug-resistant organisms (MDRO) according to international and national guidelines.
#' @inheritSection lifecycle Stable lifecycle #' @inheritSection lifecycle Stable lifecycle
#' @param x a [data.frame] with antibiotics columns, like `AMX` or `amox`. Can be omitted when used inside `dplyr` verbs, such as `filter()`, `mutate()` and `summarise()`. #' @param x a [data.frame] with antibiotics columns, like `AMX` or `amox`. Can be omitted when used inside `dplyr` verbs, such as [`filter()`][dplyr::filter()], [`mutate()`][dplyr::mutate()] and [`summarise()`][dplyr::summarise()].
#' @param guideline a specific guideline to follow. When left empty, the publication by Magiorakos *et al.* (2012, Clinical Microbiology and Infection) will be followed, please see *Details*. #' @param guideline a specific guideline to follow. When left empty, the publication by Magiorakos *et al.* (2012, Clinical Microbiology and Infection) will be followed, please see *Details*.
#' @inheritParams eucast_rules #' @inheritParams eucast_rules
#' @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 *S. aureus*. Setting this `pct_required_classes` argument to `0.5` (default) means that for every *S. aureus* isolate at least 8 different classes must be available. Any lower number of available classes will return `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 *S. aureus*. Setting this `pct_required_classes` argument to `0.5` (default) means that for every *S. aureus* isolate at least 8 different classes must be available. Any lower number of available classes will return `NA` for that isolate.

View File

@ -27,8 +27,8 @@
#' #'
#' Use these functions to return a specific property of a microorganism based on the latest accepted taxonomy. All input values will be evaluated internally with [as.mo()], which makes it possible to use microbial abbreviations, codes and names as input. Please see *Examples*. #' Use these functions to return a specific property of a microorganism based on the latest accepted taxonomy. All input values will be evaluated internally with [as.mo()], which makes it possible to use microbial abbreviations, codes and names as input. Please see *Examples*.
#' @inheritSection lifecycle Stable lifecycle #' @inheritSection lifecycle Stable lifecycle
#' @param x any character (vector) that can be coerced to a valid microorganism code with [as.mo()] #' @param x any character (vector) that can be coerced to a valid microorganism code with [as.mo()]. Can be omitted for auto-guessing in `mo_is_*()` functions when used inside `dplyr` verbs, such as [`filter()`][dplyr::filter()], [`mutate()`][dplyr::mutate()] and [`summarise()`][dplyr::summarise()], please see *Examples*.
#' @param property one of the column names of the [microorganisms] data set or `"shortname"` #' @param property one of the column names of the [microorganisms] data set: `r paste0('"``', colnames(microorganisms), '\``"', collapse = ", ")`, or must be `"shortname"`
#' @param language language of the returned text, defaults to system language (see [get_locale()]) and can be overwritten by setting the option `AMR_locale`, e.g. `options(AMR_locale = "de")`, see [translate]. Also used to translate text like "no growth". Use `language = NULL` or `language = ""` to prevent translation. #' @param language language of the returned text, defaults to system language (see [get_locale()]) and can be overwritten by setting the option `AMR_locale`, e.g. `options(AMR_locale = "de")`, see [translate]. Also used to translate text like "no growth". Use `language = NULL` or `language = ""` to prevent translation.
#' @param ... other parameters passed on to [as.mo()], such as 'allow_uncertain' and 'ignore_pattern' #' @param ... other parameters passed on to [as.mo()], such as 'allow_uncertain' and 'ignore_pattern'
#' @param ab any (vector of) text that can be coerced to a valid antibiotic code with [as.ab()] #' @param ab any (vector of) text that can be coerced to a valid antibiotic code with [as.ab()]

View File

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

View File

@ -81,7 +81,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">1.4.0.9032</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9033</span>
</span> </span>
</div> </div>

View File

@ -39,7 +39,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">1.4.0.9000</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9032</span>
</span> </span>
</div> </div>
@ -193,7 +193,7 @@
<h1 data-toc-skip>How to conduct AMR analysis</h1> <h1 data-toc-skip>How to conduct AMR analysis</h1>
<h4 class="author">Matthijs S. Berends</h4> <h4 class="author">Matthijs S. Berends</h4>
<h4 class="date">15 October 2020</h4> <h4 class="date">08 December 2020</h4>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/master/vignettes/AMR.Rmd"><code>vignettes/AMR.Rmd</code></a></small> <small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/master/vignettes/AMR.Rmd"><code>vignettes/AMR.Rmd</code></a></small>
<div class="hidden name"><code>AMR.Rmd</code></div> <div class="hidden name"><code>AMR.Rmd</code></div>
@ -202,7 +202,7 @@
<p><strong>Note:</strong> values on this page will change with every website update since they are based on randomly created values and the page was written in <a href="https://rmarkdown.rstudio.com/">R Markdown</a>. However, the methodology remains unchanged. This page was generated on 15 October 2020.</p> <p><strong>Note:</strong> values on this page will change with every website update since they are based on randomly created values and the page was written in <a href="https://rmarkdown.rstudio.com/">R Markdown</a>. However, the methodology remains unchanged. This page was generated on 08 December 2020.</p>
<div id="introduction" class="section level1"> <div id="introduction" class="section level1">
<h1 class="hasAnchor"> <h1 class="hasAnchor">
<a href="#introduction" class="anchor"></a>Introduction</h1> <a href="#introduction" class="anchor"></a>Introduction</h1>
@ -233,21 +233,21 @@
</tr></thead> </tr></thead>
<tbody> <tbody>
<tr class="odd"> <tr class="odd">
<td align="center">2020-10-15</td> <td align="center">2020-12-08</td>
<td align="center">abcd</td> <td align="center">abcd</td>
<td align="center">Escherichia coli</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">S</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">2020-10-15</td> <td align="center">2020-12-08</td>
<td align="center">abcd</td> <td align="center">abcd</td>
<td align="center">Escherichia coli</td> <td align="center">Escherichia coli</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">R</td> <td align="center">R</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">2020-10-15</td> <td align="center">2020-12-08</td>
<td align="center">efgh</td> <td align="center">efgh</td>
<td align="center">Escherichia coli</td> <td align="center">Escherichia coli</td>
<td align="center">R</td> <td align="center">R</td>
@ -352,70 +352,70 @@
</tr></thead> </tr></thead>
<tbody> <tbody>
<tr class="odd"> <tr class="odd">
<td align="center">2011-04-04</td> <td align="center">2015-10-08</td>
<td align="center">A3</td> <td align="center">Y10</td>
<td align="center">Hospital A</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">F</td>
</tr>
<tr class="even">
<td align="center">2014-04-05</td>
<td align="center">O10</td>
<td align="center">Hospital C</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">F</td>
</tr>
<tr class="odd">
<td align="center">2012-07-06</td>
<td align="center">H9</td>
<td align="center">Hospital A</td>
<td align="center">Escherichia coli</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
</tr>
<tr class="even">
<td align="center">2016-09-05</td>
<td align="center">U3</td>
<td align="center">Hospital C</td> <td align="center">Hospital C</td>
<td align="center">Staphylococcus aureus</td> <td align="center">Staphylococcus aureus</td>
<td align="center">R</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>
</tr>
<tr class="even">
<td align="center">2011-10-13</td>
<td align="center">I4</td>
<td align="center">Hospital B</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
</tr>
<tr class="odd">
<td align="center">2015-11-20</td>
<td align="center">J6</td>
<td align="center">Hospital A</td>
<td align="center">Escherichia coli</td>
<td align="center">I</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">M</td>
</tr>
<tr class="even">
<td align="center">2017-02-04</td>
<td align="center">X3</td>
<td align="center">Hospital B</td>
<td align="center">Klebsiella pneumoniae</td>
<td align="center">S</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> <td align="center">F</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">2010-10-17</td> <td align="center">2017-05-23</td>
<td align="center">N9</td> <td align="center">S5</td>
<td align="center">Hospital D</td> <td align="center">Hospital C</td>
<td align="center">Staphylococcus aureus</td> <td align="center">Escherichia coli</td>
<td align="center">I</td>
<td align="center">I</td> <td align="center">I</td>
<td align="center">R</td> <td align="center">R</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">R</td>
<td align="center">F</td> <td align="center">F</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">2014-06-04</td> <td align="center">2013-11-30</td>
<td align="center">X3</td> <td align="center">J2</td>
<td align="center">Hospital A</td> <td align="center">Hospital C</td>
<td align="center">Escherichia coli</td> <td align="center">Streptococcus pneumoniae</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">S</td> <td align="center">M</td>
<td align="center">F</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -449,16 +449,16 @@ Longest: 1</p>
<tr class="odd"> <tr class="odd">
<td align="left">1</td> <td align="left">1</td>
<td align="left">M</td> <td align="left">M</td>
<td align="right">10,412</td> <td align="right">10,384</td>
<td align="right">52.06%</td> <td align="right">51.92%</td>
<td align="right">10,412</td> <td align="right">10,384</td>
<td align="right">52.06%</td> <td align="right">51.92%</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="left">2</td> <td align="left">2</td>
<td align="left">F</td> <td align="left">F</td>
<td align="right">9,588</td> <td align="right">9,616</td>
<td align="right">47.94%</td> <td align="right">48.08%</td>
<td align="right">20,000</td> <td align="right">20,000</td>
<td align="right">100.00%</td> <td align="right">100.00%</td>
</tr> </tr>
@ -501,10 +501,10 @@ Longest: 1</p>
<div class="sourceCode" id="cb15"><pre class="downlit"> <div class="sourceCode" id="cb15"><pre class="downlit">
<span class="va">data</span> <span class="op">&lt;-</span> <span class="va">data</span> <span class="op">%&gt;%</span> <span class="va">data</span> <span class="op">&lt;-</span> <span class="va">data</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op">(</span>first <span class="op">=</span> <span class="fu"><a href="../reference/first_isolate.html">first_isolate</a></span><span class="op">(</span><span class="va">.</span><span class="op">)</span><span class="op">)</span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op">(</span>first <span class="op">=</span> <span class="fu"><a href="../reference/first_isolate.html">first_isolate</a></span><span class="op">(</span><span class="va">.</span><span class="op">)</span><span class="op">)</span>
<span class="co"># NOTE: Using column `bacteria` as input for `col_mo`.</span> <span class="co"># NOTE: Using column 'bacteria' as input for `col_mo`.</span>
<span class="co"># NOTE: Using column `date` as input for `col_date`.</span> <span class="co"># NOTE: Using column 'date' as input for `col_date`.</span>
<span class="co"># NOTE: Using column `patient_id` as input for `col_patient_id`.</span></pre></div> <span class="co"># NOTE: Using column 'patient_id' as input for `col_patient_id`.</span></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.6% 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="cb16"><pre class="downlit"> <div class="sourceCode" id="cb16"><pre class="downlit">
<span class="va">data_1st</span> <span class="op">&lt;-</span> <span class="va">data</span> <span class="op">%&gt;%</span> <span class="va">data_1st</span> <span class="op">&lt;-</span> <span class="va">data</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op">(</span><span class="va">first</span> <span class="op">==</span> <span class="cn">TRUE</span><span class="op">)</span></pre></div> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op">(</span><span class="va">first</span> <span class="op">==</span> <span class="cn">TRUE</span><span class="op">)</span></pre></div>
@ -516,7 +516,7 @@ Longest: 1</p>
<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 Z7, 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 A3, 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>
@ -532,21 +532,21 @@ Longest: 1</p>
<tbody> <tbody>
<tr class="odd"> <tr class="odd">
<td align="center">1</td> <td align="center">1</td>
<td align="center">2010-03-27</td> <td align="center">2010-01-04</td>
<td align="center">Z7</td> <td align="center">A3</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">R</td> <td align="center">R</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-10</td> <td align="center">2010-01-05</td>
<td align="center">Z7</td> <td align="center">A3</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">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
@ -554,30 +554,30 @@ Longest: 1</p>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">3</td> <td align="center">3</td>
<td align="center">2010-06-25</td> <td align="center">2010-02-07</td>
<td align="center">Z7</td> <td align="center">A3</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">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">FALSE</td>
</tr>
<tr class="even">
<td align="center">4</td>
<td align="center">2010-11-05</td>
<td align="center">Z7</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">R</td> <td align="center">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">
<td align="center">4</td>
<td align="center">2010-06-17</td>
<td align="center">A3</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">FALSE</td>
</tr>
<tr class="odd"> <tr class="odd">
<td align="center">5</td> <td align="center">5</td>
<td align="center">2010-11-22</td> <td align="center">2010-07-23</td>
<td align="center">Z7</td> <td align="center">A3</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>
@ -587,8 +587,8 @@ Longest: 1</p>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">6</td> <td align="center">6</td>
<td align="center">2011-02-06</td> <td align="center">2010-11-16</td>
<td align="center">Z7</td> <td align="center">A3</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>
@ -598,45 +598,45 @@ Longest: 1</p>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">7</td> <td align="center">7</td>
<td align="center">2011-03-19</td> <td align="center">2010-12-05</td>
<td align="center">Z7</td> <td align="center">A3</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">I</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">FALSE</td> <td align="center">FALSE</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">8</td> <td align="center">8</td>
<td align="center">2011-07-19</td> <td align="center">2011-01-17</td>
<td align="center">Z7</td> <td align="center">A3</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">R</td>
<td align="center">S</td>
<td align="center">TRUE</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-08-15</td> <td align="center">2011-01-26</td>
<td align="center">Z7</td> <td align="center">A3</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">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">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-22</td> <td align="center">2011-02-12</td>
<td align="center">Z7</td> <td align="center">A3</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">R</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">FALSE</td> <td align="center">FALSE</td>
</tr> </tr>
@ -648,11 +648,12 @@ Longest: 1</p>
<span class="va">data</span> <span class="op">&lt;-</span> <span class="va">data</span> <span class="op">%&gt;%</span> <span class="va">data</span> <span class="op">&lt;-</span> <span class="va">data</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op">(</span>keyab <span class="op">=</span> <span class="fu"><a href="../reference/key_antibiotics.html">key_antibiotics</a></span><span class="op">(</span><span class="va">.</span><span class="op">)</span><span class="op">)</span> <span class="op">%&gt;%</span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op">(</span>keyab <span class="op">=</span> <span class="fu"><a href="../reference/key_antibiotics.html">key_antibiotics</a></span><span class="op">(</span><span class="va">.</span><span class="op">)</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op">(</span>first_weighted <span class="op">=</span> <span class="fu"><a href="../reference/first_isolate.html">first_isolate</a></span><span class="op">(</span><span class="va">.</span><span class="op">)</span><span class="op">)</span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op">(</span>first_weighted <span class="op">=</span> <span class="fu"><a href="../reference/first_isolate.html">first_isolate</a></span><span class="op">(</span><span class="va">.</span><span class="op">)</span><span class="op">)</span>
<span class="co"># NOTE: Using column `bacteria` as input for `col_mo`.</span> <span class="co"># NOTE: Using column 'bacteria' as input for `col_mo`.</span>
<span class="co"># NOTE: Using column `bacteria` as input for `col_mo`.</span> <span class="co"># NOTE: Using column 'bacteria' as input for `col_mo`.</span>
<span class="co"># NOTE: Using column `date` as input for `col_date`.</span> <span class="co"># NOTE: Using column 'date' as input for `col_date`.</span>
<span class="co"># NOTE: Using column `patient_id` as input for `col_patient_id`.</span> <span class="co"># NOTE: Using column 'patient_id' as input for `col_patient_id`.</span>
<span class="co"># NOTE: Using column `keyab` as input for `col_keyantibiotics`. Use col_keyantibiotics = FALSE to prevent this.</span></pre></div> <span class="co"># NOTE: Using column 'keyab' as input for `col_keyantibiotics`. Use</span>
<span class="co"># col_keyantibiotics = FALSE to prevent this.</span></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>
@ -669,22 +670,22 @@ Longest: 1</p>
<tbody> <tbody>
<tr class="odd"> <tr class="odd">
<td align="center">1</td> <td align="center">1</td>
<td align="center">2010-03-27</td> <td align="center">2010-01-04</td>
<td align="center">Z7</td> <td align="center">A3</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">R</td> <td align="center">R</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-10</td> <td align="center">2010-01-05</td>
<td align="center">Z7</td> <td align="center">A3</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">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
@ -693,32 +694,20 @@ Longest: 1</p>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">3</td> <td align="center">3</td>
<td align="center">2010-06-25</td> <td align="center">2010-02-07</td>
<td align="center">Z7</td> <td align="center">A3</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">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">FALSE</td>
<td align="center">FALSE</td>
</tr>
<tr class="even">
<td align="center">4</td>
<td align="center">2010-11-05</td>
<td align="center">Z7</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">R</td> <td align="center">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">TRUE</td> <td align="center">TRUE</td>
</tr> </tr>
<tr class="odd"> <tr class="even">
<td align="center">5</td> <td align="center">4</td>
<td align="center">2010-11-22</td> <td align="center">2010-06-17</td>
<td align="center">Z7</td> <td align="center">A3</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>
@ -727,10 +716,22 @@ Longest: 1</p>
<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">
<td align="center">5</td>
<td align="center">2010-07-23</td>
<td align="center">A3</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">FALSE</td>
<td align="center">FALSE</td>
</tr>
<tr class="even"> <tr class="even">
<td align="center">6</td> <td align="center">6</td>
<td align="center">2011-02-06</td> <td align="center">2010-11-16</td>
<td align="center">Z7</td> <td align="center">A3</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>
@ -741,60 +742,60 @@ Longest: 1</p>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">7</td> <td align="center">7</td>
<td align="center">2011-03-19</td> <td align="center">2010-12-05</td>
<td align="center">Z7</td> <td align="center">A3</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">I</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">FALSE</td> <td align="center">FALSE</td>
<td align="center">TRUE</td> <td align="center">FALSE</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">8</td> <td align="center">8</td>
<td align="center">2011-07-19</td> <td align="center">2011-01-17</td>
<td align="center">Z7</td> <td align="center">A3</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">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="odd"> <tr class="odd">
<td align="center">9</td> <td align="center">9</td>
<td align="center">2011-08-15</td> <td align="center">2011-01-26</td>
<td align="center">Z7</td> <td align="center">A3</td>
<td align="center">B_ESCHR_COLI</td> <td align="center">B_ESCHR_COLI</td>
<td align="center">R</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">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">FALSE</td> <td align="center">FALSE</td>
<td align="center">TRUE</td> <td align="center">TRUE</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">10</td> <td align="center">10</td>
<td align="center">2011-09-22</td> <td align="center">2011-02-12</td>
<td align="center">Z7</td> <td align="center">A3</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">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">TRUE</td> <td align="center">TRUE</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<p>Instead of 2, now 8 isolates are flagged. In total, 78.6% of all isolates are marked first weighted - 50.2% 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 7 isolates are flagged. In total, 79.1% of all isolates are marked first weighted - 50.6% 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="cb19"><pre class="downlit"> <div class="sourceCode" id="cb19"><pre class="downlit">
<span class="va">data_1st</span> <span class="op">&lt;-</span> <span class="va">data</span> <span class="op">%&gt;%</span> <span class="va">data_1st</span> <span class="op">&lt;-</span> <span class="va">data</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="../reference/first_isolate.html">filter_first_weighted_isolate</a></span><span class="op">(</span><span class="op">)</span></pre></div> <span class="fu"><a href="../reference/first_isolate.html">filter_first_weighted_isolate</a></span><span class="op">(</span><span class="op">)</span></pre></div>
<p>So we end up with 15,713 isolates for analysis.</p> <p>So we end up with 15,822 isolates for analysis.</p>
<p>We can remove unneeded columns:</p> <p>We can remove unneeded columns:</p>
<div class="sourceCode" id="cb20"><pre class="downlit"> <div class="sourceCode" id="cb20"><pre class="downlit">
<span class="va">data_1st</span> <span class="op">&lt;-</span> <span class="va">data_1st</span> <span class="op">%&gt;%</span> <span class="va">data_1st</span> <span class="op">&lt;-</span> <span class="va">data_1st</span> <span class="op">%&gt;%</span>
@ -837,47 +838,15 @@ Longest: 1</p>
</tr></thead> </tr></thead>
<tbody> <tbody>
<tr class="odd"> <tr class="odd">
<td align="left">1</td>
<td align="center">2011-04-04</td>
<td align="center">A3</td>
<td align="center">Hospital C</td>
<td align="center">B_STPHY_AURS</td>
<td align="center">R</td>
<td align="center">I</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
<td align="center">Gram-positive</td>
<td align="center">Staphylococcus</td>
<td align="center">aureus</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="center">2011-10-13</td>
<td align="center">I4</td>
<td align="center">Hospital B</td>
<td align="center">B_ESCHR_COLI</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">M</td>
<td align="center">Gram-negative</td>
<td align="center">Escherichia</td>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="left">3</td> <td align="left">3</td>
<td align="center">2015-11-20</td> <td align="center">2012-07-06</td>
<td align="center">J6</td> <td align="center">H9</td>
<td align="center">Hospital A</td> <td align="center">Hospital A</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">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> <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>
@ -886,45 +855,77 @@ Longest: 1</p>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="left">4</td> <td align="left">4</td>
<td align="center">2017-02-04</td> <td align="center">2016-09-05</td>
<td align="center">X3</td> <td align="center">U3</td>
<td align="center">Hospital B</td> <td align="center">Hospital C</td>
<td align="center">B_KLBSL_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">F</td>
<td align="center">Gram-negative</td>
<td align="center">Klebsiella</td>
<td align="center">pneumoniae</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="left">5</td>
<td align="center">2010-10-17</td>
<td align="center">N9</td>
<td align="center">Hospital D</td>
<td align="center">B_STPHY_AURS</td> <td align="center">B_STPHY_AURS</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">R</td> <td align="center">S</td>
<td align="center">S</td>
<td align="center">F</td> <td align="center">F</td>
<td align="center">Gram-positive</td> <td align="center">Gram-positive</td>
<td align="center">Staphylococcus</td> <td align="center">Staphylococcus</td>
<td align="center">aureus</td> <td align="center">aureus</td>
<td align="center">TRUE</td> <td align="center">TRUE</td>
</tr> </tr>
<tr class="even"> <tr class="odd">
<td align="left">7</td> <td align="left">5</td>
<td align="center">2011-06-10</td> <td align="center">2017-05-23</td>
<td align="center">P2</td> <td align="center">S5</td>
<td align="center">Hospital B</td> <td align="center">Hospital C</td>
<td align="center">B_STRPT_PNMN</td> <td align="center">B_ESCHR_COLI</td>
<td align="center">I</td> <td align="center">I</td>
<td align="center">I</td> <td align="center">I</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">F</td>
<td align="center">Gram-negative</td>
<td align="center">Escherichia</td>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="left">8</td>
<td align="center">2016-07-20</td>
<td align="center">D2</td>
<td align="center">Hospital B</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">M</td>
<td align="center">Gram-negative</td>
<td align="center">Escherichia</td>
<td align="center">coli</td>
<td align="center">TRUE</td>
</tr>
<tr class="odd">
<td align="left">9</td>
<td align="center">2010-09-20</td>
<td align="center">H10</td>
<td align="center">Hospital D</td>
<td align="center">B_STPHY_AURS</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">S</td>
<td align="center">M</td>
<td align="center">Gram-positive</td>
<td align="center">Staphylococcus</td>
<td align="center">aureus</td>
<td align="center">TRUE</td>
</tr>
<tr class="even">
<td align="left">10</td>
<td align="center">2012-03-30</td>
<td align="center">Y4</td>
<td align="center">Hospital B</td>
<td align="center">B_STRPT_PNMN</td>
<td align="center">S</td>
<td align="center">S</td>
<td align="center">R</td>
<td align="center">R</td> <td align="center">R</td>
<td align="center">F</td> <td align="center">F</td>
<td align="center">Gram-positive</td> <td align="center">Gram-positive</td>
@ -953,8 +954,8 @@ Longest: 1</p>
<span class="va">data_1st</span> <span class="op">%&gt;%</span> <span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span><span class="op">(</span><span class="va">genus</span>, <span class="va">species</span><span class="op">)</span></pre></div> <span class="va">data_1st</span> <span class="op">%&gt;%</span> <span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span><span class="op">(</span><span class="va">genus</span>, <span class="va">species</span><span class="op">)</span></pre></div>
<p><strong>Frequency table</strong></p> <p><strong>Frequency table</strong></p>
<p>Class: character<br> <p>Class: character<br>
Length: 15,713<br> Length: 15,822<br>
Available: 15,713 (100%, NA: 0 = 0%)<br> Available: 15,822 (100%, NA: 0 = 0%)<br>
Unique: 4</p> Unique: 4</p>
<p>Shortest: 16<br> <p>Shortest: 16<br>
Longest: 24</p> Longest: 24</p>
@ -971,33 +972,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,867</td> <td align="right">7,935</td>
<td align="right">50.07%</td> <td align="right">50.15%</td>
<td align="right">7,867</td> <td align="right">7,935</td>
<td align="right">50.07%</td> <td align="right">50.15%</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,842</td> <td align="right">3,933</td>
<td align="right">24.45%</td> <td align="right">24.86%</td>
<td align="right">11,709</td> <td align="right">11,868</td>
<td align="right">74.52%</td> <td align="right">75.01%</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,346</td> <td align="right">2,376</td>
<td align="right">14.93%</td> <td align="right">15.02%</td>
<td align="right">14,055</td> <td align="right">14,244</td>
<td align="right">89.45%</td> <td align="right">90.03%</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,658</td> <td align="right">1,578</td>
<td align="right">10.55%</td> <td align="right">9.97%</td>
<td align="right">15,713</td> <td align="right">15,822</td>
<td align="right">100.00%</td> <td align="right">100.00%</td>
</tr> </tr>
</tbody> </tbody>
@ -1011,7 +1012,7 @@ Longest: 24</p>
<span class="va">data_1st</span> <span class="op">%&gt;%</span> <span class="va">data_1st</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="../reference/bug_drug_combinations.html">bug_drug_combinations</a></span><span class="op">(</span><span class="op">)</span> <span class="op">%&gt;%</span> <span class="fu"><a href="../reference/bug_drug_combinations.html">bug_drug_combinations</a></span><span class="op">(</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://rdrr.io/r/utils/head.html">head</a></span><span class="op">(</span><span class="op">)</span> <span class="co"># show first 6 rows</span></pre></div> <span class="fu"><a href="https://rdrr.io/r/utils/head.html">head</a></span><span class="op">(</span><span class="op">)</span> <span class="co"># show first 6 rows</span></pre></div>
<pre><code># NOTE: Using column `bacteria` as input for `col_mo`.</code></pre> <pre><code># NOTE: Using column 'bacteria' as input for `col_mo`.</code></pre>
<table class="table"> <table class="table">
<thead><tr class="header"> <thead><tr class="header">
<th align="center">mo</th> <th align="center">mo</th>
@ -1025,50 +1026,50 @@ Longest: 24</p>
<tr class="odd"> <tr class="odd">
<td align="center">E. coli</td> <td align="center">E. coli</td>
<td align="center">AMX</td> <td align="center">AMX</td>
<td align="center">3806</td> <td align="center">3811</td>
<td align="center">262</td> <td align="center">259</td>
<td align="center">3799</td> <td align="center">3865</td>
<td align="center">7867</td> <td align="center">7935</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">E. coli</td> <td align="center">E. coli</td>
<td align="center">AMC</td> <td align="center">AMC</td>
<td align="center">6223</td> <td align="center">6278</td>
<td align="center">321</td> <td align="center">298</td>
<td align="center">1323</td> <td align="center">1359</td>
<td align="center">7867</td> <td align="center">7935</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">E. coli</td> <td align="center">E. coli</td>
<td align="center">CIP</td> <td align="center">CIP</td>
<td align="center">6006</td> <td align="center">6070</td>
<td align="center">0</td> <td align="center">0</td>
<td align="center">1861</td> <td align="center">1865</td>
<td align="center">7867</td> <td align="center">7935</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">E. coli</td> <td align="center">E. coli</td>
<td align="center">GEN</td> <td align="center">GEN</td>
<td align="center">7072</td> <td align="center">7138</td>
<td align="center">0</td> <td align="center">0</td>
<td align="center">795</td> <td align="center">797</td>
<td align="center">7867</td> <td align="center">7935</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">K. pneumoniae</td> <td align="center">K. pneumoniae</td>
<td align="center">AMX</td> <td align="center">AMX</td>
<td align="center">0</td> <td align="center">0</td>
<td align="center">0</td> <td align="center">0</td>
<td align="center">1658</td> <td align="center">1578</td>
<td align="center">1658</td> <td align="center">1578</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">K. pneumoniae</td> <td align="center">K. pneumoniae</td>
<td align="center">AMC</td> <td align="center">AMC</td>
<td align="center">1298</td> <td align="center">1248</td>
<td align="center">56</td> <td align="center">57</td>
<td align="center">304</td> <td align="center">273</td>
<td align="center">1658</td> <td align="center">1578</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -1077,8 +1078,8 @@ Longest: 24</p>
<span class="va">data_1st</span> <span class="op">%&gt;%</span> <span class="va">data_1st</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op">(</span><span class="va">bacteria</span>, <span class="fu"><a href="../reference/antibiotic_class_selectors.html">fluoroquinolones</a></span><span class="op">(</span><span class="op">)</span><span class="op">)</span> <span class="op">%&gt;%</span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op">(</span><span class="va">bacteria</span>, <span class="fu"><a href="../reference/antibiotic_class_selectors.html">fluoroquinolones</a></span><span class="op">(</span><span class="op">)</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="../reference/bug_drug_combinations.html">bug_drug_combinations</a></span><span class="op">(</span><span class="op">)</span></pre></div> <span class="fu"><a href="../reference/bug_drug_combinations.html">bug_drug_combinations</a></span><span class="op">(</span><span class="op">)</span></pre></div>
<pre><code># Selecting fluoroquinolones: `CIP` (ciprofloxacin) <pre><code># Selecting fluoroquinolones: 'CIP' (ciprofloxacin)
# NOTE: Using column `bacteria` as input for `col_mo`.</code></pre> # NOTE: Using column 'bacteria' as input for `col_mo`.</code></pre>
<table class="table"> <table class="table">
<thead><tr class="header"> <thead><tr class="header">
<th align="center">mo</th> <th align="center">mo</th>
@ -1092,34 +1093,34 @@ Longest: 24</p>
<tr class="odd"> <tr class="odd">
<td align="center">E. coli</td> <td align="center">E. coli</td>
<td align="center">CIP</td> <td align="center">CIP</td>
<td align="center">6006</td> <td align="center">6070</td>
<td align="center">0</td> <td align="center">0</td>
<td align="center">1861</td> <td align="center">1865</td>
<td align="center">7867</td> <td align="center">7935</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">K. pneumoniae</td> <td align="center">K. pneumoniae</td>
<td align="center">CIP</td> <td align="center">CIP</td>
<td align="center">1257</td> <td align="center">1219</td>
<td align="center">0</td> <td align="center">0</td>
<td align="center">401</td> <td align="center">359</td>
<td align="center">1658</td> <td align="center">1578</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">S. aureus</td> <td align="center">S. aureus</td>
<td align="center">CIP</td> <td align="center">CIP</td>
<td align="center">2963</td> <td align="center">3015</td>
<td align="center">0</td> <td align="center">0</td>
<td align="center">879</td> <td align="center">918</td>
<td align="center">3842</td> <td align="center">3933</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">S. pneumoniae</td> <td align="center">S. pneumoniae</td>
<td align="center">CIP</td> <td align="center">CIP</td>
<td align="center">1785</td> <td align="center">1798</td>
<td align="center">0</td> <td align="center">0</td>
<td align="center">561</td> <td align="center">578</td>
<td align="center">2346</td> <td align="center">2376</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -1132,7 +1133,7 @@ Longest: 24</p>
<p>As per the EUCAST guideline of 2019, we calculate resistance as the proportion of R (<code><a href="../reference/proportion.html">proportion_R()</a></code>, equal to <code><a href="../reference/proportion.html">resistance()</a></code>) and susceptibility as the proportion of S and I (<code><a href="../reference/proportion.html">proportion_SI()</a></code>, equal to <code><a href="../reference/proportion.html">susceptibility()</a></code>). These functions can be used on their own:</p> <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="cb28"><pre class="downlit"> <div class="sourceCode" id="cb28"><pre class="downlit">
<span class="va">data_1st</span> <span class="op">%&gt;%</span> <span class="fu"><a href="../reference/proportion.html">resistance</a></span><span class="op">(</span><span class="va">AMX</span><span class="op">)</span> <span class="va">data_1st</span> <span class="op">%&gt;%</span> <span class="fu"><a href="../reference/proportion.html">resistance</a></span><span class="op">(</span><span class="va">AMX</span><span class="op">)</span>
<span class="co"># [1] 0.5382168</span></pre></div> <span class="co"># [1] 0.535457</span></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="cb29"><pre class="downlit"> <div class="sourceCode" id="cb29"><pre class="downlit">
<span class="va">data_1st</span> <span class="op">%&gt;%</span> <span class="va">data_1st</span> <span class="op">%&gt;%</span>
@ -1147,19 +1148,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.5459117</td> <td align="center">0.5309604</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.5280457</td> <td align="center">0.5345539</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.5268007</td> <td align="center">0.5403226</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.5537583</td> <td align="center">0.5401970</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -1179,23 +1180,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.5459117</td> <td align="center">0.5309604</td>
<td align="center">4574</td> <td align="center">4748</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.5280457</td> <td align="center">0.5345539</td>
<td align="center">5598</td> <td align="center">5571</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.5268007</td> <td align="center">0.5403226</td>
<td align="center">2388</td> <td align="center">2356</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.5537583</td> <td align="center">0.5401970</td>
<td align="center">3153</td> <td align="center">3147</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -1217,27 +1218,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.8318292</td> <td align="center">0.8287335</td>
<td align="center">0.8989450</td> <td align="center">0.8995589</td>
<td align="center">0.9853820</td> <td align="center">0.9863894</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">Klebsiella</td> <td align="center">Klebsiella</td>
<td align="center">0.8166466</td> <td align="center">0.8269962</td>
<td align="center">0.8908323</td> <td align="center">0.8941698</td>
<td align="center">0.9782871</td> <td align="center">0.9828897</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">Staphylococcus</td> <td align="center">Staphylococcus</td>
<td align="center">0.8232691</td> <td align="center">0.8245614</td>
<td align="center">0.9190526</td> <td align="center">0.9211798</td>
<td align="center">0.9880271</td> <td align="center">0.9839817</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">Streptococcus</td> <td align="center">Streptococcus</td>
<td align="center">0.5264280</td> <td align="center">0.5366162</td>
<td align="center">0.0000000</td> <td align="center">0.0000000</td>
<td align="center">0.5264280</td> <td align="center">0.5366162</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 45 KiB

View File

@ -318,18 +318,18 @@ Unique: 2</p>
<div class="sourceCode" id="cb5"><pre class="downlit"> <div class="sourceCode" id="cb5"><pre class="downlit">
<span class="fu"><a href="https://rdrr.io/r/utils/head.html">head</a></span><span class="op">(</span><span class="va">my_TB_data</span><span class="op">)</span> <span class="fu"><a href="https://rdrr.io/r/utils/head.html">head</a></span><span class="op">(</span><span class="va">my_TB_data</span><span class="op">)</span>
<span class="co"># rifampicin isoniazid gatifloxacin ethambutol pyrazinamide moxifloxacin</span> <span class="co"># rifampicin isoniazid gatifloxacin ethambutol pyrazinamide moxifloxacin</span>
<span class="co"># 1 S I R S R R</span> <span class="co"># 1 S S R R R R</span>
<span class="co"># 2 R S S R I S</span> <span class="co"># 2 R S S R S S</span>
<span class="co"># 3 I R I S R S</span> <span class="co"># 3 S R R R S S</span>
<span class="co"># 4 I S S R S R</span> <span class="co"># 4 S S S S S S</span>
<span class="co"># 5 R R S S R R</span> <span class="co"># 5 R S R S R S</span>
<span class="co"># 6 S R I S S I</span> <span class="co"># 6 S S R S S S</span>
<span class="co"># kanamycin</span> <span class="co"># kanamycin</span>
<span class="co"># 1 R</span> <span class="co"># 1 R</span>
<span class="co"># 2 S</span> <span class="co"># 2 R</span>
<span class="co"># 3 S</span> <span class="co"># 3 R</span>
<span class="co"># 4 R</span> <span class="co"># 4 S</span>
<span class="co"># 5 R</span> <span class="co"># 5 S</span>
<span class="co"># 6 S</span></pre></div> <span class="co"># 6 S</span></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="downlit"> <div class="sourceCode" id="cb6"><pre class="downlit">
@ -361,40 +361,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">3313</td> <td align="right">3327</td>
<td align="right">66.26%</td> <td align="right">66.54%</td>
<td align="right">3313</td> <td align="right">3327</td>
<td align="right">66.26%</td> <td align="right">66.54%</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">631</td> <td align="right">632</td>
<td align="right">12.62%</td> <td align="right">12.64%</td>
<td align="right">3944</td> <td align="right">3959</td>
<td align="right">78.88%</td> <td align="right">79.18%</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">575</td> <td align="right">536</td>
<td align="right">11.50%</td> <td align="right">10.72%</td>
<td align="right">4519</td> <td align="right">4495</td>
<td align="right">90.38%</td> <td align="right">89.90%</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">275</td> <td align="right">277</td>
<td align="right">5.50%</td> <td align="right">5.54%</td>
<td align="right">4794</td> <td align="right">4772</td>
<td align="right">95.88%</td> <td align="right">95.44%</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">206</td> <td align="right">228</td>
<td align="right">4.12%</td> <td align="right">4.56%</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

@ -39,7 +39,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">1.4.0.9008</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9032</span>
</span> </span>
</div> </div>
@ -187,8 +187,7 @@
</header><script src="PCA_files/accessible-code-block-0.0.1/empty-anchor.js"></script><link href="PCA_files/anchor-sections-1.0/anchor-sections.css" rel="stylesheet"> </header><script src="PCA_files/header-attrs-2.4/header-attrs.js"></script><script src="PCA_files/accessible-code-block-0.0.1/empty-anchor.js"></script><div class="row">
<script src="PCA_files/anchor-sections-1.0/anchor-sections.js"></script><div class="row">
<div class="col-md-9 contents"> <div class="col-md-9 contents">
<div class="page-header toc-ignore"> <div class="page-header toc-ignore">
<h1 data-toc-skip>How to conduct principal component analysis (PCA) for AMR</h1> <h1 data-toc-skip>How to conduct principal component analysis (PCA) for AMR</h1>
@ -292,8 +291,8 @@
<p>The new <code><a href="../reference/pca.html">pca()</a></code> function will automatically filter on rows that contain numeric values in all selected variables, so we now only need to do:</p> <p>The new <code><a href="../reference/pca.html">pca()</a></code> function will automatically filter on rows that contain numeric values in all selected variables, so we now only need to do:</p>
<div class="sourceCode" id="cb3"><pre class="downlit"> <div class="sourceCode" id="cb3"><pre class="downlit">
<span class="va">pca_result</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/pca.html">pca</a></span><span class="op">(</span><span class="va">resistance_data</span><span class="op">)</span> <span class="va">pca_result</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/pca.html">pca</a></span><span class="op">(</span><span class="va">resistance_data</span><span class="op">)</span>
<span class="co"># NOTE: Columns selected for PCA: AMC CXM CTX CAZ GEN TOB TMP SXT.</span> <span class="co"># NOTE: Columns selected for PCA: AMC CXM CTX CAZ GEN TOB TMP SXT. Total</span>
<span class="co"># Total observations available: 7.</span></pre></div> <span class="co"># observations available: 7.</span></pre></div>
<p>The result can be reviewed with the good old <code><a href="https://rdrr.io/r/base/summary.html">summary()</a></code> function:</p> <p>The result can be reviewed with the good old <code><a href="https://rdrr.io/r/base/summary.html">summary()</a></code> function:</p>
<div class="sourceCode" id="cb4"><pre class="downlit"> <div class="sourceCode" id="cb4"><pre class="downlit">
<span class="fu"><a href="https://rdrr.io/r/base/summary.html">summary</a></span><span class="op">(</span><span class="va">pca_result</span><span class="op">)</span> <span class="fu"><a href="https://rdrr.io/r/base/summary.html">summary</a></span><span class="op">(</span><span class="va">pca_result</span><span class="op">)</span>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

After

Width:  |  Height:  |  Size: 93 KiB

View File

@ -0,0 +1,12 @@
// Pandoc 2.9 adds attributes on both header and div. We remove the former (to
// be compatible with the behavior of Pandoc < 2.8).
document.addEventListener('DOMContentLoaded', function(e) {
var hs = document.querySelectorAll("div.section[class*='level'] > :first-child");
var i, h, a;
for (i = 0; i < hs.length; i++) {
h = hs[i];
if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6
a = h.attributes;
while (a.length > 0) h.removeAttribute(a[0].name);
}
});

View File

@ -39,7 +39,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">1.4.0.9008</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9032</span>
</span> </span>
</div> </div>
@ -187,14 +187,13 @@
</header><script src="SPSS_files/accessible-code-block-0.0.1/empty-anchor.js"></script><link href="SPSS_files/anchor-sections-1.0/anchor-sections.css" rel="stylesheet"> </header><script src="SPSS_files/header-attrs-2.4/header-attrs.js"></script><script src="SPSS_files/accessible-code-block-0.0.1/empty-anchor.js"></script><div class="row">
<script src="SPSS_files/anchor-sections-1.0/anchor-sections.js"></script><div class="row">
<div class="col-md-9 contents"> <div class="col-md-9 contents">
<div class="page-header toc-ignore"> <div class="page-header toc-ignore">
<h1 data-toc-skip>How to import data from SPSS / SAS / Stata</h1> <h1 data-toc-skip>How to import data from SPSS / SAS / Stata</h1>
<h4 class="author">Matthijs S. Berends</h4> <h4 class="author">Matthijs S. Berends</h4>
<h4 class="date">26 October 2020</h4> <h4 class="date">08 December 2020</h4>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/master/vignettes/SPSS.Rmd"><code>vignettes/SPSS.Rmd</code></a></small> <small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/master/vignettes/SPSS.Rmd"><code>vignettes/SPSS.Rmd</code></a></small>
<div class="hidden name"><code>SPSS.Rmd</code></div> <div class="hidden name"><code>SPSS.Rmd</code></div>
@ -294,7 +293,7 @@
<p>If additional packages are needed, RStudio will ask you if they should be installed on beforehand.</p> <p>If additional packages are needed, RStudio will ask you if they should be installed on beforehand.</p>
<p>In the the window that opens, you can define all options (parameters) that should be used for import and youre ready to go:</p> <p>In the the window that opens, you can define all options (parameters) that should be used for import and youre ready to go:</p>
<p><img src="https://github.com/msberends/AMR/raw/master/docs/import2.png"></p> <p><img src="https://github.com/msberends/AMR/raw/master/docs/import2.png"></p>
<p>If you want named variables to be imported as factors so it resembles SPSS more, use <code>as_factor()</code>.</p> <p>If you want named variables to be imported as factors so it resembles SPSS more, use <code><a href="https://haven.tidyverse.org/reference/as_factor.html">as_factor()</a></code>.</p>
<p>The difference is this:</p> <p>The difference is this:</p>
<div class="sourceCode" id="cb2"><pre class="downlit"> <div class="sourceCode" id="cb2"><pre class="downlit">
<span class="va">SPSS_data</span> <span class="va">SPSS_data</span>
@ -337,7 +336,7 @@
<span class="co"># download and install the latest version:</span> <span class="co"># download and install the latest version:</span>
<span class="fu"><a href="https://rdrr.io/r/utils/install.packages.html">install.packages</a></span><span class="op">(</span><span class="st">"haven"</span><span class="op">)</span> <span class="fu"><a href="https://rdrr.io/r/utils/install.packages.html">install.packages</a></span><span class="op">(</span><span class="st">"haven"</span><span class="op">)</span>
<span class="co"># load the package you just installed:</span> <span class="co"># load the package you just installed:</span>
<span class="kw"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op">(</span><span class="va">haven</span><span class="op">)</span> </pre></div> <span class="kw"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op">(</span><span class="va"><a href="http://haven.tidyverse.org">haven</a></span><span class="op">)</span> </pre></div>
<p>You can now import files as follows:</p> <p>You can now import files as follows:</p>
<div id="spss" class="section level4"> <div id="spss" class="section level4">
<h4 class="hasAnchor"> <h4 class="hasAnchor">
@ -345,21 +344,21 @@
<p>To read files from SPSS into R:</p> <p>To read files from SPSS into R:</p>
<div class="sourceCode" id="cb4"><pre class="downlit"> <div class="sourceCode" id="cb4"><pre class="downlit">
<span class="co"># read any SPSS file based on file extension (best way):</span> <span class="co"># read any SPSS file based on file extension (best way):</span>
<span class="fu">read_spss</span><span class="op">(</span>file <span class="op">=</span> <span class="st">"path/to/file"</span><span class="op">)</span> <span class="fu"><a href="https://haven.tidyverse.org/reference/read_spss.html">read_spss</a></span><span class="op">(</span>file <span class="op">=</span> <span class="st">"path/to/file"</span><span class="op">)</span>
<span class="co"># read .sav or .zsav file:</span> <span class="co"># read .sav or .zsav file:</span>
<span class="fu">read_sav</span><span class="op">(</span>file <span class="op">=</span> <span class="st">"path/to/file"</span><span class="op">)</span> <span class="fu"><a href="https://haven.tidyverse.org/reference/read_spss.html">read_sav</a></span><span class="op">(</span>file <span class="op">=</span> <span class="st">"path/to/file"</span><span class="op">)</span>
<span class="co"># read .por file:</span> <span class="co"># read .por file:</span>
<span class="fu">read_por</span><span class="op">(</span>file <span class="op">=</span> <span class="st">"path/to/file"</span><span class="op">)</span></pre></div> <span class="fu"><a href="https://haven.tidyverse.org/reference/read_spss.html">read_por</a></span><span class="op">(</span>file <span class="op">=</span> <span class="st">"path/to/file"</span><span class="op">)</span></pre></div>
<p>Do not forget about <code>as_factor()</code>, as mentioned above.</p> <p>Do not forget about <code><a href="https://haven.tidyverse.org/reference/as_factor.html">as_factor()</a></code>, as mentioned above.</p>
<p>To export your R objects to the SPSS file format:</p> <p>To export your R objects to the SPSS file format:</p>
<div class="sourceCode" id="cb5"><pre class="downlit"> <div class="sourceCode" id="cb5"><pre class="downlit">
<span class="co"># save as .sav file:</span> <span class="co"># save as .sav file:</span>
<span class="fu">write_sav</span><span class="op">(</span>data <span class="op">=</span> <span class="va">yourdata</span>, path <span class="op">=</span> <span class="st">"path/to/file"</span><span class="op">)</span> <span class="fu"><a href="https://haven.tidyverse.org/reference/read_spss.html">write_sav</a></span><span class="op">(</span>data <span class="op">=</span> <span class="va">yourdata</span>, path <span class="op">=</span> <span class="st">"path/to/file"</span><span class="op">)</span>
<span class="co"># save as compressed .zsav file:</span> <span class="co"># save as compressed .zsav file:</span>
<span class="fu">write_sav</span><span class="op">(</span>data <span class="op">=</span> <span class="va">yourdata</span>, path <span class="op">=</span> <span class="st">"path/to/file"</span>, compress <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></pre></div> <span class="fu"><a href="https://haven.tidyverse.org/reference/read_spss.html">write_sav</a></span><span class="op">(</span>data <span class="op">=</span> <span class="va">yourdata</span>, path <span class="op">=</span> <span class="st">"path/to/file"</span>, compress <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></pre></div>
</div> </div>
<div id="sas" class="section level4"> <div id="sas" class="section level4">
<h4 class="hasAnchor"> <h4 class="hasAnchor">
@ -367,18 +366,18 @@
<p>To read files from SAS into R:</p> <p>To read files from SAS into R:</p>
<div class="sourceCode" id="cb6"><pre class="downlit"> <div class="sourceCode" id="cb6"><pre class="downlit">
<span class="co"># read .sas7bdat + .sas7bcat files:</span> <span class="co"># read .sas7bdat + .sas7bcat files:</span>
<span class="fu">read_sas</span><span class="op">(</span>data_file <span class="op">=</span> <span class="st">"path/to/file"</span>, catalog_file <span class="op">=</span> <span class="cn">NULL</span><span class="op">)</span> <span class="fu"><a href="https://haven.tidyverse.org/reference/read_sas.html">read_sas</a></span><span class="op">(</span>data_file <span class="op">=</span> <span class="st">"path/to/file"</span>, catalog_file <span class="op">=</span> <span class="cn">NULL</span><span class="op">)</span>
<span class="co"># read SAS transport files (version 5 and version 8):</span> <span class="co"># read SAS transport files (version 5 and version 8):</span>
<span class="fu">read_xpt</span><span class="op">(</span>file <span class="op">=</span> <span class="st">"path/to/file"</span><span class="op">)</span></pre></div> <span class="fu"><a href="https://haven.tidyverse.org/reference/read_xpt.html">read_xpt</a></span><span class="op">(</span>file <span class="op">=</span> <span class="st">"path/to/file"</span><span class="op">)</span></pre></div>
<p>To export your R objects to the SAS file format:</p> <p>To export your R objects to the SAS file format:</p>
<div class="sourceCode" id="cb7"><pre class="downlit"> <div class="sourceCode" id="cb7"><pre class="downlit">
<span class="co"># save as regular SAS file:</span> <span class="co"># save as regular SAS file:</span>
<span class="fu">write_sas</span><span class="op">(</span>data <span class="op">=</span> <span class="va">yourdata</span>, path <span class="op">=</span> <span class="st">"path/to/file"</span><span class="op">)</span> <span class="fu"><a href="https://haven.tidyverse.org/reference/read_sas.html">write_sas</a></span><span class="op">(</span>data <span class="op">=</span> <span class="va">yourdata</span>, path <span class="op">=</span> <span class="st">"path/to/file"</span><span class="op">)</span>
<span class="co"># the SAS transport format is an open format </span> <span class="co"># the SAS transport format is an open format </span>
<span class="co"># (required for submission of the data to the FDA)</span> <span class="co"># (required for submission of the data to the FDA)</span>
<span class="fu">write_xpt</span><span class="op">(</span>data <span class="op">=</span> <span class="va">yourdata</span>, path <span class="op">=</span> <span class="st">"path/to/file"</span>, version <span class="op">=</span> <span class="fl">8</span><span class="op">)</span></pre></div> <span class="fu"><a href="https://haven.tidyverse.org/reference/read_xpt.html">write_xpt</a></span><span class="op">(</span>data <span class="op">=</span> <span class="va">yourdata</span>, path <span class="op">=</span> <span class="st">"path/to/file"</span>, version <span class="op">=</span> <span class="fl">8</span><span class="op">)</span></pre></div>
</div> </div>
<div id="stata" class="section level4"> <div id="stata" class="section level4">
<h4 class="hasAnchor"> <h4 class="hasAnchor">
@ -386,15 +385,15 @@
<p>To read files from Stata into R:</p> <p>To read files from Stata into R:</p>
<div class="sourceCode" id="cb8"><pre class="downlit"> <div class="sourceCode" id="cb8"><pre class="downlit">
<span class="co"># read .dta file:</span> <span class="co"># read .dta file:</span>
<span class="fu">read_stata</span><span class="op">(</span>file <span class="op">=</span> <span class="st">"/path/to/file"</span><span class="op">)</span> <span class="fu"><a href="https://haven.tidyverse.org/reference/read_dta.html">read_stata</a></span><span class="op">(</span>file <span class="op">=</span> <span class="st">"/path/to/file"</span><span class="op">)</span>
<span class="co"># works exactly the same:</span> <span class="co"># works exactly the same:</span>
<span class="fu">read_dta</span><span class="op">(</span>file <span class="op">=</span> <span class="st">"/path/to/file"</span><span class="op">)</span></pre></div> <span class="fu"><a href="https://haven.tidyverse.org/reference/read_dta.html">read_dta</a></span><span class="op">(</span>file <span class="op">=</span> <span class="st">"/path/to/file"</span><span class="op">)</span></pre></div>
<p>To export your R objects to the Stata file format:</p> <p>To export your R objects to the Stata file format:</p>
<div class="sourceCode" id="cb9"><pre class="downlit"> <div class="sourceCode" id="cb9"><pre class="downlit">
<span class="co"># save as .dta file, Stata version 14:</span> <span class="co"># save as .dta file, Stata version 14:</span>
<span class="co"># (supports Stata v8 until v15 at the time of writing)</span> <span class="co"># (supports Stata v8 until v15 at the time of writing)</span>
<span class="fu">write_dta</span><span class="op">(</span>data <span class="op">=</span> <span class="va">yourdata</span>, path <span class="op">=</span> <span class="st">"/path/to/file"</span>, version <span class="op">=</span> <span class="fl">14</span><span class="op">)</span></pre></div> <span class="fu"><a href="https://haven.tidyverse.org/reference/read_dta.html">write_dta</a></span><span class="op">(</span>data <span class="op">=</span> <span class="va">yourdata</span>, path <span class="op">=</span> <span class="st">"/path/to/file"</span>, version <span class="op">=</span> <span class="fl">14</span><span class="op">)</span></pre></div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -0,0 +1,12 @@
// Pandoc 2.9 adds attributes on both header and div. We remove the former (to
// be compatible with the behavior of Pandoc < 2.8).
document.addEventListener('DOMContentLoaded', function(e) {
var hs = document.querySelectorAll("div.section[class*='level'] > :first-child");
var i, h, a;
for (i = 0; i < hs.length; i++) {
h = hs[i];
if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6
a = h.attributes;
while (a.length > 0) h.removeAttribute(a[0].name);
}
});

View File

@ -39,7 +39,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">1.4.0.9008</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9032</span>
</span> </span>
</div> </div>
@ -187,8 +187,7 @@
</header><script src="WHONET_files/accessible-code-block-0.0.1/empty-anchor.js"></script><link href="WHONET_files/anchor-sections-1.0/anchor-sections.css" rel="stylesheet"> </header><script src="WHONET_files/header-attrs-2.4/header-attrs.js"></script><script src="WHONET_files/accessible-code-block-0.0.1/empty-anchor.js"></script><div class="row">
<script src="WHONET_files/anchor-sections-1.0/anchor-sections.js"></script><div class="row">
<div class="col-md-9 contents"> <div class="col-md-9 contents">
<div class="page-header toc-ignore"> <div class="page-header toc-ignore">
<h1 data-toc-skip>How to work with WHONET data</h1> <h1 data-toc-skip>How to work with WHONET data</h1>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 59 KiB

View File

@ -0,0 +1,12 @@
// Pandoc 2.9 adds attributes on both header and div. We remove the former (to
// be compatible with the behavior of Pandoc < 2.8).
document.addEventListener('DOMContentLoaded', function(e) {
var hs = document.querySelectorAll("div.section[class*='level'] > :first-child");
var i, h, a;
for (i = 0; i < hs.length; i++) {
h = hs[i];
if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6
a = h.attributes;
while (a.length > 0) h.removeAttribute(a[0].name);
}
});

View File

@ -39,7 +39,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">1.4.0.9030</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9032</span>
</span> </span>
</div> </div>
@ -227,20 +227,20 @@
times <span class="op">=</span> <span class="fl">10</span><span class="op">)</span> times <span class="op">=</span> <span class="fl">10</span><span class="op">)</span>
<span class="fu"><a href="https://docs.ropensci.org/skimr/reference/print.html">print</a></span><span class="op">(</span><span class="va">S.aureus</span>, unit <span class="op">=</span> <span class="st">"ms"</span>, signif <span class="op">=</span> <span class="fl">2</span><span class="op">)</span> <span class="fu"><a href="https://docs.ropensci.org/skimr/reference/print.html">print</a></span><span class="op">(</span><span class="va">S.aureus</span>, unit <span class="op">=</span> <span class="st">"ms"</span>, signif <span class="op">=</span> <span class="fl">2</span><span class="op">)</span>
<span class="co"># Unit: milliseconds</span> <span class="co"># Unit: milliseconds</span>
<span class="co"># expr min lq mean median uq max</span> <span class="co"># expr min lq mean median uq max</span>
<span class="co"># as.mo("sau") 11.0 12 16.0 14.0 15.0 40.0</span> <span class="co"># as.mo("sau") 13.0 13.0 17.0 15.0 16.0 43.0</span>
<span class="co"># as.mo("stau") 110.0 120 140.0 140.0 150.0 160.0</span> <span class="co"># as.mo("stau") 120.0 120.0 140.0 150.0 150.0 160.0</span>
<span class="co"># as.mo("STAU") 110.0 120 140.0 140.0 140.0 150.0</span> <span class="co"># as.mo("STAU") 120.0 150.0 150.0 150.0 160.0 160.0</span>
<span class="co"># as.mo("staaur") 12.0 13 20.0 15.0 16.0 45.0</span> <span class="co"># as.mo("staaur") 13.0 13.0 17.0 14.0 16.0 44.0</span>
<span class="co"># as.mo("STAAUR") 15.0 15 26.0 16.0 41.0 58.0</span> <span class="co"># as.mo("STAAUR") 13.0 14.0 19.0 16.0 16.0 48.0</span>
<span class="co"># as.mo("S. aureus") 31.0 35 50.0 59.0 62.0 65.0</span> <span class="co"># as.mo("S. aureus") 34.0 58.0 61.0 63.0 68.0 86.0</span>
<span class="co"># as.mo("S aureus") 27.0 33 59.0 59.0 62.0 160.0</span> <span class="co"># as.mo("S aureus") 33.0 34.0 46.0 36.0 63.0 63.0</span>
<span class="co"># as.mo("Staphylococcus aureus") 1.9 2 2.4 2.4 2.7 2.9</span> <span class="co"># as.mo("Staphylococcus aureus") 2.3 2.5 2.5 2.5 2.6 2.7</span>
<span class="co"># as.mo("Staphylococcus aureus (MRSA)") 910.0 960 980.0 970.0 1000.0 1100.0</span> <span class="co"># as.mo("Staphylococcus aureus (MRSA)") 980.0 980.0 1000.0 1000.0 1000.0 1100.0</span>
<span class="co"># as.mo("Sthafilokkockus aaureuz") 400.0 410 430.0 420.0 440.0 560.0</span> <span class="co"># as.mo("Sthafilokkockus aaureuz") 430.0 430.0 440.0 440.0 440.0 460.0</span>
<span class="co"># as.mo("MRSA") 12.0 13 19.0 15.0 15.0 42.0</span> <span class="co"># as.mo("MRSA") 13.0 14.0 18.0 16.0 17.0 43.0</span>
<span class="co"># as.mo("VISA") 20.0 22 31.0 24.0 47.0 54.0</span> <span class="co"># as.mo("VISA") 21.0 22.0 23.0 22.0 24.0 25.0</span>
<span class="co"># as.mo("VRSA") 22.0 23 35.0 24.0 52.0 56.0</span> <span class="co"># as.mo("VRSA") 22.0 23.0 35.0 27.0 52.0 55.0</span>
<span class="co"># neval</span> <span class="co"># neval</span>
<span class="co"># 10</span> <span class="co"># 10</span>
<span class="co"># 10</span> <span class="co"># 10</span>
@ -284,8 +284,8 @@
<span class="fu"><a href="https://docs.ropensci.org/skimr/reference/print.html">print</a></span><span class="op">(</span><span class="va">run_it</span>, unit <span class="op">=</span> <span class="st">"ms"</span>, signif <span class="op">=</span> <span class="fl">3</span><span class="op">)</span> <span class="fu"><a href="https://docs.ropensci.org/skimr/reference/print.html">print</a></span><span class="op">(</span><span class="va">run_it</span>, unit <span class="op">=</span> <span class="st">"ms"</span>, signif <span class="op">=</span> <span class="fl">3</span><span class="op">)</span>
<span class="co"># Unit: milliseconds</span> <span class="co"># Unit: milliseconds</span>
<span class="co"># expr min lq mean median uq max neval</span> <span class="co"># expr min lq mean median uq max neval</span>
<span class="co"># mo_name(x) 165 176 223 202 274 318 10</span></pre></div> <span class="co"># mo_name(x) 145 190 221 213 248 313 10</span></pre></div>
<p>So getting official taxonomic names of 2,000,000 (!!) items consisting of 90 unique values only takes 0.202 seconds. You only lose time on your unique input values.</p> <p>So getting official taxonomic names of 2,000,000 (!!) items consisting of 90 unique values only takes 0.213 seconds. You only lose time on your unique input values.</p>
</div> </div>
<div id="precalculated-results" class="section level3"> <div id="precalculated-results" class="section level3">
<h3 class="hasAnchor"> <h3 class="hasAnchor">
@ -299,10 +299,10 @@
<span class="fu"><a href="https://docs.ropensci.org/skimr/reference/print.html">print</a></span><span class="op">(</span><span class="va">run_it</span>, unit <span class="op">=</span> <span class="st">"ms"</span>, signif <span class="op">=</span> <span class="fl">3</span><span class="op">)</span> <span class="fu"><a href="https://docs.ropensci.org/skimr/reference/print.html">print</a></span><span class="op">(</span><span class="va">run_it</span>, unit <span class="op">=</span> <span class="st">"ms"</span>, signif <span class="op">=</span> <span class="fl">3</span><span class="op">)</span>
<span class="co"># Unit: milliseconds</span> <span class="co"># Unit: milliseconds</span>
<span class="co"># expr min lq mean median uq max neval</span> <span class="co"># expr min lq mean median uq max neval</span>
<span class="co"># A 7.83 8.05 9.56 9.43 10.90 12.90 10</span> <span class="co"># A 8.36 8.59 8.99 9.07 9.29 9.62 10</span>
<span class="co"># B 23.50 24.40 30.20 25.50 26.80 74.50 10</span> <span class="co"># B 26.80 27.50 28.10 28.00 29.10 29.80 10</span>
<span class="co"># C 2.00 2.19 2.42 2.41 2.56 3.06 10</span></pre></div> <span class="co"># C 2.06 2.15 6.68 2.50 2.69 45.20 10</span></pre></div>
<p>So going from <code><a href="../reference/mo_property.html">mo_name("Staphylococcus aureus")</a></code> to <code>"Staphylococcus aureus"</code> takes 0.0024 seconds - it doesnt even start calculating <em>if the result would be the same as the expected resulting value</em>. That goes for all helper functions:</p> <p>So going from <code><a href="../reference/mo_property.html">mo_name("Staphylococcus aureus")</a></code> to <code>"Staphylococcus aureus"</code> takes 0.0025 seconds - it doesnt even start calculating <em>if the result would be the same as the expected resulting value</em>. That goes for all helper functions:</p>
<div class="sourceCode" id="cb5"><pre class="downlit"> <div class="sourceCode" id="cb5"><pre class="downlit">
<span class="va">run_it</span> <span class="op">&lt;-</span> <span class="fu">microbenchmark</span><span class="op">(</span>A <span class="op">=</span> <span class="fu"><a href="../reference/mo_property.html">mo_species</a></span><span class="op">(</span><span class="st">"aureus"</span><span class="op">)</span>, <span class="va">run_it</span> <span class="op">&lt;-</span> <span class="fu">microbenchmark</span><span class="op">(</span>A <span class="op">=</span> <span class="fu"><a href="../reference/mo_property.html">mo_species</a></span><span class="op">(</span><span class="st">"aureus"</span><span class="op">)</span>,
B <span class="op">=</span> <span class="fu"><a href="../reference/mo_property.html">mo_genus</a></span><span class="op">(</span><span class="st">"Staphylococcus"</span><span class="op">)</span>, B <span class="op">=</span> <span class="fu"><a href="../reference/mo_property.html">mo_genus</a></span><span class="op">(</span><span class="st">"Staphylococcus"</span><span class="op">)</span>,
@ -316,14 +316,14 @@
<span class="fu"><a href="https://docs.ropensci.org/skimr/reference/print.html">print</a></span><span class="op">(</span><span class="va">run_it</span>, unit <span class="op">=</span> <span class="st">"ms"</span>, signif <span class="op">=</span> <span class="fl">3</span><span class="op">)</span> <span class="fu"><a href="https://docs.ropensci.org/skimr/reference/print.html">print</a></span><span class="op">(</span><span class="va">run_it</span>, unit <span class="op">=</span> <span class="st">"ms"</span>, signif <span class="op">=</span> <span class="fl">3</span><span class="op">)</span>
<span class="co"># Unit: milliseconds</span> <span class="co"># Unit: milliseconds</span>
<span class="co"># expr min lq mean median uq max neval</span> <span class="co"># expr min lq mean median uq max neval</span>
<span class="co"># A 1.69 1.75 1.90 1.86 2.00 2.25 10</span> <span class="co"># A 1.68 1.91 2.13 2.08 2.43 2.62 10</span>
<span class="co"># B 1.69 1.72 1.86 1.79 1.87 2.43 10</span> <span class="co"># B 1.89 1.99 2.16 2.05 2.30 2.69 10</span>
<span class="co"># C 1.67 1.75 1.89 1.81 1.93 2.67 10</span> <span class="co"># C 1.87 1.91 2.09 2.00 2.28 2.46 10</span>
<span class="co"># D 1.64 1.73 1.87 1.87 1.94 2.23 10</span> <span class="co"># D 1.65 1.71 1.92 1.87 1.98 2.58 10</span>
<span class="co"># E 1.65 1.75 1.90 1.83 1.92 2.35 10</span> <span class="co"># E 1.64 1.74 1.90 1.87 1.98 2.34 10</span>
<span class="co"># F 1.70 1.75 1.87 1.85 1.93 2.20 10</span> <span class="co"># F 1.86 1.92 2.05 2.05 2.16 2.27 10</span>
<span class="co"># G 1.73 1.83 1.93 1.93 2.01 2.25 10</span> <span class="co"># G 1.73 1.80 1.99 1.97 2.14 2.29 10</span>
<span class="co"># H 1.65 1.73 1.85 1.77 2.06 2.11 10</span></pre></div> <span class="co"># H 1.85 1.93 2.08 1.98 2.15 2.93 10</span></pre></div>
<p>Of course, when running <code><a href="../reference/mo_property.html">mo_phylum("Firmicutes")</a></code> the function has zero knowledge about the actual microorganism, namely <em>S. aureus</em>. But since the result would be <code>"Firmicutes"</code> anyway, there is no point in calculating the result. And because this package knows all phyla of all known bacteria (according to the Catalogue of Life), it can just return the initial value immediately.</p> <p>Of course, when running <code><a href="../reference/mo_property.html">mo_phylum("Firmicutes")</a></code> the function has zero knowledge about the actual microorganism, namely <em>S. aureus</em>. But since the result would be <code>"Firmicutes"</code> anyway, there is no point in calculating the result. And because this package knows all phyla of all known bacteria (according to the Catalogue of Life), it can just return the initial value immediately.</p>
</div> </div>
<div id="results-in-other-languages" class="section level3"> <div id="results-in-other-languages" class="section level3">
@ -351,13 +351,13 @@
<span class="fu"><a href="https://docs.ropensci.org/skimr/reference/print.html">print</a></span><span class="op">(</span><span class="va">run_it</span>, unit <span class="op">=</span> <span class="st">"ms"</span>, signif <span class="op">=</span> <span class="fl">4</span><span class="op">)</span> <span class="fu"><a href="https://docs.ropensci.org/skimr/reference/print.html">print</a></span><span class="op">(</span><span class="va">run_it</span>, unit <span class="op">=</span> <span class="st">"ms"</span>, signif <span class="op">=</span> <span class="fl">4</span><span class="op">)</span>
<span class="co"># Unit: milliseconds</span> <span class="co"># Unit: milliseconds</span>
<span class="co"># expr min lq mean median uq max neval</span> <span class="co"># expr min lq mean median uq max neval</span>
<span class="co"># en 16.23 16.62 21.00 17.00 18.51 59.06 100</span> <span class="co"># en 16.16 17.85 22.42 18.54 19.61 68.28 100</span>
<span class="co"># de 19.27 19.96 22.73 20.36 21.08 69.70 100</span> <span class="co"># de 19.55 21.38 24.37 21.96 22.95 61.55 100</span>
<span class="co"># nl 31.40 32.54 38.76 33.16 35.34 82.43 100</span> <span class="co"># nl 31.64 35.08 40.58 36.34 37.88 79.00 100</span>
<span class="co"># es 19.36 19.75 23.61 20.26 20.88 67.39 100</span> <span class="co"># es 18.03 21.46 25.61 22.09 23.30 64.97 100</span>
<span class="co"># it 19.24 19.64 21.23 20.00 20.72 62.92 100</span> <span class="co"># it 17.82 21.01 23.29 21.80 22.82 58.47 100</span>
<span class="co"># fr 19.19 19.82 25.12 20.16 21.49 70.00 100</span> <span class="co"># fr 18.19 21.29 25.63 21.93 23.20 60.48 100</span>
<span class="co"># pt 19.18 19.64 22.44 20.23 21.47 60.56 100</span></pre></div> <span class="co"># pt 17.76 21.07 24.81 21.83 23.39 65.00 100</span></pre></div>
<p>Currently supported are German, Dutch, Spanish, Italian, French and Portuguese.</p> <p>Currently supported are German, Dutch, Spanish, Italian, French and Portuguese.</p>
</div> </div>
</div> </div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 70 KiB

View File

@ -39,7 +39,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">1.4.0.9000</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9032</span>
</span> </span>
</div> </div>
@ -807,7 +807,7 @@ If you are reading this page from within R, please <a href="https://msberends.gi
<div id="source-4" class="section level3"> <div id="source-4" class="section level3">
<h3 class="hasAnchor"> <h3 class="hasAnchor">
<a href="#source-4" class="anchor"></a>Source</h3> <a href="#source-4" class="anchor"></a>Source</h3>
<p>This data set contains all defined intrinsic resistance by EUCAST of all bug-drug combinations, and is based on EUCAST Expert Rules / EUCAST Intrinsic Resistance and Unusual Phenotypes, v3.2 from 2020.</p> <p>This data set contains all defined intrinsic resistance by EUCAST of all bug-drug combinations, and is based on EUCAST Expert Rules and EUCAST Intrinsic Resistance and Unusual Phenotypes, v3.2 from 2020.</p>
</div> </div>
<div id="example-content-4" class="section level3"> <div id="example-content-4" class="section level3">
<h3 class="hasAnchor"> <h3 class="hasAnchor">

View File

@ -81,7 +81,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">1.4.0.9032</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9033</span>
</span> </span>
</div> </div>

View File

@ -39,7 +39,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">1.4.0.9008</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9032</span>
</span> </span>
</div> </div>
@ -187,8 +187,7 @@
</header><script src="resistance_predict_files/accessible-code-block-0.0.1/empty-anchor.js"></script><link href="resistance_predict_files/anchor-sections-1.0/anchor-sections.css" rel="stylesheet"> </header><script src="resistance_predict_files/header-attrs-2.4/header-attrs.js"></script><script src="resistance_predict_files/accessible-code-block-0.0.1/empty-anchor.js"></script><div class="row">
<script src="resistance_predict_files/anchor-sections-1.0/anchor-sections.js"></script><div class="row">
<div class="col-md-9 contents"> <div class="col-md-9 contents">
<div class="page-header toc-ignore"> <div class="page-header toc-ignore">
<h1 data-toc-skip>How to predict antimicrobial resistance</h1> <h1 data-toc-skip>How to predict antimicrobial resistance</h1>
@ -233,7 +232,7 @@
<span id="cb2-12"><a href="#cb2-12"></a> <span class="dt">model =</span> <span class="st">"binomial"</span>)</span></code></pre></div> <span id="cb2-12"><a href="#cb2-12"></a> <span class="dt">model =</span> <span class="st">"binomial"</span>)</span></code></pre></div>
<p>The function will look for a date column itself if <code>col_date</code> is not set.</p> <p>The function will look for a date column itself if <code>col_date</code> is not set.</p>
<p>When running any of these commands, a summary of the regression model will be printed unless using <code><a href="../reference/resistance_predict.html">resistance_predict(..., info = FALSE)</a></code>.</p> <p>When running any of these commands, a summary of the regression model will be printed unless using <code><a href="../reference/resistance_predict.html">resistance_predict(..., info = FALSE)</a></code>.</p>
<pre><code># NOTE: Using column `date` as input for `col_date`.</code></pre> <pre><code># NOTE: Using column 'date' as input for `col_date`.</code></pre>
<p>This text is only a printed summary - the actual result (output) of the function is a <code>data.frame</code> containing for each year: the number of observations, the actual observed resistance, the estimated resistance and the standard error below and above the estimation:</p> <p>This text is only a printed summary - the actual result (output) of the function is a <code>data.frame</code> containing for each year: the number of observations, the actual observed resistance, the estimated resistance and the standard error below and above the estimation:</p>
<div class="sourceCode" id="cb4"><pre class="downlit"> <div class="sourceCode" id="cb4"><pre class="downlit">
<span class="va">predict_TZP</span> <span class="va">predict_TZP</span>
@ -290,7 +289,7 @@
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op">(</span><span class="fu"><a href="../reference/mo_property.html">mo_gramstain</a></span><span class="op">(</span><span class="va">mo</span>, language <span class="op">=</span> <span class="cn">NULL</span><span class="op">)</span> <span class="op">==</span> <span class="st">"Gram-positive"</span><span class="op">)</span> <span class="op">%&gt;%</span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op">(</span><span class="fu"><a href="../reference/mo_property.html">mo_gramstain</a></span><span class="op">(</span><span class="va">mo</span>, language <span class="op">=</span> <span class="cn">NULL</span><span class="op">)</span> <span class="op">==</span> <span class="st">"Gram-positive"</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="../reference/resistance_predict.html">resistance_predict</a></span><span class="op">(</span>col_ab <span class="op">=</span> <span class="st">"VAN"</span>, year_min <span class="op">=</span> <span class="fl">2010</span>, info <span class="op">=</span> <span class="cn">FALSE</span>, model <span class="op">=</span> <span class="st">"binomial"</span><span class="op">)</span> <span class="op">%&gt;%</span> <span class="fu"><a href="../reference/resistance_predict.html">resistance_predict</a></span><span class="op">(</span>col_ab <span class="op">=</span> <span class="st">"VAN"</span>, year_min <span class="op">=</span> <span class="fl">2010</span>, info <span class="op">=</span> <span class="cn">FALSE</span>, model <span class="op">=</span> <span class="st">"binomial"</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="../reference/resistance_predict.html">ggplot_rsi_predict</a></span><span class="op">(</span><span class="op">)</span> <span class="fu"><a href="../reference/resistance_predict.html">ggplot_rsi_predict</a></span><span class="op">(</span><span class="op">)</span>
<span class="co"># NOTE: Using column `date` as input for `col_date`.</span></pre></div> <span class="co"># NOTE: Using column 'date' as input for `col_date`.</span></pre></div>
<p><img src="resistance_predict_files/figure-html/unnamed-chunk-6-1.png" width="720"></p> <p><img src="resistance_predict_files/figure-html/unnamed-chunk-6-1.png" width="720"></p>
<p>Vancomycin resistance could be 100% in ten years, but might also stay around 0%.</p> <p>Vancomycin resistance could be 100% in ten years, but might also stay around 0%.</p>
<p>You can define the model with the <code>model</code> parameter. The model chosen above is a generalised linear regression model using a binomial distribution, assuming that a period of zero resistance was followed by a period of increasing resistance leading slowly to more and more resistance.</p> <p>You can define the model with the <code>model</code> parameter. The model chosen above is a generalised linear regression model using a binomial distribution, assuming that a period of zero resistance was followed by a period of increasing resistance leading slowly to more and more resistance.</p>
@ -336,7 +335,7 @@
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op">(</span><span class="fu"><a href="../reference/mo_property.html">mo_gramstain</a></span><span class="op">(</span><span class="va">mo</span>, language <span class="op">=</span> <span class="cn">NULL</span><span class="op">)</span> <span class="op">==</span> <span class="st">"Gram-positive"</span><span class="op">)</span> <span class="op">%&gt;%</span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op">(</span><span class="fu"><a href="../reference/mo_property.html">mo_gramstain</a></span><span class="op">(</span><span class="va">mo</span>, language <span class="op">=</span> <span class="cn">NULL</span><span class="op">)</span> <span class="op">==</span> <span class="st">"Gram-positive"</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="../reference/resistance_predict.html">resistance_predict</a></span><span class="op">(</span>col_ab <span class="op">=</span> <span class="st">"VAN"</span>, year_min <span class="op">=</span> <span class="fl">2010</span>, info <span class="op">=</span> <span class="cn">FALSE</span>, model <span class="op">=</span> <span class="st">"linear"</span><span class="op">)</span> <span class="op">%&gt;%</span> <span class="fu"><a href="../reference/resistance_predict.html">resistance_predict</a></span><span class="op">(</span>col_ab <span class="op">=</span> <span class="st">"VAN"</span>, year_min <span class="op">=</span> <span class="fl">2010</span>, info <span class="op">=</span> <span class="cn">FALSE</span>, model <span class="op">=</span> <span class="st">"linear"</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="../reference/resistance_predict.html">ggplot_rsi_predict</a></span><span class="op">(</span><span class="op">)</span> <span class="fu"><a href="../reference/resistance_predict.html">ggplot_rsi_predict</a></span><span class="op">(</span><span class="op">)</span>
<span class="co"># NOTE: Using column `date` as input for `col_date`.</span></pre></div> <span class="co"># NOTE: Using column 'date' as input for `col_date`.</span></pre></div>
<p><img src="resistance_predict_files/figure-html/unnamed-chunk-7-1.png" width="720"></p> <p><img src="resistance_predict_files/figure-html/unnamed-chunk-7-1.png" width="720"></p>
<p>This seems more likely, doesnt it?</p> <p>This seems more likely, doesnt it?</p>
<p>The model itself is also available from the object, as an <code>attribute</code>:</p> <p>The model itself is also available from the object, as an <code>attribute</code>:</p>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

After

Width:  |  Height:  |  Size: 64 KiB

View File

@ -0,0 +1,12 @@
// Pandoc 2.9 adds attributes on both header and div. We remove the former (to
// be compatible with the behavior of Pandoc < 2.8).
document.addEventListener('DOMContentLoaded', function(e) {
var hs = document.querySelectorAll("div.section[class*='level'] > :first-child");
var i, h, a;
for (i = 0; i < hs.length; i++) {
h = hs[i];
if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6
a = h.attributes;
while (a.length > 0) h.removeAttribute(a[0].name);
}
});

View File

@ -39,7 +39,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">1.4.0.9008</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9032</span>
</span> </span>
</div> </div>
@ -187,8 +187,7 @@
</header><script src="welcome_to_AMR_files/accessible-code-block-0.0.1/empty-anchor.js"></script><link href="welcome_to_AMR_files/anchor-sections-1.0/anchor-sections.css" rel="stylesheet"> </header><script src="welcome_to_AMR_files/header-attrs-2.4/header-attrs.js"></script><script src="welcome_to_AMR_files/accessible-code-block-0.0.1/empty-anchor.js"></script><div class="row">
<script src="welcome_to_AMR_files/anchor-sections-1.0/anchor-sections.js"></script><div class="row">
<div class="col-md-9 contents"> <div class="col-md-9 contents">
<div class="page-header toc-ignore"> <div class="page-header toc-ignore">
<h1 data-toc-skip>Welcome to the AMR package</h1> <h1 data-toc-skip>Welcome to the AMR package</h1>

View File

@ -0,0 +1,12 @@
// Pandoc 2.9 adds attributes on both header and div. We remove the former (to
// be compatible with the behavior of Pandoc < 2.8).
document.addEventListener('DOMContentLoaded', function(e) {
var hs = document.querySelectorAll("div.section[class*='level'] > :first-child");
var i, h, a;
for (i = 0; i < hs.length; i++) {
h = hs[i];
if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6
a = h.attributes;
while (a.length > 0) h.removeAttribute(a[0].name);
}
});

View File

@ -81,7 +81,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">1.4.0.9032</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9033</span>
</span> </span>
</div> </div>

View File

@ -229,6 +229,11 @@ table a:not(.btn):hover, .table a:not(.btn):hover {
padding-top: 40px !important; padding-top: 40px !important;
font-weight: bold !important; font-weight: bold !important;
} }
.template-home h5 {
font-weight: normal;
font-style: italic;
font-size: 16px;
}
/* logos on index page */ /* logos on index page */
.logo_img { .logo_img {

View File

@ -43,7 +43,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">1.4.0.9032</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9033</span>
</span> </span>
</div> </div>
@ -208,12 +208,120 @@ Since you are one of our users, we would like to know how you use the package an
<p><code>AMR</code> is a free, open-source and independent <a href="https://www.r-project.org">R package</a> to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial data and properties, by using evidence-based methods. <strong>Our aim is to provide a standard</strong> for clean and reproducible antimicrobial resistance data analysis, that can therefore empower epidemiological analyses to continuously enable surveillance and treatment evaluation in any setting.</p> <p><code>AMR</code> is a free, open-source and independent <a href="https://www.r-project.org">R package</a> to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial data and properties, by using evidence-based methods. <strong>Our aim is to provide a standard</strong> for clean and reproducible antimicrobial resistance data analysis, that can therefore empower epidemiological analyses to continuously enable surveillance and treatment evaluation in any setting.</p>
<p>After installing this package, R knows <a href="./reference/microorganisms.html"><strong>~70,000 distinct microbial species</strong></a> and all <a href="./reference/antibiotics.html"><strong>~550 antibiotic, antimycotic and antiviral drugs</strong></a> by name and code (including ATC, EARS-NET, LOINC and SNOMED CT), and knows all about valid R/SI and MIC values. It supports any data format, including WHONET/EARS-Net data.</p> <p>After installing this package, R knows <a href="./reference/microorganisms.html"><strong>~70,000 distinct microbial species</strong></a> and all <a href="./reference/antibiotics.html"><strong>~550 antibiotic, antimycotic and antiviral drugs</strong></a> by name and code (including ATC, EARS-NET, LOINC and SNOMED CT), and knows all about valid R/SI and MIC values. It supports any data format, including WHONET/EARS-Net data.</p>
<p>This package is <a href="https://en.wikipedia.org/wiki/Dependency_hell">fully independent of any other R package</a> and works on Windows, macOS and Linux with all versions of R since R-3.0.0 (April 2013). <strong>It was designed to work in any setting, including those with very limited resources</strong>. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the <a href="https://www.rug.nl">University of Groningen</a>, in collaboration with non-profit organisations <a href="https://www.certe.nl">Certe Medical Diagnostics and Advice</a> and <a href="https://www.umcg.nl">University Medical Center Groningen</a>. This R package is <a href="./news">actively maintained</a> and is free software (see <a href="#copyright">Copyright</a>).</p> <p>This package is <a href="https://en.wikipedia.org/wiki/Dependency_hell">fully independent of any other R package</a> and works on Windows, macOS and Linux with all versions of R since R-3.0.0 (April 2013). <strong>It was designed to work in any setting, including those with very limited resources</strong>. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the <a href="https://www.rug.nl">University of Groningen</a>, in collaboration with non-profit organisations <a href="https://www.certe.nl">Certe Medical Diagnostics and Advice</a> and <a href="https://www.umcg.nl">University Medical Center Groningen</a>. This R package is <a href="./news">actively maintained</a> and is free software (see <a href="#copyright">Copyright</a>).</p>
<div class="main-content"> <div class="main-content" style="display: inline-block;">
<p> <p>
<a href="./countries_large.png" target="_blank"><img src="./countries.png" class="countries_map"></a> <strong>Used in 135 countries</strong><br> Since its first public release in early 2018, this package has been downloaded from 135 countries. Click the map to enlarge and to also see the names of the countries. <a href="./countries_large.png" target="_blank"><img src="./countries.png" class="countries_map"></a> <strong>Used in 135 countries</strong><br> Since its first public release in early 2018, this package has been downloaded from 135 countries. Click the map to enlarge.
</p> </p>
<br><br> <br><br>
</div> </div>
<div id="with-amr-for-r-youll-always-have-a-knowledgeable-microbiologist-at-your-side" class="section level5">
<h5 class="hasAnchor">
<a href="#with-amr-for-r-youll-always-have-a-knowledgeable-microbiologist-at-your-side" class="anchor"></a>With <code>AMR</code> (for R), youll always have a knowledgeable microbiologist at your side!</h5>
<div class="sourceCode" id="cb1"><pre class="downlit">
<span class="co"># AMR works great with dplyr, but it's not required or neccesary</span>
<span class="kw"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op">(</span><span class="va"><a href="https://msberends.github.io/AMR/">AMR</a></span><span class="op">)</span>
<span class="kw"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op">(</span><span class="va"><a href="https://dplyr.tidyverse.org">dplyr</a></span><span class="op">)</span>
<span class="va">example_isolates</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op">(</span>mo <span class="op">=</span> <span class="fu"><a href="reference/mo_property.html">mo_fullname</a></span><span class="op">(</span><span class="va">mo</span><span class="op">)</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op">(</span><span class="fu"><a href="reference/mo_property.html">mo_is_gram_positive</a></span><span class="op">(</span><span class="op">)</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op">(</span><span class="va">mo</span>, <span class="fu"><a href="reference/antibiotic_class_selectors.html">carbapenems</a></span><span class="op">(</span><span class="op">)</span>, <span class="fu"><a href="reference/antibiotic_class_selectors.html">glycopeptides</a></span><span class="op">(</span><span class="op">)</span><span class="op">)</span>
<span class="co">#&gt; NOTE: Using column 'mo' as input for mo_is_gram_positive()</span>
<span class="co">#&gt; Selecting cephalosporins: 'CAZ' (ceftazidime), 'CRO' (ceftriaxone),</span>
<span class="co">#&gt; 'CTX' (cefotaxime), 'CXM' (cefuroxime), </span>
<span class="co">#&gt; 'CZO' (cefazolin), 'FEP' (cefepime),</span>
<span class="co">#&gt; 'FOX' (cefoxitin)</span>
<span class="co">#&gt; Selecting glycopeptides: 'TEC' (teicoplanin), 'VAN' (vancomycin)</span></pre></div>
<p>With only having defined a filter on Gram-positive micro-organisms (<code><a href="reference/mo_property.html">mo_is_gram_positive()</a></code>) and a selection of two antibiotic groups (<code><a href="reference/antibiotic_class_selectors.html">carbapenems()</a></code> and <code><a href="reference/antibiotic_class_selectors.html">glycopeptides()</a></code>), the reference data about <a href="./reference/microorganisms.html">all bugs</a> and <a href="./reference/antibiotics.html">drugs</a> in the <code>AMR</code> package make sure you get what you meant:</p>
<table class="table">
<thead><tr class="header">
<th align="left">mo</th>
<th align="center">CAZ</th>
<th align="center">CRO</th>
<th align="center">CTX</th>
<th align="center">CXM</th>
<th align="center">CZO</th>
<th align="center">FEP</th>
<th align="center">FOX</th>
<th align="center">TEC</th>
<th align="center">VAN</th>
</tr></thead>
<tbody>
<tr class="odd">
<td align="left"><em>Enterococcus faecalis</em></td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center"></td>
<td align="center">S</td>
</tr>
<tr class="even">
<td align="left"><em>Enterococcus faecalis</em></td>
<td align="center">R</td>
<td align="center"></td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center"></td>
<td align="center">S</td>
</tr>
<tr class="odd">
<td align="left"><em>Enterococcus faecalis</em></td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center"></td>
<td align="center">S</td>
</tr>
<tr class="even">
<td align="left">
<em>Streptococcus</em> group B</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"></td>
<td align="center">S</td>
</tr>
<tr class="odd">
<td align="left"><em>Staphylococcus epidermidis</em></td>
<td align="center">R</td>
<td align="center"></td>
<td align="center"></td>
<td align="center">S</td>
<td align="center"></td>
<td align="center"></td>
<td align="center"></td>
<td align="center"></td>
<td align="center">S</td>
</tr>
<tr class="even">
<td align="left"><em>Enterococcus faecium</em></td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center">R</td>
<td align="center"></td>
<td align="center">S</td>
</tr>
</tbody>
</table>
<div class="home-buttons"> <div class="home-buttons">
<a href="articles/datasets.html"> <a href="articles/datasets.html">
<div style="background-color: #128f7635;"> <div style="background-color: #128f7635;">
@ -241,6 +349,7 @@ Since you are one of our users, we would like to know how you use the package an
</div> </div>
</a> </a>
</div> </div>
</div>
<div id="partners" class="section level4"> <div id="partners" class="section level4">
<h4 class="hasAnchor"> <h4 class="hasAnchor">
<a href="#partners" class="anchor"></a>Partners</h4> <a href="#partners" class="anchor"></a>Partners</h4>
@ -281,7 +390,7 @@ Since you are one of our users, we would like to know how you use the package an
<a href="#latest-released-version" class="anchor"></a>Latest released version</h4> <a href="#latest-released-version" class="anchor"></a>Latest released version</h4>
<p><img src="https://www.r-pkg.org/badges/version-ago/AMR"><img src="https://cranlogs.r-pkg.org/badges/grand-total/AMR"></p> <p><img src="https://www.r-pkg.org/badges/version-ago/AMR"><img src="https://cranlogs.r-pkg.org/badges/grand-total/AMR"></p>
<p>This package is available <a href="https://cran.r-project.org/package=AMR">here on the official R network (CRAN)</a>, which has a peer-reviewed submission process. Install this package in R from CRAN by using the command:</p> <p>This package is available <a href="https://cran.r-project.org/package=AMR">here on the official R network (CRAN)</a>, which has a peer-reviewed submission process. Install this package in R from CRAN by using the command:</p>
<div class="sourceCode" id="cb1"><pre class="downlit"> <div class="sourceCode" id="cb2"><pre class="downlit">
<span class="fu"><a href="https://rdrr.io/r/utils/install.packages.html">install.packages</a></span><span class="op">(</span><span class="st">"AMR"</span><span class="op">)</span></pre></div> <span class="fu"><a href="https://rdrr.io/r/utils/install.packages.html">install.packages</a></span><span class="op">(</span><span class="st">"AMR"</span><span class="op">)</span></pre></div>
<p>It will be downloaded and installed automatically. For RStudio, click on the menu <em>Tools</em> &gt; <em>Install Packages…</em> and then type in “AMR” and press <kbd>Install</kbd>.</p> <p>It will be downloaded and installed automatically. For RStudio, click on the menu <em>Tools</em> &gt; <em>Install Packages…</em> and then type in “AMR” and press <kbd>Install</kbd>.</p>
<p><strong>Note:</strong> Not all functions on this website may be available in this latest release. To use all functions and data sets mentioned on this website, install the latest development version.</p> <p><strong>Note:</strong> Not all functions on this website may be available in this latest release. To use all functions and data sets mentioned on this website, install the latest development version.</p>
@ -290,7 +399,7 @@ Since you are one of our users, we would like to know how you use the package an
<h4 class="hasAnchor"> <h4 class="hasAnchor">
<a href="#latest-development-version" class="anchor"></a>Latest development version</h4> <a href="#latest-development-version" class="anchor"></a>Latest development version</h4>
<p>The latest and unpublished development version can be installed from GitHub using:</p> <p>The latest and unpublished development version can be installed from GitHub using:</p>
<div class="sourceCode" id="cb2"><pre class="downlit"> <div class="sourceCode" id="cb3"><pre class="downlit">
<span class="fu"><a href="https://rdrr.io/r/utils/install.packages.html">install.packages</a></span><span class="op">(</span><span class="st">"remotes"</span><span class="op">)</span> <span class="fu"><a href="https://rdrr.io/r/utils/install.packages.html">install.packages</a></span><span class="op">(</span><span class="st">"remotes"</span><span class="op">)</span>
<span class="fu">remotes</span><span class="fu">::</span><span class="fu"><a href="https://remotes.r-lib.org/reference/install_github.html">install_github</a></span><span class="op">(</span><span class="st">"msberends/AMR"</span><span class="op">)</span></pre></div> <span class="fu">remotes</span><span class="fu">::</span><span class="fu"><a href="https://remotes.r-lib.org/reference/install_github.html">install_github</a></span><span class="op">(</span><span class="st">"msberends/AMR"</span><span class="op">)</span></pre></div>
</div> </div>
@ -353,7 +462,7 @@ Since you are one of our users, we would like to know how you use the package an
<li> <li>
<p>It <strong>analyses the data</strong> with convenient functions that use well-known methods.</p> <p>It <strong>analyses the data</strong> with convenient functions that use well-known methods.</p>
<ul> <ul>
<li>Calculate the microbial susceptibility or resistance (and even co-resistance) with the <code><a href="reference/proportion.html">susceptibility()</a></code> and <code><a href="reference/proportion.html">resistance()</a></code> functions, or be even more specific with the <code><a href="reference/proportion.html">proportion_R()</a></code>, <code><a href="reference/proportion.html">proportion_IR()</a></code>, <code><a href="reference/proportion.html">proportion_I()</a></code>, <code><a href="reference/proportion.html">proportion_SI()</a></code> and <code><a href="reference/proportion.html">proportion_S()</a></code> functions. Similarly, the <em>number</em> of isolates can be determined with the <code><a href="reference/count.html">count_resistant()</a></code>, <code><a href="reference/count.html">count_susceptible()</a></code> and <code><a href="reference/count.html">count_all()</a></code> functions. All these functions can be used with the <code>dplyr</code> package (e.g. in conjunction with <code>summarise()</code>)</li> <li>Calculate the microbial susceptibility or resistance (and even co-resistance) with the <code><a href="reference/proportion.html">susceptibility()</a></code> and <code><a href="reference/proportion.html">resistance()</a></code> functions, or be even more specific with the <code><a href="reference/proportion.html">proportion_R()</a></code>, <code><a href="reference/proportion.html">proportion_IR()</a></code>, <code><a href="reference/proportion.html">proportion_I()</a></code>, <code><a href="reference/proportion.html">proportion_SI()</a></code> and <code><a href="reference/proportion.html">proportion_S()</a></code> functions. Similarly, the <em>number</em> of isolates can be determined with the <code><a href="reference/count.html">count_resistant()</a></code>, <code><a href="reference/count.html">count_susceptible()</a></code> and <code><a href="reference/count.html">count_all()</a></code> functions. All these functions can be used with the <code>dplyr</code> package (e.g. in conjunction with <code><a href="https://dplyr.tidyverse.org/reference/summarise.html">summarise()</a></code>)</li>
<li>Plot AMR results with <code><a href="reference/ggplot_rsi.html">geom_rsi()</a></code>, a function made for the <code>ggplot2</code> package</li> <li>Plot AMR results with <code><a href="reference/ggplot_rsi.html">geom_rsi()</a></code>, a function made for the <code>ggplot2</code> package</li>
<li>Predict antimicrobial resistance for the nextcoming years using logistic regression models with the <code><a href="reference/resistance_predict.html">resistance_predict()</a></code> function</li> <li>Predict antimicrobial resistance for the nextcoming years using logistic regression models with the <code><a href="reference/resistance_predict.html">resistance_predict()</a></code> function</li>
</ul> </ul>

View File

@ -81,7 +81,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">1.4.0.9032</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9033</span>
</span> </span>
</div> </div>
@ -236,13 +236,13 @@
<small>Source: <a href='https://github.com/msberends/AMR/blob/master/NEWS.md'><code>NEWS.md</code></a></small> <small>Source: <a href='https://github.com/msberends/AMR/blob/master/NEWS.md'><code>NEWS.md</code></a></small>
</div> </div>
<div id="amr-1409032" class="section level1"> <div id="amr-1409033" class="section level1">
<h1 class="page-header" data-toc-text="1.4.0.9032"> <h1 class="page-header" data-toc-text="1.4.0.9033">
<a href="#amr-1409032" class="anchor"></a>AMR 1.4.0.9032<small> Unreleased </small> <a href="#amr-1409033" class="anchor"></a>AMR 1.4.0.9033<small> Unreleased </small>
</h1> </h1>
<div id="last-updated-7-december-2020" class="section level2"> <div id="last-updated-8-december-2020" class="section level2">
<h2 class="hasAnchor"> <h2 class="hasAnchor">
<a href="#last-updated-7-december-2020" class="anchor"></a><small>Last updated: 7 December 2020</small> <a href="#last-updated-8-december-2020" class="anchor"></a><small>Last updated: 8 December 2020</small>
</h2> </h2>
<div id="new" class="section level3"> <div id="new" class="section level3">
<h3 class="hasAnchor"> <h3 class="hasAnchor">
@ -496,7 +496,7 @@
<p>Making this package independent of especially the tidyverse (e.g. packages <code>dplyr</code> and <code>tidyr</code>) tremendously increases sustainability on the long term, since tidyverse functions change quite often. Good for users, but hard for package maintainers. Most of our functions are replaced with versions that only rely on base R, which keeps this package fully functional for many years to come, without requiring a lot of maintenance to keep up with other packages anymore. Another upside it that this package can now be used with all versions of R since R-3.0.0 (April 2013). Our package is being used in settings where the resources are very limited. Fewer dependencies on newer software is helpful for such settings.</p> <p>Making this package independent of especially the tidyverse (e.g. packages <code>dplyr</code> and <code>tidyr</code>) tremendously increases sustainability on the long term, since tidyverse functions change quite often. Good for users, but hard for package maintainers. Most of our functions are replaced with versions that only rely on base R, which keeps this package fully functional for many years to come, without requiring a lot of maintenance to keep up with other packages anymore. Another upside it that this package can now be used with all versions of R since R-3.0.0 (April 2013). Our package is being used in settings where the resources are very limited. Fewer dependencies on newer software is helpful for such settings.</p>
<p>Negative effects of this change are:</p> <p>Negative effects of this change are:</p>
<ul> <ul>
<li>Function <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq()</a></code> that was borrowed from the <code>cleaner</code> package was removed. Use <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html">cleaner::freq()</a></code>, or run <code><a href="https://github.com/msberends/cleaner">library("cleaner")</a></code> before you use <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq()</a></code>.</li> <li>Function <code>freq()</code> that was borrowed from the <code>cleaner</code> package was removed. Use <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html">cleaner::freq()</a></code>, or run <code><a href="https://github.com/msberends/cleaner">library("cleaner")</a></code> before you use <code>freq()</code>.</li>
<li><del>Printing values of class <code>mo</code> or <code>rsi</code> in a tibble will no longer be in colour and printing <code>rsi</code> in a tibble will show the class <code>&lt;ord&gt;</code>, not <code>&lt;rsi&gt;</code> anymore. This is purely a visual effect.</del></li> <li><del>Printing values of class <code>mo</code> or <code>rsi</code> in a tibble will no longer be in colour and printing <code>rsi</code> in a tibble will show the class <code>&lt;ord&gt;</code>, not <code>&lt;rsi&gt;</code> anymore. This is purely a visual effect.</del></li>
<li><del>All functions from the <code>mo_*</code> family (like <code><a href="../reference/mo_property.html">mo_name()</a></code> and <code><a href="../reference/mo_property.html">mo_gramstain()</a></code>) are noticeably slower when running on hundreds of thousands of rows.</del></li> <li><del>All functions from the <code>mo_*</code> family (like <code><a href="../reference/mo_property.html">mo_name()</a></code> and <code><a href="../reference/mo_property.html">mo_gramstain()</a></code>) are noticeably slower when running on hundreds of thousands of rows.</del></li>
<li>For developers: classes <code>mo</code> and <code>ab</code> now both also inherit class <code>character</code>, to support any data transformation. This change invalidates code that checks for class length == 1.</li> <li>For developers: classes <code>mo</code> and <code>ab</code> now both also inherit class <code>character</code>, to support any data transformation. This change invalidates code that checks for class length == 1.</li>
@ -824,7 +824,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<span class="co">#&gt; invalid microorganism code, NA generated</span></pre></div> <span class="co">#&gt; invalid microorganism code, NA generated</span></pre></div>
<p>This is important, because a value like <code>"testvalue"</code> could never be understood by e.g. <code><a href="../reference/mo_property.html">mo_name()</a></code>, although the class would suggest a valid microbial code.</p> <p>This is important, because a value like <code>"testvalue"</code> could never be understood by e.g. <code><a href="../reference/mo_property.html">mo_name()</a></code>, although the class would suggest a valid microbial code.</p>
</li> </li>
<li><p>Function <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq()</a></code> has moved to a new package, <a href="https://github.com/msberends/clean"><code>clean</code></a> (<a href="https://cran.r-project.org/package=clean">CRAN link</a>), since creating frequency tables actually does not fit the scope of this package. The <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq()</a></code> function still works, since it is re-exported from the <code>clean</code> package (which will be installed automatically upon updating this <code>AMR</code> package).</p></li> <li><p>Function <code>freq()</code> has moved to a new package, <a href="https://github.com/msberends/clean"><code>clean</code></a> (<a href="https://cran.r-project.org/package=clean">CRAN link</a>), since creating frequency tables actually does not fit the scope of this package. The <code>freq()</code> function still works, since it is re-exported from the <code>clean</code> package (which will be installed automatically upon updating this <code>AMR</code> package).</p></li>
<li><p>Renamed data set <code>septic_patients</code> to <code>example_isolates</code></p></li> <li><p>Renamed data set <code>septic_patients</code> to <code>example_isolates</code></p></li>
</ul> </ul>
</div> </div>
@ -1087,7 +1087,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<li>The <code><a href="../reference/age.html">age()</a></code> function gained a new parameter <code>exact</code> to determine ages with decimals</li> <li>The <code><a href="../reference/age.html">age()</a></code> function gained a new parameter <code>exact</code> to determine ages with decimals</li>
<li>Removed deprecated functions <code>guess_mo()</code>, <code>guess_atc()</code>, <code>EUCAST_rules()</code>, <code>interpretive_reading()</code>, <code><a href="../reference/as.rsi.html">rsi()</a></code> <li>Removed deprecated functions <code>guess_mo()</code>, <code>guess_atc()</code>, <code>EUCAST_rules()</code>, <code>interpretive_reading()</code>, <code><a href="../reference/as.rsi.html">rsi()</a></code>
</li> </li>
<li>Frequency tables (<code><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq()</a></code>): <li>Frequency tables (<code>freq()</code>):
<ul> <ul>
<li><p>speed improvement for microbial IDs</p></li> <li><p>speed improvement for microbial IDs</p></li>
<li><p>fixed factor level names for R Markdown</p></li> <li><p>fixed factor level names for R Markdown</p></li>
@ -1096,12 +1096,12 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<p>support for boxplots:</p> <p>support for boxplots:</p>
<div class="sourceCode" id="cb22"><pre class="downlit"> <div class="sourceCode" id="cb22"><pre class="downlit">
<span class="va">septic_patients</span> <span class="op">%&gt;%</span> <span class="va">septic_patients</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span><span class="op">(</span><span class="va">age</span><span class="op">)</span> <span class="op">%&gt;%</span> <span class="fu">freq</span><span class="op">(</span><span class="va">age</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://rdrr.io/r/graphics/boxplot.html">boxplot</a></span><span class="op">(</span><span class="op">)</span> <span class="fu"><a href="https://rdrr.io/r/graphics/boxplot.html">boxplot</a></span><span class="op">(</span><span class="op">)</span>
<span class="co"># grouped boxplots:</span> <span class="co"># grouped boxplots:</span>
<span class="va">septic_patients</span> <span class="op">%&gt;%</span> <span class="va">septic_patients</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span><span class="op">(</span><span class="va">hospital_id</span><span class="op">)</span> <span class="op">%&gt;%</span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span><span class="op">(</span><span class="va">hospital_id</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span><span class="op">(</span><span class="va">age</span><span class="op">)</span> <span class="op">%&gt;%</span> <span class="fu">freq</span><span class="op">(</span><span class="va">age</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://rdrr.io/r/graphics/boxplot.html">boxplot</a></span><span class="op">(</span><span class="op">)</span></pre></div> <span class="fu"><a href="https://rdrr.io/r/graphics/boxplot.html">boxplot</a></span><span class="op">(</span><span class="op">)</span></pre></div>
</li> </li>
</ul> </ul>
@ -1111,7 +1111,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<li>Added ceftazidim intrinsic resistance to <em>Streptococci</em> <li>Added ceftazidim intrinsic resistance to <em>Streptococci</em>
</li> </li>
<li>Changed default settings for <code><a href="../reference/age_groups.html">age_groups()</a></code>, to let groups of fives and tens end with 100+ instead of 120+</li> <li>Changed default settings for <code><a href="../reference/age_groups.html">age_groups()</a></code>, to let groups of fives and tens end with 100+ instead of 120+</li>
<li>Fix for <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq()</a></code> for when all values are <code>NA</code> <li>Fix for <code>freq()</code> for when all values are <code>NA</code>
</li> </li>
<li>Fix for <code><a href="../reference/first_isolate.html">first_isolate()</a></code> for when dates are missing</li> <li>Fix for <code><a href="../reference/first_isolate.html">first_isolate()</a></code> for when dates are missing</li>
<li>Improved speed of <code><a href="../reference/guess_ab_col.html">guess_ab_col()</a></code> <li>Improved speed of <code><a href="../reference/guess_ab_col.html">guess_ab_col()</a></code>
@ -1343,7 +1343,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
</li> </li>
</ul> </ul>
</li> </li>
<li>Frequency tables (<code><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq()</a></code> function): <li>Frequency tables (<code>freq()</code> function):
<ul> <ul>
<li> <li>
<p>Support for tidyverse quasiquotation! Now you can create frequency tables of function outcomes:</p> <p>Support for tidyverse quasiquotation! Now you can create frequency tables of function outcomes:</p>
@ -1352,15 +1352,15 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<span class="co"># OLD WAY</span> <span class="co"># OLD WAY</span>
<span class="va">septic_patients</span> <span class="op">%&gt;%</span> <span class="va">septic_patients</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op">(</span>genus <span class="op">=</span> <span class="fu"><a href="../reference/mo_property.html">mo_genus</a></span><span class="op">(</span><span class="va">mo</span><span class="op">)</span><span class="op">)</span> <span class="op">%&gt;%</span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op">(</span>genus <span class="op">=</span> <span class="fu"><a href="../reference/mo_property.html">mo_genus</a></span><span class="op">(</span><span class="va">mo</span><span class="op">)</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span><span class="op">(</span><span class="va">genus</span><span class="op">)</span> <span class="fu">freq</span><span class="op">(</span><span class="va">genus</span><span class="op">)</span>
<span class="co"># NEW WAY</span> <span class="co"># NEW WAY</span>
<span class="va">septic_patients</span> <span class="op">%&gt;%</span> <span class="va">septic_patients</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span><span class="op">(</span><span class="fu"><a href="../reference/mo_property.html">mo_genus</a></span><span class="op">(</span><span class="va">mo</span><span class="op">)</span><span class="op">)</span> <span class="fu">freq</span><span class="op">(</span><span class="fu"><a href="../reference/mo_property.html">mo_genus</a></span><span class="op">(</span><span class="va">mo</span><span class="op">)</span><span class="op">)</span>
<span class="co"># Even supports grouping variables:</span> <span class="co"># Even supports grouping variables:</span>
<span class="va">septic_patients</span> <span class="op">%&gt;%</span> <span class="va">septic_patients</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span><span class="op">(</span><span class="va">gender</span><span class="op">)</span> <span class="op">%&gt;%</span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span><span class="op">(</span><span class="va">gender</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span><span class="op">(</span><span class="fu"><a href="../reference/mo_property.html">mo_genus</a></span><span class="op">(</span><span class="va">mo</span><span class="op">)</span><span class="op">)</span></pre></div> <span class="fu">freq</span><span class="op">(</span><span class="fu"><a href="../reference/mo_property.html">mo_genus</a></span><span class="op">(</span><span class="va">mo</span><span class="op">)</span><span class="op">)</span></pre></div>
</li> </li>
<li><p>Header info is now available as a list, with the <code>header</code> function</p></li> <li><p>Header info is now available as a list, with the <code>header</code> function</p></li>
<li><p>The parameter <code>header</code> is now set to <code>TRUE</code> at default, even for markdown</p></li> <li><p>The parameter <code>header</code> is now set to <code>TRUE</code> at default, even for markdown</p></li>
@ -1442,20 +1442,20 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<li><p>Using <code>portion_*</code> functions now throws a warning when total available isolate is below parameter <code>minimum</code></p></li> <li><p>Using <code>portion_*</code> functions now throws a warning when total available isolate is below parameter <code>minimum</code></p></li>
<li><p>Functions <code>as.mo</code>, <code>as.rsi</code>, <code>as.mic</code>, <code>as.atc</code> and <code>freq</code> will not set package name as attribute anymore</p></li> <li><p>Functions <code>as.mo</code>, <code>as.rsi</code>, <code>as.mic</code>, <code>as.atc</code> and <code>freq</code> will not set package name as attribute anymore</p></li>
<li> <li>
<p>Frequency tables - <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq()</a></code>:</p> <p>Frequency tables - <code>freq()</code>:</p>
<ul> <ul>
<li> <li>
<p>Support for grouping variables, test with:</p> <p>Support for grouping variables, test with:</p>
<div class="sourceCode" id="cb34"><pre class="downlit"> <div class="sourceCode" id="cb34"><pre class="downlit">
<span class="va">septic_patients</span> <span class="op">%&gt;%</span> <span class="va">septic_patients</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span><span class="op">(</span><span class="va">hospital_id</span><span class="op">)</span> <span class="op">%&gt;%</span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span><span class="op">(</span><span class="va">hospital_id</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span><span class="op">(</span><span class="va">gender</span><span class="op">)</span></pre></div> <span class="fu">freq</span><span class="op">(</span><span class="va">gender</span><span class="op">)</span></pre></div>
</li> </li>
<li> <li>
<p>Support for (un)selecting columns:</p> <p>Support for (un)selecting columns:</p>
<div class="sourceCode" id="cb35"><pre class="downlit"> <div class="sourceCode" id="cb35"><pre class="downlit">
<span class="va">septic_patients</span> <span class="op">%&gt;%</span> <span class="va">septic_patients</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span><span class="op">(</span><span class="va">hospital_id</span><span class="op">)</span> <span class="op">%&gt;%</span> <span class="fu">freq</span><span class="op">(</span><span class="va">hospital_id</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op">(</span><span class="op">-</span><span class="va">count</span>, <span class="op">-</span><span class="va">cum_count</span><span class="op">)</span> <span class="co"># only get item, percent, cum_percent</span></pre></div> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op">(</span><span class="op">-</span><span class="va">count</span>, <span class="op">-</span><span class="va">cum_count</span><span class="op">)</span> <span class="co"># only get item, percent, cum_percent</span></pre></div>
</li> </li>
<li><p>Check for <code><a href="https://hms.tidyverse.org/reference/Deprecated.html">hms::is.hms</a></code></p></li> <li><p>Check for <code><a href="https://hms.tidyverse.org/reference/Deprecated.html">hms::is.hms</a></code></p></li>
@ -1473,7 +1473,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<li><p>Removed diacritics from all authors (columns <code>microorganisms$ref</code> and <code>microorganisms.old$ref</code>) to comply with CRAN policy to only allow ASCII characters</p></li> <li><p>Removed diacritics from all authors (columns <code>microorganisms$ref</code> and <code>microorganisms.old$ref</code>) to comply with CRAN policy to only allow ASCII characters</p></li>
<li><p>Fix for <code>mo_property</code> not working properly</p></li> <li><p>Fix for <code>mo_property</code> not working properly</p></li>
<li><p>Fix for <code>eucast_rules</code> where some Streptococci would become ceftazidime R in EUCAST rule 4.5</p></li> <li><p>Fix for <code>eucast_rules</code> where some Streptococci would become ceftazidime R in EUCAST rule 4.5</p></li>
<li><p>Support for named vectors of class <code>mo</code>, useful for <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html">top_freq()</a></code></p></li> <li><p>Support for named vectors of class <code>mo</code>, useful for <code>top_freq()</code></p></li>
<li><p><code>ggplot_rsi</code> and <code>scale_y_percent</code> have <code>breaks</code> parameter</p></li> <li><p><code>ggplot_rsi</code> and <code>scale_y_percent</code> have <code>breaks</code> parameter</p></li>
<li> <li>
<p>AI improvements for <code>as.mo</code>:</p> <p>AI improvements for <code>as.mo</code>:</p>
@ -1634,12 +1634,12 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<p>Support for types (classes) list and matrix for <code>freq</code></p> <p>Support for types (classes) list and matrix for <code>freq</code></p>
<div class="sourceCode" id="cb42"><pre class="downlit"> <div class="sourceCode" id="cb42"><pre class="downlit">
<span class="va">my_matrix</span> <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/with.html">with</a></span><span class="op">(</span><span class="va">septic_patients</span>, <span class="fu"><a href="https://rdrr.io/r/base/matrix.html">matrix</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op">(</span><span class="va">age</span>, <span class="va">gender</span><span class="op">)</span>, ncol <span class="op">=</span> <span class="fl">2</span><span class="op">)</span><span class="op">)</span> <span class="va">my_matrix</span> <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/with.html">with</a></span><span class="op">(</span><span class="va">septic_patients</span>, <span class="fu"><a href="https://rdrr.io/r/base/matrix.html">matrix</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op">(</span><span class="va">age</span>, <span class="va">gender</span><span class="op">)</span>, ncol <span class="op">=</span> <span class="fl">2</span><span class="op">)</span><span class="op">)</span>
<span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span><span class="op">(</span><span class="va">my_matrix</span><span class="op">)</span></pre></div> <span class="fu">freq</span><span class="op">(</span><span class="va">my_matrix</span><span class="op">)</span></pre></div>
<p>For lists, subsetting is possible:</p> <p>For lists, subsetting is possible:</p>
<div class="sourceCode" id="cb43"><pre class="downlit"> <div class="sourceCode" id="cb43"><pre class="downlit">
<span class="va">my_list</span> <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op">(</span>age <span class="op">=</span> <span class="va">septic_patients</span><span class="op">$</span><span class="va">age</span>, gender <span class="op">=</span> <span class="va">septic_patients</span><span class="op">$</span><span class="va">gender</span><span class="op">)</span> <span class="va">my_list</span> <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op">(</span>age <span class="op">=</span> <span class="va">septic_patients</span><span class="op">$</span><span class="va">age</span>, gender <span class="op">=</span> <span class="va">septic_patients</span><span class="op">$</span><span class="va">gender</span><span class="op">)</span>
<span class="va">my_list</span> <span class="op">%&gt;%</span> <span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span><span class="op">(</span><span class="va">age</span><span class="op">)</span> <span class="va">my_list</span> <span class="op">%&gt;%</span> <span class="fu">freq</span><span class="op">(</span><span class="va">age</span><span class="op">)</span>
<span class="va">my_list</span> <span class="op">%&gt;%</span> <span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq</a></span><span class="op">(</span><span class="va">gender</span><span class="op">)</span></pre></div> <span class="va">my_list</span> <span class="op">%&gt;%</span> <span class="fu">freq</span><span class="op">(</span><span class="va">gender</span><span class="op">)</span></pre></div>
</li> </li>
</ul> </ul>
</div> </div>
@ -1713,13 +1713,13 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
<ul> <ul>
<li>A vignette to explain its usage</li> <li>A vignette to explain its usage</li>
<li>Support for <code>rsi</code> (antimicrobial resistance) to use as input</li> <li>Support for <code>rsi</code> (antimicrobial resistance) to use as input</li>
<li>Support for <code>table</code> to use as input: <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq(table(x, y))</a></code> <li>Support for <code>table</code> to use as input: <code>freq(table(x, y))</code>
</li> </li>
<li>Support for existing functions <code>hist</code> and <code>plot</code> to use a frequency table as input: <code><a href="https://rdrr.io/r/graphics/hist.html">hist(freq(df$age))</a></code> <li>Support for existing functions <code>hist</code> and <code>plot</code> to use a frequency table as input: <code><a href="https://rdrr.io/r/graphics/hist.html">hist(freq(df$age))</a></code>
</li> </li>
<li>Support for <code>as.vector</code>, <code>as.data.frame</code>, <code>as_tibble</code> and <code>format</code> <li>Support for <code>as.vector</code>, <code>as.data.frame</code>, <code>as_tibble</code> and <code>format</code>
</li> </li>
<li>Support for quasiquotation: <code><a href="https://rdrr.io/pkg/cleaner/man/freq.html">freq(mydata, mycolumn)</a></code> is the same as <code>mydata %&gt;% freq(mycolumn)</code> <li>Support for quasiquotation: <code>freq(mydata, mycolumn)</code> is the same as <code>mydata %&gt;% freq(mycolumn)</code>
</li> </li>
<li>Function <code>top_freq</code> function to return the top/below <em>n</em> items as vector</li> <li>Function <code>top_freq</code> function to return the top/below <em>n</em> items as vector</li>
<li>Header of frequency tables now also show Mean Absolute Deviaton (MAD) and Interquartile Range (IQR)</li> <li>Header of frequency tables now also show Mean Absolute Deviaton (MAD) and Interquartile Range (IQR)</li>

View File

@ -12,7 +12,7 @@ articles:
datasets: datasets.html datasets: datasets.html
resistance_predict: resistance_predict.html resistance_predict: resistance_predict.html
welcome_to_AMR: welcome_to_AMR.html welcome_to_AMR: welcome_to_AMR.html
last_built: 2020-12-07T15:06Z last_built: 2020-12-08T11:37Z
urls: urls:
reference: https://msberends.github.io/AMR//reference reference: https://msberends.github.io/AMR//reference
article: https://msberends.github.io/AMR//articles article: https://msberends.github.io/AMR//articles

View File

@ -82,7 +82,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">1.4.0.9030</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9032</span>
</span> </span>
</div> </div>

View File

@ -82,7 +82,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">1.4.0.9000</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9032</span>
</span> </span>
</div> </div>

View File

@ -82,7 +82,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">1.4.0.9000</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9032</span>
</span> </span>
</div> </div>

View File

@ -82,7 +82,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">1.4.0.9000</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9032</span>
</span> </span>
</div> </div>

View File

@ -82,7 +82,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">1.4.0.9000</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9032</span>
</span> </span>
</div> </div>

View File

@ -82,7 +82,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">1.4.0.9000</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9032</span>
</span> </span>
</div> </div>

View File

@ -82,7 +82,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">1.4.0.9030</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9032</span>
</span> </span>
</div> </div>

View File

@ -82,7 +82,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">1.4.0.9030</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9032</span>
</span> </span>
</div> </div>

View File

@ -49,7 +49,7 @@
<script src="../extra.js"></script> <script src="../extra.js"></script>
<meta property="og:title" content="Antibiotic class selectors — antibiotic_class_selectors" /> <meta property="og:title" content="Antibiotic class selectors — antibiotic_class_selectors" />
<meta property="og:description" content="Use these selection helpers inside any function that allows Tidyverse selection helpers, like dplyr::select() or tidyr::pivot_longer(). They help to select the columns of antibiotics that are of a specific antibiotic class, without the need to define the columns or antibiotic abbreviations." /> <meta property="og:description" content="Use these selection helpers inside any function that allows Tidyverse selection helpers, such as select() and pivot_longer(). They help to select the columns of antibiotics that are of a specific antibiotic class, without the need to define the columns or antibiotic abbreviations." />
<meta property="og:image" content="https://msberends.github.io/AMR/logo.png" /> <meta property="og:image" content="https://msberends.github.io/AMR/logo.png" />
@ -82,7 +82,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">1.4.0.9030</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9032</span>
</span> </span>
</div> </div>
@ -239,7 +239,7 @@
</div> </div>
<div class="ref-description"> <div class="ref-description">
<p>Use these selection helpers inside any function that allows <a href='https://tidyselect.r-lib.org/reference/language.html'>Tidyverse selection helpers</a>, like <code><a href='https://dplyr.tidyverse.org/reference/select.html'>dplyr::select()</a></code> or <code><a href='https://tidyr.tidyverse.org/reference/pivot_longer.html'>tidyr::pivot_longer()</a></code>. They help to select the columns of antibiotics that are of a specific antibiotic class, without the need to define the columns or antibiotic abbreviations.</p> <p>Use these selection helpers inside any function that allows <a href='https://tidyselect.r-lib.org/reference/language.html'>Tidyverse selection helpers</a>, such as <code><a href='https://dplyr.tidyverse.org/reference/select.html'>select()</a></code> and <code><a href='https://tidyr.tidyverse.org/reference/pivot_longer.html'>pivot_longer()</a></code>. They help to select the columns of antibiotics that are of a specific antibiotic class, without the need to define the columns or antibiotic abbreviations.</p>
</div> </div>
<pre class="usage"><span class='fu'>ab_class</span><span class='op'>(</span><span class='va'>ab_class</span><span class='op'>)</span> <pre class="usage"><span class='fu'>ab_class</span><span class='op'>(</span><span class='va'>ab_class</span><span class='op'>)</span>
@ -282,7 +282,7 @@
<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>All columns will be searched for known antibiotic names, abbreviations, brand names and codes (ATC, EARS-Net, WHO, etc.) in the <a href='antibiotics.html'>antibiotics</a> data set. This means that a selector like e.g. <code>aminoglycosides()</code> will pick up column names like 'gen', 'genta', 'J01GB03', 'tobra', 'Tobracin', etc.</p> <p>All columns will be searched for known antibiotic names, abbreviations, brand names and codes (ATC, EARS-Net, WHO, etc.) in the <a href='antibiotics.html'>antibiotics</a> data set. This means that a selector like e.g. <code>aminoglycosides()</code> will pick up column names like 'gen', 'genta', 'J01GB03', 'tobra', 'Tobracin', etc.</p>
<p><strong>N.B. These functions only work if the <code>tidyselect</code> package is installed</strong>, that comes with the <code>dplyr</code> package. An error will be thrown if the <code>tidyselect</code> package is not installed, or if the functions are used outside a function that allows Tidyverse selections like <code><a href='https://dplyr.tidyverse.org/reference/select.html'>select()</a></code> or <code>pivot_longer()</code>.</p> <p><strong>N.B. These functions require the <code>tidyselect</code> package to be installed</strong>, that comes with the <code>dplyr</code> package. An error will be thrown if the <code>tidyselect</code> package is not installed, or if the functions are used outside a function that allows <a href='https://tidyselect.r-lib.org/reference/language.html'>Tidyverse selection helpers</a> such as <code><a href='https://dplyr.tidyverse.org/reference/select.html'>select()</a></code> and <code><a href='https://tidyr.tidyverse.org/reference/pivot_longer.html'>pivot_longer()</a></code>`.</p>
<h2 class="hasAnchor" id="reference-data-publicly-available"><a class="anchor" href="#reference-data-publicly-available"></a>Reference data publicly available</h2> <h2 class="hasAnchor" id="reference-data-publicly-available"><a class="anchor" href="#reference-data-publicly-available"></a>Reference data publicly available</h2>

View File

@ -82,7 +82,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">1.4.0.9000</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9032</span>
</span> </span>
</div> </div>

View File

@ -82,7 +82,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">1.4.0.9000</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9032</span>
</span> </span>
</div> </div>

View File

@ -82,7 +82,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">1.4.0.9030</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9032</span>
</span> </span>
</div> </div>

View File

@ -82,7 +82,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">1.4.0.9000</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9032</span>
</span> </span>
</div> </div>

View File

@ -82,7 +82,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">1.4.0.9030</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9033</span>
</span> </span>
</div> </div>
@ -404,8 +404,8 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
<p><img src='figures/logo_col.png' height=40px style=margin-bottom:5px /> <br /> <p><img src='figures/logo_col.png' height=40px style=margin-bottom:5px /> <br />
This package contains the complete taxonomic tree of almost all microorganisms (~70,000 species) from the authoritative and comprehensive Catalogue of Life (<a href='http://www.catalogueoflife.org'>http://www.catalogueoflife.org</a>). The Catalogue of Life is the most comprehensive and authoritative global index of species currently available.</p> This package contains the complete taxonomic tree of almost all microorganisms (~70,000 species) from the authoritative and comprehensive Catalogue of Life (CoL, <a href='http://www.catalogueoflife.org'>http://www.catalogueoflife.org</a>). The CoL is the most comprehensive and authoritative global index of species currently available. Nonetheless, we supplemented the CoL data with data from the List of Prokaryotic names with Standing in Nomenclature (LPSN, <a href='https://lpsn.dsmz.de'>lpsn.dsmz.de</a>). This supplementation is needed until the <a href='https://github.com/Sp2000/colplus'>CoL+ project</a> is finished, which we await.</p>
<p><a href='catalogue_of_life.html'>Click here</a> for more information about the included taxa. Check which version of the Catalogue of Life was included in this package with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version()</a></code>.</p> <p><a href='catalogue_of_life.html'>Click here</a> for more information about the included taxa. Check which versions of the CoL and LSPN were included in this package with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version()</a></code>.</p>
<h2 class="hasAnchor" id="reference-data-publicly-available"><a class="anchor" href="#reference-data-publicly-available"></a>Reference data publicly available</h2> <h2 class="hasAnchor" id="reference-data-publicly-available"><a class="anchor" href="#reference-data-publicly-available"></a>Reference data publicly available</h2>

View File

@ -82,7 +82,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">1.4.0.9030</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9032</span>
</span> </span>
</div> </div>

View File

@ -82,7 +82,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">1.4.0.9000</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9032</span>
</span> </span>
</div> </div>

View File

@ -82,7 +82,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">1.4.0.9000</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9032</span>
</span> </span>
</div> </div>

View File

@ -82,7 +82,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">1.4.0.9030</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9032</span>
</span> </span>
</div> </div>

View File

@ -82,7 +82,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">1.4.0.9000</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9033</span>
</span> </span>
</div> </div>
@ -249,17 +249,17 @@
<p><img src='figures/logo_col.png' height=40px style=margin-bottom:5px /> <br /> <p><img src='figures/logo_col.png' height=40px style=margin-bottom:5px /> <br />
This package contains the complete taxonomic tree of almost all microorganisms (~70,000 species) from the authoritative and comprehensive Catalogue of Life (<a href='http://www.catalogueoflife.org'>http://www.catalogueoflife.org</a>). The Catalogue of Life is the most comprehensive and authoritative global index of species currently available.</p> This package contains the complete taxonomic tree of almost all microorganisms (~70,000 species) from the authoritative and comprehensive Catalogue of Life (CoL, <a href='http://www.catalogueoflife.org'>http://www.catalogueoflife.org</a>). The CoL is the most comprehensive and authoritative global index of species currently available. Nonetheless, we supplemented the CoL data with data from the List of Prokaryotic names with Standing in Nomenclature (LPSN, <a href='https://lpsn.dsmz.de'>lpsn.dsmz.de</a>). This supplementation is needed until the <a href='https://github.com/Sp2000/colplus'>CoL+ project</a> is finished, which we await.</p>
<p>Click here for more information about the included taxa. Check which version of the Catalogue of Life was included in this package with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version()</a></code>.</p> <p>Click here for more information about the included taxa. Check which versions of the CoL and LSPN were included in this package with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version()</a></code>.</p>
<h2 class="hasAnchor" id="included-taxa"><a class="anchor" href="#included-taxa"></a>Included taxa</h2> <h2 class="hasAnchor" id="included-taxa"><a class="anchor" href="#included-taxa"></a>Included taxa</h2>
<p>Included are:</p><ul> <p>Included are:</p><ul>
<li><p>All ~61,000 (sub)species from the kingdoms of Archaea, Bacteria, Chromista and Protozoa</p></li> <li><p>All ~55,000 (sub)species from the kingdoms of Archaea, Bacteria, Chromista and Protozoa</p></li>
<li><p>All ~8,500 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Microascales, Mucorales, Onygenales, Pneumocystales, Saccharomycetales, Schizosaccharomycetales and Tremellales. The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant fungi are covered (like all species of <em>Aspergillus</em>, <em>Candida</em>, <em>Cryptococcus</em>, <em>Histplasma</em>, <em>Pneumocystis</em>, <em>Saccharomyces</em> and <em>Trichophyton</em>).</p></li> <li><p>All ~5,000 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Microascales, Mucorales, Onygenales, Pneumocystales, Saccharomycetales, Schizosaccharomycetales and Tremellales, as well as ~4,600 other fungal (sub)species. The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant fungi are covered (like all species of <em>Aspergillus</em>, <em>Candida</em>, <em>Cryptococcus</em>, <em>Histplasma</em>, <em>Pneumocystis</em>, <em>Saccharomyces</em> and <em>Trichophyton</em>).</p></li>
<li><p>All ~150 (sub)species from ~100 other relevant genera from the kingdom of Animalia (like <em>Strongyloides</em> and <em>Taenia</em>)</p></li> <li><p>All ~2,200 (sub)species from ~50 other relevant genera from the kingdom of Animalia (like <em>Strongyloides</em> and <em>Taenia</em>)</p></li>
<li><p>All ~23,000 previously accepted names of all included (sub)species (these were taxonomically renamed)</p></li> <li><p>All ~13,000 previously accepted names of all included (sub)species (these were taxonomically renamed)</p></li>
<li><p>The complete taxonomic tree of all included (sub)species: from kingdom to subspecies</p></li> <li><p>The complete taxonomic tree of all included (sub)species: from kingdom to subspecies</p></li>
<li><p>The responsible author(s) and year of scientific publication</p></li> <li><p>The responsible author(s) and year of scientific publication</p></li>
</ul> </ul>
@ -285,26 +285,26 @@ Function <code><a href='as.mo.html'>as.mo()</a></code> to use the data for intel
<span class='fu'><a href='mo_property.html'>mo_shortname</a></span><span class='op'>(</span><span class='st'>"Chlamydophila psittaci"</span><span class='op'>)</span> <span class='fu'><a href='mo_property.html'>mo_shortname</a></span><span class='op'>(</span><span class='st'>"Chlamydophila psittaci"</span><span class='op'>)</span>
<span class='co'># Note: 'Chlamydophila psittaci' (Everett et al., 1999) was renamed back to</span> <span class='co'># Note: 'Chlamydophila psittaci' (Everett et al., 1999) was renamed back to</span>
<span class='co'># 'Chlamydia psittaci' (Page, 1968)</span> <span class='co'># 'Chlamydia psittaci' (Page, 1968)</span>
<span class='co'># [1] "C. psittaci"</span> <span class='co'>#&gt; [1] "C. psittaci"</span>
<span class='co'># Get any property from the entire taxonomic tree for all included species</span> <span class='co'># Get any property from the entire taxonomic tree for all included species</span>
<span class='fu'><a href='mo_property.html'>mo_class</a></span><span class='op'>(</span><span class='st'>"E. coli"</span><span class='op'>)</span> <span class='fu'><a href='mo_property.html'>mo_class</a></span><span class='op'>(</span><span class='st'>"E. coli"</span><span class='op'>)</span>
<span class='co'># [1] "Gammaproteobacteria"</span> <span class='co'>#&gt; [1] "Gammaproteobacteria"</span>
<span class='fu'><a href='mo_property.html'>mo_family</a></span><span class='op'>(</span><span class='st'>"E. coli"</span><span class='op'>)</span> <span class='fu'><a href='mo_property.html'>mo_family</a></span><span class='op'>(</span><span class='st'>"E. coli"</span><span class='op'>)</span>
<span class='co'># [1] "Enterobacteriaceae"</span> <span class='co'>#&gt; [1] "Enterobacteriaceae"</span>
<span class='fu'><a href='mo_property.html'>mo_gramstain</a></span><span class='op'>(</span><span class='st'>"E. coli"</span><span class='op'>)</span> <span class='co'># based on kingdom and phylum, see ?mo_gramstain</span> <span class='fu'><a href='mo_property.html'>mo_gramstain</a></span><span class='op'>(</span><span class='st'>"E. coli"</span><span class='op'>)</span> <span class='co'># based on kingdom and phylum, see ?mo_gramstain</span>
<span class='co'># [1] "Gram negative"</span> <span class='co'>#&gt; [1] "Gram-negative"</span>
<span class='fu'><a href='mo_property.html'>mo_ref</a></span><span class='op'>(</span><span class='st'>"E. coli"</span><span class='op'>)</span> <span class='fu'><a href='mo_property.html'>mo_ref</a></span><span class='op'>(</span><span class='st'>"E. coli"</span><span class='op'>)</span>
<span class='co'># [1] "Castellani et al., 1919"</span> <span class='co'>#&gt; [1] "Castellani et al., 1919"</span>
<span class='co'># Do not get mistaken - this package is about microorganisms</span> <span class='co'># Do not get mistaken - this package is about microorganisms</span>
<span class='fu'><a href='mo_property.html'>mo_kingdom</a></span><span class='op'>(</span><span class='st'>"C. elegans"</span><span class='op'>)</span> <span class='fu'><a href='mo_property.html'>mo_kingdom</a></span><span class='op'>(</span><span class='st'>"C. elegans"</span><span class='op'>)</span>
<span class='co'># [1] "Fungi" # Fungi?!</span> <span class='co'>#&gt; [1] "Fungi" # Fungi?!</span>
<span class='fu'><a href='mo_property.html'>mo_name</a></span><span class='op'>(</span><span class='st'>"C. elegans"</span><span class='op'>)</span> <span class='fu'><a href='mo_property.html'>mo_name</a></span><span class='op'>(</span><span class='st'>"C. elegans"</span><span class='op'>)</span>
<span class='co'># [1] "Cladosporium elegans" # Because a microorganism was found</span> <span class='co'>#&gt; [1] "Cladosporium elegans" # Because a microorganism was found</span>
</pre> </pre>
</div> </div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">

View File

@ -82,7 +82,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">1.4.0.9000</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9033</span>
</span> </span>
</div> </div>
@ -256,8 +256,8 @@
<p><img src='figures/logo_col.png' height=40px style=margin-bottom:5px /> <br /> <p><img src='figures/logo_col.png' height=40px style=margin-bottom:5px /> <br />
This package contains the complete taxonomic tree of almost all microorganisms (~70,000 species) from the authoritative and comprehensive Catalogue of Life (<a href='http://www.catalogueoflife.org'>http://www.catalogueoflife.org</a>). The Catalogue of Life is the most comprehensive and authoritative global index of species currently available.</p> This package contains the complete taxonomic tree of almost all microorganisms (~70,000 species) from the authoritative and comprehensive Catalogue of Life (CoL, <a href='http://www.catalogueoflife.org'>http://www.catalogueoflife.org</a>). The CoL is the most comprehensive and authoritative global index of species currently available. Nonetheless, we supplemented the CoL data with data from the List of Prokaryotic names with Standing in Nomenclature (LPSN, <a href='https://lpsn.dsmz.de'>lpsn.dsmz.de</a>). This supplementation is needed until the <a href='https://github.com/Sp2000/colplus'>CoL+ project</a> is finished, which we await.</p>
<p><a href='catalogue_of_life.html'>Click here</a> for more information about the included taxa. Check which version of the Catalogue of Life was included in this package with <code>catalogue_of_life_version()</code>.</p> <p><a href='catalogue_of_life.html'>Click here</a> for more information about the included taxa. Check which versions of the CoL and LSPN were included in this package with <code>catalogue_of_life_version()</code>.</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

@ -83,7 +83,7 @@ count_resistant() should be used to count resistant isolates, count_susceptible(
</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">1.4.0.9000</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9032</span>
</span> </span>
</div> </div>

View File

@ -83,7 +83,7 @@ To improve the interpretation of the antibiogram before EUCAST rules are applied
</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">1.4.0.9000</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9032</span>
</span> </span>
</div> </div>

View File

@ -82,7 +82,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">1.4.0.9000</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9032</span>
</span> </span>
</div> </div>

View File

@ -82,7 +82,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">1.4.0.9000</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9032</span>
</span> </span>
</div> </div>

View File

@ -82,7 +82,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">1.4.0.9008</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9032</span>
</span> </span>
</div> </div>

View File

@ -285,7 +285,7 @@
<colgroup><col class="name" /><col class="desc" /></colgroup> <colgroup><col class="name" /><col class="desc" /></colgroup>
<tr> <tr>
<th>x</th> <th>x</th>
<td><p>a <a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a> containing isolates. Can be omitted when used inside <code>dplyr</code> verbs, such as <code><a href='https://rdrr.io/r/stats/filter.html'>filter()</a></code>, <code>mutate()</code> and <code>summarise()</code>.</p></td> <td><p>a <a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a> containing isolates. Can be omitted when used inside <code>dplyr</code> verbs, such as <code><a href='https://dplyr.tidyverse.org/reference/filter.html'>filter()</a></code>, <code><a href='https://dplyr.tidyverse.org/reference/mutate.html'>mutate()</a></code> and <code><a href='https://dplyr.tidyverse.org/reference/summarise.html'>summarise()</a></code>.</p></td>
</tr> </tr>
<tr> <tr>
<th>col_date</th> <th>col_date</th>

View File

@ -82,7 +82,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">1.4.0.9000</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9032</span>
</span> </span>
</div> </div>

View File

@ -82,7 +82,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">1.4.0.9030</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9032</span>
</span> </span>
</div> </div>

View File

@ -82,7 +82,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">1.4.0.9030</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9032</span>
</span> </span>
</div> </div>

View File

@ -82,7 +82,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">1.4.0.9031</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9032</span>
</span> </span>
</div> </div>

View File

@ -81,7 +81,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">1.4.0.9032</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9033</span>
</span> </span>
</div> </div>

View File

@ -82,7 +82,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">1.4.0.9030</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9032</span>
</span> </span>
</div> </div>

View File

@ -281,7 +281,49 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>experimen
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>. As we would like to better understand the backgrounds and needs of our users, please <a href='https://msberends.github.io/AMR/survey.html'>participate in our survey</a>!</p> <p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>. As we would like to better understand the backgrounds and needs of our users, please <a href='https://msberends.github.io/AMR/survey.html'>participate in our survey</a>!</p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"></pre> <pre class="examples"><span class='co'># `example_isolates` is a dataset available in the AMR package.</span>
<span class='co'># See ?example_isolates.</span>
<span class='fu'>is_new_episode</span><span class='op'>(</span><span class='va'>example_isolates</span><span class='op'>$</span><span class='va'>date</span><span class='op'>)</span>
<span class='fu'>is_new_episode</span><span class='op'>(</span><span class='va'>example_isolates</span><span class='op'>$</span><span class='va'>date</span>, episode_days <span class='op'>=</span> <span class='fl'>60</span><span class='op'>)</span>
<span class='co'># \donttest{</span>
<span class='kw'>if</span> <span class='op'>(</span><span class='kw'><a href='https://rdrr.io/r/base/library.html'>require</a></span><span class='op'>(</span><span class='st'><a href='https://dplyr.tidyverse.org'>"dplyr"</a></span><span class='op'>)</span><span class='op'>)</span> <span class='op'>{</span>
<span class='co'># is_new_episode() can also be used in dplyr verbs to determine patient</span>
<span class='co'># episodes based on any (combination of) grouping variables:</span>
<span class='va'>example_isolates</span> <span class='op'>%&gt;%</span>
<span class='fu'><a href='https://dplyr.tidyverse.org/reference/mutate.html'>mutate</a></span><span class='op'>(</span>condition <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/sample.html'>sample</a></span><span class='op'>(</span>x <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='st'>"A"</span>, <span class='st'>"B"</span>, <span class='st'>"C"</span><span class='op'>)</span>,
size <span class='op'>=</span> <span class='fl'>2000</span>,
replace <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span><span class='op'>)</span> <span class='op'>%&gt;%</span>
<span class='fu'><a href='https://dplyr.tidyverse.org/reference/group_by.html'>group_by</a></span><span class='op'>(</span><span class='va'>condition</span><span class='op'>)</span> <span class='op'>%&gt;%</span>
<span class='fu'><a href='https://dplyr.tidyverse.org/reference/mutate.html'>mutate</a></span><span class='op'>(</span>new_episode <span class='op'>=</span> <span class='fu'>is_new_episode</span><span class='op'>(</span><span class='va'>date</span><span class='op'>)</span><span class='op'>)</span>
<span class='va'>example_isolates</span> <span class='op'>%&gt;%</span>
<span class='fu'><a href='https://dplyr.tidyverse.org/reference/group_by.html'>group_by</a></span><span class='op'>(</span><span class='va'>hospital_id</span><span class='op'>)</span> <span class='op'>%&gt;%</span>
<span class='fu'><a href='https://dplyr.tidyverse.org/reference/summarise.html'>summarise</a></span><span class='op'>(</span>patients <span class='op'>=</span> <span class='fu'><a href='https://dplyr.tidyverse.org/reference/n_distinct.html'>n_distinct</a></span><span class='op'>(</span><span class='va'>patient_id</span><span class='op'>)</span>,
n_episodes_365 <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/sum.html'>sum</a></span><span class='op'>(</span><span class='fu'>is_new_episode</span><span class='op'>(</span><span class='va'>date</span>, episode_days <span class='op'>=</span> <span class='fl'>365</span><span class='op'>)</span><span class='op'>)</span>,
n_episodes_60 <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/sum.html'>sum</a></span><span class='op'>(</span><span class='fu'>is_new_episode</span><span class='op'>(</span><span class='va'>date</span>, episode_days <span class='op'>=</span> <span class='fl'>60</span><span class='op'>)</span><span class='op'>)</span>,
n_episodes_30 <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/sum.html'>sum</a></span><span class='op'>(</span><span class='fu'>is_new_episode</span><span class='op'>(</span><span class='va'>date</span>, episode_days <span class='op'>=</span> <span class='fl'>30</span><span class='op'>)</span><span class='op'>)</span><span class='op'>)</span>
<span class='co'># grouping on patients and microorganisms leads to the same results</span>
<span class='co'># as first_isolate():</span>
<span class='va'>x</span> <span class='op'>&lt;-</span> <span class='va'>example_isolates</span> <span class='op'>%&gt;%</span>
<span class='fu'><a href='https://dplyr.tidyverse.org/reference/filter.html'>filter</a></span><span class='op'>(</span><span class='fu'><a href='first_isolate.html'>first_isolate</a></span><span class='op'>(</span><span class='va'>.</span>, include_unknown <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span><span class='op'>)</span>
<span class='va'>y</span> <span class='op'>&lt;-</span> <span class='va'>example_isolates</span> <span class='op'>%&gt;%</span>
<span class='fu'><a href='https://dplyr.tidyverse.org/reference/group_by.html'>group_by</a></span><span class='op'>(</span><span class='va'>patient_id</span>, <span class='va'>mo</span><span class='op'>)</span> <span class='op'>%&gt;%</span>
<span class='fu'><a href='https://dplyr.tidyverse.org/reference/filter.html'>filter</a></span><span class='op'>(</span><span class='fu'>is_new_episode</span><span class='op'>(</span><span class='va'>date</span><span class='op'>)</span><span class='op'>)</span>
<span class='fu'><a href='https://rdrr.io/r/base/identical.html'>identical</a></span><span class='op'>(</span><span class='va'>x</span><span class='op'>$</span><span class='va'>patient_id</span>, <span class='va'>y</span><span class='op'>$</span><span class='va'>patient_id</span><span class='op'>)</span>
<span class='co'># but is_new_episode() has a lot more flexibility than first_isolate(),</span>
<span class='co'># since you can now group on anything that seems relevant:</span>
<span class='va'>example_isolates</span> <span class='op'>%&gt;%</span>
<span class='fu'><a href='https://dplyr.tidyverse.org/reference/group_by.html'>group_by</a></span><span class='op'>(</span><span class='va'>patient_id</span>, <span class='va'>mo</span>, <span class='va'>hospital_id</span>, <span class='va'>ward_icu</span><span class='op'>)</span> <span class='op'>%&gt;%</span>
<span class='fu'><a href='https://dplyr.tidyverse.org/reference/mutate.html'>mutate</a></span><span class='op'>(</span>flag_episode <span class='op'>=</span> <span class='fu'>is_new_episode</span><span class='op'>(</span><span class='va'>date</span><span class='op'>)</span><span class='op'>)</span>
<span class='op'>}</span>
<span class='co'># }</span>
</pre>
</div> </div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
<nav id="toc" data-toggle="toc" class="sticky-top"> <nav id="toc" data-toggle="toc" class="sticky-top">

View File

@ -82,7 +82,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">1.4.0.9000</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9032</span>
</span> </span>
</div> </div>

View File

@ -82,7 +82,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">1.4.0.9000</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9032</span>
</span> </span>
</div> </div>

View File

@ -84,7 +84,7 @@ This page contains a section for every lifecycle (with text borrowed from the af
</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">1.4.0.9008</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9032</span>
</span> </span>
</div> </div>

View File

@ -82,7 +82,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">1.4.0.9030</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9032</span>
</span> </span>
</div> </div>

View File

@ -82,7 +82,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">1.4.0.9032</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9033</span>
</span> </span>
</div> </div>

View File

@ -82,7 +82,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">1.4.0.9000</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9033</span>
</span> </span>
</div> </div>
@ -262,8 +262,8 @@
<p><img src='figures/logo_col.png' height=40px style=margin-bottom:5px /> <br /> <p><img src='figures/logo_col.png' height=40px style=margin-bottom:5px /> <br />
This package contains the complete taxonomic tree of almost all microorganisms (~70,000 species) from the authoritative and comprehensive Catalogue of Life (<a href='http://www.catalogueoflife.org'>http://www.catalogueoflife.org</a>). The Catalogue of Life is the most comprehensive and authoritative global index of species currently available.</p> This package contains the complete taxonomic tree of almost all microorganisms (~70,000 species) from the authoritative and comprehensive Catalogue of Life (CoL, <a href='http://www.catalogueoflife.org'>http://www.catalogueoflife.org</a>). The CoL is the most comprehensive and authoritative global index of species currently available. Nonetheless, we supplemented the CoL data with data from the List of Prokaryotic names with Standing in Nomenclature (LPSN, <a href='https://lpsn.dsmz.de'>lpsn.dsmz.de</a>). This supplementation is needed until the <a href='https://github.com/Sp2000/colplus'>CoL+ project</a> is finished, which we await.</p>
<p><a href='catalogue_of_life.html'>Click here</a> for more information about the included taxa. Check which version of the Catalogue of Life was included in this package with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version()</a></code>.</p> <p><a href='catalogue_of_life.html'>Click here</a> for more information about the included taxa. Check which versions of the CoL and LSPN were included in this package with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version()</a></code>.</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

@ -82,7 +82,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">1.4.0.9000</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9033</span>
</span> </span>
</div> </div>
@ -300,8 +300,8 @@
<p><img src='figures/logo_col.png' height=40px style=margin-bottom:5px /> <br /> <p><img src='figures/logo_col.png' height=40px style=margin-bottom:5px /> <br />
This package contains the complete taxonomic tree of almost all microorganisms (~70,000 species) from the authoritative and comprehensive Catalogue of Life (<a href='http://www.catalogueoflife.org'>http://www.catalogueoflife.org</a>). The Catalogue of Life is the most comprehensive and authoritative global index of species currently available.</p> This package contains the complete taxonomic tree of almost all microorganisms (~70,000 species) from the authoritative and comprehensive Catalogue of Life (CoL, <a href='http://www.catalogueoflife.org'>http://www.catalogueoflife.org</a>). The CoL is the most comprehensive and authoritative global index of species currently available. Nonetheless, we supplemented the CoL data with data from the List of Prokaryotic names with Standing in Nomenclature (LPSN, <a href='https://lpsn.dsmz.de'>lpsn.dsmz.de</a>). This supplementation is needed until the <a href='https://github.com/Sp2000/colplus'>CoL+ project</a> is finished, which we await.</p>
<p><a href='catalogue_of_life.html'>Click here</a> for more information about the included taxa. Check which version of the Catalogue of Life was included in this package with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version()</a></code>.</p> <p><a href='catalogue_of_life.html'>Click here</a> for more information about the included taxa. Check which versions of the CoL and LSPN were included in this package with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version()</a></code>.</p>
<h2 class="hasAnchor" id="reference-data-publicly-available"><a class="anchor" href="#reference-data-publicly-available"></a>Reference data publicly available</h2> <h2 class="hasAnchor" id="reference-data-publicly-available"><a class="anchor" href="#reference-data-publicly-available"></a>Reference data publicly available</h2>

View File

@ -82,7 +82,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">1.4.0.9000</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9033</span>
</span> </span>
</div> </div>
@ -263,8 +263,8 @@
<p><img src='figures/logo_col.png' height=40px style=margin-bottom:5px /> <br /> <p><img src='figures/logo_col.png' height=40px style=margin-bottom:5px /> <br />
This package contains the complete taxonomic tree of almost all microorganisms (~70,000 species) from the authoritative and comprehensive Catalogue of Life (<a href='http://www.catalogueoflife.org'>http://www.catalogueoflife.org</a>). The Catalogue of Life is the most comprehensive and authoritative global index of species currently available.</p> This package contains the complete taxonomic tree of almost all microorganisms (~70,000 species) from the authoritative and comprehensive Catalogue of Life (CoL, <a href='http://www.catalogueoflife.org'>http://www.catalogueoflife.org</a>). The CoL is the most comprehensive and authoritative global index of species currently available. Nonetheless, we supplemented the CoL data with data from the List of Prokaryotic names with Standing in Nomenclature (LPSN, <a href='https://lpsn.dsmz.de'>lpsn.dsmz.de</a>). This supplementation is needed until the <a href='https://github.com/Sp2000/colplus'>CoL+ project</a> is finished, which we await.</p>
<p><a href='catalogue_of_life.html'>Click here</a> for more information about the included taxa. Check which version of the Catalogue of Life was included in this package with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version()</a></code>.</p> <p><a href='catalogue_of_life.html'>Click here</a> for more information about the included taxa. Check which versions of the CoL and LSPN were included in this package with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version()</a></code>.</p>
<h2 class="hasAnchor" id="reference-data-publicly-available"><a class="anchor" href="#reference-data-publicly-available"></a>Reference data publicly available</h2> <h2 class="hasAnchor" id="reference-data-publicly-available"><a class="anchor" href="#reference-data-publicly-available"></a>Reference data publicly available</h2>

View File

@ -82,7 +82,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">1.4.0.9030</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9032</span>
</span> </span>
</div> </div>

View File

@ -82,7 +82,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">1.4.0.9030</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9033</span>
</span> </span>
</div> </div>
@ -301,7 +301,7 @@
<colgroup><col class="name" /><col class="desc" /></colgroup> <colgroup><col class="name" /><col class="desc" /></colgroup>
<tr> <tr>
<th>x</th> <th>x</th>
<td><p>any character (vector) that can be coerced to a valid microorganism code with <code><a href='as.mo.html'>as.mo()</a></code></p></td> <td><p>any character (vector) that can be coerced to a valid microorganism code with <code><a href='as.mo.html'>as.mo()</a></code>. Can be omitted for auto-guessing in <code>mo_is_*()</code> functions when used inside <code>dplyr</code> verbs, such as <code><a href='https://dplyr.tidyverse.org/reference/filter.html'>filter()</a></code>, <code><a href='https://dplyr.tidyverse.org/reference/mutate.html'>mutate()</a></code> and <code><a href='https://dplyr.tidyverse.org/reference/summarise.html'>summarise()</a></code>, please see <em>Examples</em>.</p></td>
</tr> </tr>
<tr> <tr>
<th>language</th> <th>language</th>
@ -321,7 +321,7 @@
</tr> </tr>
<tr> <tr>
<th>property</th> <th>property</th>
<td><p>one of the column names of the <a href='microorganisms.html'>microorganisms</a> data set or <code>"shortname"</code></p></td> <td><p>one of the column names of the <a href='microorganisms.html'>microorganisms</a> data set: "<code>mo</code>", "<code>fullname</code>", "<code>kingdom</code>", "<code>phylum</code>", "<code>class</code>", "<code>order</code>", "<code>family</code>", "<code>genus</code>", "<code>species</code>", "<code>subspecies</code>", "<code>rank</code>", "<code>ref</code>", "<code>species_id</code>", "<code>source</code>", "<code>prevalence</code>", "<code>snomed</code>", or must be <code>"shortname"</code></p></td>
</tr> </tr>
</table> </table>
@ -379,8 +379,8 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
<p><img src='figures/logo_col.png' height=40px style=margin-bottom:5px /> <br /> <p><img src='figures/logo_col.png' height=40px style=margin-bottom:5px /> <br />
This package contains the complete taxonomic tree of almost all microorganisms (~70,000 species) from the authoritative and comprehensive Catalogue of Life (<a href='http://www.catalogueoflife.org'>http://www.catalogueoflife.org</a>). The Catalogue of Life is the most comprehensive and authoritative global index of species currently available.</p> This package contains the complete taxonomic tree of almost all microorganisms (~70,000 species) from the authoritative and comprehensive Catalogue of Life (CoL, <a href='http://www.catalogueoflife.org'>http://www.catalogueoflife.org</a>). The CoL is the most comprehensive and authoritative global index of species currently available. Nonetheless, we supplemented the CoL data with data from the List of Prokaryotic names with Standing in Nomenclature (LPSN, <a href='https://lpsn.dsmz.de'>lpsn.dsmz.de</a>). This supplementation is needed until the <a href='https://github.com/Sp2000/colplus'>CoL+ project</a> is finished, which we await.</p>
<p><a href='catalogue_of_life.html'>Click here</a> for more information about the included taxa. Check which version of the Catalogue of Life was included in this package with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version()</a></code>.</p> <p><a href='catalogue_of_life.html'>Click here</a> for more information about the included taxa. Check which versions of the CoL and LSPN were included in this package with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version()</a></code>.</p>
<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>

View File

@ -83,7 +83,7 @@ This is the fastest way to have your organisation (or analysis) specific codes p
</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">1.4.0.9000</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9032</span>
</span> </span>
</div> </div>

View File

@ -82,7 +82,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">1.4.0.9008</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9032</span>
</span> </span>
</div> </div>

View File

@ -82,7 +82,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">1.4.0.9001</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9032</span>
</span> </span>
</div> </div>

View File

@ -83,7 +83,7 @@ resistance() should be used to calculate resistance, susceptibility() should be
</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">1.4.0.9000</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9032</span>
</span> </span>
</div> </div>

View File

@ -82,7 +82,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">1.4.0.9032</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9033</span>
</span> </span>
</div> </div>

View File

@ -82,7 +82,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">1.4.0.9000</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9032</span>
</span> </span>
</div> </div>

View File

@ -83,7 +83,7 @@ When negative ('left-skewed'): the left tail is longer; the mass of the distribu
</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">1.4.0.9000</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9032</span>
</span> </span>
</div> </div>

View File

@ -82,7 +82,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">1.4.0.9000</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9032</span>
</span> </span>
</div> </div>

View File

@ -81,7 +81,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">1.4.0.9032</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9033</span>
</span> </span>
</div> </div>

View File

@ -15,13 +15,43 @@ After installing this package, R knows [**~70,000 distinct microbial species**](
This package is [fully independent of any other R package](https://en.wikipedia.org/wiki/Dependency_hell) and works on Windows, macOS and Linux with all versions of R since R-3.0.0 (April 2013). **It was designed to work in any setting, including those with very limited resources**. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the [University of Groningen](https://www.rug.nl), in collaboration with non-profit organisations [Certe Medical Diagnostics and Advice](https://www.certe.nl) and [University Medical Center Groningen](https://www.umcg.nl). This R package is [actively maintained](./news) and is free software (see [Copyright](#copyright)). This package is [fully independent of any other R package](https://en.wikipedia.org/wiki/Dependency_hell) and works on Windows, macOS and Linux with all versions of R since R-3.0.0 (April 2013). **It was designed to work in any setting, including those with very limited resources**. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the [University of Groningen](https://www.rug.nl), in collaboration with non-profit organisations [Certe Medical Diagnostics and Advice](https://www.certe.nl) and [University Medical Center Groningen](https://www.umcg.nl). This R package is [actively maintained](./news) and is free software (see [Copyright](#copyright)).
<div class="main-content"> <div class="main-content" style="display: inline-block;">
<p> <p>
<a href="./countries_large.png" target="_blank"><img src="./countries.png" class="countries_map"></a> <a href="./countries_large.png" target="_blank"><img src="./countries.png" class="countries_map"></a>
<strong>Used in 135 countries</strong><br> <strong>Used in 135 countries</strong><br>
Since its first public release in early 2018, this package has been downloaded from 135 countries. Click the map to enlarge and to also see the names of the countries.</p><br><br> Since its first public release in early 2018, this package has been downloaded from 135 countries. Click the map to enlarge.</p><br><br>
</div> </div>
##### With `AMR` (for R), you'll always have a knowledgeable microbiologist at your side!
```r
# AMR works great with dplyr, but it's not required or neccesary
library(AMR)
library(dplyr)
example_isolates %>%
mutate(mo = mo_fullname(mo)) %>%
filter(mo_is_gram_positive()) %>%
select(mo, carbapenems(), glycopeptides())
#> NOTE: Using column 'mo' as input for mo_is_gram_positive()
#> Selecting cephalosporins: 'CAZ' (ceftazidime), 'CRO' (ceftriaxone),
#> 'CTX' (cefotaxime), 'CXM' (cefuroxime),
#> 'CZO' (cefazolin), 'FEP' (cefepime),
#> 'FOX' (cefoxitin)
#> Selecting glycopeptides: 'TEC' (teicoplanin), 'VAN' (vancomycin)
```
With only having defined a filter on Gram-positive micro-organisms (`mo_is_gram_positive()`) and a selection of two antibiotic groups (`carbapenems()` and `glycopeptides()`), the reference data about [all bugs](./reference/microorganisms.html) and [drugs](./reference/antibiotics.html) in the `AMR` package make sure you get what you meant:
| mo | CAZ | CRO | CTX | CXM | CZO | FEP | FOX | TEC | VAN |
|:-----------------------------|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
| *Enterococcus faecalis* | R | R | R | R | R | R | R | | S |
| *Enterococcus faecalis* | R | | R | R | R | R | R | | S |
| *Enterococcus faecalis* | R | R | R | R | R | R | R | | S |
| *Streptococcus* group B | R | S | S | S | S | S | S | | S |
| *Staphylococcus epidermidis* | R | | | S | | | | | S |
| *Enterococcus faecium* | R | R | R | R | R | R | R | | S |
<div class="home-buttons"> <div class="home-buttons">
<a href="articles/datasets.html"> <a href="articles/datasets.html">
<div style="background-color: #128f7635;"> <div style="background-color: #128f7635;">

View File

@ -50,12 +50,12 @@ tetracyclines()
\item{ab_class}{an antimicrobial class, like \code{"carbapenems"}. The columns \code{group}, \code{atc_group1} and \code{atc_group2} of the \link{antibiotics} data set will be searched (case-insensitive) for this value.} \item{ab_class}{an antimicrobial class, like \code{"carbapenems"}. The columns \code{group}, \code{atc_group1} and \code{atc_group2} of the \link{antibiotics} data set will be searched (case-insensitive) for this value.}
} }
\description{ \description{
Use these selection helpers inside any function that allows \href{https://tidyselect.r-lib.org/reference/language.html}{Tidyverse selection helpers}, like \code{dplyr::select()} or \code{tidyr::pivot_longer()}. They help to select the columns of antibiotics that are of a specific antibiotic class, without the need to define the columns or antibiotic abbreviations. Use these selection helpers inside any function that allows \href{https://tidyselect.r-lib.org/reference/language.html}{Tidyverse selection helpers}, such as \code{\link[dplyr:select]{select()}} and \code{\link[tidyr:pivot_longer]{pivot_longer()}}. They help to select the columns of antibiotics that are of a specific antibiotic class, without the need to define the columns or antibiotic abbreviations.
} }
\details{ \details{
All columns will be searched for known antibiotic names, abbreviations, brand names and codes (ATC, EARS-Net, WHO, etc.) in the \link{antibiotics} data set. This means that a selector like e.g. \code{\link[=aminoglycosides]{aminoglycosides()}} will pick up column names like 'gen', 'genta', 'J01GB03', 'tobra', 'Tobracin', etc. All columns will be searched for known antibiotic names, abbreviations, brand names and codes (ATC, EARS-Net, WHO, etc.) in the \link{antibiotics} data set. This means that a selector like e.g. \code{\link[=aminoglycosides]{aminoglycosides()}} will pick up column names like 'gen', 'genta', 'J01GB03', 'tobra', 'Tobracin', etc.
\strong{N.B. These functions only work if the \code{tidyselect} package is installed}, that comes with the \code{dplyr} package. An error will be thrown if the \code{tidyselect} package is not installed, or if the functions are used outside a function that allows Tidyverse selections like \code{select()} or \code{pivot_longer()}. \strong{N.B. These functions require the \code{tidyselect} package to be installed}, that comes with the \code{dplyr} package. An error will be thrown if the \code{tidyselect} package is not installed, or if the functions are used outside a function that allows \href{https://tidyselect.r-lib.org/reference/language.html}{Tidyverse selection helpers} such as \code{\link[dplyr:select]{select()}} and \code{\link[tidyr:pivot_longer]{pivot_longer()}}`.
} }
\section{Reference data publicly available}{ \section{Reference data publicly available}{

View File

@ -163,9 +163,9 @@ All matches are sorted descending on their matching score and for all user input
\section{Catalogue of Life}{ \section{Catalogue of Life}{
\if{html}{\figure{logo_col.png}{options: height=40px style=margin-bottom:5px} \cr} \if{html}{\figure{logo_col.png}{options: height=40px style=margin-bottom:5px} \cr}
This package contains the complete taxonomic tree of almost all microorganisms (~70,000 species) from the authoritative and comprehensive Catalogue of Life (\url{http://www.catalogueoflife.org}). The Catalogue of Life is the most comprehensive and authoritative global index of species currently available. This package contains the complete taxonomic tree of almost all microorganisms (~70,000 species) from the authoritative and comprehensive Catalogue of Life (CoL, \url{http://www.catalogueoflife.org}). The CoL is the most comprehensive and authoritative global index of species currently available. Nonetheless, we supplemented the CoL data with data from the List of Prokaryotic names with Standing in Nomenclature (LPSN, \href{https://lpsn.dsmz.de}{lpsn.dsmz.de}). This supplementation is needed until the \href{https://github.com/Sp2000/colplus}{CoL+ project} is finished, which we await.
\link[=catalogue_of_life]{Click here} for more information about the included taxa. Check which version of the Catalogue of Life was included in this package with \code{\link[=catalogue_of_life_version]{catalogue_of_life_version()}}. \link[=catalogue_of_life]{Click here} for more information about the included taxa. Check which versions of the CoL and LSPN were included in this package with \code{\link[=catalogue_of_life_version]{catalogue_of_life_version()}}.
} }
\section{Reference data publicly available}{ \section{Reference data publicly available}{

View File

@ -9,19 +9,19 @@ This package contains the complete taxonomic tree of almost all microorganisms f
\section{Catalogue of Life}{ \section{Catalogue of Life}{
\if{html}{\figure{logo_col.png}{options: height=40px style=margin-bottom:5px} \cr} \if{html}{\figure{logo_col.png}{options: height=40px style=margin-bottom:5px} \cr}
This package contains the complete taxonomic tree of almost all microorganisms (~70,000 species) from the authoritative and comprehensive Catalogue of Life (\url{http://www.catalogueoflife.org}). The Catalogue of Life is the most comprehensive and authoritative global index of species currently available. This package contains the complete taxonomic tree of almost all microorganisms (~70,000 species) from the authoritative and comprehensive Catalogue of Life (CoL, \url{http://www.catalogueoflife.org}). The CoL is the most comprehensive and authoritative global index of species currently available. Nonetheless, we supplemented the CoL data with data from the List of Prokaryotic names with Standing in Nomenclature (LPSN, \href{https://lpsn.dsmz.de}{lpsn.dsmz.de}). This supplementation is needed until the \href{https://github.com/Sp2000/colplus}{CoL+ project} is finished, which we await.
\link[=catalogue_of_life]{Click here} for more information about the included taxa. Check which version of the Catalogue of Life was included in this package with \code{\link[=catalogue_of_life_version]{catalogue_of_life_version()}}. \link[=catalogue_of_life]{Click here} for more information about the included taxa. Check which versions of the CoL and LSPN were included in this package with \code{\link[=catalogue_of_life_version]{catalogue_of_life_version()}}.
} }
\section{Included taxa}{ \section{Included taxa}{
Included are: Included are:
\itemize{ \itemize{
\item All ~61,000 (sub)species from the kingdoms of Archaea, Bacteria, Chromista and Protozoa \item All ~55,000 (sub)species from the kingdoms of Archaea, Bacteria, Chromista and Protozoa
\item All ~8,500 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Microascales, Mucorales, Onygenales, Pneumocystales, Saccharomycetales, Schizosaccharomycetales and Tremellales. The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant fungi are covered (like all species of \emph{Aspergillus}, \emph{Candida}, \emph{Cryptococcus}, \emph{Histplasma}, \emph{Pneumocystis}, \emph{Saccharomyces} and \emph{Trichophyton}). \item All ~5,000 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Microascales, Mucorales, Onygenales, Pneumocystales, Saccharomycetales, Schizosaccharomycetales and Tremellales, as well as ~4,600 other fungal (sub)species. The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant fungi are covered (like all species of \emph{Aspergillus}, \emph{Candida}, \emph{Cryptococcus}, \emph{Histplasma}, \emph{Pneumocystis}, \emph{Saccharomyces} and \emph{Trichophyton}).
\item All ~150 (sub)species from ~100 other relevant genera from the kingdom of Animalia (like \emph{Strongyloides} and \emph{Taenia}) \item All ~2,200 (sub)species from ~50 other relevant genera from the kingdom of Animalia (like \emph{Strongyloides} and \emph{Taenia})
\item All ~23,000 previously accepted names of all included (sub)species (these were taxonomically renamed) \item All ~13,000 previously accepted names of all included (sub)species (these were taxonomically renamed)
\item The complete taxonomic tree of all included (sub)species: from kingdom to subspecies \item The complete taxonomic tree of all included (sub)species: from kingdom to subspecies
\item The responsible author(s) and year of scientific publication \item The responsible author(s) and year of scientific publication
} }
@ -45,26 +45,26 @@ catalogue_of_life_version()
mo_shortname("Chlamydophila psittaci") mo_shortname("Chlamydophila psittaci")
# Note: 'Chlamydophila psittaci' (Everett et al., 1999) was renamed back to # Note: 'Chlamydophila psittaci' (Everett et al., 1999) was renamed back to
# 'Chlamydia psittaci' (Page, 1968) # 'Chlamydia psittaci' (Page, 1968)
# [1] "C. psittaci" #> [1] "C. psittaci"
# Get any property from the entire taxonomic tree for all included species # Get any property from the entire taxonomic tree for all included species
mo_class("E. coli") mo_class("E. coli")
# [1] "Gammaproteobacteria" #> [1] "Gammaproteobacteria"
mo_family("E. coli") mo_family("E. coli")
# [1] "Enterobacteriaceae" #> [1] "Enterobacteriaceae"
mo_gramstain("E. coli") # based on kingdom and phylum, see ?mo_gramstain mo_gramstain("E. coli") # based on kingdom and phylum, see ?mo_gramstain
# [1] "Gram negative" #> [1] "Gram-negative"
mo_ref("E. coli") mo_ref("E. coli")
# [1] "Castellani et al., 1919" #> [1] "Castellani et al., 1919"
# Do not get mistaken - this package is about microorganisms # Do not get mistaken - this package is about microorganisms
mo_kingdom("C. elegans") mo_kingdom("C. elegans")
# [1] "Fungi" # Fungi?! #> [1] "Fungi" # Fungi?!
mo_name("C. elegans") mo_name("C. elegans")
# [1] "Cladosporium elegans" # Because a microorganism was found #> [1] "Cladosporium elegans" # Because a microorganism was found
} }
\seealso{ \seealso{
Data set \link{microorganisms} for the actual data. \cr Data set \link{microorganisms} for the actual data. \cr

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