big website update, licence txt update
@@ -2,18 +2,21 @@
|
||||
# TITLE #
|
||||
# Antimicrobial Resistance (AMR) Analysis #
|
||||
# #
|
||||
# AUTHORS #
|
||||
# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# SOURCE #
|
||||
# https://gitlab.com/msberends/AMR #
|
||||
# #
|
||||
# LICENCE #
|
||||
# This package is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License version 2.0, #
|
||||
# as published by the Free Software Foundation. #
|
||||
# (c) 2019 Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# #
|
||||
# This R package is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License version 2.0 for more details. #
|
||||
# This R package is free software; you can freely use and distribute #
|
||||
# it for both personal and commercial purposes under the terms of the #
|
||||
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
|
||||
# the Free Software Foundation. #
|
||||
# #
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
# from https://stackoverflow.com/questions/51866926
|
||||
@@ -23,6 +26,7 @@
|
||||
|
||||
stages:
|
||||
- build
|
||||
- test
|
||||
- deploy
|
||||
|
||||
image: debian:buster-slim
|
||||
@@ -34,6 +38,11 @@ before_script:
|
||||
- Rscript -e 'install.packages(c("devtools", "rlang"), repos = "https://cran.rstudio.com")'
|
||||
- Rscript -e 'devtools::install_dev_deps(repos = "https://cran.rstudio.com")'
|
||||
|
||||
cache:
|
||||
key: "$CI_COMMIT_REF_SLUG"
|
||||
paths:
|
||||
- /usr/lib/R/library/
|
||||
|
||||
R 3:
|
||||
stage: build
|
||||
allow_failure: true
|
||||
@@ -45,29 +54,32 @@ R 3:
|
||||
- R CMD build . --no-build-vignettes --no-manual
|
||||
- PKG_FILE_NAME=$(ls -1t *.tar.gz | head -n 1)
|
||||
- R CMD check "${PKG_FILE_NAME}" --no-build-vignettes --no-manual --as-cran
|
||||
# code coverage
|
||||
- apt-get install --yes git
|
||||
- Rscript -e 'cc <- covr::package_coverage(); covr::codecov(coverage = cc, token = "50ffa0aa-fee0-4f8b-a11d-8c7edc6d32ca"); cat("Code coverage:", covr::percent_coverage(cc))'
|
||||
coverage: '/Code coverage: \d+\.\d+/'
|
||||
artifacts:
|
||||
paths:
|
||||
- '*.Rcheck/*.log'
|
||||
- '*.Rcheck/*.out'
|
||||
# - '*.Rcheck/*.fail'
|
||||
- '*.Rcheck/*.Rout'
|
||||
- '*.Rcheck/*'
|
||||
name: 'Rcheck log'
|
||||
expire_in: '1 month'
|
||||
|
||||
coverage:
|
||||
stage: test
|
||||
allow_failure: true
|
||||
when: on_success
|
||||
only:
|
||||
- master
|
||||
script:
|
||||
- apt-get install --yes git
|
||||
- Rscript -e 'cc <- covr::package_coverage(); covr::codecov(coverage = cc, token = "50ffa0aa-fee0-4f8b-a11d-8c7edc6d32ca"); cat("Code coverage:", covr::percent_coverage(cc))'
|
||||
coverage: '/Code coverage: \d+\.\d+/'
|
||||
|
||||
pages:
|
||||
stage: deploy
|
||||
when: always
|
||||
only:
|
||||
- master
|
||||
script:
|
||||
- Rscript -e "install.packages('pkgdown', repos = 'https://cran.rstudio.com')"
|
||||
- Rscript -e "devtools::install(build = TRUE, upgrade = FALSE)"
|
||||
# - R -e "pkgdown::build_favicon()"
|
||||
- R -e "pkgdown::build_site(examples = FALSE, override = list(destination = 'public'))"
|
||||
when: always
|
||||
artifacts:
|
||||
paths:
|
||||
- public
|
||||
only:
|
||||
- master
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Package: AMR
|
||||
Version: 0.5.0.9008
|
||||
Date: 2018-12-31
|
||||
Version: 0.5.0.9009
|
||||
Date: 2019-01-02
|
||||
Title: Antimicrobial Resistance Analysis
|
||||
Authors@R: c(
|
||||
person(
|
||||
|
||||
2
NEWS.md
@@ -5,6 +5,7 @@
|
||||
* **BREAKING**: removed deprecated functions, parameters and references to 'bactid'. Use `as.mo()` to identify an MO code.
|
||||
* New website: https://msberends.gitlab.io/AMR (built with the great [`pkgdown`](https://pkgdown.r-lib.org/))
|
||||
* Contains the complete manual of this package and all of its functions with an explanation of their parameters
|
||||
* Contains a comprehensive tutorial about how to conduct antimicrobial resistance analysis
|
||||
* Support for [`dplyr`](https://dplyr.tidyverse.org) version 0.8.0
|
||||
* Function `mo_failures()` to review values that could not be coerced to a valid MO code, using `as.mo()`. This latter function will now only show a maximum of 25 uncoerced values.
|
||||
* Function `mo_renamed()` to get a list of all returned values from `as.mo()` that have had taxonomic renaming
|
||||
@@ -23,6 +24,7 @@
|
||||
filter(only_firsts == TRUE) %>%
|
||||
select(-only_firsts)
|
||||
```
|
||||
* New vignettes about how to conduct AMR analysis, predict antimicrobial resistance, use the *G*-test and more. These are also available (and even easier readable) on our website: https://msberends.gitlab.io/AMR.
|
||||
|
||||
#### Changed
|
||||
* Fixed a critical bug in `eucast_rules()` where some rules that depend on previous applied rules would not be applied adequately
|
||||
|
||||
@@ -2,18 +2,21 @@
|
||||
# TITLE #
|
||||
# Antimicrobial Resistance (AMR) Analysis #
|
||||
# #
|
||||
# AUTHORS #
|
||||
# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# SOURCE #
|
||||
# https://gitlab.com/msberends/AMR #
|
||||
# #
|
||||
# LICENCE #
|
||||
# This package is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License version 2.0, #
|
||||
# as published by the Free Software Foundation. #
|
||||
# (c) 2019 Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# #
|
||||
# This R package is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License version 2.0 for more details. #
|
||||
# This R package is free software; you can freely use and distribute #
|
||||
# it for both personal and commercial purposes under the terms of the #
|
||||
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
|
||||
# the Free Software Foundation. #
|
||||
# #
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Property of an antibiotic
|
||||
@@ -27,6 +30,7 @@
|
||||
#' @export
|
||||
#' @importFrom dplyr %>% left_join pull
|
||||
#' @seealso \code{\link{antibiotics}}
|
||||
#' @inheritSection AMR Read more on our website!
|
||||
#' @examples
|
||||
#' ab_atc("amcl") # J01CR02
|
||||
#' ab_name("amcl") # Amoxicillin and beta-lactamase inhibitor
|
||||
|
||||
22
R/abname.R
@@ -2,18 +2,21 @@
|
||||
# TITLE #
|
||||
# Antimicrobial Resistance (AMR) Analysis #
|
||||
# #
|
||||
# AUTHORS #
|
||||
# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# SOURCE #
|
||||
# https://gitlab.com/msberends/AMR #
|
||||
# #
|
||||
# LICENCE #
|
||||
# This package is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License version 2.0, #
|
||||
# as published by the Free Software Foundation. #
|
||||
# (c) 2019 Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# #
|
||||
# This R package is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License version 2.0 for more details. #
|
||||
# This R package is free software; you can freely use and distribute #
|
||||
# it for both personal and commercial purposes under the terms of the #
|
||||
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
|
||||
# the Free Software Foundation. #
|
||||
# #
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Name of an antibiotic
|
||||
@@ -28,6 +31,7 @@
|
||||
#' @source \code{\link{antibiotics}}
|
||||
#' @export
|
||||
#' @importFrom dplyr %>% pull
|
||||
#' @inheritSection AMR Read more on our website!
|
||||
#' @examples
|
||||
#' abname("AMCL")
|
||||
#' # "Amoxicillin and beta-lactamase inhibitor"
|
||||
|
||||
23
R/age.R
@@ -2,18 +2,21 @@
|
||||
# TITLE #
|
||||
# Antimicrobial Resistance (AMR) Analysis #
|
||||
# #
|
||||
# AUTHORS #
|
||||
# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# SOURCE #
|
||||
# https://gitlab.com/msberends/AMR #
|
||||
# #
|
||||
# LICENCE #
|
||||
# This package is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License version 2.0, #
|
||||
# as published by the Free Software Foundation. #
|
||||
# (c) 2019 Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# #
|
||||
# This R package is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License version 2.0 for more details. #
|
||||
# This R package is free software; you can freely use and distribute #
|
||||
# it for both personal and commercial purposes under the terms of the #
|
||||
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
|
||||
# the Free Software Foundation. #
|
||||
# #
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Age in years of individuals
|
||||
@@ -24,6 +27,7 @@
|
||||
#' @return Integer (no decimals)
|
||||
#' @seealso \code{\link{age_groups}} to splits age into groups
|
||||
#' @importFrom dplyr if_else
|
||||
#' @inheritSection AMR Read more on our website!
|
||||
#' @export
|
||||
age <- function(x, reference = Sys.Date()) {
|
||||
if (length(x) != length(reference)) {
|
||||
@@ -70,6 +74,7 @@ age <- function(x, reference = Sys.Date()) {
|
||||
#' @return Ordered \code{\link{factor}}
|
||||
#' @seealso \code{\link{age}} to determine ages based on one or more reference dates
|
||||
#' @export
|
||||
#' @inheritSection AMR Read more on our website!
|
||||
#' @examples
|
||||
#' ages <- c(3, 8, 16, 54, 31, 76, 101, 43, 21)
|
||||
#'
|
||||
|
||||
23
R/atc.R
@@ -2,21 +2,23 @@
|
||||
# TITLE #
|
||||
# Antimicrobial Resistance (AMR) Analysis #
|
||||
# #
|
||||
# AUTHORS #
|
||||
# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# SOURCE #
|
||||
# https://gitlab.com/msberends/AMR #
|
||||
# #
|
||||
# LICENCE #
|
||||
# This package is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License version 2.0, #
|
||||
# as published by the Free Software Foundation. #
|
||||
# (c) 2019 Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# #
|
||||
# This R package is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License version 2.0 for more details. #
|
||||
# This R package is free software; you can freely use and distribute #
|
||||
# it for both personal and commercial purposes under the terms of the #
|
||||
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
|
||||
# the Free Software Foundation. #
|
||||
# #
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
|
||||
#' Transform to ATC code
|
||||
#'
|
||||
#' Use this function to determine the ATC code of one or more antibiotics. The data set \code{\link{antibiotics}} will be searched for abbreviations, official names and trade names.
|
||||
@@ -32,6 +34,7 @@
|
||||
#' Source: \url{https://www.whocc.no/atc/structure_and_principles/}
|
||||
#' @return Character (vector) with class \code{"act"}. Unknown values will return \code{NA}.
|
||||
#' @seealso \code{\link{antibiotics}} for the dataframe that is being used to determine ATCs.
|
||||
#' @inheritSection AMR Read more on our website!
|
||||
#' @examples
|
||||
#' # These examples all return "J01FA01", the ATC code of Erythromycin:
|
||||
#' as.atc("J01FA01")
|
||||
|
||||
22
R/count.R
@@ -2,18 +2,21 @@
|
||||
# TITLE #
|
||||
# Antimicrobial Resistance (AMR) Analysis #
|
||||
# #
|
||||
# AUTHORS #
|
||||
# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# SOURCE #
|
||||
# https://gitlab.com/msberends/AMR #
|
||||
# #
|
||||
# LICENCE #
|
||||
# This package is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License version 2.0, #
|
||||
# as published by the Free Software Foundation. #
|
||||
# (c) 2019 Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# #
|
||||
# This R package is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License version 2.0 for more details. #
|
||||
# This R package is free software; you can freely use and distribute #
|
||||
# it for both personal and commercial purposes under the terms of the #
|
||||
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
|
||||
# the Free Software Foundation. #
|
||||
# #
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Count isolates
|
||||
@@ -35,6 +38,7 @@
|
||||
#' @rdname count
|
||||
#' @name count
|
||||
#' @export
|
||||
#' @inheritSection AMR Read more on our website!
|
||||
#' @examples
|
||||
#' # septic_patients is a data set available in the AMR package. It is true, genuine data.
|
||||
#' ?septic_patients
|
||||
|
||||
71
R/data.R
@@ -2,18 +2,21 @@
|
||||
# TITLE #
|
||||
# Antimicrobial Resistance (AMR) Analysis #
|
||||
# #
|
||||
# AUTHORS #
|
||||
# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# SOURCE #
|
||||
# https://gitlab.com/msberends/AMR #
|
||||
# #
|
||||
# LICENCE #
|
||||
# This package is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License version 2.0, #
|
||||
# as published by the Free Software Foundation. #
|
||||
# (c) 2019 Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# #
|
||||
# This R package is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License version 2.0 for more details. #
|
||||
# This R package is free software; you can freely use and distribute #
|
||||
# it for both personal and commercial purposes under the terms of the #
|
||||
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
|
||||
# the Free Software Foundation. #
|
||||
# #
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Data set with 423 antibiotics
|
||||
@@ -41,6 +44,7 @@
|
||||
#' \item{\code{useful_grampositive}}{\code{FALSE} if not useful according to EUCAST, \code{NA} otherwise (see Source)}
|
||||
#' }
|
||||
#' @source - World Health Organization: \url{https://www.whocc.no/atc_ddd_index/} \cr - EUCAST - Expert rules intrinsic exceptional V3.1 \cr - MOLIS (LIS of Certe): \url{https://www.certe.nl} \cr - GLIMS (LIS of UMCG): \url{https://www.umcg.nl}
|
||||
#' @inheritSection AMR Read more on our website!
|
||||
#' @seealso \code{\link{microorganisms}}
|
||||
# use this later to further fill AMR::antibiotics
|
||||
# drug <- "Ciprofloxacin"
|
||||
@@ -123,7 +127,7 @@
|
||||
#' Data set with taxonomic data from ITIS
|
||||
#'
|
||||
#' A data set containing the complete microbial taxonomy of the kingdoms Bacteria, Fungi and Protozoa. MO codes can be looked up using \code{\link{as.mo}}.
|
||||
#' @inheritSection as.mo ITIS
|
||||
#' @inheritSection itis ITIS
|
||||
#' @format A \code{\link{data.frame}} with 18,833 observations and 15 variables:
|
||||
#' \describe{
|
||||
#' \item{\code{mo}}{ID of microorganism}
|
||||
@@ -143,6 +147,7 @@
|
||||
#' \item{\code{ref}}{Author(s) and year of concerning publication as found in ITIS, see Source}
|
||||
#' }
|
||||
#' @source [3] Integrated Taxonomic Information System (ITIS) on-line database, \url{https://www.itis.gov}.
|
||||
#' @inheritSection AMR Read more on our website!
|
||||
#' @seealso \code{\link{as.mo}} \code{\link{mo_property}} \code{\link{microorganisms.umcg}}
|
||||
"microorganisms"
|
||||
|
||||
@@ -158,6 +163,7 @@
|
||||
#' \item{\code{ref}}{Author(s) and year of concerning publication as found in ITIS, see Source}
|
||||
#' }
|
||||
#' @source [3] Integrated Taxonomic Information System (ITIS) on-line database, \url{https://www.itis.gov}.
|
||||
#' @inheritSection AMR Read more on our website!
|
||||
#' @seealso \code{\link{as.mo}} \code{\link{mo_property}} \code{\link{microorganisms}}
|
||||
"microorganisms.old"
|
||||
|
||||
@@ -169,6 +175,7 @@
|
||||
#' \item{\code{umcg}}{Code of microorganism according to UMCG MMB}
|
||||
#' \item{\code{certe}}{Code of microorganism according to Certe MMB}
|
||||
#' }
|
||||
#' @inheritSection AMR Read more on our website!
|
||||
#' @seealso \code{\link{as.mo}} \code{\link{microorganisms.certe}} \code{\link{microorganisms}}
|
||||
"microorganisms.umcg"
|
||||
|
||||
@@ -180,12 +187,13 @@
|
||||
#' \item{\code{certe}}{Code of microorganism according to Certe MMB}
|
||||
#' \item{\code{mo}}{Code of microorganism in \code{\link{microorganisms}}}
|
||||
#' }
|
||||
#' @inheritSection AMR Read more on our website!
|
||||
#' @seealso \code{\link{as.mo}} \code{\link{microorganisms}}
|
||||
"microorganisms.certe"
|
||||
|
||||
#' Data set with 2000 blood culture isolates of septic patients
|
||||
#'
|
||||
#' An anonymised data set containing 2,000 microbial blood culture isolates with their full antibiograms found in septic patients in 4 different hospitals in the Netherlands, between 2001 and 2017. It is true, genuine data. This \code{data.frame} can be used to practice AMR analysis. For examples, press F1.
|
||||
#' An anonymised data set containing 2,000 microbial blood culture isolates with their full antibiograms found in septic patients in 4 different hospitals in the Netherlands, between 2001 and 2017. It is true, genuine data. This \code{data.frame} can be used to practice AMR analysis. For examples, please read \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{the tutorial on our website}.
|
||||
#' @format A \code{\link{data.frame}} with 2,000 observations and 49 variables:
|
||||
#' \describe{
|
||||
#' \item{\code{date}}{date of receipt at the laboratory}
|
||||
@@ -199,45 +207,7 @@
|
||||
#' \item{\code{mo}}{ID of microorganism created with \code{\link{as.mo}}, see also \code{\link{microorganisms}}}
|
||||
#' \item{\code{peni:rifa}}{40 different antibiotics with class \code{rsi} (see \code{\link{as.rsi}}); these column names occur in \code{\link{antibiotics}} data set and can be translated with \code{\link{abname}}}
|
||||
#' }
|
||||
#' @examples
|
||||
#' # ----------- #
|
||||
#' # PREPARATION #
|
||||
#' # ----------- #
|
||||
#'
|
||||
#' # Save this example data set to an object, so we can edit it:
|
||||
#' my_data <- septic_patients
|
||||
#'
|
||||
#' # load the dplyr package to make data science A LOT easier
|
||||
#' library(dplyr)
|
||||
#'
|
||||
#' # Add first isolates to our data set:
|
||||
#' my_data <- my_data %>%
|
||||
#' mutate(first_isolates = first_isolate(my_data, "date", "patient_id", "mo"))
|
||||
#'
|
||||
#' # -------- #
|
||||
#' # ANALYSIS #
|
||||
#' # -------- #
|
||||
#'
|
||||
#' # 1. Get the amoxicillin resistance percentages (p)
|
||||
#' # and numbers (n) of E. coli, divided by hospital:
|
||||
#'
|
||||
#' my_data %>%
|
||||
#' filter(mo == guess_mo("E. coli"),
|
||||
#' first_isolates == TRUE) %>%
|
||||
#' group_by(hospital_id) %>%
|
||||
#' summarise(n = n_rsi(amox),
|
||||
#' p = portion_IR(amox))
|
||||
#'
|
||||
#'
|
||||
#' # 2. Get the amoxicillin/clavulanic acid resistance
|
||||
#' # percentages of E. coli, trend over the years:
|
||||
#'
|
||||
#' my_data %>%
|
||||
#' filter(mo == guess_mo("E. coli"),
|
||||
#' first_isolates == TRUE) %>%
|
||||
#' group_by(year = format(date, "%Y")) %>%
|
||||
#' summarise(n = n_rsi(amcl),
|
||||
#' p = portion_IR(amcl, minimum = 20))
|
||||
#' @inheritSection AMR Read more on our website!
|
||||
"septic_patients"
|
||||
|
||||
#' Supplementary Data
|
||||
@@ -245,6 +215,7 @@
|
||||
#' These \code{\link{data.table}s} are transformed from the \code{\link{microorganisms}} and \code{\link{microorganisms}} data sets to improve speed of \code{\link{as.mo}}. They are meant for internal use only, and are only mentioned here for reference.
|
||||
#' @rdname supplementary_data
|
||||
#' @name supplementary_data
|
||||
#' @inheritSection AMR Read more on our website!
|
||||
# # Renew data:
|
||||
# microorganismsDT <- data.table::as.data.table(AMR::microorganisms)
|
||||
# # sort on (1) bacteria, (2) fungi, (3) protozoa and then human pathogenic prevalence and then TSN:
|
||||
|
||||
@@ -2,23 +2,27 @@
|
||||
# TITLE #
|
||||
# Antimicrobial Resistance (AMR) Analysis #
|
||||
# #
|
||||
# AUTHORS #
|
||||
# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# SOURCE #
|
||||
# https://gitlab.com/msberends/AMR #
|
||||
# #
|
||||
# LICENCE #
|
||||
# This package is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License version 2.0, #
|
||||
# as published by the Free Software Foundation. #
|
||||
# (c) 2019 Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# #
|
||||
# This R package is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License version 2.0 for more details. #
|
||||
# This R package is free software; you can freely use and distribute #
|
||||
# it for both personal and commercial purposes under the terms of the #
|
||||
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
|
||||
# the Free Software Foundation. #
|
||||
# #
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Deprecated functions
|
||||
#'
|
||||
#' These functions are \link{Deprecated}. They will be removed in a future release. Using the functions will give a warning with the name of the function it has been replaced by.
|
||||
#' @inheritSection AMR Read more on our website!
|
||||
#' @export
|
||||
#' @keywords internal
|
||||
#' @name AMR-deprecated
|
||||
|
||||
@@ -2,18 +2,21 @@
|
||||
# TITLE #
|
||||
# Antimicrobial Resistance (AMR) Analysis #
|
||||
# #
|
||||
# AUTHORS #
|
||||
# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# SOURCE #
|
||||
# https://gitlab.com/msberends/AMR #
|
||||
# #
|
||||
# LICENCE #
|
||||
# This package is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License version 2.0, #
|
||||
# as published by the Free Software Foundation. #
|
||||
# (c) 2019 Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# #
|
||||
# This R package is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License version 2.0 for more details. #
|
||||
# This R package is free software; you can freely use and distribute #
|
||||
# it for both personal and commercial purposes under the terms of the #
|
||||
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
|
||||
# the Free Software Foundation. #
|
||||
# #
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' EUCAST rules
|
||||
@@ -115,6 +118,7 @@
|
||||
#' \url{http://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Breakpoint_tables/v_8.1_Breakpoint_Tables.xlsx}
|
||||
#' }
|
||||
#' }
|
||||
#' @inheritSection AMR Read more on our website!
|
||||
#' @examples
|
||||
#' a <- eucast_rules(septic_patients)
|
||||
#'
|
||||
|
||||
@@ -2,18 +2,21 @@
|
||||
# TITLE #
|
||||
# Antimicrobial Resistance (AMR) Analysis #
|
||||
# #
|
||||
# AUTHORS #
|
||||
# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# SOURCE #
|
||||
# https://gitlab.com/msberends/AMR #
|
||||
# #
|
||||
# LICENCE #
|
||||
# This package is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License version 2.0, #
|
||||
# as published by the Free Software Foundation. #
|
||||
# (c) 2019 Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# #
|
||||
# This R package is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License version 2.0 for more details. #
|
||||
# This R package is free software; you can freely use and distribute #
|
||||
# it for both personal and commercial purposes under the terms of the #
|
||||
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
|
||||
# the Free Software Foundation. #
|
||||
# #
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Determine first (weighted) isolates
|
||||
@@ -71,6 +74,7 @@
|
||||
#' @importFrom crayon blue bold silver
|
||||
#' @return Logical vector
|
||||
#' @source Methodology of this function is based on: \strong{M39 Analysis and Presentation of Cumulative Antimicrobial Susceptibility Test Data, 4th Edition}, 2014, \emph{Clinical and Laboratory Standards Institute (CLSI)}. \url{https://clsi.org/standards/products/microbiology/documents/m39/}.
|
||||
#' @inheritSection AMR Read more on our website!
|
||||
#' @examples
|
||||
#' # septic_patients is a dataset available in the AMR package. It is true, genuine data.
|
||||
#' ?septic_patients
|
||||
@@ -419,12 +423,7 @@ first_isolate <- function(tbl,
|
||||
& genus == lag(genus)
|
||||
& species == lag(species),
|
||||
FALSE,
|
||||
TRUE)) %>% #,
|
||||
# days_diff = 0) %>%
|
||||
# mutate(days_diff = if_else(other_pat_or_mo == FALSE,
|
||||
# as.integer((date_lab - lag(date_lab)) + lag(days_diff)),
|
||||
# as.integer(0))) %>%
|
||||
# mutate(r = days_diff) %>%
|
||||
TRUE)) %>%
|
||||
group_by_at(vars(patient_id,
|
||||
genus,
|
||||
species)) %>%
|
||||
|
||||
31
R/freq.R
@@ -2,18 +2,21 @@
|
||||
# TITLE #
|
||||
# Antimicrobial Resistance (AMR) Analysis #
|
||||
# #
|
||||
# AUTHORS #
|
||||
# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# SOURCE #
|
||||
# https://gitlab.com/msberends/AMR #
|
||||
# #
|
||||
# LICENCE #
|
||||
# This package is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License version 2.0, #
|
||||
# as published by the Free Software Foundation. #
|
||||
# (c) 2019 Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# #
|
||||
# This R package is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License version 2.0 for more details. #
|
||||
# This R package is free software; you can freely use and distribute #
|
||||
# it for both personal and commercial purposes under the terms of the #
|
||||
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
|
||||
# the Free Software Foundation. #
|
||||
# #
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Frequency table
|
||||
@@ -73,6 +76,7 @@
|
||||
#' @name freq
|
||||
#' @return A \code{data.frame} (with an additional class \code{"frequency_tbl"}) with five columns: \code{item}, \code{count}, \code{percent}, \code{cum_count} and \code{cum_percent}.
|
||||
#' @export
|
||||
#' @inheritSection AMR Read more on our website!
|
||||
#' @examples
|
||||
#' library(dplyr)
|
||||
#'
|
||||
@@ -812,7 +816,7 @@ print.frequency_tbl <- function(x,
|
||||
if (opt$tbl_format == "pandoc") {
|
||||
title <- bold(title)
|
||||
} else if (opt$tbl_format == "markdown") {
|
||||
title <- paste0("\n**", title, "**")
|
||||
title <- paste0("\n**", title, "** ") # two space for newline
|
||||
}
|
||||
|
||||
if (opt$header == TRUE) {
|
||||
@@ -825,7 +829,7 @@ print.frequency_tbl <- function(x,
|
||||
}
|
||||
} else if (opt$tbl_format == "markdown") {
|
||||
# do print title as caption in markdown
|
||||
cat("\n", title, " ", sep = "") # two trailing spaces for markdown
|
||||
cat("\n", title, sep = "") # two trailing spaces for markdown
|
||||
}
|
||||
|
||||
if (NROW(x) == 0) {
|
||||
@@ -838,6 +842,11 @@ print.frequency_tbl <- function(x,
|
||||
if (is.null(opt$na)) {
|
||||
opt$na <- "<NA>"
|
||||
}
|
||||
if (opt$tbl_format == "markdown") {
|
||||
# no HTML tags
|
||||
opt$na <- gsub("<", "(", opt$na, fixed = TRUE)
|
||||
opt$na <- gsub(">", ")", opt$na, fixed = TRUE)
|
||||
}
|
||||
options(knitr.kable.NA = opt$na)
|
||||
|
||||
x.rows <- nrow(x)
|
||||
|
||||
24
R/g.test.R
@@ -2,18 +2,21 @@
|
||||
# TITLE #
|
||||
# Antimicrobial Resistance (AMR) Analysis #
|
||||
# #
|
||||
# AUTHORS #
|
||||
# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# SOURCE #
|
||||
# https://gitlab.com/msberends/AMR #
|
||||
# #
|
||||
# LICENCE #
|
||||
# This package is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License version 2.0, #
|
||||
# as published by the Free Software Foundation. #
|
||||
# (c) 2019 Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# #
|
||||
# This R package is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License version 2.0 for more details. #
|
||||
# This R package is free software; you can freely use and distribute #
|
||||
# it for both personal and commercial purposes under the terms of the #
|
||||
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
|
||||
# the Free Software Foundation. #
|
||||
# #
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' \emph{G}-test for Count Data
|
||||
@@ -69,6 +72,7 @@
|
||||
#' }
|
||||
#' @export
|
||||
#' @importFrom stats pchisq complete.cases
|
||||
#' @inheritSection AMR Read more on our website!
|
||||
#' @examples
|
||||
#' # = EXAMPLE 1 =
|
||||
#' # Shivrain et al. (2006) crossed clearfield rice (which are resistant
|
||||
@@ -79,7 +83,7 @@
|
||||
#' # by a single gene with two co-dominant alleles, you would expect a 1:2:1
|
||||
#' # ratio.
|
||||
#'
|
||||
#' x <- c(772, 1611, 737)#'
|
||||
#' x <- c(772, 1611, 737)
|
||||
#' G <- g.test(x, p = c(1, 2, 1) / 4)
|
||||
#' # G$p.value = 0.12574.
|
||||
#'
|
||||
|
||||
@@ -2,18 +2,21 @@
|
||||
# TITLE #
|
||||
# Antimicrobial Resistance (AMR) Analysis #
|
||||
# #
|
||||
# AUTHORS #
|
||||
# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# SOURCE #
|
||||
# https://gitlab.com/msberends/AMR #
|
||||
# #
|
||||
# LICENCE #
|
||||
# This package is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License version 2.0, #
|
||||
# as published by the Free Software Foundation. #
|
||||
# (c) 2019 Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# #
|
||||
# This R package is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License version 2.0 for more details. #
|
||||
# This R package is free software; you can freely use and distribute #
|
||||
# it for both personal and commercial purposes under the terms of the #
|
||||
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
|
||||
# the Free Software Foundation. #
|
||||
# #
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Get language for AMR
|
||||
@@ -22,6 +25,7 @@
|
||||
#' @details The system language can be overwritten with \code{\link{getOption}("AMR_locale")}.
|
||||
#' @section Supported languages:
|
||||
#' Supported languages are \code{"en"} (English), \code{"de"} (German), \code{"nl"} (Dutch), \code{"es"} (Spanish), \code{"it"} (Italian), \code{"fr"} (French), and \code{"pt"} (Portuguese).
|
||||
#' @inheritSection AMR Read more on our website!
|
||||
#' @export
|
||||
get_locale <- function() {
|
||||
if (!is.null(getOption("AMR_locale"))) {
|
||||
|
||||
@@ -2,18 +2,21 @@
|
||||
# TITLE #
|
||||
# Antimicrobial Resistance (AMR) Analysis #
|
||||
# #
|
||||
# AUTHORS #
|
||||
# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# SOURCE #
|
||||
# https://gitlab.com/msberends/AMR #
|
||||
# #
|
||||
# LICENCE #
|
||||
# This package is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License version 2.0, #
|
||||
# as published by the Free Software Foundation. #
|
||||
# (c) 2019 Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# #
|
||||
# This R package is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License version 2.0 for more details. #
|
||||
# This R package is free software; you can freely use and distribute #
|
||||
# it for both personal and commercial purposes under the terms of the #
|
||||
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
|
||||
# the Free Software Foundation. #
|
||||
# #
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' AMR bar plots with \code{ggplot}
|
||||
@@ -52,6 +55,7 @@
|
||||
#' @rdname ggplot_rsi
|
||||
#' @importFrom utils installed.packages
|
||||
#' @export
|
||||
#' @inheritSection AMR Read more on our website!
|
||||
#' @examples
|
||||
#' library(dplyr)
|
||||
#' library(ggplot2)
|
||||
@@ -298,6 +302,9 @@ facet_rsi <- function(facet = c("Interpretation", "Antibiotic"), nrow = NULL) {
|
||||
#' @rdname ggplot_rsi
|
||||
#' @export
|
||||
scale_y_percent <- function(breaks = seq(0, 1, 0.1), limits = NULL) {
|
||||
if (all(breaks[breaks != 0] > 1)) {
|
||||
breaks <- breaks / 100
|
||||
}
|
||||
ggplot2::scale_y_continuous(breaks = breaks,
|
||||
labels = percent(breaks),
|
||||
limits = limits)
|
||||
|
||||
23
R/globals.R
@@ -2,18 +2,21 @@
|
||||
# TITLE #
|
||||
# Antimicrobial Resistance (AMR) Analysis #
|
||||
# #
|
||||
# AUTHORS #
|
||||
# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# SOURCE #
|
||||
# https://gitlab.com/msberends/AMR #
|
||||
# #
|
||||
# LICENCE #
|
||||
# This package is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License version 2.0, #
|
||||
# as published by the Free Software Foundation. #
|
||||
# (c) 2019 Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# #
|
||||
# This R package is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License version 2.0 for more details. #
|
||||
# This R package is free software; you can freely use and distribute #
|
||||
# it for both personal and commercial purposes under the terms of the #
|
||||
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
|
||||
# the Free Software Foundation. #
|
||||
# #
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
globalVariables(c(".",
|
||||
@@ -30,7 +33,6 @@ globalVariables(c(".",
|
||||
"cum_count",
|
||||
"cum_percent",
|
||||
"date_lab",
|
||||
"days_diff",
|
||||
"diff.percent",
|
||||
"fctlvl",
|
||||
"first_isolate_row_index",
|
||||
@@ -58,6 +60,7 @@ globalVariables(c(".",
|
||||
"microorganisms.umcg",
|
||||
"mo",
|
||||
"mo.old",
|
||||
"more_than_episode_ago",
|
||||
"n",
|
||||
"name",
|
||||
"observations",
|
||||
|
||||
62
R/itis.R
Normal file
@@ -0,0 +1,62 @@
|
||||
# ==================================================================== #
|
||||
# TITLE #
|
||||
# Antimicrobial Resistance (AMR) Analysis #
|
||||
# #
|
||||
# SOURCE #
|
||||
# https://gitlab.com/msberends/AMR #
|
||||
# #
|
||||
# LICENCE #
|
||||
# (c) 2019 Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# #
|
||||
# This R package is free software; you can freely use and distribute #
|
||||
# it for both personal and commercial purposes under the terms of the #
|
||||
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
|
||||
# the Free Software Foundation. #
|
||||
# #
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' ITIS: Integrated Taxonomic Information System
|
||||
#'
|
||||
#' All taxonomic names of all microorganisms are included in this package, using the authoritative Integrated Taxonomic Information System (ITIS).
|
||||
#' @section ITIS:
|
||||
#' \if{html}{\figure{itis_logo.jpg}{options: height=60px style=margin-bottom:5px} \cr}
|
||||
#' This package contains the \strong{complete microbial taxonomic data} (with all nine taxonomic ranks - from kingdom to subspecies) from the publicly available Integrated Taxonomic Information System (ITIS, \url{https://www.itis.gov}).
|
||||
#'
|
||||
#' All (sub)species from \strong{the taxonomic kingdoms Bacteria, Fungi and Protozoa are included in this package}, as well as all previously accepted names known to ITIS. Furthermore, the responsible authors and year of publication are available. This allows users to use authoritative taxonomic information for their data analysis on any microorganism, not only human pathogens. It also helps to quickly determine the Gram stain of bacteria, since all bacteria are classified into subkingdom Negibacteria or Posibacteria.
|
||||
#'
|
||||
#' ITIS is a partnership of U.S., Canadian, and Mexican agencies and taxonomic specialists [3].
|
||||
#' @inheritSection AMR Read more on our website!
|
||||
#' @name itis
|
||||
#' @rdname itis
|
||||
#' @examples
|
||||
#' # Get a note when a species was renamed
|
||||
#' mo_shortname("Chlamydia psittaci")
|
||||
#' # Note: 'Chlamydia psittaci' (Page, 1968) was renamed 'Chlamydophila psittaci' (Everett et al., 1999)
|
||||
#' # [1] "C. psittaci"
|
||||
#'
|
||||
#' # Get any property from the entire taxonomic tree for all included species
|
||||
#' mo_class("E. coli")
|
||||
#' # [1] "Gammaproteobacteria"
|
||||
#'
|
||||
#' mo_family("E. coli")
|
||||
#' # [1] "Enterobacteriaceae"
|
||||
#'
|
||||
#' mo_subkingdom("E. coli")
|
||||
#' # [1] "Negibacteria"
|
||||
#'
|
||||
#' mo_gramstain("E. coli") # based on subkingdom
|
||||
#' # [1] "Gram negative"
|
||||
#'
|
||||
#' mo_ref("E. coli")
|
||||
#' # [1] "Castellani and Chalmers, 1919"
|
||||
#'
|
||||
#' # Do not get mistaken - the package only includes microorganisms
|
||||
#' mo_phylum("C. elegans")
|
||||
#' # [1] "Cyanobacteria" # Bacteria?!
|
||||
#' mo_fullname("C. elegans")
|
||||
#' # [1] "Chroococcus limneticus elegans" # Because a microorganism was found
|
||||
NULL
|
||||
@@ -2,18 +2,21 @@
|
||||
# TITLE #
|
||||
# Antimicrobial Resistance (AMR) Analysis #
|
||||
# #
|
||||
# AUTHORS #
|
||||
# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# SOURCE #
|
||||
# https://gitlab.com/msberends/AMR #
|
||||
# #
|
||||
# LICENCE #
|
||||
# This package is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License version 2.0, #
|
||||
# as published by the Free Software Foundation. #
|
||||
# (c) 2019 Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# #
|
||||
# This R package is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License version 2.0 for more details. #
|
||||
# This R package is free software; you can freely use and distribute #
|
||||
# it for both personal and commercial purposes under the terms of the #
|
||||
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
|
||||
# the Free Software Foundation. #
|
||||
# #
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Join a table with \code{microorganisms}
|
||||
@@ -27,6 +30,7 @@
|
||||
#' @param suffix if there are non-joined duplicate variables in \code{x} and \code{y}, these suffixes will be added to the output to disambiguate them. Should be a character vector of length 2.
|
||||
#' @param ... other parameters to pass on to \code{dplyr::\link[dplyr]{join}}.
|
||||
#' @details \strong{Note:} As opposed to the \code{\link[dplyr]{join}} functions of \code{dplyr}, characters vectors are supported and at default existing columns will get a suffix \code{"2"} and the newly joined columns will not get a suffix. See \code{\link[dplyr]{join}} for more information.
|
||||
#' @inheritSection AMR Read more on our website!
|
||||
#' @export
|
||||
#' @examples
|
||||
#' left_join_microorganisms(as.mo("K. pneumoniae"))
|
||||
|
||||
@@ -2,18 +2,21 @@
|
||||
# TITLE #
|
||||
# Antimicrobial Resistance (AMR) Analysis #
|
||||
# #
|
||||
# AUTHORS #
|
||||
# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# SOURCE #
|
||||
# https://gitlab.com/msberends/AMR #
|
||||
# #
|
||||
# LICENCE #
|
||||
# This package is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License version 2.0, #
|
||||
# as published by the Free Software Foundation. #
|
||||
# (c) 2019 Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# #
|
||||
# This R package is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License version 2.0 for more details. #
|
||||
# This R package is free software; you can freely use and distribute #
|
||||
# it for both personal and commercial purposes under the terms of the #
|
||||
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
|
||||
# the Free Software Foundation. #
|
||||
# #
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Key antibiotics for first \emph{weighted} isolates
|
||||
@@ -43,6 +46,7 @@
|
||||
#' @importFrom dplyr %>% mutate if_else
|
||||
#' @importFrom crayon blue bold
|
||||
#' @seealso \code{\link{first_isolate}}
|
||||
#' @inheritSection AMR Read more on our website!
|
||||
#' @examples
|
||||
#' # septic_patients is a dataset available in the AMR package
|
||||
#' ?septic_patients
|
||||
|
||||
22
R/kurtosis.R
@@ -2,18 +2,21 @@
|
||||
# TITLE #
|
||||
# Antimicrobial Resistance (AMR) Analysis #
|
||||
# #
|
||||
# AUTHORS #
|
||||
# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# SOURCE #
|
||||
# https://gitlab.com/msberends/AMR #
|
||||
# #
|
||||
# LICENCE #
|
||||
# This package is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License version 2.0, #
|
||||
# as published by the Free Software Foundation. #
|
||||
# (c) 2019 Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# #
|
||||
# This R package is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License version 2.0 for more details. #
|
||||
# This R package is free software; you can freely use and distribute #
|
||||
# it for both personal and commercial purposes under the terms of the #
|
||||
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
|
||||
# the Free Software Foundation. #
|
||||
# #
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Kurtosis of the sample
|
||||
@@ -25,6 +28,7 @@
|
||||
#' @exportMethod kurtosis
|
||||
#' @seealso \code{\link{skewness}}
|
||||
#' @rdname kurtosis
|
||||
#' @inheritSection AMR Read more on our website!
|
||||
#' @export
|
||||
kurtosis <- function(x, na.rm = FALSE) {
|
||||
UseMethod("kurtosis")
|
||||
|
||||
22
R/like.R
@@ -2,18 +2,21 @@
|
||||
# TITLE #
|
||||
# Antimicrobial Resistance (AMR) Analysis #
|
||||
# #
|
||||
# AUTHORS #
|
||||
# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# SOURCE #
|
||||
# https://gitlab.com/msberends/AMR #
|
||||
# #
|
||||
# LICENCE #
|
||||
# This package is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License version 2.0, #
|
||||
# as published by the Free Software Foundation. #
|
||||
# (c) 2019 Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# #
|
||||
# This R package is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License version 2.0 for more details. #
|
||||
# This R package is free software; you can freely use and distribute #
|
||||
# it for both personal and commercial purposes under the terms of the #
|
||||
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
|
||||
# the Free Software Foundation. #
|
||||
# #
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Pattern Matching
|
||||
@@ -27,6 +30,7 @@
|
||||
#' @details Using RStudio? This function can also be inserted from the Addins menu and can have its own Keyboard Shortcut like Ctrl+Shift+L or Cmd+Shift+L (see Tools > Modify Keyboard Shortcuts...).
|
||||
#' @source Idea from the \href{https://github.com/Rdatatable/data.table/blob/master/R/like.R}{\code{like} function from the \code{data.table} package}, but made it case insensitive at default and let it support multiple patterns.
|
||||
#' @seealso \code{\link[base]{grep}}
|
||||
#' @inheritSection AMR Read more on our website!
|
||||
#' @examples
|
||||
#' # simple test
|
||||
#' a <- "This is a test"
|
||||
|
||||
22
R/mdro.R
@@ -2,18 +2,21 @@
|
||||
# TITLE #
|
||||
# Antimicrobial Resistance (AMR) Analysis #
|
||||
# #
|
||||
# AUTHORS #
|
||||
# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# SOURCE #
|
||||
# https://gitlab.com/msberends/AMR #
|
||||
# #
|
||||
# LICENCE #
|
||||
# This package is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License version 2.0, #
|
||||
# as published by the Free Software Foundation. #
|
||||
# (c) 2019 Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# #
|
||||
# This R package is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License version 2.0 for more details. #
|
||||
# This R package is free software; you can freely use and distribute #
|
||||
# it for both personal and commercial purposes under the terms of the #
|
||||
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
|
||||
# the Free Software Foundation. #
|
||||
# #
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Determine multidrug-resistant organisms (MDRO)
|
||||
@@ -32,6 +35,7 @@
|
||||
#' @importFrom dplyr %>%
|
||||
#' @importFrom crayon red blue bold
|
||||
#' @export
|
||||
#' @inheritSection AMR Read more on our website!
|
||||
#' @examples
|
||||
#' library(dplyr)
|
||||
#'
|
||||
|
||||
22
R/mic.R
@@ -2,18 +2,21 @@
|
||||
# TITLE #
|
||||
# Antimicrobial Resistance (AMR) Analysis #
|
||||
# #
|
||||
# AUTHORS #
|
||||
# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# SOURCE #
|
||||
# https://gitlab.com/msberends/AMR #
|
||||
# #
|
||||
# LICENCE #
|
||||
# This package is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License version 2.0, #
|
||||
# as published by the Free Software Foundation. #
|
||||
# (c) 2019 Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# #
|
||||
# This R package is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License version 2.0 for more details. #
|
||||
# This R package is free software; you can freely use and distribute #
|
||||
# it for both personal and commercial purposes under the terms of the #
|
||||
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
|
||||
# the Free Software Foundation. #
|
||||
# #
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Class 'mic'
|
||||
@@ -27,6 +30,7 @@
|
||||
#' @export
|
||||
#' @importFrom dplyr %>%
|
||||
#' @seealso \code{\link{as.rsi}}
|
||||
#' @inheritSection AMR Read more on our website!
|
||||
#' @examples
|
||||
#' mic_data <- as.mic(c(">=32", "1.0", "1", "1.00", 8, "<=0.128", "8", "16", "16"))
|
||||
#' is.mic(mic_data)
|
||||
|
||||
21
R/misc.R
@@ -2,18 +2,21 @@
|
||||
# TITLE #
|
||||
# Antimicrobial Resistance (AMR) Analysis #
|
||||
# #
|
||||
# AUTHORS #
|
||||
# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# SOURCE #
|
||||
# https://gitlab.com/msberends/AMR #
|
||||
# #
|
||||
# LICENCE #
|
||||
# This package is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License version 2.0, #
|
||||
# as published by the Free Software Foundation. #
|
||||
# (c) 2019 Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# #
|
||||
# This R package is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License version 2.0 for more details. #
|
||||
# This R package is free software; you can freely use and distribute #
|
||||
# it for both personal and commercial purposes under the terms of the #
|
||||
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
|
||||
# the Free Software Foundation. #
|
||||
# #
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
# No export, no Rd
|
||||
|
||||
31
R/mo.R
@@ -2,18 +2,21 @@
|
||||
# TITLE #
|
||||
# Antimicrobial Resistance (AMR) Analysis #
|
||||
# #
|
||||
# AUTHORS #
|
||||
# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# SOURCE #
|
||||
# https://gitlab.com/msberends/AMR #
|
||||
# #
|
||||
# LICENCE #
|
||||
# This package is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License version 2.0, #
|
||||
# as published by the Free Software Foundation. #
|
||||
# (c) 2019 Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# #
|
||||
# This R package is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License version 2.0 for more details. #
|
||||
# This R package is free software; you can freely use and distribute #
|
||||
# it for both personal and commercial purposes under the terms of the #
|
||||
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
|
||||
# the Free Software Foundation. #
|
||||
# #
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Transform to microorganism ID
|
||||
@@ -74,14 +77,7 @@
|
||||
#' }
|
||||
#'
|
||||
#' \code{guess_mo} is an alias of \code{as.mo}.
|
||||
#' @section ITIS:
|
||||
#' \if{html}{\figure{itis_logo.jpg}{options: height=60px style=margin-bottom:5px} \cr}
|
||||
#' This package contains the \strong{complete microbial taxonomic data} (with all nine taxonomic ranks - from kingdom to subspecies) from the publicly available Integrated Taxonomic Information System (ITIS, \url{https://www.itis.gov}).
|
||||
#'
|
||||
#' All (sub)species from \strong{the taxonomic kingdoms Bacteria, Fungi and Protozoa are included in this package}, as well as all previously accepted names known to ITIS. Furthermore, the responsible authors and year of publication are available. This allows users to use authoritative taxonomic information for their data analysis on any microorganism, not only human pathogens. It also helps to quickly determine the Gram stain of bacteria, since all bacteria are classified into subkingdom Negibacteria or Posibacteria.
|
||||
#'
|
||||
#' ITIS is a partnership of U.S., Canadian, and Mexican agencies and taxonomic specialists [3].
|
||||
#'
|
||||
#' @inheritSection itis ITIS
|
||||
# (source as a section, so it can be inherited by other man pages)
|
||||
#' @section Source:
|
||||
#' [1] Becker K \emph{et al.} \strong{Coagulase-Negative Staphylococci}. 2014. Clin Microbiol Rev. 27(4): 870–926. \url{https://dx.doi.org/10.1128/CMR.00109-13}
|
||||
@@ -93,6 +89,7 @@
|
||||
#' @return Character (vector) with class \code{"mo"}. Unknown values will return \code{NA}.
|
||||
#' @seealso \code{\link{microorganisms}} for the \code{data.frame} with ITIS content that is being used to determine ID's. \cr
|
||||
#' The \code{\link{mo_property}} functions (like \code{\link{mo_genus}}, \code{\link{mo_gramstain}}) to get properties based on the returned code.
|
||||
#' @inheritSection AMR Read more on our website!
|
||||
#' @examples
|
||||
#' # These examples all return "B_STPHY_AUR", the ID of S. aureus:
|
||||
#' as.mo("stau")
|
||||
|
||||
@@ -2,18 +2,21 @@
|
||||
# TITLE #
|
||||
# Antimicrobial Resistance (AMR) Analysis #
|
||||
# #
|
||||
# AUTHORS #
|
||||
# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# SOURCE #
|
||||
# https://gitlab.com/msberends/AMR #
|
||||
# #
|
||||
# LICENCE #
|
||||
# This package is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License version 2.0, #
|
||||
# as published by the Free Software Foundation. #
|
||||
# (c) 2019 Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# #
|
||||
# This R package is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License version 2.0 for more details. #
|
||||
# This R package is free software; you can freely use and distribute #
|
||||
# it for both personal and commercial purposes under the terms of the #
|
||||
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
|
||||
# the Free Software Foundation. #
|
||||
# #
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Property of a microorganism
|
||||
@@ -30,7 +33,7 @@
|
||||
#' \item{\code{mo_ref("Chlamydophila psittaci")} will return \code{"Everett et al., 1999"} (without a warning)}
|
||||
#' }
|
||||
#' @inheritSection get_locale Supported languages
|
||||
#' @inheritSection as.mo ITIS
|
||||
#' @inheritSection itis ITIS
|
||||
#' @inheritSection as.mo Source
|
||||
#' @rdname mo_property
|
||||
#' @name mo_property
|
||||
@@ -41,6 +44,7 @@
|
||||
#' }
|
||||
#' @export
|
||||
#' @seealso \code{\link{microorganisms}}
|
||||
#' @inheritSection AMR Read more on our website!
|
||||
#' @examples
|
||||
#' # All properties of Escherichia coli
|
||||
#' ## taxonomic properties
|
||||
|
||||
22
R/p.symbol.R
@@ -2,18 +2,21 @@
|
||||
# TITLE #
|
||||
# Antimicrobial Resistance (AMR) Analysis #
|
||||
# #
|
||||
# AUTHORS #
|
||||
# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# SOURCE #
|
||||
# https://gitlab.com/msberends/AMR #
|
||||
# #
|
||||
# LICENCE #
|
||||
# This package is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License version 2.0, #
|
||||
# as published by the Free Software Foundation. #
|
||||
# (c) 2019 Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# #
|
||||
# This R package is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License version 2.0 for more details. #
|
||||
# This R package is free software; you can freely use and distribute #
|
||||
# it for both personal and commercial purposes under the terms of the #
|
||||
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
|
||||
# the Free Software Foundation. #
|
||||
# #
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Symbol of a p value
|
||||
@@ -22,6 +25,7 @@
|
||||
#' @param p p value
|
||||
#' @param emptychar text to show when \code{p > 0.1}
|
||||
#' @return Text
|
||||
#' @inheritSection AMR Read more on our website!
|
||||
#' @export
|
||||
p.symbol <- function(p, emptychar = " ") {
|
||||
setting.bak <- options()$scipen
|
||||
|
||||
22
R/portion.R
@@ -2,18 +2,21 @@
|
||||
# TITLE #
|
||||
# Antimicrobial Resistance (AMR) Analysis #
|
||||
# #
|
||||
# AUTHORS #
|
||||
# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# SOURCE #
|
||||
# https://gitlab.com/msberends/AMR #
|
||||
# #
|
||||
# LICENCE #
|
||||
# This package is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License version 2.0, #
|
||||
# as published by the Free Software Foundation. #
|
||||
# (c) 2019 Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# #
|
||||
# This R package is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License version 2.0 for more details. #
|
||||
# This R package is free software; you can freely use and distribute #
|
||||
# it for both personal and commercial purposes under the terms of the #
|
||||
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
|
||||
# the Free Software Foundation. #
|
||||
# #
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Calculate resistance of isolates
|
||||
@@ -58,6 +61,7 @@
|
||||
#' @rdname portion
|
||||
#' @name portion
|
||||
#' @export
|
||||
#' @inheritSection AMR Read more on our website!
|
||||
#' @examples
|
||||
#' # septic_patients is a data set available in the AMR package. It is true, genuine data.
|
||||
#' ?septic_patients
|
||||
|
||||
22
R/read.4d.R
@@ -2,18 +2,21 @@
|
||||
# TITLE #
|
||||
# Antimicrobial Resistance (AMR) Analysis #
|
||||
# #
|
||||
# AUTHORS #
|
||||
# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# SOURCE #
|
||||
# https://gitlab.com/msberends/AMR #
|
||||
# #
|
||||
# LICENCE #
|
||||
# This package is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License version 2.0, #
|
||||
# as published by the Free Software Foundation. #
|
||||
# (c) 2019 Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# #
|
||||
# This R package is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License version 2.0 for more details. #
|
||||
# This R package is free software; you can freely use and distribute #
|
||||
# it for both personal and commercial purposes under the terms of the #
|
||||
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
|
||||
# the Free Software Foundation. #
|
||||
# #
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Read data from 4D database
|
||||
@@ -22,6 +25,7 @@
|
||||
#' @inheritParams utils::read.table
|
||||
#' @param info a logical to indicate whether info about the import should be printed, defaults to \code{TRUE} in interactive sessions
|
||||
#' @details Column names will be transformed, but the original column names are set as a "label" attribute and can be seen in e.g. RStudio Viewer.
|
||||
#' @inheritSection AMR Read more on our website!
|
||||
#' @export
|
||||
read.4D <- function(file,
|
||||
info = interactive(),
|
||||
|
||||
@@ -2,18 +2,21 @@
|
||||
# TITLE #
|
||||
# Antimicrobial Resistance (AMR) Analysis #
|
||||
# #
|
||||
# AUTHORS #
|
||||
# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# SOURCE #
|
||||
# https://gitlab.com/msberends/AMR #
|
||||
# #
|
||||
# LICENCE #
|
||||
# This package is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License version 2.0, #
|
||||
# as published by the Free Software Foundation. #
|
||||
# (c) 2019 Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# #
|
||||
# This R package is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License version 2.0 for more details. #
|
||||
# This R package is free software; you can freely use and distribute #
|
||||
# it for both personal and commercial purposes under the terms of the #
|
||||
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
|
||||
# the Free Software Foundation. #
|
||||
# #
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Predict antimicrobial resistance
|
||||
@@ -45,7 +48,7 @@
|
||||
#' @export
|
||||
#' @importFrom stats predict glm lm
|
||||
#' @importFrom dplyr %>% pull mutate mutate_at n group_by_at summarise filter filter_at all_vars n_distinct arrange case_when
|
||||
# @importFrom tidyr spread
|
||||
#' @inheritSection AMR Read more on our website!
|
||||
#' @examples
|
||||
#' \dontrun{
|
||||
#' # use it with base R:
|
||||
|
||||
22
R/rsi.R
@@ -2,18 +2,21 @@
|
||||
# TITLE #
|
||||
# Antimicrobial Resistance (AMR) Analysis #
|
||||
# #
|
||||
# AUTHORS #
|
||||
# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# SOURCE #
|
||||
# https://gitlab.com/msberends/AMR #
|
||||
# #
|
||||
# LICENCE #
|
||||
# This package is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License version 2.0, #
|
||||
# as published by the Free Software Foundation. #
|
||||
# (c) 2019 Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# #
|
||||
# This R package is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License version 2.0 for more details. #
|
||||
# This R package is free software; you can freely use and distribute #
|
||||
# it for both personal and commercial purposes under the terms of the #
|
||||
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
|
||||
# the Free Software Foundation. #
|
||||
# #
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Class 'rsi'
|
||||
@@ -27,6 +30,7 @@
|
||||
#' @export
|
||||
#' @importFrom dplyr %>%
|
||||
#' @seealso \code{\link{as.mic}}
|
||||
#' @inheritSection AMR Read more on our website!
|
||||
#' @examples
|
||||
#' rsi_data <- as.rsi(c(rep("S", 474), rep("I", 36), rep("R", 370)))
|
||||
#' rsi_data <- as.rsi(c(rep("S", 474), rep("I", 36), rep("R", 370), "A", "B", "C"))
|
||||
|
||||
21
R/rsi_calc.R
@@ -2,18 +2,21 @@
|
||||
# TITLE #
|
||||
# Antimicrobial Resistance (AMR) Analysis #
|
||||
# #
|
||||
# AUTHORS #
|
||||
# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# SOURCE #
|
||||
# https://gitlab.com/msberends/AMR #
|
||||
# #
|
||||
# LICENCE #
|
||||
# This package is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License version 2.0, #
|
||||
# as published by the Free Software Foundation. #
|
||||
# (c) 2019 Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# #
|
||||
# This R package is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License version 2.0 for more details. #
|
||||
# This R package is free software; you can freely use and distribute #
|
||||
# it for both personal and commercial purposes under the terms of the #
|
||||
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
|
||||
# the Free Software Foundation. #
|
||||
# #
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' @importFrom dplyr %>% pull all_vars any_vars filter_all funs mutate_all
|
||||
|
||||
22
R/skewness.R
@@ -2,18 +2,21 @@
|
||||
# TITLE #
|
||||
# Antimicrobial Resistance (AMR) Analysis #
|
||||
# #
|
||||
# AUTHORS #
|
||||
# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# SOURCE #
|
||||
# https://gitlab.com/msberends/AMR #
|
||||
# #
|
||||
# LICENCE #
|
||||
# This package is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License version 2.0, #
|
||||
# as published by the Free Software Foundation. #
|
||||
# (c) 2019 Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# #
|
||||
# This R package is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License version 2.0 for more details. #
|
||||
# This R package is free software; you can freely use and distribute #
|
||||
# it for both personal and commercial purposes under the terms of the #
|
||||
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
|
||||
# the Free Software Foundation. #
|
||||
# #
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Skewness of the sample
|
||||
@@ -26,6 +29,7 @@
|
||||
#' @exportMethod skewness
|
||||
#' @seealso \code{\link{kurtosis}}
|
||||
#' @rdname skewness
|
||||
#' @inheritSection AMR Read more on our website!
|
||||
#' @export
|
||||
skewness <- function(x, na.rm = FALSE) {
|
||||
UseMethod("skewness")
|
||||
|
||||
26
R/zzz.R
@@ -2,18 +2,21 @@
|
||||
# TITLE #
|
||||
# Antimicrobial Resistance (AMR) Analysis #
|
||||
# #
|
||||
# AUTHORS #
|
||||
# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# SOURCE #
|
||||
# https://gitlab.com/msberends/AMR #
|
||||
# #
|
||||
# LICENCE #
|
||||
# This package is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License version 2.0, #
|
||||
# as published by the Free Software Foundation. #
|
||||
# (c) 2019 Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# #
|
||||
# This R package is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License version 2.0 for more details. #
|
||||
# This R package is free software; you can freely use and distribute #
|
||||
# it for both personal and commercial purposes under the terms of the #
|
||||
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
|
||||
# the Free Software Foundation. #
|
||||
# #
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' The \code{AMR} Package
|
||||
@@ -23,8 +26,11 @@
|
||||
#' This package was intended to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and ti work with antibiotic properties by using evidence-based methods.
|
||||
#'
|
||||
#' This package was created for academic research by PhD students of the Faculty of Medical Sciences of the University of Groningen and the Medical Microbiology & Infection Prevention (MMBI) department of the University Medical Center Groningen (UMCG).
|
||||
#' @section Read more on our website!:
|
||||
#' \if{html}{\figure{logo.png}{options: height=40px style=margin-bottom:5px} \cr}
|
||||
#' On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a omprehensive tutorial} about how to conduct AMR analysis and find \href{https://msberends.gitlab.io/AMR/reference}{the complete documentation of all functions}, which reads a lot easier than in R.
|
||||
#' @section Authors:
|
||||
#' Matthijs S. Berends[1,2] Christian F. Luz[1], Erwin E.A. Hassing[2], Corinna Glasner[1], Alex W. Friedrich[1], Bhanu Sinha[1] \cr
|
||||
#' Matthijs S. Berends[1,2] Christian F. Luz[1], Erwin E.A. Hassing[2], Corinna Glasner[1], Alex W. Friedrich[1], Bhanu N.M. Sinha[1] \cr
|
||||
#'
|
||||
#' [1] Department of Medical Microbiology, University of Groningen, University Medical Center Groningen, Groningen, the Netherlands - \url{rug.nl} \url{umcg.nl} \cr
|
||||
#' [2] Certe Medical Diagnostics & Advice, Groningen, the Netherlands - \url{certe.nl}
|
||||
|
||||
578
README.md
@@ -1,11 +1,14 @@
|
||||
# `AMR` <img src="man/figures/logo.png" align="right" height="120px" />
|
||||
### An [R package](https://www.r-project.org) to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with antibiotic properties by using evidence-based methods.
|
||||
# `AMR` (for R) <img src="man/figures/logo.png" align="right" height="120px" />
|
||||
|
||||
This R package was created for academic research by PhD students of the Faculty of Medical Sciences of the [University of Groningen](https://www.rug.nl) and the Medical Microbiology & Infection Prevention (MMBI) department of the [University Medical Center Groningen (UMCG)](https://www.umcg.nl).
|
||||
*NOTE: the original source code is on GitLab (https://gitlab.com/msberends/AMR), so you can report a bug at https://gitlab.com/msberends/AMR/issues. There is a mirror repository on GitHub (https://github.com/msberends/AMR). As the mirror process is automated by GitLab, both repositories always contain the latest changes.*
|
||||
|
||||
:arrow_forward: Get it with `install.packages("AMR")` or see below for other possibilities.
|
||||
----
|
||||
|
||||
:arrow_forward: Read the [changelog here](https://gitlab.com/msberends/AMR/blob/master/NEWS.md).
|
||||
## Development source
|
||||
|
||||
This is the **development source** of `AMR`, a free and open-source [R package](https://www.r-project.org) to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with antibiotic properties by using evidence-based methods.
|
||||
|
||||
**Not a developer? Then our website https://msberends.gitlab.io/AMR is probably a better place to read about this package.** It contains documentation about all of the included functions and also a comprehensive tutorial about how to conduct AMR analysis.
|
||||
|
||||
## Authors
|
||||
Matthijs S. Berends <a href="https://orcid.org/0000-0001-7620-1800"><img src="https://cran.r-project.org/web/orcid.svg" height="16px"></a> <sup>1,2,a</sup>,
|
||||
@@ -26,105 +29,11 @@ Bhanu N.M. Sinha <a href="https://orcid.org/0000-0003-1634-0010"><img src="https
|
||||
<a href="http://www.eurhealth-1health.eu"><img src="man/figures/logo_eh1h.png" height="60px"></a>
|
||||
<a href="http://www.eurhealth-1health.eu"><img src="man/figures/logo_interreg.png" height="60px"></a>
|
||||
|
||||
## Contents
|
||||
* [Why this package?](#why-this-package)
|
||||
* [ITIS](#itis)
|
||||
* [How to get it?](#how-to-get-it)
|
||||
* [Install from CRAN](#install-from-cran)
|
||||
* [Install from Zenodo](#install-from-zenodo)
|
||||
* [Install from GitLab](#install-from-gitlab)
|
||||
* [How to use it?](#how-to-use-it)
|
||||
* [New classes](#new-classes)
|
||||
* [Overwrite/force resistance based on EUCAST rules](#overwriteforce-resistance-based-on-eucast-rules)
|
||||
* [Other (microbial) epidemiological functions](#other-microbial-epidemiological-functions)
|
||||
* [Frequency tables](#frequency-tables)
|
||||
* [Data sets included in package](#data-sets-included-in-package)
|
||||
* [Benchmarks](#benchmarks)
|
||||
* [Copyright](#copyright)
|
||||
|
||||
## Why this package?
|
||||
This R package was intended **to make microbial epidemiology easier**. Most functions contain extensive help pages to get started.
|
||||
|
||||
The `AMR` package basically does four important things:
|
||||
|
||||
1. It **cleanses existing data**, by transforming it to reproducible and profound *classes*, making the most efficient use of R. These functions all use artificial intelligence to guess results that you would expect:
|
||||
|
||||
* Use `as.mo` to get an ID of a microorganism. The IDs are human readable for the trained eye - the ID of *Klebsiella pneumoniae* is "B_KLBSL_PNE" (B stands for Bacteria) and the ID of *S. aureus* is "B_STPHY_AUR". The function takes almost any text as input that looks like the name or code of a microorganism like "E. coli", "esco" and "esccol". Even `as.mo("MRSA")` will return the ID of *S. aureus*. Moreover, it can group all coagulase negative and positive *Staphylococci*, and can transform *Streptococci* into Lancefield groups. To find bacteria based on your input, it uses Artificial Intelligence to look up values in the included ITIS data, consisting of more than 18,000 microorganisms. It is *very* fast, see [Benchmarks](#benchmarks).
|
||||
* Use `as.rsi` to transform values to valid antimicrobial results. It produces just S, I or R based on your input and warns about invalid values. Even values like "<=0.002; S" (combined MIC/RSI) will result in "S".
|
||||
* Use `as.mic` to cleanse your MIC values. It produces a so-called factor (called *ordinal* in SPSS) with valid MIC values as levels. A value like "<=0.002; S" (combined MIC/RSI) will result in "<=0.002".
|
||||
* Use `as.atc` to get the ATC code of an antibiotic as defined by the WHO. This package contains a database with most LIS codes, official names, DDDs and even trade names of antibiotics. For example, the values "Furabid", "Furadantin", "nitro" all return the ATC code of Nitrofurantoine.
|
||||
|
||||
2. It **enhances existing data** and **adds new data** from data sets included in this package.
|
||||
|
||||
* Use `eucast_rules` to apply [EUCAST expert rules to isolates](http://www.eucast.org/expert_rules_and_intrinsic_resistance/).
|
||||
* Use `first_isolate` to identify the first isolates of every patient [using guidelines from the CLSI](https://clsi.org/standards/products/microbiology/documents/m39/) (Clinical and Laboratory Standards Institute).
|
||||
* You can also identify first *weighted* isolates of every patient, an adjusted version of the CLSI guideline. This takes into account key antibiotics of every strain and compares them.
|
||||
* Use `mdro` (abbreviation of Multi Drug Resistant Organisms) to check your isolates for exceptional resistance with country-specific guidelines or EUCAST rules. Currently, national guidelines for Germany and the Netherlands are supported.
|
||||
* The data set `microorganisms` contains the complete taxonomic tree of more than 18,000 microorganisms (bacteria, fungi/yeasts and protozoa). Furthermore, the colloquial name and Gram stain are available, which enables resistance analysis of e.g. different antibiotics per Gram stain. The package also contains functions to look up values in this data set like `mo_genus`, `mo_family`, `mo_gramstain` or even `mo_phylum`. As they use `as.mo` internally, they also use artificial intelligence. For example, `mo_genus("MRSA")` and `mo_genus("S. aureus")` will both return `"Staphylococcus"`. They also come with support for German, Dutch, Spanish, Italian, French and Portuguese. These functions can be used to add new variables to your data.
|
||||
* The data set `antibiotics` contains the ATC code, LIS codes, official name, trivial name and DDD of both oral and parenteral administration. It also contains a total of 298 trade names. Use functions like `ab_name` and `ab_tradenames` to look up values. The `ab_*` functions use `as.atc` internally so they support AI to guess your expected result. For example, `ab_name("Fluclox")`, `ab_name("Floxapen")` and `ab_name("J01CF05")` will all return `"Flucloxacillin"`. These functions can again be used to add new variables to your data.
|
||||
|
||||
3. It **analyses the data** with convenient functions that use well-known methods.
|
||||
|
||||
* Calculate the resistance (and even co-resistance) of microbial isolates with the `portion_R`, `portion_IR`, `portion_I`, `portion_SI` and `portion_S` functions. Similarly, the *number* of isolates can be determined with the `count_R`, `count_IR`, `count_I`, `count_SI` and `count_S` functions. All these functions can be used [with the `dplyr` package](https://dplyr.tidyverse.org/#usage) (e.g. in conjunction with [`summarise`](https://dplyr.tidyverse.org/reference/summarise.html))
|
||||
* Plot AMR results with `geom_rsi`, a function made for the `ggplot2` package
|
||||
* Predict antimicrobial resistance for the nextcoming years using logistic regression models with the `resistance_predict` function
|
||||
* Conduct descriptive statistics to enhance base R: calculate kurtosis, skewness and create frequency tables
|
||||
|
||||
4. It **teaches the user** how to use all the above actions.
|
||||
|
||||
* The package contains extensive help pages with many examples.
|
||||
* It also contains an example data set called `septic_patients`. This data set contains:
|
||||
* 2,000 blood culture isolates from anonymised septic patients between 2001 and 2017 in the Northern Netherlands
|
||||
* Results of 40 antibiotics (each antibiotic in its own column) with a total of 38,414 antimicrobial results
|
||||
* Real and genuine data
|
||||
|
||||
### ITIS
|
||||
<img src="man/figures/itis_logo.jpg" height="100px">
|
||||
|
||||
This package contains the **complete microbial taxonomic data** (with all nine taxonomic ranks - from kingdom to subspecies) from the publicly available Integrated Taxonomic Information System (ITIS, https://www.itis.gov).
|
||||
|
||||
All (sub)species from **the taxonomic kingdoms Bacteria, Fungi and Protozoa are included in this package**, as well as all previously accepted names known to ITIS. Furthermore, the responsible authors and year of publication are available. This allows users to use authoritative taxonomic information for their data analysis on any microorganism, not only human pathogens. It also helps to quickly determine the Gram stain of bacteria, since all bacteria are classified into subkingdom Negibacteria or Posibacteria.
|
||||
|
||||
ITIS is a partnership of U.S., Canadian, and Mexican agencies and taxonomic specialists.
|
||||
|
||||
**Get a note when a species was renamed**
|
||||
```r
|
||||
mo_shortname("Chlamydia psittaci")
|
||||
# Note: 'Chlamydia psittaci' (Page, 1968) was renamed 'Chlamydophila psittaci' (Everett et al., 1999)
|
||||
# [1] "C. psittaci"
|
||||
```
|
||||
|
||||
**Get any property from the entire taxonomic tree for all included species**
|
||||
```r
|
||||
mo_class("E. coli")
|
||||
# [1] "Gammaproteobacteria"
|
||||
|
||||
mo_family("E. coli")
|
||||
# [1] "Enterobacteriaceae"
|
||||
|
||||
mo_subkingdom("E. coli")
|
||||
# [1] "Negibacteria"
|
||||
|
||||
mo_gramstain("E. coli") # based on subkingdom
|
||||
# [1] "Gram negative"
|
||||
|
||||
mo_ref("E. coli")
|
||||
# [1] "Castellani and Chalmers, 1919"
|
||||
```
|
||||
|
||||
**Do not get mistaken - the package only includes microorganisms**
|
||||
```r
|
||||
mo_phylum("C. elegans")
|
||||
# [1] "Cyanobacteria" # Bacteria?!
|
||||
mo_fullname("C. elegans")
|
||||
# [1] "Chroococcus limneticus elegans" # Because a microorganism was found
|
||||
```
|
||||
|
||||
## How to get it?
|
||||
All stable versions of this package [are published on CRAN](http://cran.r-project.org/package=AMR), the official R network with a peer-reviewed submission process.
|
||||
## How to get this package
|
||||
All stable versions of this package [are published on CRAN](https://CRAN.R-project.org/package=AMR), the official R network with a peer-reviewed submission process.
|
||||
|
||||
### Install from CRAN
|
||||
[](http://cran.r-project.org/package=AMR) [](http://cran.r-project.org/package=AMR)
|
||||
[](https://CRAN.R-project.org/package=AMR) [](https://CRAN.R-project.org/package=AMR)
|
||||
|
||||
(Note: Downloads measured only by [cran.rstudio.com](https://cran.rstudio.com/package=AMR), this excludes e.g. the official [cran.r-project.org](https://cran.r-project.org/package=AMR))
|
||||
|
||||
@@ -156,471 +65,6 @@ install.packages("devtools")
|
||||
devtools::install_gitlab("msberends/AMR")
|
||||
```
|
||||
|
||||
## How to use it?
|
||||
```r
|
||||
# Call it with:
|
||||
library(AMR)
|
||||
|
||||
# For a list of functions:
|
||||
help(package = "AMR")
|
||||
```
|
||||
|
||||
### New classes
|
||||
This package contains two new S3 classes: `mic` for MIC values (e.g. from Vitek or Phoenix) and `rsi` for antimicrobial drug interpretations (i.e. S, I and R). Both are actually ordered factors under the hood (an MIC of `2` being higher than `<=1` but lower than `>=32`, and for class `rsi` factors are ordered as `S < I < R`).
|
||||
Both classes have extensions for existing generic functions like `print`, `summary` and `plot`.
|
||||
|
||||
These functions also try to coerce valid values.
|
||||
|
||||
#### RSI
|
||||
The `septic_patients` data set comes with antimicrobial results of more than 40 different drugs. For example, columns `amox` and `cipr` contain results of amoxicillin and ciprofloxacin, respectively.
|
||||
```r
|
||||
summary(septic_patients[, c("amox", "cipr")])
|
||||
# amox cipr
|
||||
# Mode :rsi Mode :rsi
|
||||
# <NA> :1002 <NA> :596
|
||||
# Sum S :336 Sum S :1108
|
||||
# Sum IR:662 Sum IR:296
|
||||
# -Sum R:659 -Sum R:227
|
||||
# -Sum I:3 -Sum I:69
|
||||
```
|
||||
|
||||
You can use the `plot` function from base R:
|
||||
```r
|
||||
plot(septic_patients$cipr)
|
||||
```
|
||||
|
||||

|
||||
|
||||
Or use the `ggplot2` and `dplyr` packages to create more appealing plots:
|
||||
|
||||
```r
|
||||
library(dplyr)
|
||||
library(ggplot2)
|
||||
|
||||
septic_patients %>%
|
||||
select(amox, nitr, fosf, trim, cipr) %>%
|
||||
ggplot_rsi()
|
||||
```
|
||||
|
||||

|
||||
|
||||
Adjust it with any parameter you know from the `ggplot2` package:
|
||||
|
||||
```r
|
||||
septic_patients %>%
|
||||
select(amox, nitr, fosf, trim, cipr) %>%
|
||||
ggplot_rsi(datalabels = FALSE,
|
||||
width = 0.5, colour = "purple", size = 1, linetype = 2, alpha = 0.5)
|
||||
```
|
||||
|
||||

|
||||
|
||||
It also supports grouping variables. Let's say we want to compare resistance of drugs against Urine Tract Infections (UTI) between hospitals A to D (variable `hospital_id`):
|
||||
|
||||
```r
|
||||
septic_patients %>%
|
||||
select(hospital_id, amox, nitr, fosf, trim, cipr) %>%
|
||||
group_by(hospital_id) %>%
|
||||
ggplot_rsi(x = "hospital_id",
|
||||
facet = "Antibiotic",
|
||||
nrow = 1,
|
||||
datalabels = FALSE) +
|
||||
labs(title = "AMR of Anti-UTI Drugs Per Hospital",
|
||||
x = "Hospital")
|
||||
```
|
||||
|
||||

|
||||
|
||||
You could use this to group on anything in your plots: Gram stain, age (group), genus, geographic location, et cetera.
|
||||
|
||||
Is there a significant difference between hospital A and D when it comes to Fosfomycin?
|
||||
```r
|
||||
check_A_and_D <- septic_patients %>%
|
||||
filter(hospital_id %in% c("A", "D")) %>% # filter on only hospitals A and D
|
||||
select(hospital_id, fosf) %>% # select the hospitals and fosfomycin
|
||||
group_by(hospital_id) %>%
|
||||
count_df(combine_IR = TRUE) %>% # count all isolates per group (hospital_id)
|
||||
tidyr::spread(hospital_id, Value) %>% # transform output so A and D are columns
|
||||
select(A, D) %>% # and select these only
|
||||
as.matrix() # transform to good old matrix for fisher.test
|
||||
|
||||
check_A_and_D
|
||||
# A D
|
||||
# [1,] 24 33
|
||||
# [2,] 25 77
|
||||
```
|
||||
|
||||
Total sum is lower than 1,000 so we'd prefer a [Fisher's exact test](https://en.wikipedia.org/wiki/Fisher%27s_exact_test), not a [*G*-test](https://en.wikipedia.org/wiki/G-test) (or its formerly used equivalent, the famous [Chi<sup>2</sup> test](https://en.wikipedia.org/wiki/Chi-squared_test)):
|
||||
```r
|
||||
fisher.test(check_A_and_D)
|
||||
#
|
||||
# Fisher's Exact Test for Count Data
|
||||
#
|
||||
# data: check_A_and_D
|
||||
# p-value = 0.03104
|
||||
# alternative hypothesis: true odds ratio is not equal to 1
|
||||
# 95 percent confidence interval:
|
||||
# 1.054283 4.735995
|
||||
# sample estimates:
|
||||
# odds ratio
|
||||
# 2.228006
|
||||
```
|
||||
|
||||
Well, there you go!
|
||||
|
||||
#### MIC
|
||||
|
||||
```r
|
||||
# Transform values to new class
|
||||
mic_data <- as.mic(c(">=32", "1.0", "8", "<=0.128", "8", "16", "16"))
|
||||
|
||||
summary(mic_data)
|
||||
# Mode:mic
|
||||
# <NA>:0
|
||||
# Min.:<=0.128
|
||||
# Max.:>=32
|
||||
|
||||
plot(mic_data)
|
||||
```
|
||||

|
||||
|
||||
|
||||
### Overwrite/force resistance based on EUCAST rules
|
||||
This is also called *interpretive reading*.
|
||||
```r
|
||||
a <- data.frame(mo = c("Staphylococcus aureus",
|
||||
"Enterococcus faecalis",
|
||||
"Escherichia coli",
|
||||
"Klebsiella pneumoniae",
|
||||
"Pseudomonas aeruginosa"),
|
||||
vanc = "-", # Vancomycin
|
||||
amox = "-", # Amoxicillin
|
||||
coli = "-", # Colistin
|
||||
cfta = "-", # Ceftazidime
|
||||
cfur = "-", # Cefuroxime
|
||||
peni = "S", # Benzylpenicillin
|
||||
cfox = "S", # Cefoxitin
|
||||
stringsAsFactors = FALSE)
|
||||
|
||||
a
|
||||
# mo vanc amox coli cfta cfur peni cfox
|
||||
# 1 Staphylococcus aureus - - - - - S S
|
||||
# 2 Enterococcus faecalis - - - - - S S
|
||||
# 3 Escherichia coli - - - - - S S
|
||||
# 4 Klebsiella pneumoniae - - - - - S S
|
||||
# 5 Pseudomonas aeruginosa - - - - - S S
|
||||
|
||||
b <- EUCAST_rules(a) # 18 results are forced as R or S
|
||||
|
||||
b
|
||||
# mo vanc amox coli cfta cfur peni cfox
|
||||
# 1 Staphylococcus aureus - S R R S S S
|
||||
# 2 Enterococcus faecalis - - R R R S R
|
||||
# 3 Escherichia coli R - - - - R S
|
||||
# 4 Klebsiella pneumoniae R R - - - R S
|
||||
# 5 Pseudomonas aeruginosa R R - - R R R
|
||||
```
|
||||
|
||||
Bacteria IDs can be retrieved with the `guess_mo` function. It uses any type of info about a microorganism as input. For example, all these will return value `B_STPHY_AUR`, the ID of *S. aureus*:
|
||||
```r
|
||||
guess_mo("stau")
|
||||
guess_mo("STAU")
|
||||
guess_mo("staaur")
|
||||
guess_mo("S. aureus")
|
||||
guess_mo("S aureus")
|
||||
guess_mo("Staphylococcus aureus")
|
||||
guess_mo("MRSA") # Methicillin Resistant S. aureus
|
||||
guess_mo("MSSA") # Methicillin Susceptible S. aureus
|
||||
guess_mo("VISA") # Vancomycin Intermediate S. aureus
|
||||
guess_mo("VRSA") # Vancomycin Resistant S. aureus
|
||||
```
|
||||
|
||||
### Other (microbial) epidemiological functions
|
||||
|
||||
```r
|
||||
# G-test to replace Chi squared test
|
||||
g.test(...)
|
||||
|
||||
# Determine key antibiotic based on bacteria ID
|
||||
key_antibiotics(...)
|
||||
|
||||
# Selection of first isolates of any patient
|
||||
first_isolate(...)
|
||||
|
||||
# Predict resistance levels of antibiotics
|
||||
resistance_predict(...)
|
||||
|
||||
# Get name of antibiotic by ATC code
|
||||
abname(...)
|
||||
abname("J01CR02", from = "atc", to = "umcg") # "AMCL"
|
||||
```
|
||||
|
||||
### Frequency tables
|
||||
Base R lacks a simple function to create frequency tables. We created such a function that works with almost all data types: `freq` (or `frequency_tbl`). It can be used in two ways:
|
||||
```r
|
||||
# Like base R:
|
||||
freq(mydata$myvariable)
|
||||
|
||||
# And like tidyverse:
|
||||
mydata %>% freq(myvariable)
|
||||
```
|
||||
|
||||
Frequency are of course sorted by count at default:
|
||||
```r
|
||||
septic_patients %>% freq(hospital_id)
|
||||
# Class: factor (numeric)
|
||||
# Length: 2000 (of which NA: 0 = 0.00%)
|
||||
# Unique: 4
|
||||
#
|
||||
# Item Count Percent Cum. Count Cum. Percent
|
||||
# --- ----- ------ -------- ----------- -------------
|
||||
# 1 D 762 38.1% 762 38.1%
|
||||
# 2 B 663 33.1% 1425 71.2%
|
||||
# 3 A 321 16.1% 1746 87.3%
|
||||
# 4 C 254 12.7% 2000 100.0%
|
||||
```
|
||||
|
||||
This can be changed with the `sort.count` parameter:
|
||||
```r
|
||||
septic_patients %>% freq(hospital_id, sort.count = FALSE)
|
||||
# Class: factor (numeric)
|
||||
# Length: 2000 (of which NA: 0 = 0.00%)
|
||||
# Unique: 4
|
||||
#
|
||||
# Item Count Percent Cum. Count Cum. Percent
|
||||
# --- ----- ------ -------- ----------- -------------
|
||||
# 1 A 321 16.1% 321 16.1%
|
||||
# 2 B 663 33.1% 984 49.2%
|
||||
# 3 C 254 12.7% 1238 61.9%
|
||||
# 4 D 762 38.1% 2000 100.0%
|
||||
```
|
||||
|
||||
For numeric values, some extra descriptive statistics will be calculated:
|
||||
```r
|
||||
freq(runif(n = 10, min = 1, max = 5))
|
||||
# Frequency table
|
||||
# Class: numeric
|
||||
# Length: 10 (of which NA: 0 = 0.00%)
|
||||
# Unique: 10
|
||||
#
|
||||
# Mean: 3.1
|
||||
# Std. dev.: 1.3 (CV: 0.43, MAD: 1.8)
|
||||
# Five-Num: 1.3 | 1.7 | 3.2 | 4.3 | 5.0 (IQR: 2.6, CQV: 0.43)
|
||||
# Outliers: 0
|
||||
#
|
||||
# Item Count Percent Cum. Count Cum. Percent
|
||||
# --- --------- ------ -------- ----------- -------------
|
||||
# 1 1.271079 1 10.0% 1 10.0%
|
||||
# 2 1.333975 1 10.0% 2 20.0%
|
||||
# 3 1.714946 1 10.0% 3 30.0%
|
||||
# 4 2.751871 1 10.0% 4 40.0%
|
||||
# 5 3.090140 1 10.0% 5 50.0%
|
||||
# 6 3.260850 1 10.0% 6 60.0%
|
||||
# 7 3.824105 1 10.0% 7 70.0%
|
||||
# 8 4.278028 1 10.0% 8 80.0%
|
||||
# 9 4.436265 1 10.0% 9 90.0%
|
||||
# 10 4.996694 1 10.0% 10 100.0%
|
||||
#
|
||||
# Warning message:
|
||||
# All observations are unique.
|
||||
```
|
||||
Learn more about this function with:
|
||||
```r
|
||||
?freq
|
||||
```
|
||||
|
||||
### Data sets included in package
|
||||
Data sets to work with antibiotics and bacteria properties.
|
||||
```r
|
||||
# Data set with complete taxonomic trees from ITIS, containing of
|
||||
# the three kingdoms Bacteria, Fungi and Protozoa
|
||||
microorganisms # data.frame: 18,833 x 15
|
||||
microorganisms.old # data.frame: 2,383 x 4
|
||||
|
||||
# Data set with ATC antibiotics codes, official names, trade names
|
||||
# and DDDs (oral and parenteral)
|
||||
antibiotics # data.frame: 423 x 18
|
||||
|
||||
# Data set with 2000 random blood culture isolates from anonymised
|
||||
# septic patients between 2001 and 2017 in 5 Dutch hospitals
|
||||
septic_patients # data.frame: 2,000 x 49
|
||||
|
||||
```
|
||||
|
||||
## Benchmarks
|
||||
|
||||
One of the most important features of this package is the complete microbial taxonomic database, supplied by ITIS (https://www.itis.gov). We created a function `as.mo` that transforms any user input value to a valid microbial ID by using AI (Artificial Intelligence) and based on the taxonomic tree of ITIS.
|
||||
|
||||
Using the `microbenchmark` package, we can review the calculation performance of this function.
|
||||
|
||||
```r
|
||||
library(microbenchmark)
|
||||
```
|
||||
|
||||
In the next test, we try to 'coerce' different input values for *Staphylococcus aureus*. The actual result is the same every time: it returns its MO code `B_STPHY_AUR` (*B* stands for *Bacteria*, the taxonomic kingdom).
|
||||
|
||||
But the calculation time differs a lot. Here, the AI effect can be reviewed best:
|
||||
|
||||
```r
|
||||
microbenchmark(A = as.mo("stau"),
|
||||
B = as.mo("staaur"),
|
||||
C = as.mo("S. aureus"),
|
||||
D = as.mo("S. aureus"),
|
||||
E = as.mo("STAAUR"),
|
||||
F = as.mo("Staphylococcus aureus"),
|
||||
G = as.mo("B_STPHY_AUR"),
|
||||
times = 10,
|
||||
unit = "ms")
|
||||
# Unit: milliseconds
|
||||
# expr min lq mean median uq max neval
|
||||
# A 34.745551 34.798630 35.2596102 34.8994810 35.258325 38.067062 10
|
||||
# B 7.095386 7.125348 7.2219948 7.1613865 7.240377 7.495857 10
|
||||
# C 11.677114 11.733826 11.8304789 11.7715050 11.843756 12.317559 10
|
||||
# D 11.694435 11.730054 11.9859313 11.8775585 12.206371 12.750016 10
|
||||
# E 7.044402 7.117387 7.2271630 7.1923610 7.246104 7.742396 10
|
||||
# F 6.642326 6.778446 6.8988042 6.8753165 6.923577 7.513945 10
|
||||
# G 0.106788 0.131023 0.1351229 0.1357725 0.144014 0.146458 10
|
||||
```
|
||||
|
||||
In the table above, all measurements are shown in milliseconds (thousands of seconds), tested on a quite regular Linux server from 2007 (Core 2 Duo 2.7 GHz, 2 GB DDR2 RAM). A value of 6.9 milliseconds means it will roughly determine 144 input values per second. It case of 39.2 milliseconds, this is only 26 input values per second. The more an input value resembles a full name (like C, D and F), the faster the result will be found. In case of G, the input is already a valid MO code, so it only almost takes no time at all (0.0001 seconds on our server).
|
||||
|
||||
To achieve this speed, the `as.mo` function also takes into account the prevalence of human pathogenic microorganisms. The downside is of course that less prevalent microorganisms will be determined far less faster. See this example for the ID of *Burkholderia nodosa* (`B_BRKHL_NOD`):
|
||||
|
||||
```r
|
||||
microbenchmark(A = as.mo("buno"),
|
||||
B = as.mo("burnod"),
|
||||
C = as.mo("B. nodosa"),
|
||||
D = as.mo("B. nodosa"),
|
||||
E = as.mo("BURNOD"),
|
||||
F = as.mo("Burkholderia nodosa"),
|
||||
G = as.mo("B_BRKHL_NOD"),
|
||||
times = 10,
|
||||
unit = "ms")
|
||||
# Unit: milliseconds
|
||||
# expr min lq mean median uq max neval
|
||||
# A 124.175427 124.474837 125.8610536 125.3750560 126.160945 131.485994 10
|
||||
# B 154.249713 155.364729 160.9077032 156.8738940 157.136183 197.315105 10
|
||||
# C 66.066571 66.162393 66.5538611 66.4488130 66.698077 67.623404 10
|
||||
# D 86.747693 86.918665 90.7831016 87.8149725 89.440982 116.767991 10
|
||||
# E 154.863827 155.208563 162.6535954 158.4062465 168.593785 187.378088 10
|
||||
# F 32.427028 32.638648 32.9929454 32.7860475 32.992813 34.674241 10
|
||||
# G 0.213155 0.216578 0.2369226 0.2338985 0.253734 0.285581 10
|
||||
```
|
||||
|
||||
That takes up to 11 times as much time! A value of 158.4 milliseconds means it can only determine ~6 different input values per second. We can conclude that looking up arbitrary codes of less prevalent microorganisms is the worst way to go, in terms of calculation performance.
|
||||
|
||||
To relieve this pitfall and further improve performance, two important calculations take almost no time at all: **repetive results** and **already precalculated results**.
|
||||
|
||||
Repetive results mean that unique values are present more than once. Unique values will only be calculated once by `as.mo`. We will use `mo_fullname` for this test - a helper function that returns the full microbial name (genus, species and possibly subspecies) and uses `as.mo` internally.
|
||||
```r
|
||||
library(dplyr)
|
||||
# take 500,000 random MO codes from the septic_patients data set
|
||||
x = septic_patients %>%
|
||||
sample_n(500000, replace = TRUE) %>%
|
||||
pull(mo)
|
||||
|
||||
# got the right length?
|
||||
length(x)
|
||||
# [1] 500000
|
||||
|
||||
# and how many unique values do we have?
|
||||
n_distinct(x)
|
||||
# [1] 96
|
||||
|
||||
# only 96, but distributed in 500,000 results. now let's see:
|
||||
microbenchmark(X = mo_fullname(x),
|
||||
times = 10,
|
||||
unit = "ms")
|
||||
# Unit: milliseconds
|
||||
# expr min lq mean median uq max neval
|
||||
# X 114.9342 117.1076 129.6448 120.2047 131.5005 168.6371 10
|
||||
```
|
||||
|
||||
So transforming 500,000 values (!) of 96 unique values only takes 0.12 seconds (120 ms). You only lose time on your unique input values.
|
||||
|
||||
Results of a tenfold - 5,000,000 values:
|
||||
```r
|
||||
# Unit: milliseconds
|
||||
# expr min lq mean median uq max neval
|
||||
# X 882.9045 901.3011 1001.677 940.3421 1168.088 1226.846 10
|
||||
```
|
||||
|
||||
Even the full names of 5 *Million* values are calculated within a second.
|
||||
|
||||
What about precalculated results? If the input is an already precalculated result of a helper function like `mo_fullname`, it almost doesn't take any time at all (see 'C' below):
|
||||
|
||||
```r
|
||||
microbenchmark(A = mo_fullname("B_STPHY_AUR"),
|
||||
B = mo_fullname("S. aureus"),
|
||||
C = mo_fullname("Staphylococcus aureus"),
|
||||
times = 10,
|
||||
unit = "ms")
|
||||
# Unit: milliseconds
|
||||
# expr min lq mean median uq max neval
|
||||
# A 11.364086 11.460537 11.5104799 11.4795330 11.524860 11.818263 10
|
||||
# B 11.976454 12.012352 12.1704592 12.0853020 12.210004 12.881737 10
|
||||
# C 0.095823 0.102528 0.1167754 0.1153785 0.132629 0.140661 10
|
||||
```
|
||||
|
||||
So going from `mo_fullname("Staphylococcus aureus")` to `"Staphylococcus aureus"` takes 0.0001 seconds - it doesn't even start calculating *if the result would be the same as the expected resulting value*. That goes for all helper functions:
|
||||
|
||||
```r
|
||||
microbenchmark(A = mo_species("aureus"),
|
||||
B = mo_genus("Staphylococcus"),
|
||||
C = mo_fullname("Staphylococcus aureus"),
|
||||
D = mo_family("Staphylococcaceae"),
|
||||
E = mo_order("Bacillales"),
|
||||
F = mo_class("Bacilli"),
|
||||
G = mo_phylum("Firmicutes"),
|
||||
H = mo_subkingdom("Posibacteria"),
|
||||
I = mo_kingdom("Bacteria"),
|
||||
times = 10,
|
||||
unit = "ms")
|
||||
# Unit: milliseconds
|
||||
# expr min lq mean median uq max neval
|
||||
# A 0.105181 0.121314 0.1478538 0.1465265 0.166711 0.211409 10
|
||||
# B 0.132558 0.146388 0.1584278 0.1499835 0.164895 0.208477 10
|
||||
# C 0.135492 0.160355 0.2341847 0.1884665 0.348857 0.395931 10
|
||||
# D 0.109650 0.115727 0.1270481 0.1264130 0.128648 0.168317 10
|
||||
# E 0.081574 0.096940 0.0992582 0.0980915 0.101479 0.120477 10
|
||||
# F 0.081575 0.088489 0.0988463 0.0989650 0.103365 0.126482 10
|
||||
# G 0.091981 0.095333 0.1043568 0.1001530 0.111327 0.129625 10
|
||||
# H 0.092610 0.093169 0.1009135 0.0985455 0.101828 0.120406 10
|
||||
# I 0.087371 0.091213 0.1069758 0.0941815 0.109302 0.192831 10
|
||||
```
|
||||
|
||||
Of course, when running `mo_phylum("Firmicutes")` the function has zero knowledge about the actual microorganism, namely *S. aureus*. But since the result would be `"Firmicutes"` too, there is no point in calculating the result. And because this package 'knows' all phyla of all known microorganisms (according to ITIS), it can just return the initial value immediately.
|
||||
|
||||
When the system language is non-English and supported by this `AMR` package, some functions take a little while longer:
|
||||
```r
|
||||
mo_fullname("CoNS", language = "en") # or just mo_fullname("CoNS") on an English system
|
||||
# "Coagulase Negative Staphylococcus (CoNS)"
|
||||
|
||||
mo_fullname("CoNS", language = "fr") # or just mo_fullname("CoNS") on a French system
|
||||
# "Staphylococcus à coagulase négative (CoNS)"
|
||||
|
||||
microbenchmark(en = mo_fullname("CoNS", language = "en"),
|
||||
de = mo_fullname("CoNS", language = "de"),
|
||||
nl = mo_fullname("CoNS", language = "nl"),
|
||||
es = mo_fullname("CoNS", language = "es"),
|
||||
it = mo_fullname("CoNS", language = "it"),
|
||||
fr = mo_fullname("CoNS", language = "fr"),
|
||||
pt = mo_fullname("CoNS", language = "pt"),
|
||||
times = 10,
|
||||
unit = "ms")
|
||||
# Unit: milliseconds
|
||||
# expr min lq mean median uq max neval
|
||||
# en 6.093583 6.51724 6.555105 6.562986 6.630663 6.99698 100
|
||||
# de 13.934874 14.35137 16.891587 14.462210 14.764658 43.63956 100
|
||||
# nl 13.900092 14.34729 15.943268 14.424565 14.581535 43.76283 100
|
||||
# es 13.833813 14.34596 14.574783 14.439757 14.653994 17.49168 100
|
||||
# it 13.811883 14.36621 15.179060 14.453515 14.812359 43.64284 100
|
||||
# fr 13.798683 14.37019 16.344731 14.468775 14.697610 48.62923 100
|
||||
# pt 13.789674 14.36244 15.706321 14.443772 14.679905 44.76701 100
|
||||
```
|
||||
|
||||
Currently supported are German, Dutch, Spanish, Italian, French and Portuguese.
|
||||
|
||||
## Copyright
|
||||
|
||||
This R package is licensed under the [GNU General Public License (GPL) v2.0](https://gitlab.com/msberends/AMR/blob/master/LICENSE). In a nutshell, this means that this package:
|
||||
|
||||
52
_pkgdown.yml
@@ -2,21 +2,24 @@
|
||||
# TITLE #
|
||||
# Antimicrobial Resistance (AMR) Analysis #
|
||||
# #
|
||||
# AUTHORS #
|
||||
# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# SOURCE #
|
||||
# https://gitlab.com/msberends/AMR #
|
||||
# #
|
||||
# LICENCE #
|
||||
# This package is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License version 2.0, #
|
||||
# as published by the Free Software Foundation. #
|
||||
# (c) 2019 Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# #
|
||||
# This R package is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License version 2.0 for more details. #
|
||||
# This R package is free software; you can freely use and distribute #
|
||||
# it for both personal and commercial purposes under the terms of the #
|
||||
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
|
||||
# the Free Software Foundation. #
|
||||
# #
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
url: https://msberends.gitlab.io
|
||||
url: https://msberends.gitlab.io/AMR
|
||||
|
||||
title: 'AMR (for R)'
|
||||
|
||||
@@ -26,9 +29,30 @@ navbar:
|
||||
- text: 'Home'
|
||||
icon: 'fa-home'
|
||||
href: 'index.html'
|
||||
- text: 'Get Started'
|
||||
- text: 'How to'
|
||||
icon: 'fa-question-circle'
|
||||
menu:
|
||||
- text: 'Conduct AMR analysis'
|
||||
icon: 'fa-directions'
|
||||
href: 'articles/AMR.html'
|
||||
- text: 'Predict antimicrobial resistance'
|
||||
icon: 'fa-dice'
|
||||
href: 'articles/Predict.html'
|
||||
- text: 'Apply EUCAST rules'
|
||||
icon: 'fa-exchange-alt'
|
||||
href: 'articles/EUCAST.html'
|
||||
- text: 'Get properties of a microorganism'
|
||||
icon: 'fa-bug'
|
||||
href: 'articles/mo_property.html'
|
||||
- text: 'Get properties of an antibiotic'
|
||||
icon: 'fa-capsules'
|
||||
href: 'articles/ab_property.html'
|
||||
- text: 'Create frequency tables'
|
||||
icon: 'fa-sort-amount-down'
|
||||
href: 'articles/freq.html'
|
||||
- text: 'Use the G-test'
|
||||
icon: 'fa-clipboard-check'
|
||||
href: 'articles/G_test.html'
|
||||
- text: 'Manual'
|
||||
icon: 'fa-book-open'
|
||||
href: 'reference/'
|
||||
@@ -38,10 +62,10 @@ navbar:
|
||||
- text: 'Changelog'
|
||||
icon: 'far fa-newspaper'
|
||||
href: 'news/'
|
||||
right:
|
||||
- text: 'Source Code'
|
||||
icon: 'fab fa-gitlab'
|
||||
href: 'https://gitlab.com/msberends/AMR'
|
||||
right:
|
||||
- text: 'Licence'
|
||||
icon: 'fa-book'
|
||||
href: 'LICENSE-text.html'
|
||||
@@ -51,7 +75,7 @@ reference:
|
||||
desc: >
|
||||
Functions for cleaning and optimising your data, to be able
|
||||
to add variables later on (like taxonomic properties) or to
|
||||
fix and extend antibiotic interpretations by applying EUCAST rules.
|
||||
fix and extend antibiotic interpretations by applying [EUCAST rules](http://www.eucast.org/expert_rules_and_intrinsic_resistance/).
|
||||
contents:
|
||||
- starts_with("as.")
|
||||
- '`eucast_rules`'
|
||||
@@ -118,7 +142,7 @@ authors:
|
||||
href: https://www.rug.nl/staff/b.sinha/
|
||||
|
||||
template:
|
||||
assets: pkgdown/logos
|
||||
assets: pkgdown/logos # use logos in this folder
|
||||
params:
|
||||
noindex: false
|
||||
bootswatch: flatly
|
||||
|
||||
21
appveyor.yml
@@ -1,4 +1,23 @@
|
||||
# DO NOT CHANGE the "init" and "install" sections below
|
||||
# ==================================================================== #
|
||||
# TITLE #
|
||||
# Antimicrobial Resistance (AMR) Analysis #
|
||||
# #
|
||||
# SOURCE #
|
||||
# https://gitlab.com/msberends/AMR #
|
||||
# #
|
||||
# LICENCE #
|
||||
# (c) 2019 Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# #
|
||||
# This R package is free software; you can freely use and distribute #
|
||||
# it for both personal and commercial purposes under the terms of the #
|
||||
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
|
||||
# the Free Software Foundation. #
|
||||
# #
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
# Download script file from GitHub
|
||||
init:
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
msberends.gitlab.io
|
||||
@@ -47,7 +47,7 @@
|
||||
<script src="extra.js"></script>
|
||||
<meta property="og:title" content="License" />
|
||||
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -91,12 +91,65 @@
|
||||
Home
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
<span class="fa fa-question-circle"></span>
|
||||
|
||||
How to
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="articles/AMR.html">
|
||||
<span class="fa fa-directions"></span>
|
||||
|
||||
Get Started
|
||||
Conduct AMR analysis
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="articles/Predict.html">
|
||||
<span class="fa fa-dice"></span>
|
||||
|
||||
Predict antimicrobial resistance
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="articles/EUCAST.html">
|
||||
<span class="fa fa-exchange-alt"></span>
|
||||
|
||||
Apply EUCAST rules
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="articles/mo_property.html">
|
||||
<span class="fa fa-bug"></span>
|
||||
|
||||
Get properties of a microorganism
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="articles/ab_property.html">
|
||||
<span class="fa fa-capsules"></span>
|
||||
|
||||
Get properties of an antibiotic
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="articles/freq.html">
|
||||
<span class="fa fa-sort-amount-down"></span>
|
||||
|
||||
Create frequency tables
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="articles/G_test.html">
|
||||
<span class="fa fa-clipboard-check"></span>
|
||||
|
||||
Use the G-test
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="reference/">
|
||||
@@ -119,17 +172,17 @@
|
||||
Changelog
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="https://gitlab.com/msberends/AMR">
|
||||
<span class="fab fa fab fa-gitlab"></span>
|
||||
|
||||
Source Code
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<li>
|
||||
<a href="LICENSE-text.html">
|
||||
<span class="fa fa-book"></span>
|
||||
|
||||
|
||||
BIN
docs/articles/AMR_files/figure-html/plot 1-1.png
Normal file
|
After Width: | Height: | Size: 31 KiB |
BIN
docs/articles/AMR_files/figure-html/plot 3-1.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
docs/articles/AMR_files/figure-html/plot 4-1.png
Normal file
|
After Width: | Height: | Size: 65 KiB |
BIN
docs/articles/AMR_files/figure-html/plot 5-1.png
Normal file
|
After Width: | Height: | Size: 48 KiB |
245
docs/articles/EUCAST.html
Normal file
@@ -0,0 +1,245 @@
|
||||
<!DOCTYPE html>
|
||||
<!-- Generated by pkgdown: do not edit by hand --><html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>How to apply EUCAST rules • AMR (for R)</title>
|
||||
<!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png">
|
||||
<link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png">
|
||||
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png">
|
||||
<!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script><!-- Bootstrap --><link href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.3.7/flatly/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous">
|
||||
<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script><!-- sticky kit --><script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet">
|
||||
<script src="../pkgdown.js"></script><!-- docsearch --><script src="../docsearch.js"></script><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/docsearch.js/2.6.1/docsearch.min.css" integrity="sha256-QOSRU/ra9ActyXkIBbiIB144aDBdtvXBcNc3OTNuX/Q=" crossorigin="anonymous">
|
||||
<link href="../docsearch.css" rel="stylesheet">
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/jquery.mark.min.js" integrity="sha256-4HLtjeVgH0eIB3aZ9mLYF6E8oU5chNdjU6p6rrXpl9U=" crossorigin="anonymous"></script><link href="../extra.css" rel="stylesheet">
|
||||
<script src="../extra.js"></script><meta property="og:title" content="How to apply EUCAST rules">
|
||||
<meta property="og:description" content="">
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png">
|
||||
<meta name="twitter:card" content="summary">
|
||||
<!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
<body>
|
||||
<div class="container template-article">
|
||||
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div id="navbar" class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li>
|
||||
<a href="../index.html">
|
||||
<span class="fa fa-home"></span>
|
||||
|
||||
Home
|
||||
</a>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
<span class="fa fa-question-circle"></span>
|
||||
|
||||
How to
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="../articles/AMR.html">
|
||||
<span class="fa fa-directions"></span>
|
||||
|
||||
Conduct AMR analysis
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/Predict.html">
|
||||
<span class="fa fa-dice"></span>
|
||||
|
||||
Predict antimicrobial resistance
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/EUCAST.html">
|
||||
<span class="fa fa-exchange-alt"></span>
|
||||
|
||||
Apply EUCAST rules
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/mo_property.html">
|
||||
<span class="fa fa-bug"></span>
|
||||
|
||||
Get properties of a microorganism
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/ab_property.html">
|
||||
<span class="fa fa-capsules"></span>
|
||||
|
||||
Get properties of an antibiotic
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/freq.html">
|
||||
<span class="fa fa-sort-amount-down"></span>
|
||||
|
||||
Create frequency tables
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/G_test.html">
|
||||
<span class="fa fa-clipboard-check"></span>
|
||||
|
||||
Use the G-test
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../reference/">
|
||||
<span class="fa fa-book-open"></span>
|
||||
|
||||
Manual
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../authors.html">
|
||||
<span class="fa fa-users"></span>
|
||||
|
||||
Authors
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../news/">
|
||||
<span class="far fa far fa-newspaper"></span>
|
||||
|
||||
Changelog
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="https://gitlab.com/msberends/AMR">
|
||||
<span class="fab fa fab fa-gitlab"></span>
|
||||
|
||||
Source Code
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../LICENSE-text.html">
|
||||
<span class="fa fa-book"></span>
|
||||
|
||||
Licence
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<form class="navbar-form navbar-right" role="search">
|
||||
<div class="form-group">
|
||||
<input type="search" class="form-control" name="search-input" id="search-input" placeholder="Search..." aria-label="Search for..." autocomplete="off">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<!--/.nav-collapse -->
|
||||
</div>
|
||||
<!--/.container -->
|
||||
</div>
|
||||
<!--/.navbar -->
|
||||
|
||||
|
||||
</header><div class="row">
|
||||
<div class="col-md-9 contents">
|
||||
<div class="page-header toc-ignore">
|
||||
<h1>How to apply EUCAST rules</h1>
|
||||
<h4 class="author">Matthijs S. Berends</h4>
|
||||
|
||||
|
||||
|
||||
<div class="hidden name"><code>EUCAST.Rmd</code></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="introduction" class="section level2">
|
||||
<h2 class="hasAnchor">
|
||||
<a href="#introduction" class="anchor"></a>Introduction</h2>
|
||||
<p>What are EUCAST rules? The European Committee on Antimicrobial Susceptibility Testing (EUCAST) states <a href="http://www.eucast.org/expert_rules_and_intrinsic_resistance/">on their website</a>:</p>
|
||||
<blockquote>
|
||||
<p><em>EUCAST expert rules are a tabulated collection of expert knowledge on intrinsic resistances, exceptional resistance phenotypes and interpretive rules that may be applied to antimicrobial susceptibility testing in order to reduce errors and make appropriate recommendations for reporting particular resistances.</em></p>
|
||||
</blockquote>
|
||||
<p>In Europe, most medical microbiological laboratories already apply these rules. Our package features their latest insights on intrinsic resistance and exceptional phenotypes. Moreover, the <code><a href="../reference/eucast_rules.html">eucast_rules()</a></code> function we use for this purpose can also apply additional rules, like forcing <help title="ATC: J01CA01">ampicillin</help> = R in isolates when <help title="ATC: J01CR02">amoxicillin/clavulanic acid</help> = R.</p>
|
||||
<p><em>(more will be available soon)</em></p>
|
||||
<div id="benefit-for-empiric-therapy-success-estimation" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
<a href="#benefit-for-empiric-therapy-success-estimation" class="anchor"></a>Benefit for empiric therapy success estimation</h3>
|
||||
<p><em>(will be available soon)</em></p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="examples" class="section level2">
|
||||
<h2 class="hasAnchor">
|
||||
<a href="#examples" class="anchor"></a>Examples</h2>
|
||||
<p><em>(will be available soon)</em></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
|
||||
<div id="tocnav">
|
||||
<h2 class="hasAnchor">
|
||||
<a href="#tocnav" class="anchor"></a>Contents</h2>
|
||||
<ul class="nav nav-pills nav-stacked">
|
||||
<li><a href="#introduction">Introduction</a></li>
|
||||
<li><a href="#examples">Examples</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<footer><div class="copyright">
|
||||
<p>Developed by <a href="https://www.rug.nl/staff/m.s.berends/">Matthijs S. Berends</a>, <a href="https://www.rug.nl/staff/c.f.luz/">Christian F. Luz</a>, <a href="https://www.rug.nl/staff/c.glasner/">Corinna Glasner</a>, <a href="https://www.rug.nl/staff/a.w.friedrich/">Alex W. Friedrich</a>, <a href="https://www.rug.nl/staff/b.sinha/">Bhanu N. M. Sinha</a>.</p>
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/docsearch.js/2.6.1/docsearch.min.js" integrity="sha256-GKvGqXDznoRYHCwKXGnuchvKSwmx9SRMrZOTh2g4Sb0=" crossorigin="anonymous"></script><script>
|
||||
docsearch({
|
||||
|
||||
|
||||
apiKey: 'f737050abfd4d726c63938e18f8c496e',
|
||||
indexName: 'amr',
|
||||
inputSelector: 'input#search-input.form-control',
|
||||
transformData: function(hits) {
|
||||
return hits.map(function (hit) {
|
||||
hit.url = updateHitURL(hit);
|
||||
return hit;
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
218
docs/articles/G_test.html
Normal file
@@ -0,0 +1,218 @@
|
||||
<!DOCTYPE html>
|
||||
<!-- Generated by pkgdown: do not edit by hand --><html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>How to use the <em>G</em>-test • AMR (for R)</title>
|
||||
<!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png">
|
||||
<link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png">
|
||||
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png">
|
||||
<!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script><!-- Bootstrap --><link href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.3.7/flatly/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous">
|
||||
<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script><!-- sticky kit --><script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet">
|
||||
<script src="../pkgdown.js"></script><!-- docsearch --><script src="../docsearch.js"></script><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/docsearch.js/2.6.1/docsearch.min.css" integrity="sha256-QOSRU/ra9ActyXkIBbiIB144aDBdtvXBcNc3OTNuX/Q=" crossorigin="anonymous">
|
||||
<link href="../docsearch.css" rel="stylesheet">
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/jquery.mark.min.js" integrity="sha256-4HLtjeVgH0eIB3aZ9mLYF6E8oU5chNdjU6p6rrXpl9U=" crossorigin="anonymous"></script><link href="../extra.css" rel="stylesheet">
|
||||
<script src="../extra.js"></script><meta property="og:title" content="How to use the <em>G</em>-test">
|
||||
<meta property="og:description" content="">
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png">
|
||||
<meta name="twitter:card" content="summary">
|
||||
<!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
<body>
|
||||
<div class="container template-article">
|
||||
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div id="navbar" class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li>
|
||||
<a href="../index.html">
|
||||
<span class="fa fa-home"></span>
|
||||
|
||||
Home
|
||||
</a>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
<span class="fa fa-question-circle"></span>
|
||||
|
||||
How to
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="../articles/AMR.html">
|
||||
<span class="fa fa-directions"></span>
|
||||
|
||||
Conduct AMR analysis
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/Predict.html">
|
||||
<span class="fa fa-dice"></span>
|
||||
|
||||
Predict antimicrobial resistance
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/EUCAST.html">
|
||||
<span class="fa fa-exchange-alt"></span>
|
||||
|
||||
Apply EUCAST rules
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/mo_property.html">
|
||||
<span class="fa fa-bug"></span>
|
||||
|
||||
Get properties of a microorganism
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/ab_property.html">
|
||||
<span class="fa fa-capsules"></span>
|
||||
|
||||
Get properties of an antibiotic
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/freq.html">
|
||||
<span class="fa fa-sort-amount-down"></span>
|
||||
|
||||
Create frequency tables
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/G_test.html">
|
||||
<span class="fa fa-clipboard-check"></span>
|
||||
|
||||
Use the G-test
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../reference/">
|
||||
<span class="fa fa-book-open"></span>
|
||||
|
||||
Manual
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../authors.html">
|
||||
<span class="fa fa-users"></span>
|
||||
|
||||
Authors
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../news/">
|
||||
<span class="far fa far fa-newspaper"></span>
|
||||
|
||||
Changelog
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="https://gitlab.com/msberends/AMR">
|
||||
<span class="fab fa fab fa-gitlab"></span>
|
||||
|
||||
Source Code
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../LICENSE-text.html">
|
||||
<span class="fa fa-book"></span>
|
||||
|
||||
Licence
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<form class="navbar-form navbar-right" role="search">
|
||||
<div class="form-group">
|
||||
<input type="search" class="form-control" name="search-input" id="search-input" placeholder="Search..." aria-label="Search for..." autocomplete="off">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<!--/.nav-collapse -->
|
||||
</div>
|
||||
<!--/.container -->
|
||||
</div>
|
||||
<!--/.navbar -->
|
||||
|
||||
|
||||
</header><div class="row">
|
||||
<div class="col-md-9 contents">
|
||||
<div class="page-header toc-ignore">
|
||||
<h1>How to use the <em>G</em>-test</h1>
|
||||
<h4 class="author">Matthijs S. Berends</h4>
|
||||
|
||||
|
||||
|
||||
<div class="hidden name"><code>G_test.Rmd</code></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<p><em>(will be available soon - in the meanwhile, please read about <a href="./reference/g.test.html">this <em>G</em>-test in the manual</a>)</em></p>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<footer><div class="copyright">
|
||||
<p>Developed by <a href="https://www.rug.nl/staff/m.s.berends/">Matthijs S. Berends</a>, <a href="https://www.rug.nl/staff/c.f.luz/">Christian F. Luz</a>, <a href="https://www.rug.nl/staff/c.glasner/">Corinna Glasner</a>, <a href="https://www.rug.nl/staff/a.w.friedrich/">Alex W. Friedrich</a>, <a href="https://www.rug.nl/staff/b.sinha/">Bhanu N. M. Sinha</a>.</p>
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/docsearch.js/2.6.1/docsearch.min.js" integrity="sha256-GKvGqXDznoRYHCwKXGnuchvKSwmx9SRMrZOTh2g4Sb0=" crossorigin="anonymous"></script><script>
|
||||
docsearch({
|
||||
|
||||
|
||||
apiKey: 'f737050abfd4d726c63938e18f8c496e',
|
||||
indexName: 'amr',
|
||||
inputSelector: 'input#search-input.form-control',
|
||||
transformData: function(hits) {
|
||||
return hits.map(function (hit) {
|
||||
hit.url = updateHitURL(hit);
|
||||
return hit;
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
218
docs/articles/Predict.html
Normal file
@@ -0,0 +1,218 @@
|
||||
<!DOCTYPE html>
|
||||
<!-- Generated by pkgdown: do not edit by hand --><html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>How to predict antimicrobial resistance • AMR (for R)</title>
|
||||
<!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png">
|
||||
<link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png">
|
||||
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png">
|
||||
<!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script><!-- Bootstrap --><link href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.3.7/flatly/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous">
|
||||
<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script><!-- sticky kit --><script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet">
|
||||
<script src="../pkgdown.js"></script><!-- docsearch --><script src="../docsearch.js"></script><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/docsearch.js/2.6.1/docsearch.min.css" integrity="sha256-QOSRU/ra9ActyXkIBbiIB144aDBdtvXBcNc3OTNuX/Q=" crossorigin="anonymous">
|
||||
<link href="../docsearch.css" rel="stylesheet">
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/jquery.mark.min.js" integrity="sha256-4HLtjeVgH0eIB3aZ9mLYF6E8oU5chNdjU6p6rrXpl9U=" crossorigin="anonymous"></script><link href="../extra.css" rel="stylesheet">
|
||||
<script src="../extra.js"></script><meta property="og:title" content="How to predict antimicrobial resistance">
|
||||
<meta property="og:description" content="">
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png">
|
||||
<meta name="twitter:card" content="summary">
|
||||
<!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
<body>
|
||||
<div class="container template-article">
|
||||
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div id="navbar" class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li>
|
||||
<a href="../index.html">
|
||||
<span class="fa fa-home"></span>
|
||||
|
||||
Home
|
||||
</a>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
<span class="fa fa-question-circle"></span>
|
||||
|
||||
How to
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="../articles/AMR.html">
|
||||
<span class="fa fa-directions"></span>
|
||||
|
||||
Conduct AMR analysis
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/Predict.html">
|
||||
<span class="fa fa-dice"></span>
|
||||
|
||||
Predict antimicrobial resistance
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/EUCAST.html">
|
||||
<span class="fa fa-exchange-alt"></span>
|
||||
|
||||
Apply EUCAST rules
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/mo_property.html">
|
||||
<span class="fa fa-bug"></span>
|
||||
|
||||
Get properties of a microorganism
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/ab_property.html">
|
||||
<span class="fa fa-capsules"></span>
|
||||
|
||||
Get properties of an antibiotic
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/freq.html">
|
||||
<span class="fa fa-sort-amount-down"></span>
|
||||
|
||||
Create frequency tables
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/G_test.html">
|
||||
<span class="fa fa-clipboard-check"></span>
|
||||
|
||||
Use the G-test
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../reference/">
|
||||
<span class="fa fa-book-open"></span>
|
||||
|
||||
Manual
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../authors.html">
|
||||
<span class="fa fa-users"></span>
|
||||
|
||||
Authors
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../news/">
|
||||
<span class="far fa far fa-newspaper"></span>
|
||||
|
||||
Changelog
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="https://gitlab.com/msberends/AMR">
|
||||
<span class="fab fa fab fa-gitlab"></span>
|
||||
|
||||
Source Code
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../LICENSE-text.html">
|
||||
<span class="fa fa-book"></span>
|
||||
|
||||
Licence
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<form class="navbar-form navbar-right" role="search">
|
||||
<div class="form-group">
|
||||
<input type="search" class="form-control" name="search-input" id="search-input" placeholder="Search..." aria-label="Search for..." autocomplete="off">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<!--/.nav-collapse -->
|
||||
</div>
|
||||
<!--/.container -->
|
||||
</div>
|
||||
<!--/.navbar -->
|
||||
|
||||
|
||||
</header><div class="row">
|
||||
<div class="col-md-9 contents">
|
||||
<div class="page-header toc-ignore">
|
||||
<h1>How to predict antimicrobial resistance</h1>
|
||||
<h4 class="author">Matthijs S. Berends</h4>
|
||||
|
||||
|
||||
|
||||
<div class="hidden name"><code>Predict.Rmd</code></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<p><em>(will be available soon)</em></p>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<footer><div class="copyright">
|
||||
<p>Developed by <a href="https://www.rug.nl/staff/m.s.berends/">Matthijs S. Berends</a>, <a href="https://www.rug.nl/staff/c.f.luz/">Christian F. Luz</a>, <a href="https://www.rug.nl/staff/c.glasner/">Corinna Glasner</a>, <a href="https://www.rug.nl/staff/a.w.friedrich/">Alex W. Friedrich</a>, <a href="https://www.rug.nl/staff/b.sinha/">Bhanu N. M. Sinha</a>.</p>
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/docsearch.js/2.6.1/docsearch.min.js" integrity="sha256-GKvGqXDznoRYHCwKXGnuchvKSwmx9SRMrZOTh2g4Sb0=" crossorigin="anonymous"></script><script>
|
||||
docsearch({
|
||||
|
||||
|
||||
apiKey: 'f737050abfd4d726c63938e18f8c496e',
|
||||
indexName: 'amr',
|
||||
inputSelector: 'input#search-input.form-control',
|
||||
transformData: function(hits) {
|
||||
return hits.map(function (hit) {
|
||||
hit.url = updateHitURL(hit);
|
||||
return hit;
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
218
docs/articles/ab_property.html
Normal file
@@ -0,0 +1,218 @@
|
||||
<!DOCTYPE html>
|
||||
<!-- Generated by pkgdown: do not edit by hand --><html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>How to get properties of an antibiotic • AMR (for R)</title>
|
||||
<!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png">
|
||||
<link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png">
|
||||
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png">
|
||||
<!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script><!-- Bootstrap --><link href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.3.7/flatly/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous">
|
||||
<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script><!-- sticky kit --><script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet">
|
||||
<script src="../pkgdown.js"></script><!-- docsearch --><script src="../docsearch.js"></script><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/docsearch.js/2.6.1/docsearch.min.css" integrity="sha256-QOSRU/ra9ActyXkIBbiIB144aDBdtvXBcNc3OTNuX/Q=" crossorigin="anonymous">
|
||||
<link href="../docsearch.css" rel="stylesheet">
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/jquery.mark.min.js" integrity="sha256-4HLtjeVgH0eIB3aZ9mLYF6E8oU5chNdjU6p6rrXpl9U=" crossorigin="anonymous"></script><link href="../extra.css" rel="stylesheet">
|
||||
<script src="../extra.js"></script><meta property="og:title" content="How to get properties of an antibiotic">
|
||||
<meta property="og:description" content="">
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png">
|
||||
<meta name="twitter:card" content="summary">
|
||||
<!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
<body>
|
||||
<div class="container template-article">
|
||||
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div id="navbar" class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li>
|
||||
<a href="../index.html">
|
||||
<span class="fa fa-home"></span>
|
||||
|
||||
Home
|
||||
</a>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
<span class="fa fa-question-circle"></span>
|
||||
|
||||
How to
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="../articles/AMR.html">
|
||||
<span class="fa fa-directions"></span>
|
||||
|
||||
Conduct AMR analysis
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/Predict.html">
|
||||
<span class="fa fa-dice"></span>
|
||||
|
||||
Predict antimicrobial resistance
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/EUCAST.html">
|
||||
<span class="fa fa-exchange-alt"></span>
|
||||
|
||||
Apply EUCAST rules
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/mo_property.html">
|
||||
<span class="fa fa-bug"></span>
|
||||
|
||||
Get properties of a microorganism
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/ab_property.html">
|
||||
<span class="fa fa-capsules"></span>
|
||||
|
||||
Get properties of an antibiotic
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/freq.html">
|
||||
<span class="fa fa-sort-amount-down"></span>
|
||||
|
||||
Create frequency tables
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/G_test.html">
|
||||
<span class="fa fa-clipboard-check"></span>
|
||||
|
||||
Use the G-test
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../reference/">
|
||||
<span class="fa fa-book-open"></span>
|
||||
|
||||
Manual
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../authors.html">
|
||||
<span class="fa fa-users"></span>
|
||||
|
||||
Authors
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../news/">
|
||||
<span class="far fa far fa-newspaper"></span>
|
||||
|
||||
Changelog
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="https://gitlab.com/msberends/AMR">
|
||||
<span class="fab fa fab fa-gitlab"></span>
|
||||
|
||||
Source Code
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../LICENSE-text.html">
|
||||
<span class="fa fa-book"></span>
|
||||
|
||||
Licence
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<form class="navbar-form navbar-right" role="search">
|
||||
<div class="form-group">
|
||||
<input type="search" class="form-control" name="search-input" id="search-input" placeholder="Search..." aria-label="Search for..." autocomplete="off">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<!--/.nav-collapse -->
|
||||
</div>
|
||||
<!--/.container -->
|
||||
</div>
|
||||
<!--/.navbar -->
|
||||
|
||||
|
||||
</header><div class="row">
|
||||
<div class="col-md-9 contents">
|
||||
<div class="page-header toc-ignore">
|
||||
<h1>How to get properties of an antibiotic</h1>
|
||||
<h4 class="author">Matthijs S. Berends</h4>
|
||||
|
||||
|
||||
|
||||
<div class="hidden name"><code>ab_property.Rmd</code></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<p><em>(will be available soon)</em></p>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<footer><div class="copyright">
|
||||
<p>Developed by <a href="https://www.rug.nl/staff/m.s.berends/">Matthijs S. Berends</a>, <a href="https://www.rug.nl/staff/c.f.luz/">Christian F. Luz</a>, <a href="https://www.rug.nl/staff/c.glasner/">Corinna Glasner</a>, <a href="https://www.rug.nl/staff/a.w.friedrich/">Alex W. Friedrich</a>, <a href="https://www.rug.nl/staff/b.sinha/">Bhanu N. M. Sinha</a>.</p>
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/docsearch.js/2.6.1/docsearch.min.js" integrity="sha256-GKvGqXDznoRYHCwKXGnuchvKSwmx9SRMrZOTh2g4Sb0=" crossorigin="anonymous"></script><script>
|
||||
docsearch({
|
||||
|
||||
|
||||
apiKey: 'f737050abfd4d726c63938e18f8c496e',
|
||||
indexName: 'amr',
|
||||
inputSelector: 'input#search-input.form-control',
|
||||
transformData: function(hits) {
|
||||
return hits.map(function (hit) {
|
||||
hit.url = updateHitURL(hit);
|
||||
return hit;
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
890
docs/articles/freq.html
Normal file
@@ -0,0 +1,890 @@
|
||||
<!DOCTYPE html>
|
||||
<!-- Generated by pkgdown: do not edit by hand --><html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>How to create frequency tables • AMR (for R)</title>
|
||||
<!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png">
|
||||
<link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png">
|
||||
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png">
|
||||
<!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script><!-- Bootstrap --><link href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.3.7/flatly/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous">
|
||||
<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script><!-- sticky kit --><script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet">
|
||||
<script src="../pkgdown.js"></script><!-- docsearch --><script src="../docsearch.js"></script><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/docsearch.js/2.6.1/docsearch.min.css" integrity="sha256-QOSRU/ra9ActyXkIBbiIB144aDBdtvXBcNc3OTNuX/Q=" crossorigin="anonymous">
|
||||
<link href="../docsearch.css" rel="stylesheet">
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/jquery.mark.min.js" integrity="sha256-4HLtjeVgH0eIB3aZ9mLYF6E8oU5chNdjU6p6rrXpl9U=" crossorigin="anonymous"></script><link href="../extra.css" rel="stylesheet">
|
||||
<script src="../extra.js"></script><meta property="og:title" content="How to create frequency tables">
|
||||
<meta property="og:description" content="">
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png">
|
||||
<meta name="twitter:card" content="summary">
|
||||
<!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
<body>
|
||||
<div class="container template-article">
|
||||
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div id="navbar" class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li>
|
||||
<a href="../index.html">
|
||||
<span class="fa fa-home"></span>
|
||||
|
||||
Home
|
||||
</a>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
<span class="fa fa-question-circle"></span>
|
||||
|
||||
How to
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="../articles/AMR.html">
|
||||
<span class="fa fa-directions"></span>
|
||||
|
||||
Conduct AMR analysis
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/Predict.html">
|
||||
<span class="fa fa-dice"></span>
|
||||
|
||||
Predict antimicrobial resistance
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/EUCAST.html">
|
||||
<span class="fa fa-exchange-alt"></span>
|
||||
|
||||
Apply EUCAST rules
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/mo_property.html">
|
||||
<span class="fa fa-bug"></span>
|
||||
|
||||
Get properties of a microorganism
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/ab_property.html">
|
||||
<span class="fa fa-capsules"></span>
|
||||
|
||||
Get properties of an antibiotic
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/freq.html">
|
||||
<span class="fa fa-sort-amount-down"></span>
|
||||
|
||||
Create frequency tables
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/G_test.html">
|
||||
<span class="fa fa-clipboard-check"></span>
|
||||
|
||||
Use the G-test
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../reference/">
|
||||
<span class="fa fa-book-open"></span>
|
||||
|
||||
Manual
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../authors.html">
|
||||
<span class="fa fa-users"></span>
|
||||
|
||||
Authors
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../news/">
|
||||
<span class="far fa far fa-newspaper"></span>
|
||||
|
||||
Changelog
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="https://gitlab.com/msberends/AMR">
|
||||
<span class="fab fa fab fa-gitlab"></span>
|
||||
|
||||
Source Code
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../LICENSE-text.html">
|
||||
<span class="fa fa-book"></span>
|
||||
|
||||
Licence
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<form class="navbar-form navbar-right" role="search">
|
||||
<div class="form-group">
|
||||
<input type="search" class="form-control" name="search-input" id="search-input" placeholder="Search..." aria-label="Search for..." autocomplete="off">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<!--/.nav-collapse -->
|
||||
</div>
|
||||
<!--/.container -->
|
||||
</div>
|
||||
<!--/.navbar -->
|
||||
|
||||
|
||||
</header><div class="row">
|
||||
<div class="col-md-9 contents">
|
||||
<div class="page-header toc-ignore">
|
||||
<h1>How to create frequency tables</h1>
|
||||
<h4 class="author">Matthijs S. Berends</h4>
|
||||
|
||||
|
||||
|
||||
<div class="hidden name"><code>freq.Rmd</code></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="introduction" class="section level2">
|
||||
<h2 class="hasAnchor">
|
||||
<a href="#introduction" class="anchor"></a>Introduction</h2>
|
||||
<p>Frequency tables (or frequency distributions) are summaries of the distribution of values in a sample. With the <code>freq</code> function, you can create univariate frequency tables. Multiple variables will be pasted into one variable, so it forces a univariate distribution. We take the <code>septic_patients</code> dataset (included in this AMR package) as example.</p>
|
||||
</div>
|
||||
<div id="frequencies-of-one-variable" class="section level2">
|
||||
<h2 class="hasAnchor">
|
||||
<a href="#frequencies-of-one-variable" class="anchor"></a>Frequencies of one variable</h2>
|
||||
<p>To only show and quickly review the content of one variable, you can just select this variable in various ways. Let’s say we want to get the frequencies of the <code>gender</code> variable of the <code>septic_patients</code> dataset:</p>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" data-line-number="1">septic_patients <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(gender)</a></code></pre></div>
|
||||
<p><strong>Frequency table of <code>gender</code></strong></p>
|
||||
<table class="table">
|
||||
<thead><tr class="header">
|
||||
<th align="left"></th>
|
||||
<th align="left">Item</th>
|
||||
<th align="right">Count</th>
|
||||
<th align="right">Percent</th>
|
||||
<th align="right">Cum. Count</th>
|
||||
<th align="right">Cum. Percent</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td align="left">1</td>
|
||||
<td align="left">M</td>
|
||||
<td align="right">1,031</td>
|
||||
<td align="right">51.6%</td>
|
||||
<td align="right">1,031</td>
|
||||
<td align="right">51.6%</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="left">2</td>
|
||||
<td align="left">F</td>
|
||||
<td align="right">969</td>
|
||||
<td align="right">48.5%</td>
|
||||
<td align="right">2,000</td>
|
||||
<td align="right">100.0%</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>This immediately shows the class of the variable, its length and availability (i.e. the amount of <code>NA</code>), the amount of unique values and (most importantly) that among septic patients men are more prevalent than women.</p>
|
||||
</div>
|
||||
<div id="frequencies-of-more-than-one-variable" class="section level2">
|
||||
<h2 class="hasAnchor">
|
||||
<a href="#frequencies-of-more-than-one-variable" class="anchor"></a>Frequencies of more than one variable</h2>
|
||||
<p>Multiple variables will be pasted into one variable to review individual cases, keeping a univariate frequency table.</p>
|
||||
<p>For illustration, we could add some more variables to the <code>septic_patients</code> dataset to learn about bacterial properties:</p>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb2-1" data-line-number="1">my_patients <-<span class="st"> </span>septic_patients <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/join.html">left_join_microorganisms</a></span>()</a>
|
||||
<a class="sourceLine" id="cb2-2" data-line-number="2"><span class="co"># Joining, by = "mo"</span></a></code></pre></div>
|
||||
<p>Now all variables of the <code>microorganisms</code> dataset have been joined to the <code>septic_patients</code> dataset. The <code>microorganisms</code> dataset consists of the following variables:</p>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb3-1" data-line-number="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/colnames">colnames</a></span>(microorganisms)</a>
|
||||
<a class="sourceLine" id="cb3-2" data-line-number="2"><span class="co"># [1] "mo" "tsn" "genus" "species" "subspecies"</span></a>
|
||||
<a class="sourceLine" id="cb3-3" data-line-number="3"><span class="co"># [6] "fullname" "family" "order" "class" "phylum" </span></a>
|
||||
<a class="sourceLine" id="cb3-4" data-line-number="4"><span class="co"># [11] "subkingdom" "kingdom" "gramstain" "prevalence" "ref"</span></a></code></pre></div>
|
||||
<p>If we compare the dimensions between the old and new dataset, we can see that these 14 variables were added:</p>
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb4-1" data-line-number="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/dim">dim</a></span>(septic_patients)</a>
|
||||
<a class="sourceLine" id="cb4-2" data-line-number="2"><span class="co"># [1] 2000 49</span></a>
|
||||
<a class="sourceLine" id="cb4-3" data-line-number="3"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/dim">dim</a></span>(my_patients)</a>
|
||||
<a class="sourceLine" id="cb4-4" data-line-number="4"><span class="co"># [1] 2000 63</span></a></code></pre></div>
|
||||
<p>So now the <code>genus</code> and <code>species</code> variables are available. A frequency table of these combined variables can be created like this:</p>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb5-1" data-line-number="1">my_patients <span class="op">%>%</span></a>
|
||||
<a class="sourceLine" id="cb5-2" data-line-number="2"><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(genus, species, <span class="dt">nmax =</span> <span class="dv">15</span>)</a></code></pre></div>
|
||||
<p><strong>Frequency table of <code>genus</code> and <code>species</code></strong></p>
|
||||
<table class="table">
|
||||
<thead><tr class="header">
|
||||
<th align="left"></th>
|
||||
<th align="left">Item</th>
|
||||
<th align="right">Count</th>
|
||||
<th align="right">Percent</th>
|
||||
<th align="right">Cum. Count</th>
|
||||
<th align="right">Cum. Percent</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td align="left">1</td>
|
||||
<td align="left">Escherichia coli</td>
|
||||
<td align="right">467</td>
|
||||
<td align="right">23.4%</td>
|
||||
<td align="right">467</td>
|
||||
<td align="right">23.4%</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="left">2</td>
|
||||
<td align="left">Staphylococcus coagulase negative</td>
|
||||
<td align="right">313</td>
|
||||
<td align="right">15.7%</td>
|
||||
<td align="right">780</td>
|
||||
<td align="right">39.0%</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="left">3</td>
|
||||
<td align="left">Staphylococcus aureus</td>
|
||||
<td align="right">235</td>
|
||||
<td align="right">11.8%</td>
|
||||
<td align="right">1,015</td>
|
||||
<td align="right">50.7%</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="left">4</td>
|
||||
<td align="left">Staphylococcus epidermidis</td>
|
||||
<td align="right">174</td>
|
||||
<td align="right">8.7%</td>
|
||||
<td align="right">1,189</td>
|
||||
<td align="right">59.5%</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="left">5</td>
|
||||
<td align="left">Streptococcus pneumoniae</td>
|
||||
<td align="right">117</td>
|
||||
<td align="right">5.9%</td>
|
||||
<td align="right">1,306</td>
|
||||
<td align="right">65.3%</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="left">6</td>
|
||||
<td align="left">Staphylococcus hominis</td>
|
||||
<td align="right">81</td>
|
||||
<td align="right">4.1%</td>
|
||||
<td align="right">1,387</td>
|
||||
<td align="right">69.4%</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="left">7</td>
|
||||
<td align="left">Klebsiella pneumoniae</td>
|
||||
<td align="right">58</td>
|
||||
<td align="right">2.9%</td>
|
||||
<td align="right">1,445</td>
|
||||
<td align="right">72.3%</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="left">8</td>
|
||||
<td align="left">Enterococcus faecalis</td>
|
||||
<td align="right">39</td>
|
||||
<td align="right">2.0%</td>
|
||||
<td align="right">1,484</td>
|
||||
<td align="right">74.2%</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="left">9</td>
|
||||
<td align="left">Proteus mirabilis</td>
|
||||
<td align="right">36</td>
|
||||
<td align="right">1.8%</td>
|
||||
<td align="right">1,520</td>
|
||||
<td align="right">76.0%</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="left">10</td>
|
||||
<td align="left">Pseudomonas aeruginosa</td>
|
||||
<td align="right">30</td>
|
||||
<td align="right">1.5%</td>
|
||||
<td align="right">1,550</td>
|
||||
<td align="right">77.5%</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="left">11</td>
|
||||
<td align="left">Serratia marcescens</td>
|
||||
<td align="right">25</td>
|
||||
<td align="right">1.3%</td>
|
||||
<td align="right">1,575</td>
|
||||
<td align="right">78.8%</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="left">12</td>
|
||||
<td align="left">Enterobacter cloacae</td>
|
||||
<td align="right">23</td>
|
||||
<td align="right">1.2%</td>
|
||||
<td align="right">1,598</td>
|
||||
<td align="right">79.9%</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="left">13</td>
|
||||
<td align="left">Enterococcus faecium</td>
|
||||
<td align="right">21</td>
|
||||
<td align="right">1.1%</td>
|
||||
<td align="right">1,619</td>
|
||||
<td align="right">81.0%</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="left">14</td>
|
||||
<td align="left">Staphylococcus capitis</td>
|
||||
<td align="right">21</td>
|
||||
<td align="right">1.1%</td>
|
||||
<td align="right">1,640</td>
|
||||
<td align="right">82.0%</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="left">15</td>
|
||||
<td align="left">Bacteroides fragilis</td>
|
||||
<td align="right">20</td>
|
||||
<td align="right">1.0%</td>
|
||||
<td align="right">1,660</td>
|
||||
<td align="right">83.0%</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>(omitted 81 entries, n = 340 [17.0%])</p>
|
||||
</div>
|
||||
<div id="frequencies-of-numeric-values" class="section level2">
|
||||
<h2 class="hasAnchor">
|
||||
<a href="#frequencies-of-numeric-values" class="anchor"></a>Frequencies of numeric values</h2>
|
||||
<p>Frequency tables can be created of any input.</p>
|
||||
<p>In case of numeric values (like integers, doubles, etc.) additional descriptive statistics will be calculated and shown into the header:</p>
|
||||
<div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb6-1" data-line-number="1"><span class="co"># # get age distribution of unique patients</span></a>
|
||||
<a class="sourceLine" id="cb6-2" data-line-number="2">septic_patients <span class="op">%>%</span><span class="st"> </span></a>
|
||||
<a class="sourceLine" id="cb6-3" data-line-number="3"><span class="st"> </span><span class="kw">distinct</span>(patient_id, <span class="dt">.keep_all =</span> <span class="ot">TRUE</span>) <span class="op">%>%</span><span class="st"> </span></a>
|
||||
<a class="sourceLine" id="cb6-4" data-line-number="4"><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(age, <span class="dt">nmax =</span> <span class="dv">5</span>, <span class="dt">header =</span> <span class="ot">TRUE</span>)</a></code></pre></div>
|
||||
<p><strong>Frequency table of <code>age</code></strong><br>
|
||||
Class: numeric<br>
|
||||
Length: 981 (of which NA: 0 = 0.00%)<br>
|
||||
Unique: 73</p>
|
||||
<p>Mean: 71.08<br>
|
||||
SD: 14.05 (CV: 0.20, MAD: 13.34)<br>
|
||||
Five-Num: 14 | 63 | 74 | 82 | 97 (IQR: 19, CQV: 0.13)<br>
|
||||
Outliers: 15 (unique count: 12)</p>
|
||||
<table class="table">
|
||||
<thead><tr class="header">
|
||||
<th align="left"></th>
|
||||
<th align="right">Item</th>
|
||||
<th align="right">Count</th>
|
||||
<th align="right">Percent</th>
|
||||
<th align="right">Cum. Count</th>
|
||||
<th align="right">Cum. Percent</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td align="left">1</td>
|
||||
<td align="right">83</td>
|
||||
<td align="right">44</td>
|
||||
<td align="right">4.5%</td>
|
||||
<td align="right">44</td>
|
||||
<td align="right">4.5%</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="left">2</td>
|
||||
<td align="right">76</td>
|
||||
<td align="right">43</td>
|
||||
<td align="right">4.4%</td>
|
||||
<td align="right">87</td>
|
||||
<td align="right">8.9%</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="left">3</td>
|
||||
<td align="right">75</td>
|
||||
<td align="right">37</td>
|
||||
<td align="right">3.8%</td>
|
||||
<td align="right">124</td>
|
||||
<td align="right">12.6%</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="left">4</td>
|
||||
<td align="right">82</td>
|
||||
<td align="right">33</td>
|
||||
<td align="right">3.4%</td>
|
||||
<td align="right">157</td>
|
||||
<td align="right">16.0%</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="left">5</td>
|
||||
<td align="right">78</td>
|
||||
<td align="right">32</td>
|
||||
<td align="right">3.3%</td>
|
||||
<td align="right">189</td>
|
||||
<td align="right">19.3%</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>(omitted 68 entries, n = 792 [80.7%])</p>
|
||||
<p>So the following properties are determined, where <code>NA</code> values are always ignored:</p>
|
||||
<ul>
|
||||
<li><p><strong>Mean</strong></p></li>
|
||||
<li><p><strong>Standard deviation</strong></p></li>
|
||||
<li><p><strong>Coefficient of variation</strong> (CV), the standard deviation divided by the mean</p></li>
|
||||
<li><p><strong>Five numbers of Tukey</strong> (min, Q1, median, Q3, max)</p></li>
|
||||
<li><p><strong>Coefficient of quartile variation</strong> (CQV, sometimes called coefficient of dispersion), calculated as (Q3 - Q1) / (Q3 + Q1) using quantile with <code>type = 6</code> as quantile algorithm to comply with SPSS standards</p></li>
|
||||
<li><p><strong>Outliers</strong> (total count and unique count)</p></li>
|
||||
</ul>
|
||||
<p>So for example, the above frequency table quickly shows the median age of patients being 74.</p>
|
||||
</div>
|
||||
<div id="frequencies-of-factors" class="section level2">
|
||||
<h2 class="hasAnchor">
|
||||
<a href="#frequencies-of-factors" class="anchor"></a>Frequencies of factors</h2>
|
||||
<p>To sort frequencies of factors on factor level instead of item count, use the <code>sort.count</code> parameter.</p>
|
||||
<p><code>sort.count</code> is <code>TRUE</code> by default. Compare this default behaviour…</p>
|
||||
<div class="sourceCode" id="cb7"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb7-1" data-line-number="1">septic_patients <span class="op">%>%</span></a>
|
||||
<a class="sourceLine" id="cb7-2" data-line-number="2"><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(hospital_id)</a></code></pre></div>
|
||||
<p><strong>Frequency table of <code>hospital_id</code></strong></p>
|
||||
<table class="table">
|
||||
<thead><tr class="header">
|
||||
<th align="left"></th>
|
||||
<th align="left">Item</th>
|
||||
<th align="right">Count</th>
|
||||
<th align="right">Percent</th>
|
||||
<th align="right">Cum. Count</th>
|
||||
<th align="right">Cum. Percent</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td align="left">1</td>
|
||||
<td align="left">D</td>
|
||||
<td align="right">762</td>
|
||||
<td align="right">38.1%</td>
|
||||
<td align="right">762</td>
|
||||
<td align="right">38.1%</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="left">2</td>
|
||||
<td align="left">B</td>
|
||||
<td align="right">663</td>
|
||||
<td align="right">33.2%</td>
|
||||
<td align="right">1,425</td>
|
||||
<td align="right">71.3%</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="left">3</td>
|
||||
<td align="left">A</td>
|
||||
<td align="right">321</td>
|
||||
<td align="right">16.1%</td>
|
||||
<td align="right">1,746</td>
|
||||
<td align="right">87.3%</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="left">4</td>
|
||||
<td align="left">C</td>
|
||||
<td align="right">254</td>
|
||||
<td align="right">12.7%</td>
|
||||
<td align="right">2,000</td>
|
||||
<td align="right">100.0%</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>… with this, where items are now sorted on count:</p>
|
||||
<div class="sourceCode" id="cb8"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb8-1" data-line-number="1">septic_patients <span class="op">%>%</span></a>
|
||||
<a class="sourceLine" id="cb8-2" data-line-number="2"><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(hospital_id, <span class="dt">sort.count =</span> <span class="ot">FALSE</span>)</a></code></pre></div>
|
||||
<p><strong>Frequency table of <code>hospital_id</code></strong></p>
|
||||
<table class="table">
|
||||
<thead><tr class="header">
|
||||
<th align="left"></th>
|
||||
<th align="left">Item</th>
|
||||
<th align="right">Count</th>
|
||||
<th align="right">Percent</th>
|
||||
<th align="right">Cum. Count</th>
|
||||
<th align="right">Cum. Percent</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td align="left">1</td>
|
||||
<td align="left">A</td>
|
||||
<td align="right">321</td>
|
||||
<td align="right">16.1%</td>
|
||||
<td align="right">321</td>
|
||||
<td align="right">16.1%</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="left">2</td>
|
||||
<td align="left">B</td>
|
||||
<td align="right">663</td>
|
||||
<td align="right">33.2%</td>
|
||||
<td align="right">984</td>
|
||||
<td align="right">49.2%</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="left">3</td>
|
||||
<td align="left">C</td>
|
||||
<td align="right">254</td>
|
||||
<td align="right">12.7%</td>
|
||||
<td align="right">1,238</td>
|
||||
<td align="right">61.9%</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="left">4</td>
|
||||
<td align="left">D</td>
|
||||
<td align="right">762</td>
|
||||
<td align="right">38.1%</td>
|
||||
<td align="right">2,000</td>
|
||||
<td align="right">100.0%</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>All classes will be printed into the header (default is <code>FALSE</code> when using markdown like this document). Variables with the new <code>rsi</code> class of this AMR package are actually ordered factors and have three classes (look at <code>Class</code> in the header):</p>
|
||||
<div class="sourceCode" id="cb9"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb9-1" data-line-number="1">septic_patients <span class="op">%>%</span></a>
|
||||
<a class="sourceLine" id="cb9-2" data-line-number="2"><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(amox, <span class="dt">header =</span> <span class="ot">TRUE</span>)</a></code></pre></div>
|
||||
<p><strong>Frequency table of <code>amox</code></strong><br>
|
||||
Class: factor > ordered > rsi (numeric)<br>
|
||||
Levels: S < I < R<br>
|
||||
Length: 2,000 (of which NA: 828 = 41.40%)<br>
|
||||
Unique: 3</p>
|
||||
<p>%IR: 58.53% (ratio S : IR = 1.0 : 1.4)</p>
|
||||
<table class="table">
|
||||
<thead><tr class="header">
|
||||
<th align="left"></th>
|
||||
<th align="left">Item</th>
|
||||
<th align="right">Count</th>
|
||||
<th align="right">Percent</th>
|
||||
<th align="right">Cum. Count</th>
|
||||
<th align="right">Cum. Percent</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td align="left">1</td>
|
||||
<td align="left">R</td>
|
||||
<td align="right">683</td>
|
||||
<td align="right">58.3%</td>
|
||||
<td align="right">683</td>
|
||||
<td align="right">58.3%</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="left">2</td>
|
||||
<td align="left">S</td>
|
||||
<td align="right">486</td>
|
||||
<td align="right">41.5%</td>
|
||||
<td align="right">1,169</td>
|
||||
<td align="right">99.7%</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="left">3</td>
|
||||
<td align="left">I</td>
|
||||
<td align="right">3</td>
|
||||
<td align="right">0.3%</td>
|
||||
<td align="right">1,172</td>
|
||||
<td align="right">100.0%</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="frequencies-of-dates" class="section level2">
|
||||
<h2 class="hasAnchor">
|
||||
<a href="#frequencies-of-dates" class="anchor"></a>Frequencies of dates</h2>
|
||||
<p>Frequencies of dates will show the oldest and newest date in the data, and the amount of days between them:</p>
|
||||
<div class="sourceCode" id="cb10"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb10-1" data-line-number="1">septic_patients <span class="op">%>%</span></a>
|
||||
<a class="sourceLine" id="cb10-2" data-line-number="2"><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(date, <span class="dt">nmax =</span> <span class="dv">5</span>, <span class="dt">header =</span> <span class="ot">TRUE</span>)</a></code></pre></div>
|
||||
<p><strong>Frequency table of <code>date</code></strong><br>
|
||||
Class: Date (numeric)<br>
|
||||
Length: 2,000 (of which NA: 0 = 0.00%)<br>
|
||||
Unique: 1,140</p>
|
||||
<p>Oldest: 2 January 2002<br>
|
||||
Newest: 28 December 2017 (+5,839)<br>
|
||||
Median: 31 July 2009 (47.39%)</p>
|
||||
<table class="table">
|
||||
<thead><tr class="header">
|
||||
<th align="left"></th>
|
||||
<th align="left">Item</th>
|
||||
<th align="right">Count</th>
|
||||
<th align="right">Percent</th>
|
||||
<th align="right">Cum. Count</th>
|
||||
<th align="right">Cum. Percent</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td align="left">1</td>
|
||||
<td align="left">2016-05-21</td>
|
||||
<td align="right">10</td>
|
||||
<td align="right">0.5%</td>
|
||||
<td align="right">10</td>
|
||||
<td align="right">0.5%</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="left">2</td>
|
||||
<td align="left">2004-11-15</td>
|
||||
<td align="right">8</td>
|
||||
<td align="right">0.4%</td>
|
||||
<td align="right">18</td>
|
||||
<td align="right">0.9%</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="left">3</td>
|
||||
<td align="left">2013-07-29</td>
|
||||
<td align="right">8</td>
|
||||
<td align="right">0.4%</td>
|
||||
<td align="right">26</td>
|
||||
<td align="right">1.3%</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="left">4</td>
|
||||
<td align="left">2017-06-12</td>
|
||||
<td align="right">8</td>
|
||||
<td align="right">0.4%</td>
|
||||
<td align="right">34</td>
|
||||
<td align="right">1.7%</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="left">5</td>
|
||||
<td align="left">2015-11-19</td>
|
||||
<td align="right">7</td>
|
||||
<td align="right">0.4%</td>
|
||||
<td align="right">41</td>
|
||||
<td align="right">2.1%</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>(omitted 1,135 entries, n = 1,959 [98.0%])</p>
|
||||
</div>
|
||||
<div id="assigning-a-frequency-table-to-an-object" class="section level2">
|
||||
<h2 class="hasAnchor">
|
||||
<a href="#assigning-a-frequency-table-to-an-object" class="anchor"></a>Assigning a frequency table to an object</h2>
|
||||
<p>A frequency table is actaually a regular <code>data.frame</code>, with the exception that it contains an additional class.</p>
|
||||
<div class="sourceCode" id="cb11"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb11-1" data-line-number="1">my_df <-<span class="st"> </span>septic_patients <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(age)</a>
|
||||
<a class="sourceLine" id="cb11-2" data-line-number="2"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/class">class</a></span>(my_df)</a></code></pre></div>
|
||||
<p>[1] “frequency_tbl” “data.frame”</p>
|
||||
<p>Because of this additional class, a frequency table prints like the examples above. But the object itself contains the complete table without a row limitation:</p>
|
||||
<div class="sourceCode" id="cb12"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb12-1" data-line-number="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/dim">dim</a></span>(my_df)</a></code></pre></div>
|
||||
<p>[1] 74 5</p>
|
||||
</div>
|
||||
<div id="additional-parameters" class="section level2">
|
||||
<h2 class="hasAnchor">
|
||||
<a href="#additional-parameters" class="anchor"></a>Additional parameters</h2>
|
||||
<div id="parameter-na-rm" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
<a href="#parameter-na-rm" class="anchor"></a>Parameter <code>na.rm</code>
|
||||
</h3>
|
||||
<p>With the <code>na.rm</code> parameter (defaults to <code>TRUE</code>, but they will always be shown into the header), you can include <code>NA</code> values in the frequency table:</p>
|
||||
<div class="sourceCode" id="cb13"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb13-1" data-line-number="1">septic_patients <span class="op">%>%</span></a>
|
||||
<a class="sourceLine" id="cb13-2" data-line-number="2"><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(amox, <span class="dt">na.rm =</span> <span class="ot">FALSE</span>)</a></code></pre></div>
|
||||
<p><strong>Frequency table of <code>amox</code></strong></p>
|
||||
<table class="table">
|
||||
<thead><tr class="header">
|
||||
<th align="left"></th>
|
||||
<th align="left">Item</th>
|
||||
<th align="right">Count</th>
|
||||
<th align="right">Percent</th>
|
||||
<th align="right">Cum. Count</th>
|
||||
<th align="right">Cum. Percent</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td align="left">1</td>
|
||||
<td align="left">(NA)</td>
|
||||
<td align="right">828</td>
|
||||
<td align="right">41.4%</td>
|
||||
<td align="right">828</td>
|
||||
<td align="right">41.4%</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="left">2</td>
|
||||
<td align="left">R</td>
|
||||
<td align="right">683</td>
|
||||
<td align="right">34.2%</td>
|
||||
<td align="right">1,511</td>
|
||||
<td align="right">75.6%</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="left">3</td>
|
||||
<td align="left">S</td>
|
||||
<td align="right">486</td>
|
||||
<td align="right">24.3%</td>
|
||||
<td align="right">1,997</td>
|
||||
<td align="right">99.9%</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="left">4</td>
|
||||
<td align="left">I</td>
|
||||
<td align="right">3</td>
|
||||
<td align="right">0.2%</td>
|
||||
<td align="right">2,000</td>
|
||||
<td align="right">100.0%</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="parameter-row-names" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
<a href="#parameter-row-names" class="anchor"></a>Parameter <code>row.names</code>
|
||||
</h3>
|
||||
<p>The default frequency tables shows row indices. To remove them, use <code>row.names = FALSE</code>:</p>
|
||||
<div class="sourceCode" id="cb14"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb14-1" data-line-number="1">septic_patients <span class="op">%>%</span></a>
|
||||
<a class="sourceLine" id="cb14-2" data-line-number="2"><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(hospital_id, <span class="dt">row.names =</span> <span class="ot">FALSE</span>)</a></code></pre></div>
|
||||
<p><strong>Frequency table of <code>hospital_id</code></strong></p>
|
||||
<table class="table">
|
||||
<thead><tr class="header">
|
||||
<th align="left">Item</th>
|
||||
<th align="right">Count</th>
|
||||
<th align="right">Percent</th>
|
||||
<th align="right">Cum. Count</th>
|
||||
<th align="right">Cum. Percent</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td align="left">D</td>
|
||||
<td align="right">762</td>
|
||||
<td align="right">38.1%</td>
|
||||
<td align="right">762</td>
|
||||
<td align="right">38.1%</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="left">B</td>
|
||||
<td align="right">663</td>
|
||||
<td align="right">33.2%</td>
|
||||
<td align="right">1,425</td>
|
||||
<td align="right">71.3%</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="left">A</td>
|
||||
<td align="right">321</td>
|
||||
<td align="right">16.1%</td>
|
||||
<td align="right">1,746</td>
|
||||
<td align="right">87.3%</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="left">C</td>
|
||||
<td align="right">254</td>
|
||||
<td align="right">12.7%</td>
|
||||
<td align="right">2,000</td>
|
||||
<td align="right">100.0%</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="parameter-markdown" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
<a href="#parameter-markdown" class="anchor"></a>Parameter <code>markdown</code>
|
||||
</h3>
|
||||
<p>The <code>markdown</code> parameter is <code>TRUE</code> at default in non-interactive sessions, like in reports created with R Markdown. This will always print all rows, unless <code>nmax</code> is set.</p>
|
||||
<div class="sourceCode" id="cb15"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb15-1" data-line-number="1">septic_patients <span class="op">%>%</span></a>
|
||||
<a class="sourceLine" id="cb15-2" data-line-number="2"><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(hospital_id, <span class="dt">markdown =</span> <span class="ot">TRUE</span>)</a></code></pre></div>
|
||||
<p><strong>Frequency table of <code>hospital_id</code></strong></p>
|
||||
<table class="table">
|
||||
<thead><tr class="header">
|
||||
<th align="left"></th>
|
||||
<th align="left">Item</th>
|
||||
<th align="right">Count</th>
|
||||
<th align="right">Percent</th>
|
||||
<th align="right">Cum. Count</th>
|
||||
<th align="right">Cum. Percent</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td align="left">1</td>
|
||||
<td align="left">D</td>
|
||||
<td align="right">762</td>
|
||||
<td align="right">38.1%</td>
|
||||
<td align="right">762</td>
|
||||
<td align="right">38.1%</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="left">2</td>
|
||||
<td align="left">B</td>
|
||||
<td align="right">663</td>
|
||||
<td align="right">33.2%</td>
|
||||
<td align="right">1,425</td>
|
||||
<td align="right">71.3%</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="left">3</td>
|
||||
<td align="left">A</td>
|
||||
<td align="right">321</td>
|
||||
<td align="right">16.1%</td>
|
||||
<td align="right">1,746</td>
|
||||
<td align="right">87.3%</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="left">4</td>
|
||||
<td align="left">C</td>
|
||||
<td align="right">254</td>
|
||||
<td align="right">12.7%</td>
|
||||
<td align="right">2,000</td>
|
||||
<td align="right">100.0%</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
|
||||
<div id="tocnav">
|
||||
<h2 class="hasAnchor">
|
||||
<a href="#tocnav" class="anchor"></a>Contents</h2>
|
||||
<ul class="nav nav-pills nav-stacked">
|
||||
<li><a href="#introduction">Introduction</a></li>
|
||||
<li><a href="#frequencies-of-one-variable">Frequencies of one variable</a></li>
|
||||
<li><a href="#frequencies-of-more-than-one-variable">Frequencies of more than one variable</a></li>
|
||||
<li><a href="#frequencies-of-numeric-values">Frequencies of numeric values</a></li>
|
||||
<li><a href="#frequencies-of-factors">Frequencies of factors</a></li>
|
||||
<li><a href="#frequencies-of-dates">Frequencies of dates</a></li>
|
||||
<li><a href="#assigning-a-frequency-table-to-an-object">Assigning a frequency table to an object</a></li>
|
||||
<li><a href="#additional-parameters">Additional parameters</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<footer><div class="copyright">
|
||||
<p>Developed by <a href="https://www.rug.nl/staff/m.s.berends/">Matthijs S. Berends</a>, <a href="https://www.rug.nl/staff/c.f.luz/">Christian F. Luz</a>, <a href="https://www.rug.nl/staff/c.glasner/">Corinna Glasner</a>, <a href="https://www.rug.nl/staff/a.w.friedrich/">Alex W. Friedrich</a>, <a href="https://www.rug.nl/staff/b.sinha/">Bhanu N. M. Sinha</a>.</p>
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/docsearch.js/2.6.1/docsearch.min.js" integrity="sha256-GKvGqXDznoRYHCwKXGnuchvKSwmx9SRMrZOTh2g4Sb0=" crossorigin="anonymous"></script><script>
|
||||
docsearch({
|
||||
|
||||
|
||||
apiKey: 'f737050abfd4d726c63938e18f8c496e',
|
||||
indexName: 'amr',
|
||||
inputSelector: 'input#search-input.form-control',
|
||||
transformData: function(hits) {
|
||||
return hits.map(function (hit) {
|
||||
hit.url = updateHitURL(hit);
|
||||
return hit;
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -47,7 +47,7 @@
|
||||
<script src="../extra.js"></script>
|
||||
<meta property="og:title" content="Articles" />
|
||||
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -91,12 +91,65 @@
|
||||
Home
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
<span class="fa fa-question-circle"></span>
|
||||
|
||||
How to
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="../articles/AMR.html">
|
||||
<span class="fa fa-directions"></span>
|
||||
|
||||
Get Started
|
||||
Conduct AMR analysis
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/Predict.html">
|
||||
<span class="fa fa-dice"></span>
|
||||
|
||||
Predict antimicrobial resistance
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/EUCAST.html">
|
||||
<span class="fa fa-exchange-alt"></span>
|
||||
|
||||
Apply EUCAST rules
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/mo_property.html">
|
||||
<span class="fa fa-bug"></span>
|
||||
|
||||
Get properties of a microorganism
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/ab_property.html">
|
||||
<span class="fa fa-capsules"></span>
|
||||
|
||||
Get properties of an antibiotic
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/freq.html">
|
||||
<span class="fa fa-sort-amount-down"></span>
|
||||
|
||||
Create frequency tables
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/G_test.html">
|
||||
<span class="fa fa-clipboard-check"></span>
|
||||
|
||||
Use the G-test
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../reference/">
|
||||
@@ -119,17 +172,17 @@
|
||||
Changelog
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="https://gitlab.com/msberends/AMR">
|
||||
<span class="fab fa fab fa-gitlab"></span>
|
||||
|
||||
Source Code
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<li>
|
||||
<a href="../LICENSE-text.html">
|
||||
<span class="fa fa-book"></span>
|
||||
|
||||
@@ -162,7 +215,13 @@
|
||||
<p class="section-desc"></p>
|
||||
|
||||
<ul>
|
||||
<li><a href="AMR.html">The AMR package - How to conduct AMR analysis</a></li>
|
||||
<li><a href="AMR.html">How to conduct AMR analysis</a></li>
|
||||
<li><a href="EUCAST.html">How to apply EUCAST rules</a></li>
|
||||
<li><a href="G_test.html">How to use the *G*-test</a></li>
|
||||
<li><a href="Predict.html">How to predict antimicrobial resistance</a></li>
|
||||
<li><a href="ab_property.html">How to get properties of an antibiotic</a></li>
|
||||
<li><a href="freq.html">How to create frequency tables</a></li>
|
||||
<li><a href="mo_property.html">How to get properties of a microorganism</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
218
docs/articles/mo_property.html
Normal file
@@ -0,0 +1,218 @@
|
||||
<!DOCTYPE html>
|
||||
<!-- Generated by pkgdown: do not edit by hand --><html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>How to get properties of a microorganism • AMR (for R)</title>
|
||||
<!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png">
|
||||
<link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png">
|
||||
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png">
|
||||
<!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script><!-- Bootstrap --><link href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.3.7/flatly/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous">
|
||||
<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script><!-- sticky kit --><script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet">
|
||||
<script src="../pkgdown.js"></script><!-- docsearch --><script src="../docsearch.js"></script><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/docsearch.js/2.6.1/docsearch.min.css" integrity="sha256-QOSRU/ra9ActyXkIBbiIB144aDBdtvXBcNc3OTNuX/Q=" crossorigin="anonymous">
|
||||
<link href="../docsearch.css" rel="stylesheet">
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/jquery.mark.min.js" integrity="sha256-4HLtjeVgH0eIB3aZ9mLYF6E8oU5chNdjU6p6rrXpl9U=" crossorigin="anonymous"></script><link href="../extra.css" rel="stylesheet">
|
||||
<script src="../extra.js"></script><meta property="og:title" content="How to get properties of a microorganism">
|
||||
<meta property="og:description" content="">
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png">
|
||||
<meta name="twitter:card" content="summary">
|
||||
<!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
<body>
|
||||
<div class="container template-article">
|
||||
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div id="navbar" class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li>
|
||||
<a href="../index.html">
|
||||
<span class="fa fa-home"></span>
|
||||
|
||||
Home
|
||||
</a>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
<span class="fa fa-question-circle"></span>
|
||||
|
||||
How to
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="../articles/AMR.html">
|
||||
<span class="fa fa-directions"></span>
|
||||
|
||||
Conduct AMR analysis
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/Predict.html">
|
||||
<span class="fa fa-dice"></span>
|
||||
|
||||
Predict antimicrobial resistance
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/EUCAST.html">
|
||||
<span class="fa fa-exchange-alt"></span>
|
||||
|
||||
Apply EUCAST rules
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/mo_property.html">
|
||||
<span class="fa fa-bug"></span>
|
||||
|
||||
Get properties of a microorganism
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/ab_property.html">
|
||||
<span class="fa fa-capsules"></span>
|
||||
|
||||
Get properties of an antibiotic
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/freq.html">
|
||||
<span class="fa fa-sort-amount-down"></span>
|
||||
|
||||
Create frequency tables
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/G_test.html">
|
||||
<span class="fa fa-clipboard-check"></span>
|
||||
|
||||
Use the G-test
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../reference/">
|
||||
<span class="fa fa-book-open"></span>
|
||||
|
||||
Manual
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../authors.html">
|
||||
<span class="fa fa-users"></span>
|
||||
|
||||
Authors
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../news/">
|
||||
<span class="far fa far fa-newspaper"></span>
|
||||
|
||||
Changelog
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="https://gitlab.com/msberends/AMR">
|
||||
<span class="fab fa fab fa-gitlab"></span>
|
||||
|
||||
Source Code
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../LICENSE-text.html">
|
||||
<span class="fa fa-book"></span>
|
||||
|
||||
Licence
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<form class="navbar-form navbar-right" role="search">
|
||||
<div class="form-group">
|
||||
<input type="search" class="form-control" name="search-input" id="search-input" placeholder="Search..." aria-label="Search for..." autocomplete="off">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<!--/.nav-collapse -->
|
||||
</div>
|
||||
<!--/.container -->
|
||||
</div>
|
||||
<!--/.navbar -->
|
||||
|
||||
|
||||
</header><div class="row">
|
||||
<div class="col-md-9 contents">
|
||||
<div class="page-header toc-ignore">
|
||||
<h1>How to get properties of a microorganism</h1>
|
||||
<h4 class="author">Matthijs S. Berends</h4>
|
||||
|
||||
|
||||
|
||||
<div class="hidden name"><code>mo_property.Rmd</code></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<p><em>(will be available soon)</em></p>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<footer><div class="copyright">
|
||||
<p>Developed by <a href="https://www.rug.nl/staff/m.s.berends/">Matthijs S. Berends</a>, <a href="https://www.rug.nl/staff/c.f.luz/">Christian F. Luz</a>, <a href="https://www.rug.nl/staff/c.glasner/">Corinna Glasner</a>, <a href="https://www.rug.nl/staff/a.w.friedrich/">Alex W. Friedrich</a>, <a href="https://www.rug.nl/staff/b.sinha/">Bhanu N. M. Sinha</a>.</p>
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/docsearch.js/2.6.1/docsearch.min.js" integrity="sha256-GKvGqXDznoRYHCwKXGnuchvKSwmx9SRMrZOTh2g4Sb0=" crossorigin="anonymous"></script><script>
|
||||
docsearch({
|
||||
|
||||
|
||||
apiKey: 'f737050abfd4d726c63938e18f8c496e',
|
||||
indexName: 'amr',
|
||||
inputSelector: 'input#search-input.form-control',
|
||||
transformData: function(hits) {
|
||||
return hits.map(function (hit) {
|
||||
hit.url = updateHitURL(hit);
|
||||
return hit;
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -47,7 +47,7 @@
|
||||
<script src="extra.js"></script>
|
||||
<meta property="og:title" content="Authors" />
|
||||
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -91,12 +91,65 @@
|
||||
Home
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
<span class="fa fa-question-circle"></span>
|
||||
|
||||
How to
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="articles/AMR.html">
|
||||
<span class="fa fa-directions"></span>
|
||||
|
||||
Get Started
|
||||
Conduct AMR analysis
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="articles/Predict.html">
|
||||
<span class="fa fa-dice"></span>
|
||||
|
||||
Predict antimicrobial resistance
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="articles/EUCAST.html">
|
||||
<span class="fa fa-exchange-alt"></span>
|
||||
|
||||
Apply EUCAST rules
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="articles/mo_property.html">
|
||||
<span class="fa fa-bug"></span>
|
||||
|
||||
Get properties of a microorganism
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="articles/ab_property.html">
|
||||
<span class="fa fa-capsules"></span>
|
||||
|
||||
Get properties of an antibiotic
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="articles/freq.html">
|
||||
<span class="fa fa-sort-amount-down"></span>
|
||||
|
||||
Create frequency tables
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="articles/G_test.html">
|
||||
<span class="fa fa-clipboard-check"></span>
|
||||
|
||||
Use the G-test
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="reference/">
|
||||
@@ -119,17 +172,17 @@
|
||||
Changelog
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="https://gitlab.com/msberends/AMR">
|
||||
<span class="fab fa fab fa-gitlab"></span>
|
||||
|
||||
Source Code
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<li>
|
||||
<a href="LICENSE-text.html">
|
||||
<span class="fa fa-book"></span>
|
||||
|
||||
|
||||
@@ -2,21 +2,21 @@
|
||||
"index_name": "amr",
|
||||
"start_urls": [
|
||||
{
|
||||
"url": "https://msberends.gitlab.io/index.html",
|
||||
"url": "https://msberends.gitlab.io/AMR/index.html",
|
||||
"selectors_key": "homepage",
|
||||
"tags": [
|
||||
"homepage"
|
||||
]
|
||||
},
|
||||
{
|
||||
"url": "https://msberends.gitlab.io/reference",
|
||||
"url": "https://msberends.gitlab.io/AMR/reference",
|
||||
"selectors_key": "reference",
|
||||
"tags": [
|
||||
"reference"
|
||||
]
|
||||
},
|
||||
{
|
||||
"url": "https://msberends.gitlab.io/articles",
|
||||
"url": "https://msberends.gitlab.io/AMR/articles",
|
||||
"selectors_key": "articles",
|
||||
"tags": [
|
||||
"articles"
|
||||
@@ -30,7 +30,7 @@
|
||||
"/articles/index.html"
|
||||
],
|
||||
"sitemap_urls": [
|
||||
"https://msberends.gitlab.io/sitemap.xml"
|
||||
"https://msberends.gitlab.io/AMR/sitemap.xml"
|
||||
],
|
||||
"selectors": {
|
||||
"homepage": {
|
||||
|
||||
@@ -1,3 +1,26 @@
|
||||
/*
|
||||
# ==================================================================== #
|
||||
# TITLE #
|
||||
# Antimicrobial Resistance (AMR) Analysis #
|
||||
# #
|
||||
# SOURCE #
|
||||
# https://gitlab.com/msberends/AMR #
|
||||
# #
|
||||
# LICENCE #
|
||||
# (c) 2019 Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# #
|
||||
# This R package is free software; you can freely use and distribute #
|
||||
# it for both personal and commercial purposes under the terms of the #
|
||||
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
|
||||
# the Free Software Foundation. #
|
||||
# #
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
*/
|
||||
|
||||
/* class for footer */
|
||||
.university {
|
||||
background-image: url(logo_rug.png);
|
||||
@@ -11,13 +34,26 @@
|
||||
font-family: "Font Awesome 5 Brands" !important;
|
||||
}
|
||||
|
||||
/* make colour darker and better readable for links */
|
||||
code a, pre a,
|
||||
code a:hover, pre a:hover {
|
||||
color: #128f76;
|
||||
/* Remove the 'Read more on our website!' part from the manual pages */
|
||||
#read-more-on-our-website-,
|
||||
#read-more-on-our-website- + p,
|
||||
li a[href="#read-more-on-our-website-"] {
|
||||
display: none;
|
||||
}
|
||||
a,
|
||||
a:hover {
|
||||
|
||||
/* make colour darker and better readable for links */
|
||||
code a, code a:hover, code a:focus,
|
||||
pre a, pre a:hover, pre a:focus,
|
||||
a, a:hover, a:focus {
|
||||
/* do not set colour to element without href attribute, they aren't links! */
|
||||
color: black;
|
||||
}
|
||||
a[href], a[href]:hover, a[href]:focus,
|
||||
code a[href], code a[href]:hover, code a[href]:focus,
|
||||
pre a[href], pre a[href]:hover, pre a[href]:focus,
|
||||
a code[href], a code[href]:hover, a code[href]:focus,
|
||||
a pre[href], a pre[href]:hover, a pre[href]:focus {
|
||||
/* adjusted colour for all real links; having href attribute */
|
||||
color: #128f76;
|
||||
}
|
||||
|
||||
@@ -74,6 +110,11 @@ help {
|
||||
#navbar .fas {
|
||||
margin-right: 5px;
|
||||
}
|
||||
#navbar li.dropdown li .fa {
|
||||
font-size: 120%;
|
||||
width: 24px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* tables */
|
||||
.table {
|
||||
|
||||
@@ -1,11 +1,40 @@
|
||||
/*
|
||||
# ==================================================================== #
|
||||
# TITLE #
|
||||
# Antimicrobial Resistance (AMR) Analysis #
|
||||
# #
|
||||
# SOURCE #
|
||||
# https://gitlab.com/msberends/AMR #
|
||||
# #
|
||||
# LICENCE #
|
||||
# (c) 2019 Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
|
||||
# #
|
||||
# This R package is free software; you can freely use and distribute #
|
||||
# it for both personal and commercial purposes under the terms of the #
|
||||
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
|
||||
# the Free Software Foundation. #
|
||||
# #
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
*/
|
||||
|
||||
// Keep GitLab as original source
|
||||
// window.location.replace("github", "gitlab");
|
||||
|
||||
// Add updated Font Awesome 5.6.3 library
|
||||
$('head').append('<!-- Updated Font Awesome library --><link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">');
|
||||
|
||||
/* edit footer */
|
||||
// Edit footer
|
||||
$( document ).ready(function() {
|
||||
$('footer').html('<p>' +
|
||||
$('footer .copyright p').html().replace("Developed by",
|
||||
"<code>AMR</code> (for R). Developed at the University of Groningen.<br>Authors:") +
|
||||
'</p>');
|
||||
//$('footer').prepend("<div class='university'/>");
|
||||
//$('footer').prepend("<div class='university'/>");
|
||||
|
||||
// Edit title of manual
|
||||
$('.template-reference-index h1').text('Manual');
|
||||
});
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<meta property="og:description" content="Functions to simplify the analysis and prediction of Antimicrobial
|
||||
Resistance (AMR) and to work with microbial and antimicrobial properties by
|
||||
using evidence-based methods.">
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/logo.png">
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png">
|
||||
<meta name="twitter:card" content="summary">
|
||||
<!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
@@ -42,7 +42,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -55,12 +55,65 @@
|
||||
Home
|
||||
</a>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
<span class="fa fa-question-circle"></span>
|
||||
|
||||
How to
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="articles/AMR.html">
|
||||
<span class="fa fa-directions"></span>
|
||||
|
||||
Get Started
|
||||
Conduct AMR analysis
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="articles/Predict.html">
|
||||
<span class="fa fa-dice"></span>
|
||||
|
||||
Predict antimicrobial resistance
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="articles/EUCAST.html">
|
||||
<span class="fa fa-exchange-alt"></span>
|
||||
|
||||
Apply EUCAST rules
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="articles/mo_property.html">
|
||||
<span class="fa fa-bug"></span>
|
||||
|
||||
Get properties of a microorganism
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="articles/ab_property.html">
|
||||
<span class="fa fa-capsules"></span>
|
||||
|
||||
Get properties of an antibiotic
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="articles/freq.html">
|
||||
<span class="fa fa-sort-amount-down"></span>
|
||||
|
||||
Create frequency tables
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="articles/G_test.html">
|
||||
<span class="fa fa-clipboard-check"></span>
|
||||
|
||||
Use the G-test
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="reference/">
|
||||
@@ -83,6 +136,8 @@
|
||||
Changelog
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="https://gitlab.com/msberends/AMR">
|
||||
<span class="fab fa fab fa-gitlab"></span>
|
||||
@@ -90,8 +145,6 @@
|
||||
Source Code
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="LICENSE-text.html">
|
||||
<span class="fa fa-book"></span>
|
||||
@@ -162,13 +215,13 @@
|
||||
<h3 class="hasAnchor">
|
||||
<a href="#get-this-package" class="anchor"></a>Get this package</h3>
|
||||
<p>This package is available on the official R network. Install this package in R with:</p>
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw"><a href="https://www.rdocumentation.org/packages/utils/topics/install.packages">install.packages</a></span>(<span class="st">"AMR"</span>)</code></pre></div>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" data-line-number="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/utils/topics/install.packages">install.packages</a></span>(<span class="st">"AMR"</span>)</a></code></pre></div>
|
||||
<p>It will be downloaded and installed automatically.</p>
|
||||
</div>
|
||||
<div id="get-started" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
<a href="#get-started" class="anchor"></a>Get started</h3>
|
||||
<p>To find out how to conduct AMR analysis, please <a href="./articles/AMR.html">continue reading here to get started</a> or click the button ‘Get Started’ in the top menu.</p>
|
||||
<p>To find out how to conduct AMR analysis, please <a href="./articles/AMR.html">continue reading here to get started</a> or click the links in the ‘How to’ menu.</p>
|
||||
</div>
|
||||
<div id="short-introduction" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
@@ -178,17 +231,17 @@
|
||||
<p>All (sub)species from <strong>the taxonomic kingdoms Bacteria, Fungi and Protozoa are included in this package</strong>, as well as all previously accepted names known to ITIS. Furthermore, the responsible authors and year of publication are available. This allows users to use authoritative taxonomic information for their data analysis on any microorganism, not only human pathogens. It also helps to quickly determine the Gram stain of bacteria, since all bacteria are classified into subkingdom Negibacteria or Posibacteria. ITIS is a partnership of U.S., Canadian, and Mexican agencies and taxonomic specialists.</p>
|
||||
<p>The <code>AMR</code> package basically does four important things:</p>
|
||||
<ol>
|
||||
<li>It <strong>cleanses existing data</strong>, by transforming it to reproducible and profound <em>classes</em>, making the most efficient use of R. These functions all use artificial intelligence to guess results that you would expect:</li>
|
||||
</ol>
|
||||
<li>
|
||||
<p>It <strong>cleanses existing data</strong>, by transforming it to reproducible and profound <em>classes</em>, making the most efficient use of R. These functions all use artificial intelligence to guess results that you would expect:</p>
|
||||
<ul>
|
||||
<li>Use <code><a href="reference/as.mo.html">as.mo()</a></code> to get an ID of a microorganism. The IDs are human readable for the trained eye - the ID of <em>Klebsiella pneumoniae</em> is “B_KLBSL_PNE” (B stands for Bacteria) and the ID of <em>S. aureus</em> is “B_STPHY_AUR”. The function takes almost any text as input that looks like the name or code of a microorganism like “E. coli”, “esco” and “esccol”. Even <code><a href="reference/as.mo.html">as.mo("MRSA")</a></code> will return the ID of <em>S. aureus</em>. Moreover, it can group all coagulase negative and positive <em>Staphylococci</em>, and can transform <em>Streptococci</em> into Lancefield groups. To find bacteria based on your input, it uses Artificial Intelligence to look up values in the included ITIS data, consisting of more than 18,000 microorganisms.</li>
|
||||
<li>Use <code><a href="reference/as.rsi.html">as.rsi()</a></code> to transform values to valid antimicrobial results. It produces just S, I or R based on your input and warns about invalid values. Even values like “<=0.002; S” (combined MIC/RSI) will result in “S”.</li>
|
||||
<li>Use <code><a href="reference/as.mic.html">as.mic()</a></code> to cleanse your MIC values. It produces a so-called factor (called <em>ordinal</em> in SPSS) with valid MIC values as levels. A value like “<=0.002; S” (combined MIC/RSI) will result in “<=0.002”.</li>
|
||||
<li>Use <code><a href="reference/as.atc.html">as.atc()</a></code> to get the ATC code of an antibiotic as defined by the WHO. This package contains a database with most LIS codes, official names, DDDs and even trade names of antibiotics. For example, the values “Furabid”, “Furadantin”, “nitro” all return the ATC code of Nitrofurantoine.</li>
|
||||
</ul>
|
||||
<ol>
|
||||
<li>It <strong>enhances existing data</strong> and <strong>adds new data</strong> from data sets included in this package.</li>
|
||||
</ol>
|
||||
</li>
|
||||
<li>
|
||||
<p>It <strong>enhances existing data</strong> and <strong>adds new data</strong> from data sets included in this package.</p>
|
||||
<ul>
|
||||
<li>Use <code><a href="reference/eucast_rules.html">eucast_rules()</a></code> to apply <a href="http://www.eucast.org/expert_rules_and_intrinsic_resistance/">EUCAST expert rules to isolates</a>.</li>
|
||||
<li>Use <code><a href="reference/first_isolate.html">first_isolate()</a></code> to identify the first isolates of every patient <a href="https://clsi.org/standards/products/microbiology/documents/m39/">using guidelines from the CLSI</a> (Clinical and Laboratory Standards Institute).
|
||||
@@ -200,9 +253,9 @@
|
||||
<li>The data set <code>microorganisms</code> contains the complete taxonomic tree of more than 18,000 microorganisms (bacteria, fungi/yeasts and protozoa). Furthermore, the colloquial name and Gram stain are available, which enables resistance analysis of e.g. different antibiotics per Gram stain. The package also contains functions to look up values in this data set like <code><a href="reference/mo_property.html">mo_genus()</a></code>, <code><a href="reference/mo_property.html">mo_family()</a></code>, <code><a href="reference/mo_property.html">mo_gramstain()</a></code> or even <code><a href="reference/mo_property.html">mo_phylum()</a></code>. As they use <code><a href="reference/as.mo.html">as.mo()</a></code> internally, they also use artificial intelligence. For example, <code><a href="reference/mo_property.html">mo_genus("MRSA")</a></code> and <code><a href="reference/mo_property.html">mo_genus("S. aureus")</a></code> will both return <code>"Staphylococcus"</code>. They also come with support for German, Dutch, Spanish, Italian, French and Portuguese. These functions can be used to add new variables to your data.</li>
|
||||
<li>The data set <code>antibiotics</code> contains the ATC code, LIS codes, official name, trivial name and DDD of both oral and parenteral administration. It also contains a total of 298 trade names. Use functions like <code><a href="reference/ab_property.html">ab_name()</a></code> and <code><a href="reference/ab_property.html">ab_tradenames()</a></code> to look up values. The <code>ab_*</code> functions use <code><a href="reference/as.atc.html">as.atc()</a></code> internally so they support AI to guess your expected result. For example, <code><a href="reference/ab_property.html">ab_name("Fluclox")</a></code>, <code><a href="reference/ab_property.html">ab_name("Floxapen")</a></code> and <code><a href="reference/ab_property.html">ab_name("J01CF05")</a></code> will all return <code>"Flucloxacillin"</code>. These functions can again be used to add new variables to your data.</li>
|
||||
</ul>
|
||||
<ol>
|
||||
<li>It <strong>analyses the data</strong> with convenient functions that use well-known methods.</li>
|
||||
</ol>
|
||||
</li>
|
||||
<li>
|
||||
<p>It <strong>analyses the data</strong> with convenient functions that use well-known methods.</p>
|
||||
<ul>
|
||||
<li>Calculate the resistance (and even co-resistance) of microbial isolates with the <code><a href="reference/portion.html">portion_R()</a></code>, <code><a href="reference/portion.html">portion_IR()</a></code>, <code><a href="reference/portion.html">portion_I()</a></code>, <code><a href="reference/portion.html">portion_SI()</a></code> and <code><a href="reference/portion.html">portion_S()</a></code> functions. Similarly, the <em>number</em> of isolates can be determined with the <code><a href="reference/count.html">count_R()</a></code>, <code><a href="reference/count.html">count_IR()</a></code>, <code><a href="reference/count.html">count_I()</a></code>, <code><a href="reference/count.html">count_SI()</a></code> and <code><a href="reference/count.html">count_S()</a></code> functions. All these functions can be used <a href="https://dplyr.tidyverse.org/#usage">with the <code>dplyr</code> package</a> (e.g. in conjunction with <a href="https://dplyr.tidyverse.org/reference/summarise.html"><code>summarise</code></a>)</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>
|
||||
@@ -210,9 +263,9 @@
|
||||
<li>Conduct descriptive statistics to enhance base R: calculate <code><a href="reference/kurtosis.html">kurtosis()</a></code>, <code><a href="reference/skewness.html">skewness()</a></code> and create frequency tables with <code><a href="reference/freq.html">freq()</a></code>
|
||||
</li>
|
||||
</ul>
|
||||
<ol>
|
||||
<li>It <strong>teaches the user</strong> how to use all the above actions.</li>
|
||||
</ol>
|
||||
</li>
|
||||
<li>
|
||||
<p>It <strong>teaches the user</strong> how to use all the above actions.</p>
|
||||
<ul>
|
||||
<li>The package contains extensive help pages with many examples.</li>
|
||||
<li>It also contains an example data set called <code>septic_patients</code>. This data set contains:
|
||||
@@ -223,6 +276,8 @@
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ol>
|
||||
<hr>
|
||||
<p><a href="https://www.rug.nl"><img src="./logo_rug.png" height="60px"></a> <a href="https://www.umcg.nl"><img src="./logo_umcg.png" height="60px"></a> <a href="https://www.certe.nl"><img src="./logo_certe.png" height="60px"></a> <a href="http://www.eurhealth-1health.eu"><img src="./logo_eh1h.png" height="60px"></a> <a href="http://www.eurhealth-1health.eu"><img src="./logo_interreg.png" height="60px"></a></p>
|
||||
</div>
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
<script src="../extra.js"></script>
|
||||
<meta property="og:title" content="Changelog" />
|
||||
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -91,12 +91,65 @@
|
||||
Home
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
<span class="fa fa-question-circle"></span>
|
||||
|
||||
How to
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="../articles/AMR.html">
|
||||
<span class="fa fa-directions"></span>
|
||||
|
||||
Get Started
|
||||
Conduct AMR analysis
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/Predict.html">
|
||||
<span class="fa fa-dice"></span>
|
||||
|
||||
Predict antimicrobial resistance
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/EUCAST.html">
|
||||
<span class="fa fa-exchange-alt"></span>
|
||||
|
||||
Apply EUCAST rules
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/mo_property.html">
|
||||
<span class="fa fa-bug"></span>
|
||||
|
||||
Get properties of a microorganism
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/ab_property.html">
|
||||
<span class="fa fa-capsules"></span>
|
||||
|
||||
Get properties of an antibiotic
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/freq.html">
|
||||
<span class="fa fa-sort-amount-down"></span>
|
||||
|
||||
Create frequency tables
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/G_test.html">
|
||||
<span class="fa fa-clipboard-check"></span>
|
||||
|
||||
Use the G-test
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../reference/">
|
||||
@@ -119,17 +172,17 @@
|
||||
Changelog
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="https://gitlab.com/msberends/AMR">
|
||||
<span class="fab fa fab fa-gitlab"></span>
|
||||
|
||||
Source Code
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<li>
|
||||
<a href="../LICENSE-text.html">
|
||||
<span class="fa fa-book"></span>
|
||||
|
||||
@@ -169,15 +222,29 @@
|
||||
<ul>
|
||||
<li>
|
||||
<strong>BREAKING</strong>: removed deprecated functions, parameters and references to ‘bactid’. Use <code><a href="../reference/as.mo.html">as.mo()</a></code> to identify an MO code.</li>
|
||||
<li>New website: <a href="https://msberends.gitlab.io/AMR" class="uri">https://msberends.gitlab.io/AMR</a> (built with the great <a href="https://pkgdown.r-lib.org/"><code>pkgdown</code></a>)</li>
|
||||
<li>New website: <a href="https://msberends.gitlab.io/AMR" class="uri">https://msberends.gitlab.io/AMR</a> (built with the great <a href="https://pkgdown.r-lib.org/"><code>pkgdown</code></a>)
|
||||
<ul>
|
||||
<li>Contains the complete manual of this package and all of its functions with an explanation of their parameters</li>
|
||||
<li>Contains a comprehensive tutorial about how to conduct antimicrobial resistance analysis</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Support for <a href="https://dplyr.tidyverse.org"><code>dplyr</code></a> version 0.8.0</li>
|
||||
<li>Function <code><a href="../reference/mo_failures.html">mo_failures()</a></code> to review values that could not be coerced to a valid MO code, using <code><a href="../reference/as.mo.html">as.mo()</a></code>. This latter function will now only show a maximum of 25 uncoerced values.</li>
|
||||
<li>Function <code><a href="../reference/mo_renamed.html">mo_renamed()</a></code> to get a list of all returned values from <code><a href="../reference/as.mo.html">as.mo()</a></code> that have had taxonomic renaming</li>
|
||||
<li>Function <code><a href="../reference/age.html">age()</a></code> to calculate the (patients) age in years</li>
|
||||
<li>Function <code><a href="../reference/age_groups.html">age_groups()</a></code> to split ages into custom or predefined groups (like children or elderly). This allows for easier demographic antimicrobial resistance analysis per age group.</li>
|
||||
<li>Functions <code><a href="../reference/first_isolate.html">filter_first_isolate()</a></code> and <code><a href="../reference/first_isolate.html">filter_first_weighted_isolate()</a></code> to shorten and fasten filtering on data sets with antimicrobial results, e.g.: <code>r septic_patients %>% filter_first_isolate() # or filter_first_isolate(septic_patients)</code> is equal to: <code>r septic_patients %>% mutate(only_firsts = first_isolate(septic_patients, ...)) %>% filter(only_firsts == TRUE) %>% select(-only_firsts)</code>
|
||||
<li>
|
||||
<p>Functions <code><a href="../reference/first_isolate.html">filter_first_isolate()</a></code> and <code><a href="../reference/first_isolate.html">filter_first_weighted_isolate()</a></code> to shorten and fasten filtering on data sets with antimicrobial results, e.g.:</p>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" data-line-number="1">septic_patients <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/first_isolate.html">filter_first_isolate</a></span>()</a>
|
||||
<a class="sourceLine" id="cb1-2" data-line-number="2"><span class="co"># or</span></a>
|
||||
<a class="sourceLine" id="cb1-3" data-line-number="3"><span class="kw"><a href="../reference/first_isolate.html">filter_first_isolate</a></span>(septic_patients)</a></code></pre></div>
|
||||
<p>is equal to:</p>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb2-1" data-line-number="1">septic_patients <span class="op">%>%</span></a>
|
||||
<a class="sourceLine" id="cb2-2" data-line-number="2"><span class="st"> </span><span class="kw">mutate</span>(<span class="dt">only_firsts =</span> <span class="kw"><a href="../reference/first_isolate.html">first_isolate</a></span>(septic_patients, ...)) <span class="op">%>%</span></a>
|
||||
<a class="sourceLine" id="cb2-3" data-line-number="3"><span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/stats/topics/filter">filter</a></span>(only_firsts <span class="op">==</span><span class="st"> </span><span class="ot">TRUE</span>) <span class="op">%>%</span></a>
|
||||
<a class="sourceLine" id="cb2-4" data-line-number="4"><span class="st"> </span><span class="kw">select</span>(<span class="op">-</span>only_firsts)</a></code></pre></div>
|
||||
</li>
|
||||
<li><p>New vignettes about how to conduct AMR analysis, predict antimicrobial resistance, use the <em>G</em>-test and more. These are also available (and even easier readable) on our website: <a href="https://msberends.gitlab.io/AMR" class="uri">https://msberends.gitlab.io/AMR</a>.</p></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="changed" class="section level4">
|
||||
@@ -185,7 +252,8 @@
|
||||
<a href="#changed" class="anchor"></a>Changed</h4>
|
||||
<ul>
|
||||
<li>Fixed a critical bug in <code><a href="../reference/eucast_rules.html">eucast_rules()</a></code> where some rules that depend on previous applied rules would not be applied adequately</li>
|
||||
<li>Improvements for <code><a href="../reference/as.mo.html">as.mo()</a></code>:</li>
|
||||
<li>Improvements for <code><a href="../reference/as.mo.html">as.mo()</a></code>:
|
||||
<ul>
|
||||
<li>Finds better results when input is in other languages</li>
|
||||
<li>Better handling for subspecies</li>
|
||||
<li>Better handling for <em>Salmonellae</em>
|
||||
@@ -194,12 +262,17 @@
|
||||
<li>Manual now contains more info about the algorithms</li>
|
||||
<li>Progress bar will be shown when it takes more than 3 seconds to get results</li>
|
||||
<li>Support for formatted console text</li>
|
||||
<li>Function <code><a href="../reference/first_isolate.html">first_isolate()</a></code>:</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Function <code><a href="../reference/first_isolate.html">first_isolate()</a></code>:
|
||||
<ul>
|
||||
<li>Fixed a bug where distances between dates would not be calculated right - in the <code>septic_patients</code> data set this yielded a difference of 0.15% more isolates</li>
|
||||
<li>Will now use a column named like “patid” for the patient ID (parameter <code>col_patientid</code>), when this parameter was left blank</li>
|
||||
<li>Will now use a column named like “key(…)ab” or “key(…)antibiotics” for the key antibiotics (parameter <code>col_keyantibiotics()</code>), when this parameter was left blank</li>
|
||||
<li>Removed parameter <code>output_logical</code>, the function will now always return a logical value</li>
|
||||
<li>Renamed parameter <code>filter_specimen</code> to <code>specimen_group</code>, although using <code>filter_specimen</code> will still work</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>A note to the manual pages of the <code>portion</code> functions, that low counts can influence the outcome and that the <code>portion</code> functions may camouflage this, since they only return the portion (albeit being dependent on the <code>minimum</code> parameter)</li>
|
||||
<li>Function <code><a href="../reference/mo_property.html">mo_taxonomy()</a></code> now contains the kingdom too</li>
|
||||
<li>Reduce false positives for <code><a href="../reference/as.rsi.html">is.rsi.eligible()</a></code>
|
||||
@@ -208,7 +281,8 @@
|
||||
</li>
|
||||
<li>Small text updates to summaries of class <code>rsi</code> and <code>mic</code>
|
||||
</li>
|
||||
<li>Frequency tables (<code><a href="../reference/freq.html">freq()</a></code> function):</li>
|
||||
<li>Frequency tables (<code><a href="../reference/freq.html">freq()</a></code> function):
|
||||
<ul>
|
||||
<li>Header info is now available as a list, with the <code>header</code> function</li>
|
||||
<li>Added header info for class <code>mo</code> to show unique count of families, genera and species</li>
|
||||
<li>Now honours the <code>decimal.mark</code> setting, which just like <code>format</code> defaults to <code><a href="https://www.rdocumentation.org/packages/base/topics/options">getOption("OutDec")</a></code>
|
||||
@@ -218,6 +292,8 @@
|
||||
</li>
|
||||
<li>New parameter <code>droplevels</code> to exclude empty factor levels when input is a factor</li>
|
||||
<li>Factor levels will be in header when present in input data</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Function <code><a href="../reference/ggplot_rsi.html">scale_y_percent()</a></code> now contains the <code>limits</code> parameter</li>
|
||||
<li>Automatic parameter filling for <code><a href="../reference/mdro.html">mdro()</a></code>, <code><a href="../reference/key_antibiotics.html">key_antibiotics()</a></code> and <code><a href="../reference/eucast_rules.html">eucast_rules()</a></code>
|
||||
</li>
|
||||
@@ -259,7 +335,8 @@
|
||||
</li>
|
||||
<li>
|
||||
<code>EUCAST_rules</code> was renamed to <code>eucast_rules</code>, the old function still exists as a deprecated function</li>
|
||||
<li>Big changes to the <code>eucast_rules</code> function:</li>
|
||||
<li>Big changes to the <code>eucast_rules</code> function:
|
||||
<ul>
|
||||
<li>Now also applies rules from the EUCAST ‘Breakpoint tables for bacteria’, version 8.1, 2018, <a href="http://www.eucast.org/clinical_breakpoints/" class="uri">http://www.eucast.org/clinical_breakpoints/</a> (see Source of the function)</li>
|
||||
<li>New parameter <code>rules</code> to specify which rules should be applied (expert rules, breakpoints, others or all)</li>
|
||||
<li>New parameter <code>verbose</code> which can be set to <code>TRUE</code> to get very specific messages about which columns and rows were affected</li>
|
||||
@@ -268,11 +345,18 @@
|
||||
<li>Data set <code>septic_patients</code> now reflects these changes</li>
|
||||
<li>Added parameter <code>pipe</code> for piperacillin (J01CA12), also to the <code>mdro</code> function</li>
|
||||
<li>Small fixes to EUCAST clinical breakpoint rules</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Added column <code>kingdom</code> to the microorganisms data set, and function <code>mo_kingdom</code> to look up values</li>
|
||||
<li>Tremendous speed improvement for <code>as.mo</code> (and subsequently all <code>mo_*</code> functions), as empty values wil be ignored <em>a priori</em>
|
||||
</li>
|
||||
<li>Fewer than 3 characters as input for <code>as.mo</code> will return NA</li>
|
||||
<li>Function <code>as.mo</code> (and all <code>mo_*</code> wrappers) now supports genus abbreviations with “species” attached <code>r as.mo("E. species") # B_ESCHR mo_fullname("E. spp.") # "Escherichia species" as.mo("S. spp") # B_STPHY mo_fullname("S. species") # "Staphylococcus species"</code>
|
||||
<li>
|
||||
<p>Function <code>as.mo</code> (and all <code>mo_*</code> wrappers) now supports genus abbreviations with “species” attached</p>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb3-1" data-line-number="1"><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"E. species"</span>) <span class="co"># B_ESCHR</span></a>
|
||||
<a class="sourceLine" id="cb3-2" data-line-number="2"><span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"E. spp."</span>) <span class="co"># "Escherichia species"</span></a>
|
||||
<a class="sourceLine" id="cb3-3" data-line-number="3"><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"S. spp"</span>) <span class="co"># B_STPHY</span></a>
|
||||
<a class="sourceLine" id="cb3-4" data-line-number="4"><span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"S. species"</span>) <span class="co"># "Staphylococcus species"</span></a></code></pre></div>
|
||||
</li>
|
||||
<li>Added parameter <code>combine_IR</code> (TRUE/FALSE) to functions <code>portion_df</code> and <code>count_df</code>, to indicate that all values of I and R must be merged into one, so the output only consists of S vs. IR (susceptible vs. non-susceptible)</li>
|
||||
<li>Fix for <code>portion_*(..., as_percent = TRUE)</code> when minimal number of isolates would not be met</li>
|
||||
@@ -281,18 +365,19 @@
|
||||
<li>Using <code>portion_*</code> functions now throws a warning when total available isolate is below parameter <code>minimum</code>
|
||||
</li>
|
||||
<li>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</li>
|
||||
<li>Frequency tables - <code><a href="../reference/freq.html">freq()</a></code>:</li>
|
||||
<li>Frequency tables - <code><a href="../reference/freq.html">freq()</a></code>:
|
||||
<ul>
|
||||
<li>
|
||||
<p>Support for grouping variables, test with:</p>
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">septic_patients %>%<span class="st"> </span>
|
||||
<span class="st"> </span><span class="kw">group_by</span>(hospital_id) %>%<span class="st"> </span>
|
||||
<span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(gender)</code></pre></div>
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb4-1" data-line-number="1">septic_patients <span class="op">%>%</span><span class="st"> </span></a>
|
||||
<a class="sourceLine" id="cb4-2" data-line-number="2"><span class="st"> </span><span class="kw">group_by</span>(hospital_id) <span class="op">%>%</span><span class="st"> </span></a>
|
||||
<a class="sourceLine" id="cb4-3" data-line-number="3"><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(gender)</a></code></pre></div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Support for (un)selecting columns:</p>
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">septic_patients %>%<span class="st"> </span>
|
||||
<span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(hospital_id) %>%<span class="st"> </span>
|
||||
<span class="st"> </span><span class="kw">select</span>(-count, -cum_count) <span class="co"># only get item, percent, cum_percent</span></code></pre></div>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb5-1" data-line-number="1">septic_patients <span class="op">%>%</span><span class="st"> </span></a>
|
||||
<a class="sourceLine" id="cb5-2" data-line-number="2"><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(hospital_id) <span class="op">%>%</span><span class="st"> </span></a>
|
||||
<a class="sourceLine" id="cb5-3" data-line-number="3"><span class="st"> </span><span class="kw">select</span>(<span class="op">-</span>count, <span class="op">-</span>cum_count) <span class="co"># only get item, percent, cum_percent</span></a></code></pre></div>
|
||||
</li>
|
||||
<li>Check for <code><a href="https://www.rdocumentation.org/packages/hms/topics/hms">hms::is.hms</a></code>
|
||||
</li>
|
||||
@@ -303,6 +388,8 @@
|
||||
<li>New parameter <code>na</code>, to choose which character to print for empty values</li>
|
||||
<li>New parameter <code>header</code> to turn the header info off (default when <code>markdown = TRUE</code>)</li>
|
||||
<li>New parameter <code>title</code> to manually setbthe title of the frequency table</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<code>first_isolate</code> now tries to find columns to use as input when parameters are left blank</li>
|
||||
<li>Improvements for MDRO algorithm (function <code>mdro</code>)</li>
|
||||
@@ -314,7 +401,8 @@
|
||||
</li>
|
||||
<li>
|
||||
<code>ggplot_rsi</code> and <code>scale_y_percent</code> have <code>breaks</code> parameter</li>
|
||||
<li>AI improvements for <code>as.mo</code>:</li>
|
||||
<li>AI improvements for <code>as.mo</code>:
|
||||
<ul>
|
||||
<li>
|
||||
<code>"CRS"</code> -> <em>Stenotrophomonas maltophilia</em>
|
||||
</li>
|
||||
@@ -327,6 +415,8 @@
|
||||
<li>
|
||||
<code>"MSSE"</code> -> <em>Staphylococcus epidermidis</em>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Fix for <code>join</code> functions</li>
|
||||
<li>Speed improvement for <code>is.rsi.eligible</code>, now 15-20 times faster</li>
|
||||
<li>In <code>g.test</code>, when <code><a href="https://www.rdocumentation.org/packages/base/topics/sum">sum(x)</a></code> is below 1000 or any of the expected values is below 5, Fisher’s Exact Test will be suggested</li>
|
||||
@@ -355,7 +445,8 @@
|
||||
<a href="#new-2" class="anchor"></a>New</h4>
|
||||
<ul>
|
||||
<li>The data set <code>microorganisms</code> now contains <strong>all microbial taxonomic data from ITIS</strong> (kingdoms Bacteria, Fungi and Protozoa), the Integrated Taxonomy Information System, available via <a href="https://itis.gov" class="uri">https://itis.gov</a>. The data set now contains more than 18,000 microorganisms with all known bacteria, fungi and protozoa according ITIS with genus, species, subspecies, family, order, class, phylum and subkingdom. The new data set <code>microorganisms.old</code> contains all previously known taxonomic names from those kingdoms.</li>
|
||||
<li>New functions based on the existing function <code>mo_property</code>:</li>
|
||||
<li>New functions based on the existing function <code>mo_property</code>:
|
||||
<ul>
|
||||
<li>Taxonomic names: <code>mo_phylum</code>, <code>mo_class</code>, <code>mo_order</code>, <code>mo_family</code>, <code>mo_genus</code>, <code>mo_species</code>, <code>mo_subspecies</code>
|
||||
</li>
|
||||
<li>Semantic names: <code>mo_fullname</code>, <code>mo_shortname</code>
|
||||
@@ -365,22 +456,52 @@
|
||||
<li>Author and year: <code>mo_ref</code>
|
||||
</li>
|
||||
</ul>
|
||||
<p>They also come with support for German, Dutch, French, Italian, Spanish and Portuguese: <code>r mo_gramstain("E. coli") # [1] "Gram negative" mo_gramstain("E. coli", language = "de") # German # [1] "Gramnegativ" mo_gramstain("E. coli", language = "es") # Spanish # [1] "Gram negativo" mo_fullname("S. group A", language = "pt") # Portuguese # [1] "Streptococcus grupo A"</code></p>
|
||||
<p>Furthermore, former taxonomic names will give a note about the current taxonomic name: <code>r mo_gramstain("Esc blattae") # Note: 'Escherichia blattae' (Burgess et al., 1973) was renamed 'Shimwellia blattae' (Priest and Barker, 2010) # [1] "Gram negative"</code></p>
|
||||
<p>They also come with support for German, Dutch, French, Italian, Spanish and Portuguese:</p>
|
||||
<div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb6-1" data-line-number="1"><span class="kw"><a href="../reference/mo_property.html">mo_gramstain</a></span>(<span class="st">"E. coli"</span>)</a>
|
||||
<a class="sourceLine" id="cb6-2" data-line-number="2"><span class="co"># [1] "Gram negative"</span></a>
|
||||
<a class="sourceLine" id="cb6-3" data-line-number="3"><span class="kw"><a href="../reference/mo_property.html">mo_gramstain</a></span>(<span class="st">"E. coli"</span>, <span class="dt">language =</span> <span class="st">"de"</span>) <span class="co"># German</span></a>
|
||||
<a class="sourceLine" id="cb6-4" data-line-number="4"><span class="co"># [1] "Gramnegativ"</span></a>
|
||||
<a class="sourceLine" id="cb6-5" data-line-number="5"><span class="kw"><a href="../reference/mo_property.html">mo_gramstain</a></span>(<span class="st">"E. coli"</span>, <span class="dt">language =</span> <span class="st">"es"</span>) <span class="co"># Spanish</span></a>
|
||||
<a class="sourceLine" id="cb6-6" data-line-number="6"><span class="co"># [1] "Gram negativo"</span></a>
|
||||
<a class="sourceLine" id="cb6-7" data-line-number="7"><span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"S. group A"</span>, <span class="dt">language =</span> <span class="st">"pt"</span>) <span class="co"># Portuguese</span></a>
|
||||
<a class="sourceLine" id="cb6-8" data-line-number="8"><span class="co"># [1] "Streptococcus grupo A"</span></a></code></pre></div>
|
||||
<p>Furthermore, former taxonomic names will give a note about the current taxonomic name:</p>
|
||||
<div class="sourceCode" id="cb7"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb7-1" data-line-number="1"><span class="kw"><a href="../reference/mo_property.html">mo_gramstain</a></span>(<span class="st">"Esc blattae"</span>)</a>
|
||||
<a class="sourceLine" id="cb7-2" data-line-number="2"><span class="co"># Note: 'Escherichia blattae' (Burgess et al., 1973) was renamed 'Shimwellia blattae' (Priest and Barker, 2010)</span></a>
|
||||
<a class="sourceLine" id="cb7-3" data-line-number="3"><span class="co"># [1] "Gram negative"</span></a></code></pre></div>
|
||||
</li>
|
||||
<li>Functions <code>count_R</code>, <code>count_IR</code>, <code>count_I</code>, <code>count_SI</code> and <code>count_S</code> to selectively count resistant or susceptible isolates
|
||||
<ul>
|
||||
<li>Functions <code>count_R</code>, <code>count_IR</code>, <code>count_I</code>, <code>count_SI</code> and <code>count_S</code> to selectively count resistant or susceptible isolates</li>
|
||||
<li>Extra function <code>count_df</code> (which works like <code>portion_df</code>) to get all counts of S, I and R of a data set with antibiotic columns, with support for grouped variables</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Function <code>is.rsi.eligible</code> to check for columns that have valid antimicrobial results, but do not have the <code>rsi</code> class yet. Transform the columns of your raw data with: <code>data %>% mutate_if(is.rsi.eligible, as.rsi)</code>
|
||||
</li>
|
||||
<li>Functions <code>as.mo</code> and <code>is.mo</code> as replacements for <code>as.bactid</code> and <code>is.bactid</code> (since the <code>microoganisms</code> data set not only contains bacteria). These last two functions are deprecated and will be removed in a future release. The <code>as.mo</code> function determines microbial IDs using Artificial Intelligence (AI): <code>r as.mo("E. coli") # [1] B_ESCHR_COL as.mo("MRSA") # [1] B_STPHY_AUR as.mo("S group A") # [1] B_STRPTC_GRA</code> And with great speed too - on a quite regular Linux server from 2007 it takes us less than 0.02 seconds to transform 25,000 items: <code>r thousands_of_E_colis <- rep("E. coli", 25000) microbenchmark::microbenchmark(as.mo(thousands_of_E_colis), unit = "s") # Unit: seconds # min median max neval # 0.01817717 0.01843957 0.03878077 100</code>
|
||||
<li>
|
||||
<p>Functions <code>as.mo</code> and <code>is.mo</code> as replacements for <code>as.bactid</code> and <code>is.bactid</code> (since the <code>microoganisms</code> data set not only contains bacteria). These last two functions are deprecated and will be removed in a future release. The <code>as.mo</code> function determines microbial IDs using Artificial Intelligence (AI):</p>
|
||||
<div class="sourceCode" id="cb8"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb8-1" data-line-number="1"><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"E. coli"</span>)</a>
|
||||
<a class="sourceLine" id="cb8-2" data-line-number="2"><span class="co"># [1] B_ESCHR_COL</span></a>
|
||||
<a class="sourceLine" id="cb8-3" data-line-number="3"><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"MRSA"</span>)</a>
|
||||
<a class="sourceLine" id="cb8-4" data-line-number="4"><span class="co"># [1] B_STPHY_AUR</span></a>
|
||||
<a class="sourceLine" id="cb8-5" data-line-number="5"><span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"S group A"</span>)</a>
|
||||
<a class="sourceLine" id="cb8-6" data-line-number="6"><span class="co"># [1] B_STRPTC_GRA</span></a></code></pre></div>
|
||||
<p>And with great speed too - on a quite regular Linux server from 2007 it takes us less than 0.02 seconds to transform 25,000 items:</p>
|
||||
<div class="sourceCode" id="cb9"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb9-1" data-line-number="1">thousands_of_E_colis <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/rep">rep</a></span>(<span class="st">"E. coli"</span>, <span class="dv">25000</span>)</a>
|
||||
<a class="sourceLine" id="cb9-2" data-line-number="2">microbenchmark<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/microbenchmark/topics/microbenchmark">microbenchmark</a></span>(<span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(thousands_of_E_colis), <span class="dt">unit =</span> <span class="st">"s"</span>)</a>
|
||||
<a class="sourceLine" id="cb9-3" data-line-number="3"><span class="co"># Unit: seconds</span></a>
|
||||
<a class="sourceLine" id="cb9-4" data-line-number="4"><span class="co"># min median max neval</span></a>
|
||||
<a class="sourceLine" id="cb9-5" data-line-number="5"><span class="co"># 0.01817717 0.01843957 0.03878077 100</span></a></code></pre></div>
|
||||
</li>
|
||||
<li>Added parameter <code>reference_df</code> for <code>as.mo</code>, so users can supply their own microbial IDs, name or codes as a reference table</li>
|
||||
<li>Renamed all previous references to <code>bactid</code> to <code>mo</code>, like:</li>
|
||||
<li>Renamed all previous references to <code>bactid</code> to <code>mo</code>, like:
|
||||
<ul>
|
||||
<li>Column names inputs of <code>EUCAST_rules</code>, <code>first_isolate</code> and <code>key_antibiotics</code>
|
||||
</li>
|
||||
<li>Column names of datasets <code>microorganisms</code> and <code>septic_patients</code>
|
||||
</li>
|
||||
<li>All old syntaxes will still work with this version, but will throw warnings</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Function <code>labels_rsi_count</code> to print datalabels on a RSI <code>ggplot2</code> model</li>
|
||||
<li><p>Functions <code>as.atc</code> and <code>is.atc</code> to transform/look up antibiotic ATC codes as defined by the WHO. The existing function <code>guess_atc</code> is now an alias of <code>as.atc</code>.</p></li>
|
||||
<li>Function <code>ab_property</code> and its aliases: <code>ab_name</code>, <code>ab_tradenames</code>, <code>ab_certe</code>, <code>ab_umcg</code> and <code>ab_trivial_nl</code>
|
||||
@@ -395,7 +516,14 @@
|
||||
<a href="#changed-2" class="anchor"></a>Changed</h4>
|
||||
<ul>
|
||||
<li>Added three antimicrobial agents to the <code>antibiotics</code> data set: Terbinafine (D01BA02), Rifaximin (A07AA11) and Isoconazole (D01AC05)</li>
|
||||
<li>Added 163 trade names to the <code>antibiotics</code> data set, it now contains 298 different trade names in total, e.g.: <code>r ab_official("Bactroban") # [1] "Mupirocin" ab_name(c("Bactroban", "Amoxil", "Zithromax", "Floxapen")) # [1] "Mupirocin" "Amoxicillin" "Azithromycin" "Flucloxacillin" ab_atc(c("Bactroban", "Amoxil", "Zithromax", "Floxapen")) # [1] "R01AX06" "J01CA04" "J01FA10" "J01CF05"</code>
|
||||
<li>
|
||||
<p>Added 163 trade names to the <code>antibiotics</code> data set, it now contains 298 different trade names in total, e.g.:</p>
|
||||
<div class="sourceCode" id="cb10"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb10-1" data-line-number="1"><span class="kw"><a href="../reference/ab_property.html">ab_official</a></span>(<span class="st">"Bactroban"</span>)</a>
|
||||
<a class="sourceLine" id="cb10-2" data-line-number="2"><span class="co"># [1] "Mupirocin"</span></a>
|
||||
<a class="sourceLine" id="cb10-3" data-line-number="3"><span class="kw"><a href="../reference/ab_property.html">ab_name</a></span>(<span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="st">"Bactroban"</span>, <span class="st">"Amoxil"</span>, <span class="st">"Zithromax"</span>, <span class="st">"Floxapen"</span>))</a>
|
||||
<a class="sourceLine" id="cb10-4" data-line-number="4"><span class="co"># [1] "Mupirocin" "Amoxicillin" "Azithromycin" "Flucloxacillin"</span></a>
|
||||
<a class="sourceLine" id="cb10-5" data-line-number="5"><span class="kw"><a href="../reference/ab_property.html">ab_atc</a></span>(<span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="st">"Bactroban"</span>, <span class="st">"Amoxil"</span>, <span class="st">"Zithromax"</span>, <span class="st">"Floxapen"</span>))</a>
|
||||
<a class="sourceLine" id="cb10-6" data-line-number="6"><span class="co"># [1] "R01AX06" "J01CA04" "J01FA10" "J01CF05"</span></a></code></pre></div>
|
||||
</li>
|
||||
<li>For <code>first_isolate</code>, rows will be ignored when there’s no species available</li>
|
||||
<li>Function <code>ratio</code> is now deprecated and will be removed in a future release, as it is not really the scope of this package</li>
|
||||
@@ -404,9 +532,36 @@
|
||||
<li>Added <code>prevalence</code> column to the <code>microorganisms</code> data set</li>
|
||||
<li>Added parameters <code>minimum</code> and <code>as_percent</code> to <code>portion_df</code>
|
||||
</li>
|
||||
<li>Support for quasiquotation in the functions series <code>count_*</code> and <code>portions_*</code>, and <code>n_rsi</code>. This allows to check for more than 2 vectors or columns. ```r septic_patients %>% select(amox, cipr) %>% count_IR() # which is the same as: septic_patients %>% count_IR(amox, cipr)</li>
|
||||
<li>
|
||||
<p>Support for quasiquotation in the functions series <code>count_*</code> and <code>portions_*</code>, and <code>n_rsi</code>. This allows to check for more than 2 vectors or columns.</p>
|
||||
<div class="sourceCode" id="cb11"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb11-1" data-line-number="1">septic_patients <span class="op">%>%</span><span class="st"> </span><span class="kw">select</span>(amox, cipr) <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/count.html">count_IR</a></span>()</a>
|
||||
<a class="sourceLine" id="cb11-2" data-line-number="2"><span class="co"># which is the same as:</span></a>
|
||||
<a class="sourceLine" id="cb11-3" data-line-number="3">septic_patients <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/count.html">count_IR</a></span>(amox, cipr)</a>
|
||||
<a class="sourceLine" id="cb11-4" data-line-number="4"></a>
|
||||
<a class="sourceLine" id="cb11-5" data-line-number="5">septic_patients <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/portion.html">portion_S</a></span>(amcl)</a>
|
||||
<a class="sourceLine" id="cb11-6" data-line-number="6">septic_patients <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/portion.html">portion_S</a></span>(amcl, gent)</a>
|
||||
<a class="sourceLine" id="cb11-7" data-line-number="7">septic_patients <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/portion.html">portion_S</a></span>(amcl, gent, pita)</a></code></pre></div>
|
||||
</li>
|
||||
<li>Edited <code>ggplot_rsi</code> and <code>geom_rsi</code> so they can cope with <code>count_df</code>. The new <code>fun</code> parameter has value <code>portion_df</code> at default, but can be set to <code>count_df</code>.</li>
|
||||
<li>Fix for <code>ggplot_rsi</code> when the <code>ggplot2</code> package was not loaded</li>
|
||||
<li>Added datalabels function <code>labels_rsi_count</code> to <code>ggplot_rsi</code>
|
||||
</li>
|
||||
<li>Added possibility to set any parameter to <code>geom_rsi</code> (and <code>ggplot_rsi</code>) so you can set your own preferences</li>
|
||||
<li>Fix for joins, where predefined suffices would not be honoured</li>
|
||||
<li>Added parameter <code>quote</code> to the <code>freq</code> function</li>
|
||||
<li>Added generic function <code>diff</code> for frequency tables</li>
|
||||
<li>Added longest en shortest character length in the frequency table (<code>freq</code>) header of class <code>character</code>
|
||||
</li>
|
||||
<li>
|
||||
<p>Support for types (classes) list and matrix for <code>freq</code></p>
|
||||
<div class="sourceCode" id="cb12"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb12-1" data-line-number="1">my_matrix =<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/with">with</a></span>(septic_patients, <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/matrix">matrix</a></span>(<span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(age, gender), <span class="dt">ncol =</span> <span class="dv">2</span>))</a>
|
||||
<a class="sourceLine" id="cb12-2" data-line-number="2"><span class="kw"><a href="../reference/freq.html">freq</a></span>(my_matrix)</a></code></pre></div>
|
||||
<p>For lists, subsetting is possible:</p>
|
||||
<div class="sourceCode" id="cb13"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb13-1" data-line-number="1">my_list =<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/list">list</a></span>(<span class="dt">age =</span> septic_patients<span class="op">$</span>age, <span class="dt">gender =</span> septic_patients<span class="op">$</span>gender)</a>
|
||||
<a class="sourceLine" id="cb13-2" data-line-number="2">my_list <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(age)</a>
|
||||
<a class="sourceLine" id="cb13-3" data-line-number="3">my_list <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(gender)</a></code></pre></div>
|
||||
</li>
|
||||
</ul>
|
||||
<p>septic_patients %>% portion_S(amcl) septic_patients %>% portion_S(amcl, gent) septic_patients %>% portion_S(amcl, gent, pita) <code>* Edited `ggplot_rsi` and `geom_rsi` so they can cope with `count_df`. The new `fun` parameter has value `portion_df` at default, but can be set to `count_df`. * Fix for `ggplot_rsi` when the `ggplot2` package was not loaded * Added datalabels function `labels_rsi_count` to `ggplot_rsi` * Added possibility to set any parameter to `geom_rsi` (and `ggplot_rsi`) so you can set your own preferences * Fix for joins, where predefined suffices would not be honoured * Added parameter `quote` to the `freq` function * Added generic function `diff` for frequency tables * Added longest en shortest character length in the frequency table (`freq`) header of class `character` * Support for types (classes) list and matrix for `freq`</code>r my_matrix = with(septic_patients, matrix(c(age, gender), ncol = 2)) freq(my_matrix) <code>For lists, subsetting is possible:</code>r my_list = list(age = septic_patients$age, gender = septic_patients$gender) my_list %>% freq(age) my_list %>% freq(gender) ```</p>
|
||||
</div>
|
||||
<div id="other-2" class="section level4">
|
||||
<h4 class="hasAnchor">
|
||||
@@ -425,15 +580,21 @@
|
||||
<a href="#new-3" class="anchor"></a>New</h4>
|
||||
<ul>
|
||||
<li>
|
||||
<strong>BREAKING</strong>: <code>rsi_df</code> was removed in favour of new functions <code>portion_R</code>, <code>portion_IR</code>, <code>portion_I</code>, <code>portion_SI</code> and <code>portion_S</code> to selectively calculate resistance or susceptibility. These functions are 20 to 30 times faster than the old <code>rsi</code> function. The old function still works, but is deprecated.</li>
|
||||
<strong>BREAKING</strong>: <code>rsi_df</code> was removed in favour of new functions <code>portion_R</code>, <code>portion_IR</code>, <code>portion_I</code>, <code>portion_SI</code> and <code>portion_S</code> to selectively calculate resistance or susceptibility. These functions are 20 to 30 times faster than the old <code>rsi</code> function. The old function still works, but is deprecated.
|
||||
<ul>
|
||||
<li>New function <code>portion_df</code> to get all portions of S, I and R of a data set with antibiotic columns, with support for grouped variables</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<strong>BREAKING</strong>: the methodology for determining first weighted isolates was changed. The antibiotics that are compared between isolates (call <em>key antibiotics</em>) to include more first isolates (afterwards called first <em>weighted</em> isolates) are now as follows:</li>
|
||||
<strong>BREAKING</strong>: the methodology for determining first weighted isolates was changed. The antibiotics that are compared between isolates (call <em>key antibiotics</em>) to include more first isolates (afterwards called first <em>weighted</em> isolates) are now as follows:
|
||||
<ul>
|
||||
<li>Universal: amoxicillin, amoxicillin/clavlanic acid, cefuroxime, piperacillin/tazobactam, ciprofloxacin, trimethoprim/sulfamethoxazole</li>
|
||||
<li>Gram-positive: vancomycin, teicoplanin, tetracycline, erythromycin, oxacillin, rifampicin</li>
|
||||
<li>Gram-negative: gentamicin, tobramycin, colistin, cefotaxime, ceftazidime, meropenem</li>
|
||||
<li>Support for <code>ggplot2</code>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Support for <code>ggplot2</code>
|
||||
<ul>
|
||||
<li>New functions <code>geom_rsi</code>, <code>facet_rsi</code>, <code>scale_y_percent</code>, <code>scale_rsi_colours</code> and <code>theme_rsi</code>
|
||||
</li>
|
||||
<li>New wrapper function <code>ggplot_rsi</code> to apply all above functions on a data set:
|
||||
@@ -444,22 +605,32 @@
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Determining bacterial ID:</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Determining bacterial ID:
|
||||
<ul>
|
||||
<li>New functions <code>as.bactid</code> and <code>is.bactid</code> to transform/ look up microbial ID’s.</li>
|
||||
<li>The existing function <code>guess_bactid</code> is now an alias of <code>as.bactid</code>
|
||||
</li>
|
||||
<li>New Becker classification for <em>Staphylococcus</em> to categorise them into Coagulase Negative <em>Staphylococci</em> (CoNS) and Coagulase Positve <em>Staphylococci</em> (CoPS)</li>
|
||||
<li>New Lancefield classification for <em>Streptococcus</em> to categorise them into Lancefield groups</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>For convience, new descriptive statistical functions <code>kurtosis</code> and <code>skewness</code> that are lacking in base R - they are generic functions and have support for vectors, data.frames and matrices</li>
|
||||
<li>Function <code>g.test</code> to perform the Χ<sup>2</sup> distributed <a href="https://en.wikipedia.org/wiki/G-test"><em>G</em>-test</a>, which use is the same as <code>chisq.test</code>
|
||||
</li>
|
||||
<li><del>Function <code>ratio</code> to transform a vector of values to a preset ratio</del></li>
|
||||
<li>
|
||||
<del>Function <code>ratio</code> to transform a vector of values to a preset ratio</del>
|
||||
<ul>
|
||||
<li><del>For example: <code><a href="../reference/AMR-deprecated.html">ratio(c(10, 500, 10), ratio = "1:2:1")</a></code> would return <code>130, 260, 130</code></del></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Support for Addins menu in RStudio to quickly insert <code>%in%</code> or <code>%like%</code> (and give them keyboard shortcuts), or to view the datasets that come with this package</li>
|
||||
<li>Function <code>p.symbol</code> to transform p values to their related symbols: <code>0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1</code>
|
||||
</li>
|
||||
<li>Functions <code>clipboard_import</code> and <code>clipboard_export</code> as helper functions to quickly copy and paste from/to software like Excel and SPSS. These functions use the <code>clipr</code> package, but are a little altered to also support headless Linux servers (so you can use it in RStudio Server)</li>
|
||||
<li>New for frequency tables (function <code>freq</code>):</li>
|
||||
<li>New for frequency tables (function <code>freq</code>):
|
||||
<ul>
|
||||
<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>table</code> to use as input: <code><a href="../reference/freq.html">freq(table(x, y))</a></code>
|
||||
@@ -474,6 +645,8 @@
|
||||
<li>Header of frequency tables now also show Mean Absolute Deviaton (MAD) and Interquartile Range (IQR)</li>
|
||||
<li>Possibility to globally set the default for the amount of items to print, with <code><a href="https://www.rdocumentation.org/packages/base/topics/options">options(max.print.freq = n)</a></code> where <em>n</em> is your preset value</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="changed-3" class="section level4">
|
||||
<h4 class="hasAnchor">
|
||||
@@ -495,21 +668,27 @@
|
||||
</li>
|
||||
<li>Small improvements to the <code>microorganisms</code> dataset (especially for <em>Salmonella</em>) and the column <code>bactid</code> now has the new class <code>"bactid"</code>
|
||||
</li>
|
||||
<li>Combined MIC/RSI values will now be coerced by the <code>rsi</code> and <code>mic</code> functions:</li>
|
||||
<li>Combined MIC/RSI values will now be coerced by the <code>rsi</code> and <code>mic</code> functions:
|
||||
<ul>
|
||||
<li>
|
||||
<code><a href="../reference/as.rsi.html">as.rsi("<=0.002; S")</a></code> will return <code>S</code>
|
||||
</li>
|
||||
<li>
|
||||
<code><a href="../reference/as.mic.html">as.mic("<=0.002; S")</a></code> will return <code><=0.002</code>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Now possible to coerce MIC values with a space between operator and value, i.e. <code><a href="../reference/as.mic.html">as.mic("<= 0.002")</a></code> now works</li>
|
||||
<li>Classes <code>rsi</code> and <code>mic</code> do not add the attribute <code>package.version</code> anymore</li>
|
||||
<li>Added <code>"groups"</code> option for <code><a href="../reference/atc_property.html">atc_property(..., property)</a></code>. It will return a vector of the ATC hierarchy as defined by the <a href="https://www.whocc.no/atc/structure_and_principles/">WHO</a>. The new function <code>atc_groups</code> is a convenient wrapper around this.</li>
|
||||
<li>Build-in host check for <code>atc_property</code> as it requires the host set by <code>url</code> to be responsive</li>
|
||||
<li>Improved <code>first_isolate</code> algorithm to exclude isolates where bacteria ID or genus is unavailable</li>
|
||||
<li>Fix for warning <em>hybrid evaluation forced for row_number</em> (<a href="https://github.com/tidyverse/dplyr/commit/924b62"><code>924b62</code></a>) from the <code>dplyr</code> package v0.7.5 and above</li>
|
||||
<li>Support for empty values and for 1 or 2 columns as input for <code>guess_bactid</code> (now called <code>as.bactid</code>)</li>
|
||||
<li>Support for empty values and for 1 or 2 columns as input for <code>guess_bactid</code> (now called <code>as.bactid</code>)
|
||||
<ul>
|
||||
<li>So <code>yourdata %>% select(genus, species) %>% as.bactid()</code> now also works</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Other small fixes</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -517,11 +696,14 @@
|
||||
<h4 class="hasAnchor">
|
||||
<a href="#other-3" class="anchor"></a>Other</h4>
|
||||
<ul>
|
||||
<li>Added integration tests (check if everything works as expected) for all releases of R 3.1 and higher</li>
|
||||
<li>Added integration tests (check if everything works as expected) for all releases of R 3.1 and higher
|
||||
<ul>
|
||||
<li>Linux and macOS: <a href="https://travis-ci.org/msberends/AMR" class="uri">https://travis-ci.org/msberends/AMR</a>
|
||||
</li>
|
||||
<li>Windows: <a href="https://ci.appveyor.com/project/msberends/amr" class="uri">https://ci.appveyor.com/project/msberends/amr</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Added thesis advisors to DESCRIPTION file</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -536,16 +718,19 @@
|
||||
<ul>
|
||||
<li>Full support for Windows, Linux and macOS</li>
|
||||
<li>Full support for old R versions, only R-3.0.0 (April 2013) or later is needed (needed packages may have other dependencies)</li>
|
||||
<li>Function <code>n_rsi</code> to count cases where antibiotic test results were available, to be used in conjunction with <code><a href="http://dplyr.tidyverse.org/reference/summarise.html">dplyr::summarise</a></code>, see ?rsi</li>
|
||||
<li>Function <code>n_rsi</code> to count cases where antibiotic test results were available, to be used in conjunction with <code><a href="https://www.rdocumentation.org/packages/dplyr/topics/summarise">dplyr::summarise</a></code>, see ?rsi</li>
|
||||
<li>Function <code>guess_bactid</code> to <strong>determine the ID</strong> of a microorganism based on genus/species or known abbreviations like MRSA</li>
|
||||
<li>Function <code>guess_atc</code> to <strong>determine the ATC</strong> of an antibiotic based on name, trade name, or known abbreviations</li>
|
||||
<li>Function <code>freq</code> to create <strong>frequency tables</strong>, with additional info in a header</li>
|
||||
<li>Function <code>MDRO</code> to <strong>determine Multi Drug Resistant Organisms (MDRO)</strong> with support for country-specific guidelines.</li>
|
||||
<li>Function <code>MDRO</code> to <strong>determine Multi Drug Resistant Organisms (MDRO)</strong> with support for country-specific guidelines.
|
||||
<ul>
|
||||
<li>Suggest your own via <a href="https://github.com/msberends/AMR/issues/new?title=New%20guideline%20for%20MDRO&body=%3C--%20Please%20add%20your%20country%20code,%20guideline%20name,%20version%20and%20source%20below%20and%20remove%20this%20line--%3E">https://github.com/msberends/AMR/issues/new</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://www.eucast.org/expert_rules_and_intrinsic_resistance">Exceptional resistances defined by EUCAST</a> are also supported instead of countries alone</li>
|
||||
<li>Functions <code>BRMO</code> and <code>MRGN</code> are wrappers for Dutch and German guidelines, respectively</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>New algorithm to determine weighted isolates, can now be <code>"points"</code> or <code>"keyantibiotics"</code>, see <code><a href="../reference/first_isolate.html">?first_isolate</a></code>
|
||||
</li>
|
||||
<li>New print format for <code>tibble</code>s and <code>data.table</code>s</li>
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
pandoc: 1.17.2
|
||||
pandoc: 2.3.1
|
||||
pkgdown: 1.3.0
|
||||
pkgdown_sha: ~
|
||||
articles:
|
||||
AMR: AMR.html
|
||||
EUCAST: EUCAST.html
|
||||
G_test: G_test.html
|
||||
Predict: Predict.html
|
||||
ab_property: ab_property.html
|
||||
freq: freq.html
|
||||
mo_property: mo_property.html
|
||||
urls:
|
||||
reference: https://msberends.gitlab.io/reference
|
||||
article: https://msberends.gitlab.io/articles
|
||||
reference: https://msberends.gitlab.io/AMR/reference
|
||||
article: https://msberends.gitlab.io/AMR/articles
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
<meta property="og:description" content="These functions are Deprecated. They will be removed in a future release. Using the functions will give a warning with the name of the function it has been replaced by." />
|
||||
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -93,12 +93,65 @@
|
||||
Home
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
<span class="fa fa-question-circle"></span>
|
||||
|
||||
How to
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="../articles/AMR.html">
|
||||
<span class="fa fa-directions"></span>
|
||||
|
||||
Get Started
|
||||
Conduct AMR analysis
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/Predict.html">
|
||||
<span class="fa fa-dice"></span>
|
||||
|
||||
Predict antimicrobial resistance
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/EUCAST.html">
|
||||
<span class="fa fa-exchange-alt"></span>
|
||||
|
||||
Apply EUCAST rules
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/mo_property.html">
|
||||
<span class="fa fa-bug"></span>
|
||||
|
||||
Get properties of a microorganism
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/ab_property.html">
|
||||
<span class="fa fa-capsules"></span>
|
||||
|
||||
Get properties of an antibiotic
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/freq.html">
|
||||
<span class="fa fa-sort-amount-down"></span>
|
||||
|
||||
Create frequency tables
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/G_test.html">
|
||||
<span class="fa fa-clipboard-check"></span>
|
||||
|
||||
Use the G-test
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../reference/">
|
||||
@@ -121,17 +174,17 @@
|
||||
Changelog
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="https://gitlab.com/msberends/AMR">
|
||||
<span class="fab fa fab fa-gitlab"></span>
|
||||
|
||||
Source Code
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<li>
|
||||
<a href="../LICENSE-text.html">
|
||||
<span class="fa fa-book"></span>
|
||||
|
||||
@@ -169,11 +222,19 @@
|
||||
|
||||
<pre class="usage"><span class='fu'>ratio</span>(<span class='no'>x</span>, <span class='no'>ratio</span>)</pre>
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
|
||||
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
|
||||
<h2>Contents</h2>
|
||||
<ul class="nav nav-pills nav-stacked">
|
||||
|
||||
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
<meta property="og:description" content="Welcome to the AMR package. This page gives some additional contact information about the authors." />
|
||||
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -93,12 +93,65 @@
|
||||
Home
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
<span class="fa fa-question-circle"></span>
|
||||
|
||||
How to
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="../articles/AMR.html">
|
||||
<span class="fa fa-directions"></span>
|
||||
|
||||
Get Started
|
||||
Conduct AMR analysis
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/Predict.html">
|
||||
<span class="fa fa-dice"></span>
|
||||
|
||||
Predict antimicrobial resistance
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/EUCAST.html">
|
||||
<span class="fa fa-exchange-alt"></span>
|
||||
|
||||
Apply EUCAST rules
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/mo_property.html">
|
||||
<span class="fa fa-bug"></span>
|
||||
|
||||
Get properties of a microorganism
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/ab_property.html">
|
||||
<span class="fa fa-capsules"></span>
|
||||
|
||||
Get properties of an antibiotic
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/freq.html">
|
||||
<span class="fa fa-sort-amount-down"></span>
|
||||
|
||||
Create frequency tables
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/G_test.html">
|
||||
<span class="fa fa-clipboard-check"></span>
|
||||
|
||||
Use the G-test
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../reference/">
|
||||
@@ -121,17 +174,17 @@
|
||||
Changelog
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="https://gitlab.com/msberends/AMR">
|
||||
<span class="fab fa fab fa-gitlab"></span>
|
||||
|
||||
Source Code
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<li>
|
||||
<a href="../LICENSE-text.html">
|
||||
<span class="fa fa-book"></span>
|
||||
|
||||
@@ -173,10 +226,16 @@
|
||||
<p>This package was intended to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and ti work with antibiotic properties by using evidence-based methods.</p>
|
||||
<p>This package was created for academic research by PhD students of the Faculty of Medical Sciences of the University of Groningen and the Medical Microbiology & Infection Prevention (MMBI) department of the University Medical Center Groningen (UMCG).</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>
|
||||
|
||||
|
||||
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
|
||||
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
|
||||
|
||||
<h2 class="hasAnchor" id="authors"><a class="anchor" href="#authors"></a>Authors</h2>
|
||||
|
||||
|
||||
<p>Matthijs S. Berends[1,2] Christian F. Luz[1], Erwin E.A. Hassing[2], Corinna Glasner[1], Alex W. Friedrich[1], Bhanu Sinha[1] <br /></p>
|
||||
<p>Matthijs S. Berends[1,2] Christian F. Luz[1], Erwin E.A. Hassing[2], Corinna Glasner[1], Alex W. Friedrich[1], Bhanu N.M. Sinha[1] <br /></p>
|
||||
<p>[1] Department of Medical Microbiology, University of Groningen, University Medical Center Groningen, Groningen, the Netherlands - <a href='rug.nl'>rug.nl</a> <a href='umcg.nl'>umcg.nl</a> <br />
|
||||
[2] Certe Medical Diagnostics & Advice, Groningen, the Netherlands - <a href='certe.nl'>certe.nl</a></p>
|
||||
|
||||
@@ -201,6 +260,8 @@ Post Office Box 30001 <br />
|
||||
|
||||
<li><a href="#details">Details</a></li>
|
||||
|
||||
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
|
||||
|
||||
<li><a href="#authors">Authors</a></li>
|
||||
|
||||
<li><a href="#contact-us">Contact us</a></li>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
<meta property="og:description" content="Use these functions to return a specific property of an antibiotic from the antibiotics data set, based on their ATC code. Get such a code with as.atc." />
|
||||
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -93,12 +93,65 @@
|
||||
Home
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
<span class="fa fa-question-circle"></span>
|
||||
|
||||
How to
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="../articles/AMR.html">
|
||||
<span class="fa fa-directions"></span>
|
||||
|
||||
Get Started
|
||||
Conduct AMR analysis
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/Predict.html">
|
||||
<span class="fa fa-dice"></span>
|
||||
|
||||
Predict antimicrobial resistance
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/EUCAST.html">
|
||||
<span class="fa fa-exchange-alt"></span>
|
||||
|
||||
Apply EUCAST rules
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/mo_property.html">
|
||||
<span class="fa fa-bug"></span>
|
||||
|
||||
Get properties of a microorganism
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/ab_property.html">
|
||||
<span class="fa fa-capsules"></span>
|
||||
|
||||
Get properties of an antibiotic
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/freq.html">
|
||||
<span class="fa fa-sort-amount-down"></span>
|
||||
|
||||
Create frequency tables
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/G_test.html">
|
||||
<span class="fa fa-clipboard-check"></span>
|
||||
|
||||
Use the G-test
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../reference/">
|
||||
@@ -121,17 +174,17 @@
|
||||
Changelog
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="https://gitlab.com/msberends/AMR">
|
||||
<span class="fab fa fab fa-gitlab"></span>
|
||||
|
||||
Source Code
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<li>
|
||||
<a href="../LICENSE-text.html">
|
||||
<span class="fa fa-book"></span>
|
||||
|
||||
@@ -204,13 +257,26 @@
|
||||
|
||||
<p>A vector of values. In case of <code>ab_tradenames</code>, if <code>x</code> is of length one, a vector will be returned. Otherwise a <code><a href='https://www.rdocumentation.org/packages/base/topics/list'>list</a></code>, with <code>x</code> as names.</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>
|
||||
|
||||
|
||||
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
|
||||
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
|
||||
|
||||
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
|
||||
|
||||
<div class='dont-index'><p><code><a href='antibiotics.html'>antibiotics</a></code></p></div>
|
||||
|
||||
|
||||
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
|
||||
<pre class="examples"><div class='input'><span class='fu'>ab_atc</span>(<span class='st'>"amcl"</span>) <span class='co'># J01CR02</span></div><div class='output co'>#> [1] "J01CR02"</div><div class='input'><span class='fu'>ab_name</span>(<span class='st'>"amcl"</span>) <span class='co'># Amoxicillin and beta-lactamase inhibitor</span></div><div class='output co'>#> [1] "Amoxicillin and beta-lactamase inhibitor"</div><div class='input'><span class='fu'>ab_name</span>(<span class='st'>"amcl"</span>, <span class='st'>"nl"</span>) <span class='co'># Amoxicilline met enzymremmer</span></div><div class='output co'>#> [1] "Amoxicilline met enzymremmer"</div><div class='input'><span class='fu'>ab_trivial_nl</span>(<span class='st'>"amcl"</span>) <span class='co'># Amoxicilline/clavulaanzuur</span></div><div class='output co'>#> [1] "Amoxicilline/clavulaanzuur"</div><div class='input'><span class='fu'>ab_certe</span>(<span class='st'>"amcl"</span>) <span class='co'># amcl</span></div><div class='output co'>#> [1] "amcl"</div><div class='input'><span class='fu'>ab_umcg</span>(<span class='st'>"amcl"</span>) <span class='co'># AMCL</span></div><div class='output co'>#> [1] "AMCL"</div></pre>
|
||||
<pre class="examples"><span class='co'># NOT RUN {</span>
|
||||
<span class='fu'>ab_atc</span>(<span class='st'>"amcl"</span>) <span class='co'># J01CR02</span>
|
||||
<span class='fu'>ab_name</span>(<span class='st'>"amcl"</span>) <span class='co'># Amoxicillin and beta-lactamase inhibitor</span>
|
||||
<span class='fu'>ab_name</span>(<span class='st'>"amcl"</span>, <span class='st'>"nl"</span>) <span class='co'># Amoxicilline met enzymremmer</span>
|
||||
<span class='fu'>ab_trivial_nl</span>(<span class='st'>"amcl"</span>) <span class='co'># Amoxicilline/clavulaanzuur</span>
|
||||
<span class='fu'>ab_certe</span>(<span class='st'>"amcl"</span>) <span class='co'># amcl</span>
|
||||
<span class='fu'>ab_umcg</span>(<span class='st'>"amcl"</span>) <span class='co'># AMCL</span>
|
||||
<span class='co'># }</span></pre>
|
||||
</div>
|
||||
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
|
||||
<h2>Contents</h2>
|
||||
@@ -219,6 +285,8 @@
|
||||
|
||||
<li><a href="#value">Value</a></li>
|
||||
|
||||
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
|
||||
|
||||
<li><a href="#see-also">See also</a></li>
|
||||
|
||||
<li><a href="#examples">Examples</a></li>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
<meta property="og:description" content="Convert antibiotic codes to a (trivial) antibiotic name or ATC code, or vice versa. This uses the data from antibiotics." />
|
||||
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -93,12 +93,65 @@
|
||||
Home
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
<span class="fa fa-question-circle"></span>
|
||||
|
||||
How to
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="../articles/AMR.html">
|
||||
<span class="fa fa-directions"></span>
|
||||
|
||||
Get Started
|
||||
Conduct AMR analysis
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/Predict.html">
|
||||
<span class="fa fa-dice"></span>
|
||||
|
||||
Predict antimicrobial resistance
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/EUCAST.html">
|
||||
<span class="fa fa-exchange-alt"></span>
|
||||
|
||||
Apply EUCAST rules
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/mo_property.html">
|
||||
<span class="fa fa-bug"></span>
|
||||
|
||||
Get properties of a microorganism
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/ab_property.html">
|
||||
<span class="fa fa-capsules"></span>
|
||||
|
||||
Get properties of an antibiotic
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/freq.html">
|
||||
<span class="fa fa-sort-amount-down"></span>
|
||||
|
||||
Create frequency tables
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/G_test.html">
|
||||
<span class="fa fa-clipboard-check"></span>
|
||||
|
||||
Use the G-test
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../reference/">
|
||||
@@ -121,17 +174,17 @@
|
||||
Changelog
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="https://gitlab.com/msberends/AMR">
|
||||
<span class="fab fa fab fa-gitlab"></span>
|
||||
|
||||
Source Code
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<li>
|
||||
<a href="../LICENSE-text.html">
|
||||
<span class="fa fa-book"></span>
|
||||
|
||||
@@ -199,30 +252,44 @@
|
||||
|
||||
<p><strong>The <code><a href='ab_property.html'>ab_property</a></code> functions are faster and more concise</strong>, but do not support concatenated strings, like <code>abname("AMCL+GENT"</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>
|
||||
|
||||
|
||||
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
|
||||
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
|
||||
|
||||
|
||||
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
|
||||
<pre class="examples"><div class='input'><span class='fu'>abname</span>(<span class='st'>"AMCL"</span>)</div><div class='output co'>#> [1] "Amoxicillin and beta-lactamase inhibitor"</div><div class='input'><span class='co'># "Amoxicillin and beta-lactamase inhibitor"</span>
|
||||
<pre class="examples"><span class='co'># NOT RUN {</span>
|
||||
<span class='fu'>abname</span>(<span class='st'>"AMCL"</span>)
|
||||
<span class='co'># "Amoxicillin and beta-lactamase inhibitor"</span>
|
||||
|
||||
<span class='co'># It is quite flexible at default (having `from = "guess"`)</span>
|
||||
<span class='fu'>abname</span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"amox"</span>, <span class='st'>"J01CA04"</span>, <span class='st'>"Trimox"</span>, <span class='st'>"dispermox"</span>, <span class='st'>"Amoxil"</span>))</div><div class='output co'>#> [1] "Amoxicillin" "Amoxicillin" "Amoxicillin" "Amoxicillin" "Amoxicillin"</div><div class='input'><span class='co'># "Amoxicillin" "Amoxicillin" "Amoxicillin" "Amoxicillin" "Amoxicillin"</span>
|
||||
<span class='fu'>abname</span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"amox"</span>, <span class='st'>"J01CA04"</span>, <span class='st'>"Trimox"</span>, <span class='st'>"dispermox"</span>, <span class='st'>"Amoxil"</span>))
|
||||
<span class='co'># "Amoxicillin" "Amoxicillin" "Amoxicillin" "Amoxicillin" "Amoxicillin"</span>
|
||||
|
||||
<span class='co'># Multiple antibiotics can be combined with "+".</span>
|
||||
<span class='co'># The second antibiotic will be set to lower case when `tolower` was not set:</span>
|
||||
<span class='fu'>abname</span>(<span class='st'>"AMCL+GENT"</span>, <span class='kw'>textbetween</span> <span class='kw'>=</span> <span class='st'>"/"</span>)</div><div class='output co'>#> [1] "Amoxicillin and beta-lactamase inhibitor/gentamicin"</div><div class='input'><span class='co'># "amoxicillin and enzyme inhibitor/gentamicin"</span>
|
||||
<span class='fu'>abname</span>(<span class='st'>"AMCL+GENT"</span>, <span class='kw'>textbetween</span> <span class='kw'>=</span> <span class='st'>"/"</span>)
|
||||
<span class='co'># "amoxicillin and enzyme inhibitor/gentamicin"</span>
|
||||
|
||||
<span class='fu'>abname</span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"AMCL"</span>, <span class='st'>"GENT"</span>))</div><div class='output co'>#> [1] "Amoxicillin and beta-lactamase inhibitor"
|
||||
#> [2] "Gentamicin" </div><div class='input'><span class='co'># "Amoxicillin and beta-lactamase inhibitor" "Gentamicin"</span>
|
||||
<span class='fu'>abname</span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"AMCL"</span>, <span class='st'>"GENT"</span>))
|
||||
<span class='co'># "Amoxicillin and beta-lactamase inhibitor" "Gentamicin"</span>
|
||||
|
||||
<span class='fu'>abname</span>(<span class='st'>"AMCL"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"trivial_nl"</span>)</div><div class='output co'>#> [1] "Amoxicilline/clavulaanzuur"</div><div class='input'><span class='co'># "Amoxicilline/clavulaanzuur"</span>
|
||||
<span class='fu'>abname</span>(<span class='st'>"AMCL"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"trivial_nl"</span>)
|
||||
<span class='co'># "Amoxicilline/clavulaanzuur"</span>
|
||||
|
||||
<span class='fu'>abname</span>(<span class='st'>"AMCL"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"atc"</span>)</div><div class='output co'>#> [1] "J01CR02"</div><div class='input'><span class='co'># "J01CR02"</span>
|
||||
<span class='fu'>abname</span>(<span class='st'>"AMCL"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"atc"</span>)
|
||||
<span class='co'># "J01CR02"</span>
|
||||
|
||||
<span class='co'># specific codes for University Medical Center Groningen (UMCG):</span>
|
||||
<span class='fu'>abname</span>(<span class='st'>"J01CR02"</span>, <span class='kw'>from</span> <span class='kw'>=</span> <span class='st'>"atc"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"umcg"</span>)</div><div class='output co'>#> [1] "AMCL"</div><div class='input'><span class='co'># "AMCL"</span>
|
||||
<span class='fu'>abname</span>(<span class='st'>"J01CR02"</span>, <span class='kw'>from</span> <span class='kw'>=</span> <span class='st'>"atc"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"umcg"</span>)
|
||||
<span class='co'># "AMCL"</span>
|
||||
|
||||
<span class='co'># specific codes for Certe:</span>
|
||||
<span class='fu'>abname</span>(<span class='st'>"J01CR02"</span>, <span class='kw'>from</span> <span class='kw'>=</span> <span class='st'>"atc"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"certe"</span>)</div><div class='output co'>#> [1] "amcl"</div><div class='input'># "amcl"
|
||||
</div></pre>
|
||||
<span class='fu'>abname</span>(<span class='st'>"J01CR02"</span>, <span class='kw'>from</span> <span class='kw'>=</span> <span class='st'>"atc"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"certe"</span>)
|
||||
<span class='co'># "amcl"</span>
|
||||
<span class='co'># }</span></pre>
|
||||
</div>
|
||||
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
|
||||
<h2>Contents</h2>
|
||||
@@ -233,6 +300,8 @@
|
||||
|
||||
<li><a href="#details">Details</a></li>
|
||||
|
||||
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
|
||||
|
||||
<li><a href="#examples">Examples</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
<meta property="og:description" content="Calculates age in years based on a reference date, which is the sytem time at default." />
|
||||
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -93,12 +93,65 @@
|
||||
Home
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
<span class="fa fa-question-circle"></span>
|
||||
|
||||
How to
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="../articles/AMR.html">
|
||||
<span class="fa fa-directions"></span>
|
||||
|
||||
Get Started
|
||||
Conduct AMR analysis
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/Predict.html">
|
||||
<span class="fa fa-dice"></span>
|
||||
|
||||
Predict antimicrobial resistance
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/EUCAST.html">
|
||||
<span class="fa fa-exchange-alt"></span>
|
||||
|
||||
Apply EUCAST rules
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/mo_property.html">
|
||||
<span class="fa fa-bug"></span>
|
||||
|
||||
Get properties of a microorganism
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/ab_property.html">
|
||||
<span class="fa fa-capsules"></span>
|
||||
|
||||
Get properties of an antibiotic
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/freq.html">
|
||||
<span class="fa fa-sort-amount-down"></span>
|
||||
|
||||
Create frequency tables
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/G_test.html">
|
||||
<span class="fa fa-clipboard-check"></span>
|
||||
|
||||
Use the G-test
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../reference/">
|
||||
@@ -121,17 +174,17 @@
|
||||
Changelog
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="https://gitlab.com/msberends/AMR">
|
||||
<span class="fab fa fab fa-gitlab"></span>
|
||||
|
||||
Source Code
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<li>
|
||||
<a href="../LICENSE-text.html">
|
||||
<span class="fa fa-book"></span>
|
||||
|
||||
@@ -186,6 +239,12 @@
|
||||
|
||||
<p>Integer (no decimals)</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>
|
||||
|
||||
|
||||
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
|
||||
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
|
||||
|
||||
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
|
||||
|
||||
<div class='dont-index'><p><code><a href='age_groups.html'>age_groups</a></code> to splits age into groups</p></div>
|
||||
@@ -199,6 +258,8 @@
|
||||
|
||||
<li><a href="#value">Value</a></li>
|
||||
|
||||
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
|
||||
|
||||
<li><a href="#see-also">See also</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 50 KiB |
@@ -49,7 +49,7 @@
|
||||
|
||||
<meta property="og:description" content="Split ages into age groups defined by the split parameter. This allows for easier demographic (antimicrobial resistance) analysis." />
|
||||
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -93,12 +93,65 @@
|
||||
Home
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
<span class="fa fa-question-circle"></span>
|
||||
|
||||
How to
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="../articles/AMR.html">
|
||||
<span class="fa fa-directions"></span>
|
||||
|
||||
Get Started
|
||||
Conduct AMR analysis
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/Predict.html">
|
||||
<span class="fa fa-dice"></span>
|
||||
|
||||
Predict antimicrobial resistance
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/EUCAST.html">
|
||||
<span class="fa fa-exchange-alt"></span>
|
||||
|
||||
Apply EUCAST rules
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/mo_property.html">
|
||||
<span class="fa fa-bug"></span>
|
||||
|
||||
Get properties of a microorganism
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/ab_property.html">
|
||||
<span class="fa fa-capsules"></span>
|
||||
|
||||
Get properties of an antibiotic
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/freq.html">
|
||||
<span class="fa fa-sort-amount-down"></span>
|
||||
|
||||
Create frequency tables
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/G_test.html">
|
||||
<span class="fa fa-clipboard-check"></span>
|
||||
|
||||
Use the G-test
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../reference/">
|
||||
@@ -121,17 +174,17 @@
|
||||
Changelog
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="https://gitlab.com/msberends/AMR">
|
||||
<span class="fab fa fab fa-gitlab"></span>
|
||||
|
||||
Source Code
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<li>
|
||||
<a href="../LICENSE-text.html">
|
||||
<span class="fa fa-book"></span>
|
||||
|
||||
@@ -199,49 +252,51 @@
|
||||
</ul></li>
|
||||
</ul>
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
|
||||
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
|
||||
|
||||
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
|
||||
|
||||
<div class='dont-index'><p><code><a href='age.html'>age</a></code> to determine ages based on one or more reference dates</p></div>
|
||||
|
||||
|
||||
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
|
||||
<pre class="examples"><div class='input'><span class='no'>ages</span> <span class='kw'><-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='fl'>3</span>, <span class='fl'>8</span>, <span class='fl'>16</span>, <span class='fl'>54</span>, <span class='fl'>31</span>, <span class='fl'>76</span>, <span class='fl'>101</span>, <span class='fl'>43</span>, <span class='fl'>21</span>)
|
||||
<pre class="examples"><span class='co'># NOT RUN {</span>
|
||||
<span class='no'>ages</span> <span class='kw'><-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='fl'>3</span>, <span class='fl'>8</span>, <span class='fl'>16</span>, <span class='fl'>54</span>, <span class='fl'>31</span>, <span class='fl'>76</span>, <span class='fl'>101</span>, <span class='fl'>43</span>, <span class='fl'>21</span>)
|
||||
|
||||
<span class='co'># split into 0-49 and 50+</span>
|
||||
<span class='fu'>age_groups</span>(<span class='no'>ages</span>, <span class='fl'>50</span>)</div><div class='output co'>#> [1] 0-49 0-49 0-49 50+ 0-49 50+ 50+ 0-49 0-49
|
||||
#> Levels: 0-49 < 50+</div><div class='input'>
|
||||
<span class='fu'>age_groups</span>(<span class='no'>ages</span>, <span class='fl'>50</span>)
|
||||
|
||||
<span class='co'># split into 0-19, 20-49 and 50+</span>
|
||||
<span class='fu'>age_groups</span>(<span class='no'>ages</span>, <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='fl'>20</span>, <span class='fl'>50</span>))</div><div class='output co'>#> [1] 0-19 0-19 0-19 50+ 20-49 50+ 50+ 20-49 20-49
|
||||
#> Levels: 0-19 < 20-49 < 50+</div><div class='input'>
|
||||
<span class='fu'>age_groups</span>(<span class='no'>ages</span>, <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='fl'>20</span>, <span class='fl'>50</span>))
|
||||
|
||||
<span class='co'># split into groups of ten years</span>
|
||||
<span class='fu'>age_groups</span>(<span class='no'>ages</span>, <span class='fl'>1</span>:<span class='fl'>10</span> * <span class='fl'>10</span>)</div><div class='output co'>#> [1] 0-9 0-9 10-19 50-59 30-39 70-79 100+ 40-49 20-29
|
||||
#> 11 Levels: 0-9 < 10-19 < 20-29 < 30-39 < 40-49 < 50-59 < 60-69 < ... < 100+</div><div class='input'><span class='fu'>age_groups</span>(<span class='no'>ages</span>, <span class='kw'>split_at</span> <span class='kw'>=</span> <span class='st'>"tens"</span>)</div><div class='output co'>#> [1] 0-9 0-9 10-19 50-59 30-39 70-79 100+ 40-49 20-29
|
||||
#> 11 Levels: 0-9 < 10-19 < 20-29 < 30-39 < 40-49 < 50-59 < 60-69 < ... < 100+</div><div class='input'>
|
||||
<span class='fu'>age_groups</span>(<span class='no'>ages</span>, <span class='fl'>1</span>:<span class='fl'>10</span> * <span class='fl'>10</span>)
|
||||
<span class='fu'>age_groups</span>(<span class='no'>ages</span>, <span class='kw'>split_at</span> <span class='kw'>=</span> <span class='st'>"tens"</span>)
|
||||
|
||||
<span class='co'># split into groups of five years</span>
|
||||
<span class='fu'>age_groups</span>(<span class='no'>ages</span>, <span class='fl'>1</span>:<span class='fl'>20</span> * <span class='fl'>5</span>)</div><div class='output co'>#> [1] 0-4 5-9 15-19 50-54 30-34 75-79 100+ 40-44 20-24
|
||||
#> 21 Levels: 0-4 < 5-9 < 10-14 < 15-19 < 20-24 < 25-29 < 30-34 < ... < 100+</div><div class='input'><span class='fu'>age_groups</span>(<span class='no'>ages</span>, <span class='kw'>split_at</span> <span class='kw'>=</span> <span class='st'>"fives"</span>)</div><div class='output co'>#> [1] 0-4 5-9 15-19 50-54 30-34 75-79 100+ 40-44 20-24
|
||||
#> 21 Levels: 0-4 < 5-9 < 10-14 < 15-19 < 20-24 < 25-29 < 30-34 < ... < 100+</div><div class='input'>
|
||||
<span class='fu'>age_groups</span>(<span class='no'>ages</span>, <span class='fl'>1</span>:<span class='fl'>20</span> * <span class='fl'>5</span>)
|
||||
<span class='fu'>age_groups</span>(<span class='no'>ages</span>, <span class='kw'>split_at</span> <span class='kw'>=</span> <span class='st'>"fives"</span>)
|
||||
|
||||
<span class='co'># split specifically for children</span>
|
||||
<span class='fu'>age_groups</span>(<span class='no'>ages</span>, <span class='st'>"children"</span>)</div><div class='output co'>#> [1] 2-3 6-12 13-17 18+ 18+ 18+ 18+ 18+ 18+
|
||||
#> Levels: 0 < 1 < 2-3 < 4-5 < 6-12 < 13-17 < 18+</div><div class='input'><span class='co'># same:</span>
|
||||
<span class='fu'>age_groups</span>(<span class='no'>ages</span>, <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='fl'>1</span>, <span class='fl'>2</span>, <span class='fl'>4</span>, <span class='fl'>6</span>, <span class='fl'>13</span>, <span class='fl'>17</span>))</div><div class='output co'>#> [1] 2-3 6-12 13-16 17+ 17+ 17+ 17+ 17+ 17+
|
||||
#> Levels: 0 < 1 < 2-3 < 4-5 < 6-12 < 13-16 < 17+</div><div class='input'>
|
||||
<span class='fu'>age_groups</span>(<span class='no'>ages</span>, <span class='st'>"children"</span>)
|
||||
<span class='co'># same:</span>
|
||||
<span class='fu'>age_groups</span>(<span class='no'>ages</span>, <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='fl'>1</span>, <span class='fl'>2</span>, <span class='fl'>4</span>, <span class='fl'>6</span>, <span class='fl'>13</span>, <span class='fl'>17</span>))
|
||||
|
||||
<span class='co'># resistance of ciprofloxacine per age group</span>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/library'>library</a></span>(<span class='no'>dplyr</span>)</div><div class='output co'>#> <span class='message'></span>
|
||||
#> <span class='message'>Attaching package: ‘dplyr’</span></div><div class='output co'>#> <span class='message'>The following object is masked from ‘package:testthat’:</span>
|
||||
#> <span class='message'></span>
|
||||
#> <span class='message'> matches</span></div><div class='output co'>#> <span class='message'>The following objects are masked from ‘package:stats’:</span>
|
||||
#> <span class='message'></span>
|
||||
#> <span class='message'> filter, lag</span></div><div class='output co'>#> <span class='message'>The following objects are masked from ‘package:base’:</span>
|
||||
#> <span class='message'></span>
|
||||
#> <span class='message'> intersect, setdiff, setequal, union</span></div><div class='input'><span class='no'>septic_patients</span> <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/mutate.html'>mutate</a></span>(<span class='kw'>first_isolate</span> <span class='kw'>=</span> <span class='fu'><a href='first_isolate.html'>first_isolate</a></span>(<span class='no'>.</span>)) <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/filter.html'>filter</a></span>(<span class='no'>first_isolate</span> <span class='kw'>==</span> <span class='fl'>TRUE</span>,
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/library'>library</a></span>(<span class='no'>dplyr</span>)
|
||||
<span class='no'>septic_patients</span> <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/mutate'>mutate</a></span>(<span class='kw'>first_isolate</span> <span class='kw'>=</span> <span class='fu'><a href='first_isolate.html'>first_isolate</a></span>(<span class='no'>.</span>)) <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/filter'>filter</a></span>(<span class='no'>first_isolate</span> <span class='kw'>==</span> <span class='fl'>TRUE</span>,
|
||||
<span class='no'>mo</span> <span class='kw'>==</span> <span class='fu'><a href='as.mo.html'>as.mo</a></span>(<span class='st'>"E. coli"</span>)) <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/group_by.html'>group_by</a></span>(<span class='kw'>age_group</span> <span class='kw'>=</span> <span class='fu'>age_groups</span>(<span class='no'>age</span>)) <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/select.html'>select</a></span>(<span class='no'>age_group</span>,
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/group_by'>group_by</a></span>(<span class='kw'>age_group</span> <span class='kw'>=</span> <span class='fu'>age_groups</span>(<span class='no'>age</span>)) <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/select'>select</a></span>(<span class='no'>age_group</span>,
|
||||
<span class='no'>cipr</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='ggplot_rsi.html'>ggplot_rsi</a></span>(<span class='kw'>x</span> <span class='kw'>=</span> <span class='st'>"age_group"</span>)</div><div class='output co'>#> <span class='message'><span style='color: #0000BB;'>NOTE: Using column `</span><span style='color: #0000BB;font-weight: bold;'>mo</span><span style='color: #0000BB;'>` as input for `col_mo`.</span><span></span></div><div class='output co'>#> <span class='message'></span><span style='color: #0000BB;'>NOTE: Using column `</span><span style='color: #0000BB;font-weight: bold;'>date</span><span style='color: #0000BB;'>` as input for `col_date`.</span><span></span></div><div class='output co'>#> <span class='message'></span><span style='color: #0000BB;'>NOTE: Using column `</span><span style='color: #0000BB;font-weight: bold;'>patient_id</span><span style='color: #0000BB;'>` as input for `col_patient_id`.</span><span></span></div><div class='output co'>#> <span class='message'>=> Found </span><span style='font-weight: bold;'>1,317 first isolates</span><span> (65.9% of total)</span></div><div class='output co'>#> <span class='warning'>Warning: Removed 3 rows containing missing values (geom_bar).</span></div><div class='output co'>#> <span class='warning'>Warning: Removed 3 rows containing missing values (geom_text).</span></div><div class='img'><img src='age_groups-1.png' alt='' width='700' height='433' /></div></span></pre>
|
||||
<span class='fu'><a href='ggplot_rsi.html'>ggplot_rsi</a></span>(<span class='kw'>x</span> <span class='kw'>=</span> <span class='st'>"age_group"</span>)
|
||||
<span class='co'># }</span></pre>
|
||||
</div>
|
||||
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
|
||||
<h2>Contents</h2>
|
||||
@@ -252,6 +307,8 @@
|
||||
|
||||
<li><a href="#details">Details</a></li>
|
||||
|
||||
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
|
||||
|
||||
<li><a href="#see-also">See also</a></li>
|
||||
|
||||
<li><a href="#examples">Examples</a></li>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
<meta property="og:description" content="A data set containing all antibiotics with a J0 code and some other antimicrobial agents, with their DDDs. Except for trade names and abbreviations, all properties were downloaded from the WHO, see Source." />
|
||||
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -93,12 +93,65 @@
|
||||
Home
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
<span class="fa fa-question-circle"></span>
|
||||
|
||||
How to
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="../articles/AMR.html">
|
||||
<span class="fa fa-directions"></span>
|
||||
|
||||
Get Started
|
||||
Conduct AMR analysis
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/Predict.html">
|
||||
<span class="fa fa-dice"></span>
|
||||
|
||||
Predict antimicrobial resistance
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/EUCAST.html">
|
||||
<span class="fa fa-exchange-alt"></span>
|
||||
|
||||
Apply EUCAST rules
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/mo_property.html">
|
||||
<span class="fa fa-bug"></span>
|
||||
|
||||
Get properties of a microorganism
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/ab_property.html">
|
||||
<span class="fa fa-capsules"></span>
|
||||
|
||||
Get properties of an antibiotic
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/freq.html">
|
||||
<span class="fa fa-sort-amount-down"></span>
|
||||
|
||||
Create frequency tables
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/G_test.html">
|
||||
<span class="fa fa-clipboard-check"></span>
|
||||
|
||||
Use the G-test
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../reference/">
|
||||
@@ -121,17 +174,17 @@
|
||||
Changelog
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="https://gitlab.com/msberends/AMR">
|
||||
<span class="fab fa fab fa-gitlab"></span>
|
||||
|
||||
Source Code
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<li>
|
||||
<a href="../LICENSE-text.html">
|
||||
<span class="fa fa-book"></span>
|
||||
|
||||
@@ -196,6 +249,12 @@
|
||||
|
||||
<p>- World Health Organization: <a href='https://www.whocc.no/atc_ddd_index/'>https://www.whocc.no/atc_ddd_index/</a> <br /> - EUCAST - Expert rules intrinsic exceptional V3.1 <br /> - MOLIS (LIS of Certe): <a href='https://www.certe.nl'>https://www.certe.nl</a> <br /> - GLIMS (LIS of UMCG): <a href='https://www.umcg.nl'>https://www.umcg.nl</a></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>
|
||||
|
||||
|
||||
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
|
||||
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
|
||||
|
||||
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
|
||||
|
||||
<div class='dont-index'><p><code><a href='microorganisms.html'>microorganisms</a></code></p></div>
|
||||
@@ -210,6 +269,8 @@
|
||||
|
||||
<li><a href="#source">Source</a></li>
|
||||
|
||||
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
|
||||
|
||||
<li><a href="#see-also">See also</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
<meta property="og:description" content="Use this function to determine the ATC code of one or more antibiotics. The data set antibiotics will be searched for abbreviations, official names and trade names." />
|
||||
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -93,12 +93,65 @@
|
||||
Home
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
<span class="fa fa-question-circle"></span>
|
||||
|
||||
How to
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="../articles/AMR.html">
|
||||
<span class="fa fa-directions"></span>
|
||||
|
||||
Get Started
|
||||
Conduct AMR analysis
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/Predict.html">
|
||||
<span class="fa fa-dice"></span>
|
||||
|
||||
Predict antimicrobial resistance
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/EUCAST.html">
|
||||
<span class="fa fa-exchange-alt"></span>
|
||||
|
||||
Apply EUCAST rules
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/mo_property.html">
|
||||
<span class="fa fa-bug"></span>
|
||||
|
||||
Get properties of a microorganism
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/ab_property.html">
|
||||
<span class="fa fa-capsules"></span>
|
||||
|
||||
Get properties of an antibiotic
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/freq.html">
|
||||
<span class="fa fa-sort-amount-down"></span>
|
||||
|
||||
Create frequency tables
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/G_test.html">
|
||||
<span class="fa fa-clipboard-check"></span>
|
||||
|
||||
Use the G-test
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../reference/">
|
||||
@@ -121,17 +174,17 @@
|
||||
Changelog
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="https://gitlab.com/msberends/AMR">
|
||||
<span class="fab fa fab fa-gitlab"></span>
|
||||
|
||||
Source Code
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<li>
|
||||
<a href="../LICENSE-text.html">
|
||||
<span class="fa fa-book"></span>
|
||||
|
||||
@@ -192,26 +245,35 @@
|
||||
<p>In the ATC classification system, the active substances are classified in a hierarchy with five different levels. The system has fourteen main anatomical/pharmacological groups or 1st levels. Each ATC main group is divided into 2nd levels which could be either pharmacological or therapeutic groups. The 3rd and 4th levels are chemical, pharmacological or therapeutic subgroups and the 5th level is the chemical substance. The 2nd, 3rd and 4th levels are often used to identify pharmacological subgroups when that is considered more appropriate than therapeutic or chemical subgroups.
|
||||
Source: <a href='https://www.whocc.no/atc/structure_and_principles/'>https://www.whocc.no/atc/structure_and_principles/</a></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>
|
||||
|
||||
|
||||
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
|
||||
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
|
||||
|
||||
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
|
||||
|
||||
<div class='dont-index'><p><code><a href='antibiotics.html'>antibiotics</a></code> for the dataframe that is being used to determine ATCs.</p></div>
|
||||
|
||||
|
||||
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
|
||||
<pre class="examples"><div class='input'><span class='co'># These examples all return "J01FA01", the ATC code of Erythromycin:</span>
|
||||
<span class='fu'>as.atc</span>(<span class='st'>"J01FA01"</span>)</div><div class='output co'>#> Class 'atc'
|
||||
#> [1] J01FA01</div><div class='input'><span class='fu'>as.atc</span>(<span class='st'>"Erythromycin"</span>)</div><div class='output co'>#> Class 'atc'
|
||||
#> [1] J01FA01</div><div class='input'><span class='fu'>as.atc</span>(<span class='st'>"eryt"</span>)</div><div class='output co'>#> Class 'atc'
|
||||
#> [1] J01FA01</div><div class='input'><span class='fu'>as.atc</span>(<span class='st'>" eryt 123"</span>)</div><div class='output co'>#> Class 'atc'
|
||||
#> [1] J01FA01</div><div class='input'><span class='fu'>as.atc</span>(<span class='st'>"ERYT"</span>)</div><div class='output co'>#> Class 'atc'
|
||||
#> [1] J01FA01</div><div class='input'><span class='fu'>as.atc</span>(<span class='st'>"ERY"</span>)</div><div class='output co'>#> Class 'atc'
|
||||
#> [1] J01FA01</div><div class='input'><span class='fu'>as.atc</span>(<span class='st'>"Erythrocin"</span>) <span class='co'># Trade name</span></div><div class='output co'>#> Class 'atc'
|
||||
#> [1] J01FA01</div><div class='input'><span class='fu'>as.atc</span>(<span class='st'>"Eryzole"</span>) <span class='co'># Trade name</span></div><div class='output co'>#> Class 'atc'
|
||||
#> [1] J01FA01</div><div class='input'><span class='fu'>as.atc</span>(<span class='st'>"Pediamycin"</span>) <span class='co'># Trade name</span></div><div class='output co'>#> Class 'atc'
|
||||
#> [1] J01FA01</div><div class='input'>
|
||||
<pre class="examples"><span class='co'># NOT RUN {</span>
|
||||
<span class='co'># These examples all return "J01FA01", the ATC code of Erythromycin:</span>
|
||||
<span class='fu'>as.atc</span>(<span class='st'>"J01FA01"</span>)
|
||||
<span class='fu'>as.atc</span>(<span class='st'>"Erythromycin"</span>)
|
||||
<span class='fu'>as.atc</span>(<span class='st'>"eryt"</span>)
|
||||
<span class='fu'>as.atc</span>(<span class='st'>" eryt 123"</span>)
|
||||
<span class='fu'>as.atc</span>(<span class='st'>"ERYT"</span>)
|
||||
<span class='fu'>as.atc</span>(<span class='st'>"ERY"</span>)
|
||||
<span class='fu'>as.atc</span>(<span class='st'>"Erythrocin"</span>) <span class='co'># Trade name</span>
|
||||
<span class='fu'>as.atc</span>(<span class='st'>"Eryzole"</span>) <span class='co'># Trade name</span>
|
||||
<span class='fu'>as.atc</span>(<span class='st'>"Pediamycin"</span>) <span class='co'># Trade name</span>
|
||||
|
||||
<span class='co'># Use ab_* functions to get a specific property based on an ATC code</span>
|
||||
<span class='no'>Cipro</span> <span class='kw'><-</span> <span class='fu'>as.atc</span>(<span class='st'>"cipro"</span>) <span class='co'># returns `J01MA02`</span>
|
||||
<span class='fu'><a href='ab_property.html'>ab_official</a></span>(<span class='no'>Cipro</span>) <span class='co'># returns "Ciprofloxacin"</span></div><div class='output co'>#> [1] "Ciprofloxacin"</div><div class='input'><span class='fu'><a href='ab_property.html'>ab_umcg</a></span>(<span class='no'>Cipro</span>) <span class='co'># returns "CIPR", the code used in the UMCG</span></div><div class='output co'>#> [1] "CIPR"</div></pre>
|
||||
<span class='fu'><a href='ab_property.html'>ab_official</a></span>(<span class='no'>Cipro</span>) <span class='co'># returns "Ciprofloxacin"</span>
|
||||
<span class='fu'><a href='ab_property.html'>ab_umcg</a></span>(<span class='no'>Cipro</span>) <span class='co'># returns "CIPR", the code used in the UMCG</span>
|
||||
<span class='co'># }</span></pre>
|
||||
</div>
|
||||
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
|
||||
<h2>Contents</h2>
|
||||
@@ -222,6 +284,8 @@
|
||||
|
||||
<li><a href="#details">Details</a></li>
|
||||
|
||||
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
|
||||
|
||||
<li><a href="#see-also">See also</a></li>
|
||||
|
||||
<li><a href="#examples">Examples</a></li>
|
||||
|
||||
|
Before Width: | Height: | Size: 20 KiB |
@@ -49,7 +49,7 @@
|
||||
|
||||
<meta property="og:description" content="This transforms a vector to a new class mic, which is an ordered factor with valid MIC values as levels. Invalid MIC values will be translated as NA with a warning." />
|
||||
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -93,12 +93,65 @@
|
||||
Home
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
<span class="fa fa-question-circle"></span>
|
||||
|
||||
How to
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="../articles/AMR.html">
|
||||
<span class="fa fa-directions"></span>
|
||||
|
||||
Get Started
|
||||
Conduct AMR analysis
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/Predict.html">
|
||||
<span class="fa fa-dice"></span>
|
||||
|
||||
Predict antimicrobial resistance
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/EUCAST.html">
|
||||
<span class="fa fa-exchange-alt"></span>
|
||||
|
||||
Apply EUCAST rules
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/mo_property.html">
|
||||
<span class="fa fa-bug"></span>
|
||||
|
||||
Get properties of a microorganism
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/ab_property.html">
|
||||
<span class="fa fa-capsules"></span>
|
||||
|
||||
Get properties of an antibiotic
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/freq.html">
|
||||
<span class="fa fa-sort-amount-down"></span>
|
||||
|
||||
Create frequency tables
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/G_test.html">
|
||||
<span class="fa fa-clipboard-check"></span>
|
||||
|
||||
Use the G-test
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../reference/">
|
||||
@@ -121,17 +174,17 @@
|
||||
Changelog
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="https://gitlab.com/msberends/AMR">
|
||||
<span class="fab fa fab fa-gitlab"></span>
|
||||
|
||||
Source Code
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<li>
|
||||
<a href="../LICENSE-text.html">
|
||||
<span class="fa fa-book"></span>
|
||||
|
||||
@@ -188,31 +241,29 @@
|
||||
|
||||
<p>Ordered factor with new class <code>mic</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>
|
||||
|
||||
|
||||
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
|
||||
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
|
||||
|
||||
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
|
||||
|
||||
<div class='dont-index'><p><code><a href='as.rsi.html'>as.rsi</a></code></p></div>
|
||||
|
||||
|
||||
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
|
||||
<pre class="examples"><div class='input'><span class='no'>mic_data</span> <span class='kw'><-</span> <span class='fu'>as.mic</span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>">=32"</span>, <span class='st'>"1.0"</span>, <span class='st'>"1"</span>, <span class='st'>"1.00"</span>, <span class='fl'>8</span>, <span class='st'>"<=0.128"</span>, <span class='st'>"8"</span>, <span class='st'>"16"</span>, <span class='st'>"16"</span>))
|
||||
<span class='fu'>is.mic</span>(<span class='no'>mic_data</span>)</div><div class='output co'>#> [1] TRUE</div><div class='input'>
|
||||
<pre class="examples"><span class='co'># NOT RUN {</span>
|
||||
<span class='no'>mic_data</span> <span class='kw'><-</span> <span class='fu'>as.mic</span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>">=32"</span>, <span class='st'>"1.0"</span>, <span class='st'>"1"</span>, <span class='st'>"1.00"</span>, <span class='fl'>8</span>, <span class='st'>"<=0.128"</span>, <span class='st'>"8"</span>, <span class='st'>"16"</span>, <span class='st'>"16"</span>))
|
||||
<span class='fu'>is.mic</span>(<span class='no'>mic_data</span>)
|
||||
|
||||
<span class='co'># this can also coerce combined MIC/RSI values:</span>
|
||||
<span class='fu'>as.mic</span>(<span class='st'>"<=0.002; S"</span>) <span class='co'># will return <=0.002</span></div><div class='output co'>#> Class 'mic'
|
||||
#> [1] <=0.002</div><div class='input'>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/graphics/topics/plot'>plot</a></span>(<span class='no'>mic_data</span>)</div><div class='input'><span class='fu'><a href='https://www.rdocumentation.org/packages/graphics/topics/barplot'>barplot</a></span>(<span class='no'>mic_data</span>)</div><div class='img'><img src='as.mic-1.png' alt='' width='700' height='433' /></div><div class='input'><span class='fu'><a href='freq.html'>freq</a></span>(<span class='no'>mic_data</span>)</div><div class='output co'>#>
|
||||
#>
|
||||
#> **Frequency table**
|
||||
#>
|
||||
#>
|
||||
#> | |Item | Count| Percent| Cum. Count| Cum. Percent|
|
||||
#> |:--|:-------|-----:|-------:|----------:|------------:|
|
||||
#> |1 |1 | 3| 33.3%| 3| 33.3%|
|
||||
#> |2 |8 | 2| 22.2%| 5| 55.6%|
|
||||
#> |3 |16 | 2| 22.2%| 7| 77.8%|
|
||||
#> |4 |<=0.128 | 1| 11.1%| 8| 88.9%|
|
||||
#> |5 |>=32 | 1| 11.1%| 9| 100.0%|
|
||||
#>
|
||||
#> </div></pre>
|
||||
<span class='fu'>as.mic</span>(<span class='st'>"<=0.002; S"</span>) <span class='co'># will return <=0.002</span>
|
||||
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/graphics/topics/plot'>plot</a></span>(<span class='no'>mic_data</span>)
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/graphics/topics/barplot'>barplot</a></span>(<span class='no'>mic_data</span>)
|
||||
<span class='fu'><a href='freq.html'>freq</a></span>(<span class='no'>mic_data</span>)
|
||||
<span class='co'># }</span></pre>
|
||||
</div>
|
||||
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
|
||||
<h2>Contents</h2>
|
||||
@@ -221,6 +272,8 @@
|
||||
|
||||
<li><a href="#value">Value</a></li>
|
||||
|
||||
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
|
||||
|
||||
<li><a href="#see-also">See also</a></li>
|
||||
|
||||
<li><a href="#examples">Examples</a></li>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
<meta property="og:description" content="Use this function to determine a valid microorganism ID (mo). Determination is done using Artificial Intelligence (AI) and the complete taxonomic kingdoms Bacteria, Fungi and Protozoa (see Source), so the input can be almost anything: a full name (like "Staphylococcus aureus"), an abbreviated name (like "S. aureus"), an abbreviation known in the field (like "MRSA"), or just a genus. You could also select a genus and species column, zie Examples." />
|
||||
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -93,12 +93,65 @@
|
||||
Home
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
<span class="fa fa-question-circle"></span>
|
||||
|
||||
How to
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="../articles/AMR.html">
|
||||
<span class="fa fa-directions"></span>
|
||||
|
||||
Get Started
|
||||
Conduct AMR analysis
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/Predict.html">
|
||||
<span class="fa fa-dice"></span>
|
||||
|
||||
Predict antimicrobial resistance
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/EUCAST.html">
|
||||
<span class="fa fa-exchange-alt"></span>
|
||||
|
||||
Apply EUCAST rules
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/mo_property.html">
|
||||
<span class="fa fa-bug"></span>
|
||||
|
||||
Get properties of a microorganism
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/ab_property.html">
|
||||
<span class="fa fa-capsules"></span>
|
||||
|
||||
Get properties of an antibiotic
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/freq.html">
|
||||
<span class="fa fa-sort-amount-down"></span>
|
||||
|
||||
Create frequency tables
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/G_test.html">
|
||||
<span class="fa fa-clipboard-check"></span>
|
||||
|
||||
Use the G-test
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../reference/">
|
||||
@@ -121,17 +174,17 @@
|
||||
Changelog
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="https://gitlab.com/msberends/AMR">
|
||||
<span class="fab fa fab fa-gitlab"></span>
|
||||
|
||||
Source Code
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<li>
|
||||
<a href="../LICENSE-text.html">
|
||||
<span class="fa fa-book"></span>
|
||||
|
||||
@@ -241,6 +294,13 @@
|
||||
</ul>
|
||||
<p><code>guess_mo</code> is an alias of <code>as.mo</code>.</p>
|
||||
|
||||
<h2 class="hasAnchor" id="source"><a class="anchor" href="#source"></a>Source</h2>
|
||||
|
||||
|
||||
<p>[1] Becker K <em>et al.</em> <strong>Coagulase-Negative Staphylococci</strong>. 2014. Clin Microbiol Rev. 27(4): 870–926. <a href='https://dx.doi.org/10.1128/CMR.00109-13'>https://dx.doi.org/10.1128/CMR.00109-13</a></p>
|
||||
<p>[2] Lancefield RC <strong>A serological differentiation of human and other groups of hemolytic streptococci</strong>. 1933. J Exp Med. 57(4): 571–95. <a href='https://dx.doi.org/10.1084/jem.57.4.571'>https://dx.doi.org/10.1084/jem.57.4.571</a></p>
|
||||
<p>[3] Integrated Taxonomic Information System (ITIS). Retrieved September 2018. <a href='http://www.itis.gov'>http://www.itis.gov</a></p>
|
||||
|
||||
<h2 class="hasAnchor" id="itis"><a class="anchor" href="#itis"></a>ITIS</h2>
|
||||
|
||||
|
||||
@@ -249,12 +309,11 @@ This package contains the <strong>complete microbial taxonomic data</strong> (wi
|
||||
<p>All (sub)species from <strong>the taxonomic kingdoms Bacteria, Fungi and Protozoa are included in this package</strong>, as well as all previously accepted names known to ITIS. Furthermore, the responsible authors and year of publication are available. This allows users to use authoritative taxonomic information for their data analysis on any microorganism, not only human pathogens. It also helps to quickly determine the Gram stain of bacteria, since all bacteria are classified into subkingdom Negibacteria or Posibacteria.</p>
|
||||
<p>ITIS is a partnership of U.S., Canadian, and Mexican agencies and taxonomic specialists [3].</p>
|
||||
|
||||
<h2 class="hasAnchor" id="source"><a class="anchor" href="#source"></a>Source</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>
|
||||
|
||||
|
||||
<p>[1] Becker K <em>et al.</em> <strong>Coagulase-Negative Staphylococci</strong>. 2014. Clin Microbiol Rev. 27(4): 870–926. <a href='https://dx.doi.org/10.1128/CMR.00109-13'>https://dx.doi.org/10.1128/CMR.00109-13</a></p>
|
||||
<p>[2] Lancefield RC <strong>A serological differentiation of human and other groups of hemolytic streptococci</strong>. 1933. J Exp Med. 57(4): 571–95. <a href='https://dx.doi.org/10.1084/jem.57.4.571'>https://dx.doi.org/10.1084/jem.57.4.571</a></p>
|
||||
<p>[3] Integrated Taxonomic Information System (ITIS). Retrieved September 2018. <a href='http://www.itis.gov'>http://www.itis.gov</a></p>
|
||||
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
|
||||
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
|
||||
|
||||
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
|
||||
|
||||
@@ -263,52 +322,56 @@ The <code><a href='mo_property.html'>mo_property</a></code> functions (like <cod
|
||||
|
||||
|
||||
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
|
||||
<pre class="examples"><div class='input'><span class='co'># These examples all return "B_STPHY_AUR", the ID of S. aureus:</span>
|
||||
<span class='fu'>as.mo</span>(<span class='st'>"stau"</span>)</div><div class='output co'>#> Class 'mo'
|
||||
#> [1] B_STPHY_AUR</div><div class='input'><span class='fu'>as.mo</span>(<span class='st'>"STAU"</span>)</div><div class='output co'>#> Class 'mo'
|
||||
#> [1] B_STPHY_AUR</div><div class='input'><span class='fu'>as.mo</span>(<span class='st'>"staaur"</span>)</div><div class='output co'>#> Class 'mo'
|
||||
#> [1] B_STPHY_AUR</div><div class='input'><span class='fu'>as.mo</span>(<span class='st'>"S. aureus"</span>)</div><div class='output co'>#> Class 'mo'
|
||||
#> [1] B_STPHY_AUR</div><div class='input'><span class='fu'>as.mo</span>(<span class='st'>"S aureus"</span>)</div><div class='output co'>#> Class 'mo'
|
||||
#> [1] B_STPHY_AUR</div><div class='input'><span class='fu'>as.mo</span>(<span class='st'>"Staphylococcus aureus"</span>)</div><div class='output co'>#> Class 'mo'
|
||||
#> [1] B_STPHY_AUR</div><div class='input'><span class='fu'>as.mo</span>(<span class='st'>"Staphylococcus aureus (MRSA)"</span>)</div><div class='output co'>#> <span class='warning'>Warning: <span style='color: #BB0000;'>UNCERTAIN - "Staphylococcus aureus (MRSA)" -> </span><span style='color: #BB0000;font-style: italic;'>Staphylococcus aureus</span><span style='color: #BB0000;'> (B_STPHY_AUR)</span><span></span></div><div class='output co'>#> Class 'mo'
|
||||
#> [1] B_STPHY_AUR</div><div class='input'><span class='fu'>as.mo</span>(<span class='st'>"MRSA"</span>) <span class='co'># Methicillin Resistant S. aureus</span></div><div class='output co'>#> Class 'mo'
|
||||
#> [1] B_STPHY_AUR</div><div class='input'><span class='fu'>as.mo</span>(<span class='st'>"VISA"</span>) <span class='co'># Vancomycin Intermediate S. aureus</span></div><div class='output co'>#> Class 'mo'
|
||||
#> [1] B_STPHY_AUR</div><div class='input'><span class='fu'>as.mo</span>(<span class='st'>"VRSA"</span>) <span class='co'># Vancomycin Resistant S. aureus</span></div><div class='output co'>#> Class 'mo'
|
||||
#> [1] B_STPHY_AUR</div><div class='input'><span class='fu'>as.mo</span>(<span class='fl'>369</span>) <span class='co'># Search on TSN (Taxonomic Serial Number), a unique identifier</span></div><div class='output co'>#> Class 'mo'
|
||||
#> [1] B_STPHY_AUR</div><div class='input'> <span class='co'># for the Integrated Taxonomic Information System (ITIS)</span>
|
||||
<pre class="examples"><span class='co'># NOT RUN {</span>
|
||||
<span class='co'># These examples all return "B_STPHY_AUR", the ID of S. aureus:</span>
|
||||
<span class='fu'>as.mo</span>(<span class='st'>"stau"</span>)
|
||||
<span class='fu'>as.mo</span>(<span class='st'>"STAU"</span>)
|
||||
<span class='fu'>as.mo</span>(<span class='st'>"staaur"</span>)
|
||||
<span class='fu'>as.mo</span>(<span class='st'>"S. aureus"</span>)
|
||||
<span class='fu'>as.mo</span>(<span class='st'>"S aureus"</span>)
|
||||
<span class='fu'>as.mo</span>(<span class='st'>"Staphylococcus aureus"</span>)
|
||||
<span class='fu'>as.mo</span>(<span class='st'>"Staphylococcus aureus (MRSA)"</span>)
|
||||
<span class='fu'>as.mo</span>(<span class='st'>"MRSA"</span>) <span class='co'># Methicillin Resistant S. aureus</span>
|
||||
<span class='fu'>as.mo</span>(<span class='st'>"VISA"</span>) <span class='co'># Vancomycin Intermediate S. aureus</span>
|
||||
<span class='fu'>as.mo</span>(<span class='st'>"VRSA"</span>) <span class='co'># Vancomycin Resistant S. aureus</span>
|
||||
<span class='fu'>as.mo</span>(<span class='fl'>369</span>) <span class='co'># Search on TSN (Taxonomic Serial Number), a unique identifier</span>
|
||||
<span class='co'># for the Integrated Taxonomic Information System (ITIS)</span>
|
||||
|
||||
<span class='fu'>as.mo</span>(<span class='st'>"Streptococcus group A"</span>)
|
||||
<span class='fu'>as.mo</span>(<span class='st'>"GAS"</span>) <span class='co'># Group A Streptococci</span>
|
||||
<span class='fu'>as.mo</span>(<span class='st'>"GBS"</span>) <span class='co'># Group B Streptococci</span>
|
||||
|
||||
<span class='fu'>as.mo</span>(<span class='st'>"Streptococcus group A"</span>)</div><div class='output co'>#> Class 'mo'
|
||||
#> [1] B_STRPTC_GRA</div><div class='input'><span class='fu'>as.mo</span>(<span class='st'>"GAS"</span>) <span class='co'># Group A Streptococci</span></div><div class='output co'>#> Class 'mo'
|
||||
#> [1] B_STRPTC_GRA</div><div class='input'><span class='fu'>as.mo</span>(<span class='st'>"GBS"</span>) <span class='co'># Group B Streptococci</span></div><div class='output co'>#> Class 'mo'
|
||||
#> [1] B_STRPTC_GRB</div><div class='input'>
|
||||
<span class='co'># guess_mo is an alias of as.mo and works the same</span>
|
||||
<span class='fu'>guess_mo</span>(<span class='st'>"S. epidermidis"</span>) <span class='co'># will remain species: B_STPHY_EPI</span></div><div class='output co'>#> Class 'mo'
|
||||
#> [1] B_STPHY_EPI</div><div class='input'><span class='fu'>guess_mo</span>(<span class='st'>"S. epidermidis"</span>, <span class='kw'>Becker</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) <span class='co'># will not remain species: B_STPHY_CNS</span></div><div class='output co'>#> Class 'mo'
|
||||
#> [1] B_STPHY_CNS</div><div class='input'>
|
||||
<span class='fu'>guess_mo</span>(<span class='st'>"S. pyogenes"</span>) <span class='co'># will remain species: B_STRPTC_PYO</span></div><div class='output co'>#> Class 'mo'
|
||||
#> [1] B_STRPTC_PYO</div><div class='input'><span class='fu'>guess_mo</span>(<span class='st'>"S. pyogenes"</span>, <span class='kw'>Lancefield</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) <span class='co'># will not remain species: B_STRPTC_GRA</span></div><div class='output co'>#> Class 'mo'
|
||||
#> [1] B_STRPTC_GRA</div><div class='input'>
|
||||
<span class='fu'>guess_mo</span>(<span class='st'>"S. epidermidis"</span>) <span class='co'># will remain species: B_STPHY_EPI</span>
|
||||
<span class='fu'>guess_mo</span>(<span class='st'>"S. epidermidis"</span>, <span class='kw'>Becker</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) <span class='co'># will not remain species: B_STPHY_CNS</span>
|
||||
|
||||
<span class='fu'>guess_mo</span>(<span class='st'>"S. pyogenes"</span>) <span class='co'># will remain species: B_STRPTC_PYO</span>
|
||||
<span class='fu'>guess_mo</span>(<span class='st'>"S. pyogenes"</span>, <span class='kw'>Lancefield</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) <span class='co'># will not remain species: B_STRPTC_GRA</span>
|
||||
|
||||
<span class='co'># Use mo_* functions to get a specific property based on `mo`</span>
|
||||
<span class='no'>Ecoli</span> <span class='kw'><-</span> <span class='fu'>as.mo</span>(<span class='st'>"E. coli"</span>) <span class='co'># returns `B_ESCHR_COL`</span>
|
||||
<span class='fu'><a href='mo_property.html'>mo_genus</a></span>(<span class='no'>Ecoli</span>) <span class='co'># returns "Escherichia"</span></div><div class='output co'>#> [1] "Escherichia"</div><div class='input'><span class='fu'><a href='mo_property.html'>mo_gramstain</a></span>(<span class='no'>Ecoli</span>) <span class='co'># returns "Gram negative"</span></div><div class='output co'>#> [1] "Gram-negatief"</div><div class='input'><span class='co'># but it uses as.mo internally too, so you could also just use:</span>
|
||||
<span class='fu'><a href='mo_property.html'>mo_genus</a></span>(<span class='st'>"E. coli"</span>) <span class='co'># returns "Escherichia"</span></div><div class='output co'>#> [1] "Escherichia"</div><div class='input'>
|
||||
<span class='fu'><a href='mo_property.html'>mo_genus</a></span>(<span class='no'>Ecoli</span>) <span class='co'># returns "Escherichia"</span>
|
||||
<span class='fu'><a href='mo_property.html'>mo_gramstain</a></span>(<span class='no'>Ecoli</span>) <span class='co'># returns "Gram negative"</span>
|
||||
<span class='co'># but it uses as.mo internally too, so you could also just use:</span>
|
||||
<span class='fu'><a href='mo_property.html'>mo_genus</a></span>(<span class='st'>"E. coli"</span>) <span class='co'># returns "Escherichia"</span>
|
||||
|
||||
</div></span><span class='co'># NOT RUN {</span>
|
||||
|
||||
<span class='co'># }</span><span class='co'># NOT RUN {</span>
|
||||
<span class='no'>df</span>$<span class='no'>mo</span> <span class='kw'><-</span> <span class='fu'>as.mo</span>(<span class='no'>df</span>$<span class='no'>microorganism_name</span>)
|
||||
|
||||
<span class='co'># the select function of tidyverse is also supported:</span>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/library'>library</a></span>(<span class='no'>dplyr</span>)
|
||||
<span class='no'>df</span>$<span class='no'>mo</span> <span class='kw'><-</span> <span class='no'>df</span> <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/select.html'>select</a></span>(<span class='no'>microorganism_name</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/select'>select</a></span>(<span class='no'>microorganism_name</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'>as.mo</span>()
|
||||
|
||||
<span class='co'># and can even contain 2 columns, which is convenient for genus/species combinations:</span>
|
||||
<span class='no'>df</span>$<span class='no'>mo</span> <span class='kw'><-</span> <span class='no'>df</span> <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/select.html'>select</a></span>(<span class='no'>genus</span>, <span class='no'>species</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/select'>select</a></span>(<span class='no'>genus</span>, <span class='no'>species</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'>as.mo</span>()
|
||||
<span class='co'># although this works easier and does the same:</span>
|
||||
<span class='no'>df</span> <span class='kw'><-</span> <span class='no'>df</span> <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/mutate.html'>mutate</a></span>(<span class='kw'>mo</span> <span class='kw'>=</span> <span class='fu'>as.mo</span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/paste'>paste</a></span>(<span class='no'>genus</span>, <span class='no'>species</span>)))
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/mutate'>mutate</a></span>(<span class='kw'>mo</span> <span class='kw'>=</span> <span class='fu'>as.mo</span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/paste'>paste</a></span>(<span class='no'>genus</span>, <span class='no'>species</span>)))
|
||||
<span class='co'># }</span></pre>
|
||||
</div>
|
||||
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
|
||||
@@ -320,9 +383,11 @@ The <code><a href='mo_property.html'>mo_property</a></code> functions (like <cod
|
||||
|
||||
<li><a href="#details">Details</a></li>
|
||||
|
||||
<li><a href="#source">Source</a></li>
|
||||
|
||||
<li><a href="#itis">ITIS</a></li>
|
||||
|
||||
<li><a href="#source">Source</a></li>
|
||||
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
|
||||
|
||||
<li><a href="#see-also">See also</a></li>
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 26 KiB |
@@ -49,7 +49,7 @@
|
||||
|
||||
<meta property="og:description" content="Gets data from the WHO to determine properties of an ATC (e.g. an antibiotic) like name, defined daily dose (DDD) or standard unit. This function requires an internet connection." />
|
||||
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -93,12 +93,65 @@
|
||||
Home
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
<span class="fa fa-question-circle"></span>
|
||||
|
||||
How to
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="../articles/AMR.html">
|
||||
<span class="fa fa-directions"></span>
|
||||
|
||||
Get Started
|
||||
Conduct AMR analysis
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/Predict.html">
|
||||
<span class="fa fa-dice"></span>
|
||||
|
||||
Predict antimicrobial resistance
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/EUCAST.html">
|
||||
<span class="fa fa-exchange-alt"></span>
|
||||
|
||||
Apply EUCAST rules
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/mo_property.html">
|
||||
<span class="fa fa-bug"></span>
|
||||
|
||||
Get properties of a microorganism
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/ab_property.html">
|
||||
<span class="fa fa-capsules"></span>
|
||||
|
||||
Get properties of an antibiotic
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/freq.html">
|
||||
<span class="fa fa-sort-amount-down"></span>
|
||||
|
||||
Create frequency tables
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/G_test.html">
|
||||
<span class="fa fa-clipboard-check"></span>
|
||||
|
||||
Use the G-test
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../reference/">
|
||||
@@ -121,17 +174,17 @@
|
||||
Changelog
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="https://gitlab.com/msberends/AMR">
|
||||
<span class="fab fa fab fa-gitlab"></span>
|
||||
|
||||
Source Code
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<li>
|
||||
<a href="../LICENSE-text.html">
|
||||
<span class="fa fa-book"></span>
|
||||
|
||||
@@ -230,21 +283,22 @@
|
||||
|
||||
|
||||
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
|
||||
<pre class="examples"><div class='input'><span class='co'># What's the ATC of amoxicillin?</span>
|
||||
<span class='fu'><a href='as.atc.html'>guess_atc</a></span>(<span class='st'>"Amoxicillin"</span>)</div><div class='output co'>#> Class 'atc'
|
||||
#> [1] J01CA04</div><div class='input'><span class='co'># [1] "J01CA04"</span>
|
||||
<pre class="examples"><span class='co'># NOT RUN {</span>
|
||||
<span class='co'># What's the ATC of amoxicillin?</span>
|
||||
<span class='fu'><a href='as.atc.html'>guess_atc</a></span>(<span class='st'>"Amoxicillin"</span>)
|
||||
<span class='co'># [1] "J01CA04"</span>
|
||||
|
||||
<span class='co'># oral DDD (Defined Daily Dose) of amoxicillin</span>
|
||||
<span class='fu'>atc_property</span>(<span class='st'>"J01CA04"</span>, <span class='st'>"DDD"</span>, <span class='st'>"O"</span>)</div><div class='output co'>#> [1] 1.5</div><div class='input'><span class='co'># parenteral DDD (Defined Daily Dose) of amoxicillin</span>
|
||||
<span class='fu'>atc_property</span>(<span class='st'>"J01CA04"</span>, <span class='st'>"DDD"</span>, <span class='st'>"P"</span>)</div><div class='output co'>#> [1] 3</div><div class='input'>
|
||||
<span class='fu'>atc_property</span>(<span class='st'>"J01CA04"</span>, <span class='kw'>property</span> <span class='kw'>=</span> <span class='st'>"groups"</span>) <span class='co'># search hierarchical groups of amoxicillin</span></div><div class='output co'>#> [1] "ANTIINFECTIVES FOR SYSTEMIC USE"
|
||||
#> [2] "ANTIBACTERIALS FOR SYSTEMIC USE"
|
||||
#> [3] "BETA-LACTAM ANTIBACTERIALS, PENICILLINS"
|
||||
#> [4] "Penicillins with extended spectrum" </div><div class='input'># [1] "ANTIINFECTIVES FOR SYSTEMIC USE"
|
||||
# [2] "ANTIBACTERIALS FOR SYSTEMIC USE"
|
||||
# [3] "BETA-LACTAM ANTIBACTERIALS, PENICILLINS"
|
||||
# [4] "Penicillins with extended spectrum"
|
||||
</div></pre>
|
||||
<span class='fu'>atc_property</span>(<span class='st'>"J01CA04"</span>, <span class='st'>"DDD"</span>, <span class='st'>"O"</span>)
|
||||
<span class='co'># parenteral DDD (Defined Daily Dose) of amoxicillin</span>
|
||||
<span class='fu'>atc_property</span>(<span class='st'>"J01CA04"</span>, <span class='st'>"DDD"</span>, <span class='st'>"P"</span>)
|
||||
|
||||
<span class='fu'>atc_property</span>(<span class='st'>"J01CA04"</span>, <span class='kw'>property</span> <span class='kw'>=</span> <span class='st'>"groups"</span>) <span class='co'># search hierarchical groups of amoxicillin</span>
|
||||
<span class='co'># [1] "ANTIINFECTIVES FOR SYSTEMIC USE"</span>
|
||||
<span class='co'># [2] "ANTIBACTERIALS FOR SYSTEMIC USE"</span>
|
||||
<span class='co'># [3] "BETA-LACTAM ANTIBACTERIALS, PENICILLINS"</span>
|
||||
<span class='co'># [4] "Penicillins with extended spectrum"</span>
|
||||
<span class='co'># }</span></pre>
|
||||
</div>
|
||||
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
|
||||
<h2>Contents</h2>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<meta property="og:description" content="These functions can be used to count resistant/susceptible microbial isolates. All functions support quasiquotation with pipes, can be used in dplyrs summarise and support grouped variables, see Examples.
|
||||
count_R and count_IR can be used to count resistant isolates, count_S and count_SI can be used to count susceptible isolates." />
|
||||
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ count_R and count_IR can be used to count resistant isolates, count_S and count_
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -94,12 +94,65 @@ count_R and count_IR can be used to count resistant isolates, count_S and count_
|
||||
Home
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
<span class="fa fa-question-circle"></span>
|
||||
|
||||
How to
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="../articles/AMR.html">
|
||||
<span class="fa fa-directions"></span>
|
||||
|
||||
Get Started
|
||||
Conduct AMR analysis
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/Predict.html">
|
||||
<span class="fa fa-dice"></span>
|
||||
|
||||
Predict antimicrobial resistance
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/EUCAST.html">
|
||||
<span class="fa fa-exchange-alt"></span>
|
||||
|
||||
Apply EUCAST rules
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/mo_property.html">
|
||||
<span class="fa fa-bug"></span>
|
||||
|
||||
Get properties of a microorganism
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/ab_property.html">
|
||||
<span class="fa fa-capsules"></span>
|
||||
|
||||
Get properties of an antibiotic
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/freq.html">
|
||||
<span class="fa fa-sort-amount-down"></span>
|
||||
|
||||
Create frequency tables
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/G_test.html">
|
||||
<span class="fa fa-clipboard-check"></span>
|
||||
|
||||
Use the G-test
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../reference/">
|
||||
@@ -122,17 +175,17 @@ count_R and count_IR can be used to count resistant isolates, count_S and count_
|
||||
Changelog
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="https://gitlab.com/msberends/AMR">
|
||||
<span class="fab fa fab fa-gitlab"></span>
|
||||
|
||||
Source Code
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<li>
|
||||
<a href="../LICENSE-text.html">
|
||||
<span class="fa fa-book"></span>
|
||||
|
||||
@@ -222,79 +275,79 @@ count_R and count_IR can be used to count resistant isolates, count_S and count_
|
||||
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
|
||||
|
||||
<p>These functions are meant to count isolates. Use the <code><a href='portion.html'>portion</a>_*</code> functions to calculate microbial resistance.</p>
|
||||
<p><code>n_rsi</code> is an alias of <code>count_all</code>. They can be used to count all available isolates, i.e. where all input antibiotics have an available result (S, I or R). Their use is equal to <code><a href='http://dplyr.tidyverse.org/reference/n_distinct.html'>n_distinct</a></code>. Their function is equal to <code>count_S(...) + count_IR(...)</code>.</p>
|
||||
<p><code>n_rsi</code> is an alias of <code>count_all</code>. They can be used to count all available isolates, i.e. where all input antibiotics have an available result (S, I or R). Their use is equal to <code><a href='https://www.rdocumentation.org/packages/dplyr/topics/n_distinct'>n_distinct</a></code>. Their function is equal to <code>count_S(...) + count_IR(...)</code>.</p>
|
||||
<p><code>count_df</code> takes any variable from <code>data</code> that has an <code>"rsi"</code> class (created with <code><a href='as.rsi.html'>as.rsi</a></code>) and counts the amounts of R, I and S. The resulting <em>tidy data</em> (see Source) <code>data.frame</code> will have three rows (S/I/R) and a column for each variable with class <code>"rsi"</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>
|
||||
|
||||
|
||||
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
|
||||
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
|
||||
|
||||
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
|
||||
|
||||
<div class='dont-index'><p><code><a href='portion.html'>portion</a>_*</code> to calculate microbial resistance and susceptibility.</p></div>
|
||||
|
||||
|
||||
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
|
||||
<pre class="examples"><div class='input'><span class='co'># septic_patients is a data set available in the AMR package. It is true, genuine data.</span>
|
||||
?<span class='no'>septic_patients</span></div><div class='output co'>#> <span class='message'>Rendering development documentation for 'septic_patients'</span></div><div class='input'>
|
||||
<pre class="examples"><span class='co'># NOT RUN {</span>
|
||||
<span class='co'># septic_patients is a data set available in the AMR package. It is true, genuine data.</span>
|
||||
?<span class='no'>septic_patients</span>
|
||||
|
||||
<span class='co'># Count resistant isolates</span>
|
||||
<span class='fu'>count_R</span>(<span class='no'>septic_patients</span>$<span class='no'>amox</span>)</div><div class='output co'>#> [1] 683</div><div class='input'><span class='fu'>count_IR</span>(<span class='no'>septic_patients</span>$<span class='no'>amox</span>)</div><div class='output co'>#> [1] 686</div><div class='input'>
|
||||
<span class='fu'>count_R</span>(<span class='no'>septic_patients</span>$<span class='no'>amox</span>)
|
||||
<span class='fu'>count_IR</span>(<span class='no'>septic_patients</span>$<span class='no'>amox</span>)
|
||||
|
||||
<span class='co'># Or susceptible isolates</span>
|
||||
<span class='fu'>count_S</span>(<span class='no'>septic_patients</span>$<span class='no'>amox</span>)</div><div class='output co'>#> [1] 486</div><div class='input'><span class='fu'>count_SI</span>(<span class='no'>septic_patients</span>$<span class='no'>amox</span>)</div><div class='output co'>#> [1] 489</div><div class='input'>
|
||||
<span class='fu'>count_S</span>(<span class='no'>septic_patients</span>$<span class='no'>amox</span>)
|
||||
<span class='fu'>count_SI</span>(<span class='no'>septic_patients</span>$<span class='no'>amox</span>)
|
||||
|
||||
<span class='co'># Count all available isolates</span>
|
||||
<span class='fu'>count_all</span>(<span class='no'>septic_patients</span>$<span class='no'>amox</span>)</div><div class='output co'>#> [1] 1172</div><div class='input'><span class='fu'>n_rsi</span>(<span class='no'>septic_patients</span>$<span class='no'>amox</span>)</div><div class='output co'>#> [1] 1172</div><div class='input'>
|
||||
<span class='fu'>count_all</span>(<span class='no'>septic_patients</span>$<span class='no'>amox</span>)
|
||||
<span class='fu'>n_rsi</span>(<span class='no'>septic_patients</span>$<span class='no'>amox</span>)
|
||||
|
||||
<span class='co'># Since n_rsi counts available isolates, you can</span>
|
||||
<span class='co'># calculate back to count e.g. non-susceptible isolates.</span>
|
||||
<span class='co'># This results in the same:</span>
|
||||
<span class='fu'>count_IR</span>(<span class='no'>septic_patients</span>$<span class='no'>amox</span>)</div><div class='output co'>#> [1] 686</div><div class='input'><span class='fu'><a href='portion.html'>portion_IR</a></span>(<span class='no'>septic_patients</span>$<span class='no'>amox</span>) * <span class='fu'>n_rsi</span>(<span class='no'>septic_patients</span>$<span class='no'>amox</span>)</div><div class='output co'>#> [1] 686</div><div class='input'>
|
||||
<span class='fu'>count_IR</span>(<span class='no'>septic_patients</span>$<span class='no'>amox</span>)
|
||||
<span class='fu'><a href='portion.html'>portion_IR</a></span>(<span class='no'>septic_patients</span>$<span class='no'>amox</span>) * <span class='fu'>n_rsi</span>(<span class='no'>septic_patients</span>$<span class='no'>amox</span>)
|
||||
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/library'>library</a></span>(<span class='no'>dplyr</span>)
|
||||
<span class='no'>septic_patients</span> <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/group_by.html'>group_by</a></span>(<span class='no'>hospital_id</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/summarise.html'>summarise</a></span>(<span class='kw'>R</span> <span class='kw'>=</span> <span class='fu'>count_R</span>(<span class='no'>cipr</span>),
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/group_by'>group_by</a></span>(<span class='no'>hospital_id</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/summarise'>summarise</a></span>(<span class='kw'>R</span> <span class='kw'>=</span> <span class='fu'>count_R</span>(<span class='no'>cipr</span>),
|
||||
<span class='kw'>I</span> <span class='kw'>=</span> <span class='fu'>count_I</span>(<span class='no'>cipr</span>),
|
||||
<span class='kw'>S</span> <span class='kw'>=</span> <span class='fu'>count_S</span>(<span class='no'>cipr</span>),
|
||||
<span class='kw'>n1</span> <span class='kw'>=</span> <span class='fu'>count_all</span>(<span class='no'>cipr</span>), <span class='co'># the actual total; sum of all three</span>
|
||||
<span class='kw'>n2</span> <span class='kw'>=</span> <span class='fu'>n_rsi</span>(<span class='no'>cipr</span>), <span class='co'># same - analogous to n_distinct</span>
|
||||
<span class='kw'>total</span> <span class='kw'>=</span> <span class='fu'><a href='http://dplyr.tidyverse.org/reference/n.html'>n</a></span>()) <span class='co'># NOT the amount of tested isolates!</span></div><div class='output co'>#> <span style='color: #949494;'># A tibble: 4 x 7</span><span>
|
||||
#> hospital_id R I S n1 n2 total
|
||||
#> </span><span style='color: #949494;font-style: italic;'><fct></span><span> </span><span style='color: #949494;font-style: italic;'><int></span><span> </span><span style='color: #949494;font-style: italic;'><int></span><span> </span><span style='color: #949494;font-style: italic;'><int></span><span> </span><span style='color: #949494;font-style: italic;'><int></span><span> </span><span style='color: #949494;font-style: italic;'><int></span><span> </span><span style='color: #949494;font-style: italic;'><int></span><span>
|
||||
#> </span><span style='color: #BCBCBC;'>1</span><span> A 26 3 178 207 207 321
|
||||
#> </span><span style='color: #BCBCBC;'>2</span><span> B 85 35 379 499 499 663
|
||||
#> </span><span style='color: #BCBCBC;'>3</span><span> C 41 22 139 202 202 254
|
||||
#> </span><span style='color: #BCBCBC;'>4</span><span> D 76 9 416 501 501 762</div><div class='input'>
|
||||
<span class='kw'>total</span> <span class='kw'>=</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/n'>n</a></span>()) <span class='co'># NOT the amount of tested isolates!</span>
|
||||
|
||||
<span class='co'># Count co-resistance between amoxicillin/clav acid and gentamicin,</span>
|
||||
<span class='co'># so we can see that combination therapy does a lot more than mono therapy.</span>
|
||||
<span class='co'># Please mind that `portion_S` calculates percentages right away instead.</span>
|
||||
<span class='fu'>count_S</span>(<span class='no'>septic_patients</span>$<span class='no'>amcl</span>) <span class='co'># S = 1057 (67.1%)</span></div><div class='output co'>#> [1] 1291</div><div class='input'><span class='fu'>count_all</span>(<span class='no'>septic_patients</span>$<span class='no'>amcl</span>) <span class='co'># n = 1576</span></div><div class='output co'>#> [1] 1828</div><div class='input'>
|
||||
<span class='fu'>count_S</span>(<span class='no'>septic_patients</span>$<span class='no'>gent</span>) <span class='co'># S = 1372 (74.0%)</span></div><div class='output co'>#> [1] 1372</div><div class='input'><span class='fu'>count_all</span>(<span class='no'>septic_patients</span>$<span class='no'>gent</span>) <span class='co'># n = 1855</span></div><div class='output co'>#> [1] 1855</div><div class='input'>
|
||||
<span class='fu'>count_S</span>(<span class='no'>septic_patients</span>$<span class='no'>amcl</span>) <span class='co'># S = 1057 (67.1%)</span>
|
||||
<span class='fu'>count_all</span>(<span class='no'>septic_patients</span>$<span class='no'>amcl</span>) <span class='co'># n = 1576</span>
|
||||
|
||||
<span class='fu'>count_S</span>(<span class='no'>septic_patients</span>$<span class='no'>gent</span>) <span class='co'># S = 1372 (74.0%)</span>
|
||||
<span class='fu'>count_all</span>(<span class='no'>septic_patients</span>$<span class='no'>gent</span>) <span class='co'># n = 1855</span>
|
||||
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/with'>with</a></span>(<span class='no'>septic_patients</span>,
|
||||
<span class='fu'>count_S</span>(<span class='no'>amcl</span>, <span class='no'>gent</span>)) <span class='co'># S = 1396 (92.0%)</span></div><div class='output co'>#> [1] 1609</div><div class='input'><span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/with'>with</a></span>(<span class='no'>septic_patients</span>, <span class='co'># n = 1517</span>
|
||||
<span class='fu'>n_rsi</span>(<span class='no'>amcl</span>, <span class='no'>gent</span>))</div><div class='output co'>#> [1] 1747</div><div class='input'>
|
||||
<span class='fu'>count_S</span>(<span class='no'>amcl</span>, <span class='no'>gent</span>)) <span class='co'># S = 1396 (92.0%)</span>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/with'>with</a></span>(<span class='no'>septic_patients</span>, <span class='co'># n = 1517</span>
|
||||
<span class='fu'>n_rsi</span>(<span class='no'>amcl</span>, <span class='no'>gent</span>))
|
||||
|
||||
<span class='co'># Get portions S/I/R immediately of all rsi columns</span>
|
||||
<span class='no'>septic_patients</span> <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/select.html'>select</a></span>(<span class='no'>amox</span>, <span class='no'>cipr</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'>count_df</span>(<span class='kw'>translate</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</div><div class='output co'>#> Interpretation Antibiotic Value
|
||||
#> 1 S amox 486
|
||||
#> 2 I amox 3
|
||||
#> 3 R amox 683
|
||||
#> 4 S cipr 1112
|
||||
#> 5 I cipr 69
|
||||
#> 6 R cipr 228</div><div class='input'>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/select'>select</a></span>(<span class='no'>amox</span>, <span class='no'>cipr</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'>count_df</span>(<span class='kw'>translate</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)
|
||||
|
||||
<span class='co'># It also supports grouping variables</span>
|
||||
<span class='no'>septic_patients</span> <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/select.html'>select</a></span>(<span class='no'>hospital_id</span>, <span class='no'>amox</span>, <span class='no'>cipr</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/group_by.html'>group_by</a></span>(<span class='no'>hospital_id</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'>count_df</span>(<span class='kw'>translate</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</div><div class='output co'>#> </span><span style='color: #949494;'># A tibble: 24 x 4</span><span>
|
||||
#> Interpretation hospital_id Antibiotic Value
|
||||
#> </span><span style='color: #949494;font-style: italic;'><ord></span><span> </span><span style='color: #949494;font-style: italic;'><fct></span><span> </span><span style='color: #949494;font-style: italic;'><chr></span><span> </span><span style='color: #949494;font-style: italic;'><int></span><span>
|
||||
#> </span><span style='color: #BCBCBC;'> 1</span><span> S A amox 63
|
||||
#> </span><span style='color: #BCBCBC;'> 2</span><span> S B amox 141
|
||||
#> </span><span style='color: #BCBCBC;'> 3</span><span> S C amox 59
|
||||
#> </span><span style='color: #BCBCBC;'> 4</span><span> S D amox 223
|
||||
#> </span><span style='color: #BCBCBC;'> 5</span><span> I A amox 0
|
||||
#> </span><span style='color: #BCBCBC;'> 6</span><span> I B amox 1
|
||||
#> </span><span style='color: #BCBCBC;'> 7</span><span> I C amox 0
|
||||
#> </span><span style='color: #BCBCBC;'> 8</span><span> I D amox 2
|
||||
#> </span><span style='color: #BCBCBC;'> 9</span><span> R A amox 87
|
||||
#> </span><span style='color: #BCBCBC;'>10</span><span> R B amox 231
|
||||
#> </span><span style='color: #949494;'># ... with 14 more rows</span><span></div><div class='input'>
|
||||
</div></span></pre>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/select'>select</a></span>(<span class='no'>hospital_id</span>, <span class='no'>amox</span>, <span class='no'>cipr</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/group_by'>group_by</a></span>(<span class='no'>hospital_id</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'>count_df</span>(<span class='kw'>translate</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)
|
||||
|
||||
<span class='co'># }</span></pre>
|
||||
</div>
|
||||
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
|
||||
<h2>Contents</h2>
|
||||
@@ -307,6 +360,8 @@ count_R and count_IR can be used to count resistant isolates, count_S and count_
|
||||
|
||||
<li><a href="#details">Details</a></li>
|
||||
|
||||
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
|
||||
|
||||
<li><a href="#see-also">See also</a></li>
|
||||
|
||||
<li><a href="#examples">Examples</a></li>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
<meta property="og:description" content="Apply susceptibility rules as defined by the European Committee on Antimicrobial Susceptibility Testing (EUCAST, http://eucast.org), see Source. This includes (1) expert rules, (2) intrinsic resistance and (3) inferred resistance as defined in their breakpoint tables." />
|
||||
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -93,12 +93,65 @@
|
||||
Home
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
<span class="fa fa-question-circle"></span>
|
||||
|
||||
How to
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="../articles/AMR.html">
|
||||
<span class="fa fa-directions"></span>
|
||||
|
||||
Get Started
|
||||
Conduct AMR analysis
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/Predict.html">
|
||||
<span class="fa fa-dice"></span>
|
||||
|
||||
Predict antimicrobial resistance
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/EUCAST.html">
|
||||
<span class="fa fa-exchange-alt"></span>
|
||||
|
||||
Apply EUCAST rules
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/mo_property.html">
|
||||
<span class="fa fa-bug"></span>
|
||||
|
||||
Get properties of a microorganism
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/ab_property.html">
|
||||
<span class="fa fa-capsules"></span>
|
||||
|
||||
Get properties of an antibiotic
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/freq.html">
|
||||
<span class="fa fa-sort-amount-down"></span>
|
||||
|
||||
Create frequency tables
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/G_test.html">
|
||||
<span class="fa fa-clipboard-check"></span>
|
||||
|
||||
Use the G-test
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../reference/">
|
||||
@@ -121,17 +174,17 @@
|
||||
Changelog
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="https://gitlab.com/msberends/AMR">
|
||||
<span class="fab fa fab fa-gitlab"></span>
|
||||
|
||||
Source Code
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<li>
|
||||
<a href="../LICENSE-text.html">
|
||||
<span class="fa fa-book"></span>
|
||||
|
||||
@@ -307,51 +360,17 @@
|
||||
<strong>trsu</strong>: sulfamethoxazole and trimethoprim (<em>J01EE01</em>),
|
||||
<strong>vanc</strong>: vancomycin (<em>J01XA01</em>).</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>
|
||||
|
||||
|
||||
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
|
||||
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
|
||||
|
||||
|
||||
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
|
||||
<pre class="examples"><div class='input'><span class='no'>a</span> <span class='kw'><-</span> <span class='fu'>eucast_rules</span>(<span class='no'>septic_patients</span>)</div><div class='output co'>#> <span class='message'><span style='color: #0000BB;'>NOTE: Using column `</span><span style='color: #0000BB;font-weight: bold;'>mo</span><span style='color: #0000BB;'>` as input for `col_mo`.</span><span></span></div><div class='output co'>#> <span class='warning'>Warning: These columns do not exist and will be ignored: azlo, aztr, cefa, cfra, clar, dapt, erta, fusi, levo, linc, mezl, mino, nali, neom, neti, novo, norf, oflo, pipe, poly, pris, qida, roxi, siso, tica.</span>
|
||||
#> <span class='warning'>THIS MAY STRONGLY INFLUENCE THE OUTCOME.</span></div><div class='output co'>#>
|
||||
#> Rules by the European Committee on Antimicrobial Susceptibility Testing (EUCAST)
|
||||
#> </span><span style='font-weight: bold;'>
|
||||
#> EUCAST Clinical Breakpoints (v8.1, 2018)
|
||||
#> </span><span>Enterobacteriales (Order)</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span style='font-style: italic;'>Staphylococcus</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span style='font-style: italic;'>Enterococcus</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span style='font-style: italic;'>Streptococcus</span><span> groups A, B, C, G</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span style='font-style: italic;'>Streptococcus pneumoniae</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span>Viridans group streptococci</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span style='font-style: italic;'>Haemophilus influenzae</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span style='font-style: italic;'>Moraxella catarrhalis</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span>Anaerobic Gram positives</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span>Anaerobic Gram negatives</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span style='font-style: italic;'>Pasteurella multocida</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span style='font-style: italic;'>Campylobacter jejuni</span><span> and </span><span style='font-style: italic;'>C. coli</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span style='font-style: italic;'>Aerococcus sanguinicola</span><span> and </span><span style='font-style: italic;'>A. urinae</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span style='font-style: italic;'>Kingella kingae</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span style='font-weight: bold;'>
|
||||
#> EUCAST Expert Rules, Intrinsic Resistance and Exceptional Phenotypes (v3.1, 2016)
|
||||
#> </span><span>Table 1: Intrinsic resistance in </span><span style='font-style: italic;'>Enterobacteriaceae</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span>Table 2: Intrinsic resistance in non-fermentative Gram-negative bacteria</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span>Table 3: Intrinsic resistance in other Gram-negative bacteria</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span>Table 4: Intrinsic resistance in Gram-positive bacteria</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span>Table 8: Interpretive rules for B-lactam agents and Gram-positive cocci</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span>Table 9: Interpretive rules for B-lactam agents and Gram-negative rods</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span>Table 10: Interpretive rules for B-lactam agents and other Gram-negative bacteria</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span>Table 11: Interpretive rules for macrolides, lincosamides, and streptogramins</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span>Table 12: Interpretive rules for aminoglycosides</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span>Table 13: Interpretive rules for quinolones</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span style='font-weight: bold;'>
|
||||
#> Other rules
|
||||
#> </span><span>Non-EUCAST: ampicillin = R where amoxicillin/clav acid = R</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span>Non-EUCAST: piperacillin = R where piperacillin/tazobactam = R</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span>Non-EUCAST: trimethoprim = R where trimethoprim/sulfa = R</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span>Non-EUCAST: amoxicillin/clav acid = S where ampicillin = S</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span>Non-EUCAST: piperacillin/tazobactam = S where piperacillin = S</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span>Non-EUCAST: trimethoprim/sulfa = S where trimethoprim = S</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span style='font-weight: bold;'>
|
||||
#> => EUCAST rules affected 1,980 out of 2,000 rows -> </span><span style='color: #00BB00;font-weight: bold;'>changed 0 test results.
|
||||
#>
|
||||
#> </span><span></div><div class='input'>
|
||||
<pre class="examples"><span class='co'># NOT RUN {</span>
|
||||
<span class='no'>a</span> <span class='kw'><-</span> <span class='fu'>eucast_rules</span>(<span class='no'>septic_patients</span>)
|
||||
|
||||
<span class='no'>a</span> <span class='kw'><-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/data.frame'>data.frame</a></span>(<span class='kw'>mo</span> <span class='kw'>=</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"Staphylococcus aureus"</span>,
|
||||
<span class='st'>"Enterococcus faecalis"</span>,
|
||||
<span class='st'>"Escherichia coli"</span>,
|
||||
@@ -366,72 +385,24 @@
|
||||
<span class='kw'>cfox</span> <span class='kw'>=</span> <span class='st'>"S"</span>, <span class='co'># Cefoxitin</span>
|
||||
<span class='kw'>stringsAsFactors</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)
|
||||
|
||||
<span class='no'>a</span></div><div class='output co'>#> mo vanc amox coli cfta cfur peni cfox
|
||||
#> 1 Staphylococcus aureus - - - - - S S
|
||||
#> 2 Enterococcus faecalis - - - - - S S
|
||||
#> 3 Escherichia coli - - - - - S S
|
||||
#> 4 Klebsiella pneumoniae - - - - - S S
|
||||
#> 5 Pseudomonas aeruginosa - - - - - S S</div><div class='input'><span class='co'># mo vanc amox coli cfta cfur peni cfox</span>
|
||||
<span class='no'>a</span>
|
||||
<span class='co'># mo vanc amox coli cfta cfur peni cfox</span>
|
||||
<span class='co'># 1 Staphylococcus aureus - - - - - S S</span>
|
||||
<span class='co'># 2 Enterococcus faecalis - - - - - S S</span>
|
||||
<span class='co'># 3 Escherichia coli - - - - - S S</span>
|
||||
<span class='co'># 4 Klebsiella pneumoniae - - - - - S S</span>
|
||||
<span class='co'># 5 Pseudomonas aeruginosa - - - - - S S</span>
|
||||
|
||||
<span class='no'>b</span> <span class='kw'><-</span> <span class='fu'>eucast_rules</span>(<span class='no'>a</span>, <span class='st'>"mo"</span>) <span class='co'># 18 results are forced as R or S</span></div><div class='output co'>#> <span class='warning'>Warning: These columns do not exist and will be ignored: amcl, amik, ampi, azit, azlo, aztr, cefa, cfra, cfep, cfot, cftr, chlo, cipr, clar, clin, clox, czol, dapt, doxy, erta, eryt, fosf, fusi, gent, imip, kana, levo, linc, line, mero, mezl, mino, moxi, nali, neom, neti, nitr, novo, norf, oflo, oxac, pipe, pita, poly, pris, qida, rifa, roxi, siso, teic, tetr, tica, tige, tobr, trim, trsu.</span>
|
||||
#> <span class='warning'>THIS MAY STRONGLY INFLUENCE THE OUTCOME.</span></div><div class='output co'>#>
|
||||
#> Rules by the European Committee on Antimicrobial Susceptibility Testing (EUCAST)</div><div class='output co'>#> <span class='message'></span><span style='color: #0000BB;'>NOTE: Using column `</span><span style='color: #0000BB;font-weight: bold;'>amox</span><span style='color: #0000BB;'>` as input for ampicillin (J01CA01) since many EUCAST rules depend on it.</span><span></span></div><div class='output co'>#> </span><span style='font-weight: bold;'>
|
||||
#> EUCAST Clinical Breakpoints (v8.1, 2018)
|
||||
#> </span><span>Enterobacteriales (Order)</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span style='font-style: italic;'>Staphylococcus</span><span style='color: #0000BB;'> (2 changes)
|
||||
#> </span><span style='font-style: italic;'>Enterococcus</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span style='font-style: italic;'>Streptococcus</span><span> groups A, B, C, G</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span style='font-style: italic;'>Streptococcus pneumoniae</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span>Viridans group streptococci</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span style='font-style: italic;'>Haemophilus influenzae</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span style='font-style: italic;'>Moraxella catarrhalis</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span>Anaerobic Gram positives</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span>Anaerobic Gram negatives</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span style='font-style: italic;'>Pasteurella multocida</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span style='font-style: italic;'>Campylobacter jejuni</span><span> and </span><span style='font-style: italic;'>C. coli</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span style='font-style: italic;'>Aerococcus sanguinicola</span><span> and </span><span style='font-style: italic;'>A. urinae</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span style='font-style: italic;'>Kingella kingae</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span style='font-weight: bold;'>
|
||||
#> EUCAST Expert Rules, Intrinsic Resistance and Exceptional Phenotypes (v3.1, 2016)
|
||||
#> </span><span>Table 1: Intrinsic resistance in </span><span style='font-style: italic;'>Enterobacteriaceae</span><span style='color: #0000BB;'> (5 changes)
|
||||
#> </span><span>Table 2: Intrinsic resistance in non-fermentative Gram-negative bacteria</span><span style='color: #0000BB;'> (5 changes)
|
||||
#> </span><span>Table 3: Intrinsic resistance in other Gram-negative bacteria</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span>Table 4: Intrinsic resistance in Gram-positive bacteria</span><span style='color: #0000BB;'> (6 changes)
|
||||
#> </span><span>Table 8: Interpretive rules for B-lactam agents and Gram-positive cocci</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span>Table 9: Interpretive rules for B-lactam agents and Gram-negative rods</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span>Table 10: Interpretive rules for B-lactam agents and other Gram-negative bacteria</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span>Table 11: Interpretive rules for macrolides, lincosamides, and streptogramins</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span>Table 12: Interpretive rules for aminoglycosides</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span>Table 13: Interpretive rules for quinolones</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span style='font-weight: bold;'>
|
||||
#> Other rules
|
||||
#> </span><span>Non-EUCAST: ampicillin = R where amoxicillin/clav acid = R</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span>Non-EUCAST: piperacillin = R where piperacillin/tazobactam = R</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span>Non-EUCAST: trimethoprim = R where trimethoprim/sulfa = R</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span>Non-EUCAST: amoxicillin/clav acid = S where ampicillin = S</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span>Non-EUCAST: piperacillin/tazobactam = S where piperacillin = S</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span>Non-EUCAST: trimethoprim/sulfa = S where trimethoprim = S</span><span style='color: #00BB00;'> (no changes)
|
||||
#> </span><span style='font-weight: bold;'>
|
||||
#> => EUCAST rules affected 5 out of 5 rows -> </span><span style='color: #0000BB;font-weight: bold;'>changed 18 test results.
|
||||
#>
|
||||
#> </span><span></div><div class='input'>
|
||||
<span class='no'>b</span></div><div class='output co'>#> mo vanc amox coli cfta cfur peni cfox
|
||||
#> 1 Staphylococcus aureus - S R R S S S
|
||||
#> 2 Enterococcus faecalis - - R R R S R
|
||||
#> 3 Escherichia coli R - - - - R S
|
||||
#> 4 Klebsiella pneumoniae R R - - - R S
|
||||
#> 5 Pseudomonas aeruginosa R R - - R R R</div><div class='input'># mo vanc amox coli cfta cfur peni cfox
|
||||
# 1 Staphylococcus aureus - S R R S S S
|
||||
# 2 Enterococcus faecalis - - R R R S R
|
||||
# 3 Escherichia coli R - - - - R S
|
||||
# 4 Klebsiella pneumoniae R R - - - R S
|
||||
# 5 Pseudomonas aeruginosa R R - - R R R
|
||||
</div></span></pre>
|
||||
<span class='no'>b</span> <span class='kw'><-</span> <span class='fu'>eucast_rules</span>(<span class='no'>a</span>, <span class='st'>"mo"</span>) <span class='co'># 18 results are forced as R or S</span>
|
||||
|
||||
<span class='no'>b</span>
|
||||
<span class='co'># mo vanc amox coli cfta cfur peni cfox</span>
|
||||
<span class='co'># 1 Staphylococcus aureus - S R R S S S</span>
|
||||
<span class='co'># 2 Enterococcus faecalis - - R R R S R</span>
|
||||
<span class='co'># 3 Escherichia coli R - - - - R S</span>
|
||||
<span class='co'># 4 Klebsiella pneumoniae R R - - - R S</span>
|
||||
<span class='co'># 5 Pseudomonas aeruginosa R R - - R R R</span>
|
||||
<span class='co'># }</span></pre>
|
||||
</div>
|
||||
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
|
||||
<h2>Contents</h2>
|
||||
@@ -444,6 +415,8 @@
|
||||
|
||||
<li><a href="#antibiotics">Antibiotics</a></li>
|
||||
|
||||
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
|
||||
|
||||
<li><a href="#examples">Examples</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 24 KiB |
@@ -50,7 +50,7 @@
|
||||
<meta property="og:description" content="Create a frequency table of a vector with items or a data frame. Supports quasiquotation and markdown for reports. The best practice is: data %&gt;% freq(var).
|
||||
top_freq can be used to get the top/bottom n items of a frequency table, with counts as names." />
|
||||
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ top_freq can be used to get the top/bottom n items of a frequency table, with co
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -94,12 +94,65 @@ top_freq can be used to get the top/bottom n items of a frequency table, with co
|
||||
Home
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
<span class="fa fa-question-circle"></span>
|
||||
|
||||
How to
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="../articles/AMR.html">
|
||||
<span class="fa fa-directions"></span>
|
||||
|
||||
Get Started
|
||||
Conduct AMR analysis
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/Predict.html">
|
||||
<span class="fa fa-dice"></span>
|
||||
|
||||
Predict antimicrobial resistance
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/EUCAST.html">
|
||||
<span class="fa fa-exchange-alt"></span>
|
||||
|
||||
Apply EUCAST rules
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/mo_property.html">
|
||||
<span class="fa fa-bug"></span>
|
||||
|
||||
Get properties of a microorganism
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/ab_property.html">
|
||||
<span class="fa fa-capsules"></span>
|
||||
|
||||
Get properties of an antibiotic
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/freq.html">
|
||||
<span class="fa fa-sort-amount-down"></span>
|
||||
|
||||
Create frequency tables
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/G_test.html">
|
||||
<span class="fa fa-clipboard-check"></span>
|
||||
|
||||
Use the G-test
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../reference/">
|
||||
@@ -122,17 +175,17 @@ top_freq can be used to get the top/bottom n items of a frequency table, with co
|
||||
Changelog
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="https://gitlab.com/msberends/AMR">
|
||||
<span class="fab fa fab fa-gitlab"></span>
|
||||
|
||||
Source Code
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<li>
|
||||
<a href="../LICENSE-text.html">
|
||||
<span class="fa fa-book"></span>
|
||||
|
||||
@@ -303,248 +356,62 @@ top_freq can be used to get the top/bottom n items of a frequency table, with co
|
||||
<p>In factors, all factor levels that are not existing in the input data will be dropped.</p>
|
||||
<p>The function <code>top_freq</code> uses <code><a href='http://dplyr.tidyverse.org/reference/top_n.html'>top_n</a></code> internally and will include more than <code>n</code> rows if there are ties.</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>
|
||||
|
||||
|
||||
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
|
||||
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
|
||||
|
||||
|
||||
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
|
||||
<pre class="examples"><div class='input'><span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/library'>library</a></span>(<span class='no'>dplyr</span>)
|
||||
<pre class="examples"><span class='co'># NOT RUN {</span>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/library'>library</a></span>(<span class='no'>dplyr</span>)
|
||||
|
||||
<span class='co'># this all gives the same result:</span>
|
||||
<span class='fu'>freq</span>(<span class='no'>septic_patients</span>$<span class='no'>hospital_id</span>)</div><div class='output co'>#>
|
||||
#>
|
||||
#> **Frequency table**
|
||||
#>
|
||||
#>
|
||||
#> | |Item | Count| Percent| Cum. Count| Cum. Percent|
|
||||
#> |:--|:----|-----:|-------:|----------:|------------:|
|
||||
#> |1 |D | 762| 38.1%| 762| 38.1%|
|
||||
#> |2 |B | 663| 33.2%| 1,425| 71.3%|
|
||||
#> |3 |A | 321| 16.1%| 1,746| 87.3%|
|
||||
#> |4 |C | 254| 12.7%| 2,000| 100.0%|
|
||||
#>
|
||||
#> </div><div class='input'><span class='fu'>freq</span>(<span class='no'>septic_patients</span>[, <span class='st'>"hospital_id"</span>])</div><div class='output co'>#>
|
||||
#>
|
||||
#> **Frequency table**
|
||||
#>
|
||||
#>
|
||||
#> | |Item | Count| Percent| Cum. Count| Cum. Percent|
|
||||
#> |:--|:----|-----:|-------:|----------:|------------:|
|
||||
#> |1 |D | 762| 38.1%| 762| 38.1%|
|
||||
#> |2 |B | 663| 33.2%| 1,425| 71.3%|
|
||||
#> |3 |A | 321| 16.1%| 1,746| 87.3%|
|
||||
#> |4 |C | 254| 12.7%| 2,000| 100.0%|
|
||||
#>
|
||||
#> </div><div class='input'><span class='no'>septic_patients</span>$<span class='no'>hospital_id</span> <span class='kw'>%>%</span> <span class='fu'>freq</span>()</div><div class='output co'>#>
|
||||
#>
|
||||
#> **Frequency table**
|
||||
#>
|
||||
#>
|
||||
#> | |Item | Count| Percent| Cum. Count| Cum. Percent|
|
||||
#> |:--|:----|-----:|-------:|----------:|------------:|
|
||||
#> |1 |D | 762| 38.1%| 762| 38.1%|
|
||||
#> |2 |B | 663| 33.2%| 1,425| 71.3%|
|
||||
#> |3 |A | 321| 16.1%| 1,746| 87.3%|
|
||||
#> |4 |C | 254| 12.7%| 2,000| 100.0%|
|
||||
#>
|
||||
#> </div><div class='input'><span class='no'>septic_patients</span>[, <span class='st'>"hospital_id"</span>] <span class='kw'>%>%</span> <span class='fu'>freq</span>()</div><div class='output co'>#>
|
||||
#>
|
||||
#> **Frequency table**
|
||||
#>
|
||||
#>
|
||||
#> | |Item | Count| Percent| Cum. Count| Cum. Percent|
|
||||
#> |:--|:----|-----:|-------:|----------:|------------:|
|
||||
#> |1 |D | 762| 38.1%| 762| 38.1%|
|
||||
#> |2 |B | 663| 33.2%| 1,425| 71.3%|
|
||||
#> |3 |A | 321| 16.1%| 1,746| 87.3%|
|
||||
#> |4 |C | 254| 12.7%| 2,000| 100.0%|
|
||||
#>
|
||||
#> </div><div class='input'><span class='no'>septic_patients</span> <span class='kw'>%>%</span> <span class='fu'>freq</span>(<span class='st'>"hospital_id"</span>)</div><div class='output co'>#>
|
||||
#>
|
||||
#> **Frequency table of `hospital_id`**
|
||||
#>
|
||||
#>
|
||||
#> | |Item | Count| Percent| Cum. Count| Cum. Percent|
|
||||
#> |:--|:----|-----:|-------:|----------:|------------:|
|
||||
#> |1 |D | 762| 38.1%| 762| 38.1%|
|
||||
#> |2 |B | 663| 33.2%| 1,425| 71.3%|
|
||||
#> |3 |A | 321| 16.1%| 1,746| 87.3%|
|
||||
#> |4 |C | 254| 12.7%| 2,000| 100.0%|
|
||||
#>
|
||||
#> </div><div class='input'><span class='no'>septic_patients</span> <span class='kw'>%>%</span> <span class='fu'>freq</span>(<span class='no'>hospital_id</span>) <span class='co'>#<- easiest to remember (tidyverse)</span></div><div class='output co'>#>
|
||||
#>
|
||||
#> **Frequency table of `hospital_id`**
|
||||
#>
|
||||
#>
|
||||
#> | |Item | Count| Percent| Cum. Count| Cum. Percent|
|
||||
#> |:--|:----|-----:|-------:|----------:|------------:|
|
||||
#> |1 |D | 762| 38.1%| 762| 38.1%|
|
||||
#> |2 |B | 663| 33.2%| 1,425| 71.3%|
|
||||
#> |3 |A | 321| 16.1%| 1,746| 87.3%|
|
||||
#> |4 |C | 254| 12.7%| 2,000| 100.0%|
|
||||
#>
|
||||
#> </div><div class='input'>
|
||||
<span class='fu'>freq</span>(<span class='no'>septic_patients</span>$<span class='no'>hospital_id</span>)
|
||||
<span class='fu'>freq</span>(<span class='no'>septic_patients</span>[, <span class='st'>"hospital_id"</span>])
|
||||
<span class='no'>septic_patients</span>$<span class='no'>hospital_id</span> <span class='kw'>%>%</span> <span class='fu'>freq</span>()
|
||||
<span class='no'>septic_patients</span>[, <span class='st'>"hospital_id"</span>] <span class='kw'>%>%</span> <span class='fu'>freq</span>()
|
||||
<span class='no'>septic_patients</span> <span class='kw'>%>%</span> <span class='fu'>freq</span>(<span class='st'>"hospital_id"</span>)
|
||||
<span class='no'>septic_patients</span> <span class='kw'>%>%</span> <span class='fu'>freq</span>(<span class='no'>hospital_id</span>) <span class='co'>#<- easiest to remember (tidyverse)</span>
|
||||
|
||||
|
||||
<span class='co'># you could also use `select` or `pull` to get your variables</span>
|
||||
<span class='no'>septic_patients</span> <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/filter.html'>filter</a></span>(<span class='no'>hospital_id</span> <span class='kw'>==</span> <span class='st'>"A"</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/select.html'>select</a></span>(<span class='no'>mo</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'>freq</span>()</div><div class='output co'>#>
|
||||
#>
|
||||
#> **Frequency table**
|
||||
#>
|
||||
#>
|
||||
#> | |Item | Count| Percent| Cum. Count| Cum. Percent|
|
||||
#> |:--|:------------|-----:|-------:|----------:|------------:|
|
||||
#> |1 |B_ESCHR_COL | 62| 19.3%| 62| 19.3%|
|
||||
#> |2 |B_STPHY_EPI | 46| 14.3%| 108| 33.6%|
|
||||
#> |3 |B_STPHY_CNS | 38| 11.8%| 146| 45.5%|
|
||||
#> |4 |B_STPHY_AUR | 35| 10.9%| 181| 56.4%|
|
||||
#> |5 |B_STPHY_HOM | 25| 7.8%| 206| 64.2%|
|
||||
#> |6 |B_STRPTC_PNE | 12| 3.7%| 218| 67.9%|
|
||||
#> |7 |B_PROTS_MIR | 11| 3.4%| 229| 71.3%|
|
||||
#> |8 |B_ENTRC_FAE | 10| 3.1%| 239| 74.5%|
|
||||
#> |9 |B_KLBSL_PNE | 8| 2.5%| 247| 76.9%|
|
||||
#> |10 |B_STRPTC_PYO | 7| 2.2%| 254| 79.1%|
|
||||
#> |11 |B_BCTRD_FRA | 5| 1.6%| 259| 80.7%|
|
||||
#> |12 |B_KLBSL_OXY | 5| 1.6%| 264| 82.2%|
|
||||
#> |13 |B_STRPTC | 5| 1.6%| 269| 83.8%|
|
||||
#> |14 |B_ENTRC_IUM | 4| 1.2%| 273| 85.0%|
|
||||
#> |15 |B_STRPTC_MIT | 4| 1.2%| 277| 86.3%|
|
||||
#> |16 |B_CRYNB | 3| 0.9%| 280| 87.2%|
|
||||
#> |17 |B_PDMNS_AER | 3| 0.9%| 283| 88.2%|
|
||||
#> |18 |B_STPHY_CAP | 3| 0.9%| 286| 89.1%|
|
||||
#> |19 |B_STRPTC_DYS | 3| 0.9%| 289| 90.0%|
|
||||
#> |20 |F_CANDD_GLB | 3| 0.9%| 292| 91.0%|
|
||||
#> |21 |B_ACNTB | 2| 0.6%| 294| 91.6%|
|
||||
#> |22 |B_ENTRB_CLO | 2| 0.6%| 296| 92.2%|
|
||||
#> |23 |B_HMPHL_INF | 2| 0.6%| 298| 92.8%|
|
||||
#> |24 |B_MCRCCC | 2| 0.6%| 300| 93.5%|
|
||||
#> |25 |B_PROTS_VUL | 2| 0.6%| 302| 94.1%|
|
||||
#> |26 |B_SERRT_MAR | 2| 0.6%| 304| 94.7%|
|
||||
#> |27 |B_STPHY_COH | 2| 0.6%| 306| 95.3%|
|
||||
#> |28 |B_STRPTC_BOV | 2| 0.6%| 308| 96.0%|
|
||||
#> |29 |B_AMYCS_ODO | 1| 0.3%| 309| 96.3%|
|
||||
#> |30 |B_ARCCC_URI | 1| 0.3%| 310| 96.6%|
|
||||
#> |31 |B_CTRDM_PER | 1| 0.3%| 311| 96.9%|
|
||||
#> |32 |B_CTRDM_SEP | 1| 0.3%| 312| 97.2%|
|
||||
#> |33 |B_STPHY_SCH | 1| 0.3%| 313| 97.5%|
|
||||
#> |34 |B_STRPTC_AGA | 1| 0.3%| 314| 97.8%|
|
||||
#> |35 |B_STRPTC_EQU | 1| 0.3%| 315| 98.1%|
|
||||
#> |36 |B_STRPTC_GRA | 1| 0.3%| 316| 98.4%|
|
||||
#> |37 |B_STRPTC_GRB | 1| 0.3%| 317| 98.8%|
|
||||
#> |38 |B_STRPTC_SAN | 1| 0.3%| 318| 99.1%|
|
||||
#> |39 |B_VLLNL_PAR | 1| 0.3%| 319| 99.4%|
|
||||
#> |40 |F_CANDD_ALB | 1| 0.3%| 320| 99.7%|
|
||||
#> |41 |F_CANDD_TRO | 1| 0.3%| 321| 100.0%|
|
||||
#>
|
||||
#> </div><div class='input'>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/filter'>filter</a></span>(<span class='no'>hospital_id</span> <span class='kw'>==</span> <span class='st'>"A"</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/select'>select</a></span>(<span class='no'>mo</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'>freq</span>()
|
||||
|
||||
|
||||
<span class='co'># multiple selected variables will be pasted together</span>
|
||||
<span class='no'>septic_patients</span> <span class='kw'>%>%</span>
|
||||
<span class='no'>left_join_microorganisms</span> <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/filter.html'>filter</a></span>(<span class='no'>hospital_id</span> <span class='kw'>==</span> <span class='st'>"A"</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'>freq</span>(<span class='no'>genus</span>, <span class='no'>species</span>)</div><div class='output co'>#> <span class='message'>Joining, by = "mo"</span></div><div class='output co'>#>
|
||||
#>
|
||||
#> **Frequency table of `genus` and `species`**
|
||||
#>
|
||||
#>
|
||||
#> | |Item | Count| Percent| Cum. Count| Cum. Percent|
|
||||
#> |:--|:---------------------------------|-----:|-------:|----------:|------------:|
|
||||
#> |1 |Escherichia coli | 62| 19.3%| 62| 19.3%|
|
||||
#> |2 |Staphylococcus epidermidis | 46| 14.3%| 108| 33.6%|
|
||||
#> |3 |Staphylococcus coagulase negative | 38| 11.8%| 146| 45.5%|
|
||||
#> |4 |Staphylococcus aureus | 35| 10.9%| 181| 56.4%|
|
||||
#> |5 |Staphylococcus hominis | 25| 7.8%| 206| 64.2%|
|
||||
#> |6 |Streptococcus pneumoniae | 12| 3.7%| 218| 67.9%|
|
||||
#> |7 |Proteus mirabilis | 11| 3.4%| 229| 71.3%|
|
||||
#> |8 |Enterococcus faecalis | 10| 3.1%| 239| 74.5%|
|
||||
#> |9 |Klebsiella pneumoniae | 8| 2.5%| 247| 76.9%|
|
||||
#> |10 |Streptococcus pyogenes | 7| 2.2%| 254| 79.1%|
|
||||
#> |11 |Bacteroides fragilis | 5| 1.6%| 259| 80.7%|
|
||||
#> |12 |Klebsiella oxytoca | 5| 1.6%| 264| 82.2%|
|
||||
#> |13 |Streptococcus species | 5| 1.6%| 269| 83.8%|
|
||||
#> |14 |Enterococcus faecium | 4| 1.2%| 273| 85.0%|
|
||||
#> |15 |Streptococcus mitis | 4| 1.2%| 277| 86.3%|
|
||||
#> |16 |Candida glabrata | 3| 0.9%| 280| 87.2%|
|
||||
#> |17 |Corynebacterium species | 3| 0.9%| 283| 88.2%|
|
||||
#> |18 |Pseudomonas aeruginosa | 3| 0.9%| 286| 89.1%|
|
||||
#> |19 |Staphylococcus capitis | 3| 0.9%| 289| 90.0%|
|
||||
#> |20 |Streptococcus dysgalactiae | 3| 0.9%| 292| 91.0%|
|
||||
#> |21 |Acinetobacter species | 2| 0.6%| 294| 91.6%|
|
||||
#> |22 |Enterobacter cloacae | 2| 0.6%| 296| 92.2%|
|
||||
#> |23 |Haemophilus influenzae | 2| 0.6%| 298| 92.8%|
|
||||
#> |24 |Micrococcus species | 2| 0.6%| 300| 93.5%|
|
||||
#> |25 |Proteus vulgaris | 2| 0.6%| 302| 94.1%|
|
||||
#> |26 |Serratia marcescens | 2| 0.6%| 304| 94.7%|
|
||||
#> |27 |Staphylococcus cohnii | 2| 0.6%| 306| 95.3%|
|
||||
#> |28 |Streptococcus bovis | 2| 0.6%| 308| 96.0%|
|
||||
#> |29 |Actinomyces odontolyticus | 1| 0.3%| 309| 96.3%|
|
||||
#> |30 |Aerococcus urinae | 1| 0.3%| 310| 96.6%|
|
||||
#> |31 |Candida albicans | 1| 0.3%| 311| 96.9%|
|
||||
#> |32 |Candida tropicalis | 1| 0.3%| 312| 97.2%|
|
||||
#> |33 |Clostridium perfringens | 1| 0.3%| 313| 97.5%|
|
||||
#> |34 |Clostridium septicum | 1| 0.3%| 314| 97.8%|
|
||||
#> |35 |Staphylococcus schleiferi | 1| 0.3%| 315| 98.1%|
|
||||
#> |36 |Streptococcus agalactiae | 1| 0.3%| 316| 98.4%|
|
||||
#> |37 |Streptococcus equi | 1| 0.3%| 317| 98.8%|
|
||||
#> |38 |Streptococcus group A | 1| 0.3%| 318| 99.1%|
|
||||
#> |39 |Streptococcus group B | 1| 0.3%| 319| 99.4%|
|
||||
#> |40 |Streptococcus sanguinis | 1| 0.3%| 320| 99.7%|
|
||||
#> |41 |Veillonella parvula | 1| 0.3%| 321| 100.0%|
|
||||
#>
|
||||
#> </div><div class='input'>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/filter'>filter</a></span>(<span class='no'>hospital_id</span> <span class='kw'>==</span> <span class='st'>"A"</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'>freq</span>(<span class='no'>genus</span>, <span class='no'>species</span>)
|
||||
|
||||
|
||||
<span class='co'># group a variable and analyse another</span>
|
||||
<span class='no'>septic_patients</span> <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/group_by.html'>group_by</a></span>(<span class='no'>hospital_id</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'>freq</span>(<span class='no'>gender</span>)</div><div class='output co'>#>
|
||||
#>
|
||||
#> **Frequency table of `gender` (grouped by `hospital_id`)**
|
||||
#>
|
||||
#>
|
||||
#> | |Group |Item | Count| Percent| Cum. Count| Cum. Percent|
|
||||
#> |:--|:-----|:----|-----:|-------:|----------:|------------:|
|
||||
#> |1 |1 |F | 148| 7.4%| 148| 7.4%|
|
||||
#> |2 | |M | 173| 8.7%| 321| 16.1%|
|
||||
#> |3 |2 |F | 332| 16.6%| 332| 16.6%|
|
||||
#> |4 | |M | 331| 16.6%| 663| 33.2%|
|
||||
#> |5 |3 |F | 121| 6.1%| 121| 6.1%|
|
||||
#> |6 | |M | 133| 6.7%| 254| 12.7%|
|
||||
#> |7 |4 |F | 368| 18.4%| 368| 18.4%|
|
||||
#> |8 | |M | 394| 19.7%| 762| 38.1%|
|
||||
#>
|
||||
#> </div><div class='input'>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/group_by'>group_by</a></span>(<span class='no'>hospital_id</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'>freq</span>(<span class='no'>gender</span>)
|
||||
|
||||
|
||||
<span class='co'># get top 10 bugs of hospital A as a vector</span>
|
||||
<span class='no'>septic_patients</span> <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/filter.html'>filter</a></span>(<span class='no'>hospital_id</span> <span class='kw'>==</span> <span class='st'>"A"</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/filter'>filter</a></span>(<span class='no'>hospital_id</span> <span class='kw'>==</span> <span class='st'>"A"</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'>freq</span>(<span class='no'>mo</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'>top_freq</span>(<span class='fl'>10</span>)</div><div class='output co'>#> 62 46 38 35 25
|
||||
#> "B_ESCHR_COL" "B_STPHY_EPI" "B_STPHY_CNS" "B_STPHY_AUR" "B_STPHY_HOM"
|
||||
#> 12 11 10 8 7
|
||||
#> "B_STRPTC_PNE" "B_PROTS_MIR" "B_ENTRC_FAE" "B_KLBSL_PNE" "B_STRPTC_PYO" </div><div class='input'>
|
||||
<span class='fu'>top_freq</span>(<span class='fl'>10</span>)
|
||||
|
||||
|
||||
<span class='co'># save frequency table to an object</span>
|
||||
<span class='no'>years</span> <span class='kw'><-</span> <span class='no'>septic_patients</span> <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/mutate.html'>mutate</a></span>(<span class='kw'>year</span> <span class='kw'>=</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/format'>format</a></span>(<span class='no'>date</span>, <span class='st'>"%Y"</span>)) <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/mutate'>mutate</a></span>(<span class='kw'>year</span> <span class='kw'>=</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/format'>format</a></span>(<span class='no'>date</span>, <span class='st'>"%Y"</span>)) <span class='kw'>%>%</span>
|
||||
<span class='fu'>freq</span>(<span class='no'>year</span>)
|
||||
|
||||
|
||||
<span class='co'># show only the top 5</span>
|
||||
<span class='no'>years</span> <span class='kw'>%>%</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/print'>print</a></span>(<span class='kw'>nmax</span> <span class='kw'>=</span> <span class='fl'>5</span>)</div><div class='output co'>#>
|
||||
#>
|
||||
#> **Frequency table of `year`**
|
||||
#>
|
||||
#>
|
||||
#> | |Item | Count| Percent| Cum. Count| Cum. Percent|
|
||||
#> |:--|:----|-----:|-------:|----------:|------------:|
|
||||
#> |1 |2017 | 168| 8.4%| 168| 8.4%|
|
||||
#> |2 |2004 | 167| 8.4%| 335| 16.8%|
|
||||
#> |3 |2016 | 143| 7.2%| 478| 23.9%|
|
||||
#> |4 |2002 | 136| 6.8%| 614| 30.7%|
|
||||
#> |5 |2003 | 135| 6.8%| 749| 37.5%|
|
||||
#>
|
||||
#> (omitted 11 entries, n = 1,251 [62.6%])
|
||||
#>
|
||||
#> </div><div class='input'>
|
||||
<span class='no'>years</span> <span class='kw'>%>%</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/print'>print</a></span>(<span class='kw'>nmax</span> <span class='kw'>=</span> <span class='fl'>5</span>)
|
||||
|
||||
|
||||
<span class='co'># save to an object with formatted percentages</span>
|
||||
<span class='no'>years</span> <span class='kw'><-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/format'>format</a></span>(<span class='no'>years</span>)
|
||||
@@ -553,372 +420,53 @@ top_freq can be used to get the top/bottom n items of a frequency table, with co
|
||||
<span class='co'># print a histogram of numeric values</span>
|
||||
<span class='no'>septic_patients</span> <span class='kw'>%>%</span>
|
||||
<span class='fu'>freq</span>(<span class='no'>age</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/graphics/topics/hist'>hist</a></span>()</div><div class='img'><img src='freq-1.png' alt='' width='700' height='433' /></div><div class='input'>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/graphics/topics/hist'>hist</a></span>()
|
||||
|
||||
|
||||
<span class='co'># or print all points to a regular plot</span>
|
||||
<span class='no'>septic_patients</span> <span class='kw'>%>%</span>
|
||||
<span class='fu'>freq</span>(<span class='no'>age</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/graphics/topics/plot'>plot</a></span>()</div><div class='img'><img src='freq-2.png' alt='' width='700' height='433' /></div><div class='input'>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/graphics/topics/plot'>plot</a></span>()
|
||||
|
||||
|
||||
<span class='co'># transform to a data.frame or tibble</span>
|
||||
<span class='no'>septic_patients</span> <span class='kw'>%>%</span>
|
||||
<span class='fu'>freq</span>(<span class='no'>age</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/as.data.frame'>as.data.frame</a></span>()</div><div class='output co'>#> item count percent cum_count cum_percent
|
||||
#> 1 83 102 0.0510 102 0.0510
|
||||
#> 2 80 75 0.0375 177 0.0885
|
||||
#> 3 75 72 0.0360 249 0.1245
|
||||
#> 4 79 72 0.0360 321 0.1605
|
||||
#> 5 78 70 0.0350 391 0.1955
|
||||
#> 6 76 65 0.0325 456 0.2280
|
||||
#> 7 82 62 0.0310 518 0.2590
|
||||
#> 8 86 61 0.0305 579 0.2895
|
||||
#> 9 81 58 0.0290 637 0.3185
|
||||
#> 10 87 57 0.0285 694 0.3470
|
||||
#> 11 74 54 0.0270 748 0.3740
|
||||
#> 12 73 53 0.0265 801 0.4005
|
||||
#> 13 77 52 0.0260 853 0.4265
|
||||
#> 14 67 51 0.0255 904 0.4520
|
||||
#> 15 88 51 0.0255 955 0.4775
|
||||
#> 16 70 50 0.0250 1005 0.5025
|
||||
#> 17 69 49 0.0245 1054 0.5270
|
||||
#> 18 71 47 0.0235 1101 0.5505
|
||||
#> 19 72 45 0.0225 1146 0.5730
|
||||
#> 20 65 43 0.0215 1189 0.5945
|
||||
#> 21 66 42 0.0210 1231 0.6155
|
||||
#> 22 85 42 0.0210 1273 0.6365
|
||||
#> 23 68 41 0.0205 1314 0.6570
|
||||
#> 24 47 39 0.0195 1353 0.6765
|
||||
#> 25 90 35 0.0175 1388 0.6940
|
||||
#> 26 89 34 0.0170 1422 0.7110
|
||||
#> 27 84 33 0.0165 1455 0.7275
|
||||
#> 28 62 32 0.0160 1487 0.7435
|
||||
#> 29 59 31 0.0155 1518 0.7590
|
||||
#> 30 64 31 0.0155 1549 0.7745
|
||||
#> 31 57 29 0.0145 1578 0.7890
|
||||
#> 32 63 28 0.0140 1606 0.8030
|
||||
#> 33 51 27 0.0135 1633 0.8165
|
||||
#> 34 52 25 0.0125 1658 0.8290
|
||||
#> 35 60 25 0.0125 1683 0.8415
|
||||
#> 36 53 23 0.0115 1706 0.8530
|
||||
#> 37 58 23 0.0115 1729 0.8645
|
||||
#> 38 50 22 0.0110 1751 0.8755
|
||||
#> 39 56 21 0.0105 1772 0.8860
|
||||
#> 40 45 20 0.0100 1792 0.8960
|
||||
#> 41 55 17 0.0085 1809 0.9045
|
||||
#> 42 61 17 0.0085 1826 0.9130
|
||||
#> 43 93 16 0.0080 1842 0.9210
|
||||
#> 44 43 15 0.0075 1857 0.9285
|
||||
#> 45 44 13 0.0065 1870 0.9350
|
||||
#> 46 46 13 0.0065 1883 0.9415
|
||||
#> 47 41 10 0.0050 1893 0.9465
|
||||
#> 48 48 10 0.0050 1903 0.9515
|
||||
#> 49 30 9 0.0045 1912 0.9560
|
||||
#> 50 54 9 0.0045 1921 0.9605
|
||||
#> 51 92 9 0.0045 1930 0.9650
|
||||
#> 52 91 8 0.0040 1938 0.9690
|
||||
#> 53 42 7 0.0035 1945 0.9725
|
||||
#> 54 38 6 0.0030 1951 0.9755
|
||||
#> 55 94 6 0.0030 1957 0.9785
|
||||
#> 56 20 4 0.0020 1961 0.9805
|
||||
#> 57 39 4 0.0020 1965 0.9825
|
||||
#> 58 49 4 0.0020 1969 0.9845
|
||||
#> 59 19 3 0.0015 1972 0.9860
|
||||
#> 60 29 3 0.0015 1975 0.9875
|
||||
#> 61 33 3 0.0015 1978 0.9890
|
||||
#> 62 37 3 0.0015 1981 0.9905
|
||||
#> 63 40 3 0.0015 1984 0.9920
|
||||
#> 64 18 2 0.0010 1986 0.9930
|
||||
#> 65 24 2 0.0010 1988 0.9940
|
||||
#> 66 31 2 0.0010 1990 0.9950
|
||||
#> 67 36 2 0.0010 1992 0.9960
|
||||
#> 68 97 2 0.0010 1994 0.9970
|
||||
#> 69 14 1 0.0005 1995 0.9975
|
||||
#> 70 22 1 0.0005 1996 0.9980
|
||||
#> 71 32 1 0.0005 1997 0.9985
|
||||
#> 72 34 1 0.0005 1998 0.9990
|
||||
#> 73 35 1 0.0005 1999 0.9995
|
||||
#> 74 95 1 0.0005 2000 1.0000</div><div class='input'>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/as.data.frame'>as.data.frame</a></span>()
|
||||
|
||||
|
||||
<span class='co'># or transform (back) to a vector</span>
|
||||
<span class='no'>septic_patients</span> <span class='kw'>%>%</span>
|
||||
<span class='fu'>freq</span>(<span class='no'>age</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/vector'>as.vector</a></span>()</div><div class='output co'>#> [1] 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83
|
||||
#> [25] 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83
|
||||
#> [49] 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83
|
||||
#> [73] 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83
|
||||
#> [97] 83 83 83 83 83 83 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80
|
||||
#> [121] 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80
|
||||
#> [145] 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80
|
||||
#> [169] 80 80 80 80 80 80 80 80 80 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75
|
||||
#> [193] 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75
|
||||
#> [217] 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75
|
||||
#> [241] 75 75 75 75 75 75 75 75 75 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79
|
||||
#> [265] 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79
|
||||
#> [289] 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79
|
||||
#> [313] 79 79 79 79 79 79 79 79 79 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78
|
||||
#> [337] 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78
|
||||
#> [361] 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78
|
||||
#> [385] 78 78 78 78 78 78 78 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76
|
||||
#> [409] 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76
|
||||
#> [433] 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76
|
||||
#> [457] 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82
|
||||
#> [481] 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82
|
||||
#> [505] 82 82 82 82 82 82 82 82 82 82 82 82 82 82 86 86 86 86 86 86 86 86 86 86
|
||||
#> [529] 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86
|
||||
#> [553] 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86
|
||||
#> [577] 86 86 86 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81
|
||||
#> [601] 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81
|
||||
#> [625] 81 81 81 81 81 81 81 81 81 81 81 81 81 87 87 87 87 87 87 87 87 87 87 87
|
||||
#> [649] 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87
|
||||
#> [673] 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87 74 74
|
||||
#> [697] 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74
|
||||
#> [721] 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74
|
||||
#> [745] 74 74 74 74 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73
|
||||
#> [769] 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73 73
|
||||
#> [793] 73 73 73 73 73 73 73 73 73 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77
|
||||
#> [817] 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77
|
||||
#> [841] 77 77 77 77 77 77 77 77 77 77 77 77 77 67 67 67 67 67 67 67 67 67 67 67
|
||||
#> [865] 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67
|
||||
#> [889] 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 88 88 88 88 88 88 88 88
|
||||
#> [913] 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88
|
||||
#> [937] 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 70 70 70 70 70
|
||||
#> [961] 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70
|
||||
#> [985] 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 69 69 69
|
||||
#> [1009] 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69
|
||||
#> [1033] 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 71 71
|
||||
#> [1057] 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71
|
||||
#> [1081] 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 72 72 72
|
||||
#> [1105] 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72
|
||||
#> [1129] 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 65 65 65 65 65 65
|
||||
#> [1153] 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65
|
||||
#> [1177] 65 65 65 65 65 65 65 65 65 65 65 65 65 66 66 66 66 66 66 66 66 66 66 66
|
||||
#> [1201] 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66
|
||||
#> [1225] 66 66 66 66 66 66 66 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85
|
||||
#> [1249] 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85
|
||||
#> [1273] 85 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68
|
||||
#> [1297] 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 47 47 47 47 47 47
|
||||
#> [1321] 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47
|
||||
#> [1345] 47 47 47 47 47 47 47 47 47 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
|
||||
#> [1369] 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 89 89 89 89
|
||||
#> [1393] 89 89 89 89 89 89 89 89 89 89 89 89 89 89 89 89 89 89 89 89 89 89 89 89
|
||||
#> [1417] 89 89 89 89 89 89 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84
|
||||
#> [1441] 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 62 62 62 62 62 62 62 62 62
|
||||
#> [1465] 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 59
|
||||
#> [1489] 59 59 59 59 59 59 59 59 59 59 59 59 59 59 59 59 59 59 59 59 59 59 59 59
|
||||
#> [1513] 59 59 59 59 59 59 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64
|
||||
#> [1537] 64 64 64 64 64 64 64 64 64 64 64 64 64 57 57 57 57 57 57 57 57 57 57 57
|
||||
#> [1561] 57 57 57 57 57 57 57 57 57 57 57 57 57 57 57 57 57 57 63 63 63 63 63 63
|
||||
#> [1585] 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 51 51
|
||||
#> [1609] 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51
|
||||
#> [1633] 51 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52
|
||||
#> [1657] 52 52 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60
|
||||
#> [1681] 60 60 60 53 53 53 53 53 53 53 53 53 53 53 53 53 53 53 53 53 53 53 53 53
|
||||
#> [1705] 53 53 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58
|
||||
#> [1729] 58 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 56
|
||||
#> [1753] 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 45 45 45 45
|
||||
#> [1777] 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 55 55 55 55 55 55 55 55
|
||||
#> [1801] 55 55 55 55 55 55 55 55 55 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61
|
||||
#> [1825] 61 61 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 43 43 43 43 43 43
|
||||
#> [1849] 43 43 43 43 43 43 43 43 43 44 44 44 44 44 44 44 44 44 44 44 44 44 46 46
|
||||
#> [1873] 46 46 46 46 46 46 46 46 46 46 46 41 41 41 41 41 41 41 41 41 41 48 48 48
|
||||
#> [1897] 48 48 48 48 48 48 48 30 30 30 30 30 30 30 30 30 54 54 54 54 54 54 54 54
|
||||
#> [1921] 54 92 92 92 92 92 92 92 92 92 91 91 91 91 91 91 91 91 42 42 42 42 42 42
|
||||
#> [1945] 42 38 38 38 38 38 38 94 94 94 94 94 94 20 20 20 20 39 39 39 39 49 49 49
|
||||
#> [1969] 49 19 19 19 29 29 29 33 33 33 37 37 37 40 40 40 18 18 24 24 31 31 36 36
|
||||
#> [1993] 97 97 14 22 32 34 35 95</div><div class='input'>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/vector'>as.vector</a></span>()
|
||||
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/identical'>identical</a></span>(<span class='no'>septic_patients</span> <span class='kw'>%>%</span>
|
||||
<span class='fu'>freq</span>(<span class='no'>age</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/vector'>as.vector</a></span>() <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/sort'>sort</a></span>(),
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/sort'>sort</a></span>(<span class='no'>septic_patients</span>$<span class='no'>age</span>)) <span class='co'># TRUE</span></div><div class='output co'>#> [1] TRUE</div><div class='input'>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/sort'>sort</a></span>(<span class='no'>septic_patients</span>$<span class='no'>age</span>)) <span class='co'># TRUE</span>
|
||||
|
||||
|
||||
<span class='co'># it also supports `table` objects</span>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/table'>table</a></span>(<span class='no'>septic_patients</span>$<span class='no'>gender</span>,
|
||||
<span class='no'>septic_patients</span>$<span class='no'>age</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'>freq</span>(<span class='kw'>sep</span> <span class='kw'>=</span> <span class='st'>" **sep** "</span>)</div><div class='output co'>#>
|
||||
#>
|
||||
#> **Frequency table of a `table` object**
|
||||
#>
|
||||
#>
|
||||
#> | |Item | Count| Percent| Cum. Count| Cum. Percent|
|
||||
#> |:---|:------------|-----:|-------:|----------:|------------:|
|
||||
#> |1 |F **sep** 83 | 55| 2.8%| 55| 2.8%|
|
||||
#> |2 |M **sep** 78 | 51| 2.6%| 106| 5.3%|
|
||||
#> |3 |M **sep** 83 | 47| 2.4%| 153| 7.7%|
|
||||
#> |4 |M **sep** 82 | 43| 2.2%| 196| 9.8%|
|
||||
#> |5 |M **sep** 79 | 42| 2.1%| 238| 11.9%|
|
||||
#> |6 |F **sep** 80 | 41| 2.1%| 279| 14.0%|
|
||||
#> |7 |F **sep** 76 | 39| 2.0%| 318| 15.9%|
|
||||
#> |8 |F **sep** 75 | 38| 1.9%| 356| 17.8%|
|
||||
#> |9 |F **sep** 86 | 38| 1.9%| 394| 19.7%|
|
||||
#> |10 |M **sep** 71 | 35| 1.8%| 429| 21.5%|
|
||||
#> |11 |M **sep** 75 | 34| 1.7%| 463| 23.2%|
|
||||
#> |12 |M **sep** 77 | 34| 1.7%| 497| 24.9%|
|
||||
#> |13 |M **sep** 80 | 34| 1.7%| 531| 26.6%|
|
||||
#> |14 |F **sep** 81 | 33| 1.7%| 564| 28.2%|
|
||||
#> |15 |M **sep** 88 | 31| 1.6%| 595| 29.8%|
|
||||
#> |16 |F **sep** 79 | 30| 1.5%| 625| 31.3%|
|
||||
#> |17 |M **sep** 74 | 30| 1.5%| 655| 32.8%|
|
||||
#> |18 |M **sep** 87 | 30| 1.5%| 685| 34.3%|
|
||||
#> |19 |F **sep** 65 | 29| 1.5%| 714| 35.7%|
|
||||
#> |20 |M **sep** 73 | 29| 1.5%| 743| 37.2%|
|
||||
#> |21 |M **sep** 69 | 28| 1.4%| 771| 38.6%|
|
||||
#> |22 |M **sep** 72 | 28| 1.4%| 799| 40.0%|
|
||||
#> |23 |F **sep** 67 | 27| 1.4%| 826| 41.3%|
|
||||
#> |24 |F **sep** 87 | 27| 1.4%| 853| 42.7%|
|
||||
#> |25 |M **sep** 76 | 26| 1.3%| 879| 44.0%|
|
||||
#> |26 |F **sep** 66 | 25| 1.3%| 904| 45.2%|
|
||||
#> |27 |F **sep** 70 | 25| 1.3%| 929| 46.5%|
|
||||
#> |28 |M **sep** 70 | 25| 1.3%| 954| 47.7%|
|
||||
#> |29 |M **sep** 81 | 25| 1.3%| 979| 49.0%|
|
||||
#> |30 |F **sep** 47 | 24| 1.2%| 1,003| 50.1%|
|
||||
#> |31 |F **sep** 73 | 24| 1.2%| 1,027| 51.4%|
|
||||
#> |32 |F **sep** 74 | 24| 1.2%| 1,051| 52.6%|
|
||||
#> |33 |M **sep** 67 | 24| 1.2%| 1,075| 53.8%|
|
||||
#> |34 |M **sep** 86 | 23| 1.2%| 1,098| 54.9%|
|
||||
#> |35 |F **sep** 89 | 22| 1.1%| 1,120| 56.0%|
|
||||
#> |36 |M **sep** 68 | 22| 1.1%| 1,142| 57.1%|
|
||||
#> |37 |M **sep** 85 | 22| 1.1%| 1,164| 58.2%|
|
||||
#> |38 |F **sep** 69 | 21| 1.1%| 1,185| 59.3%|
|
||||
#> |39 |M **sep** 62 | 21| 1.1%| 1,206| 60.3%|
|
||||
#> |40 |F **sep** 85 | 20| 1.0%| 1,226| 61.3%|
|
||||
#> |41 |F **sep** 88 | 20| 1.0%| 1,246| 62.3%|
|
||||
#> |42 |F **sep** 90 | 20| 1.0%| 1,266| 63.3%|
|
||||
#> |43 |M **sep** 64 | 20| 1.0%| 1,286| 64.3%|
|
||||
#> |44 |F **sep** 68 | 19| 1.0%| 1,305| 65.3%|
|
||||
#> |45 |F **sep** 78 | 19| 1.0%| 1,324| 66.2%|
|
||||
#> |46 |F **sep** 82 | 19| 1.0%| 1,343| 67.2%|
|
||||
#> |47 |F **sep** 45 | 18| 0.9%| 1,361| 68.1%|
|
||||
#> |48 |F **sep** 60 | 18| 0.9%| 1,379| 69.0%|
|
||||
#> |49 |F **sep** 77 | 18| 0.9%| 1,397| 69.9%|
|
||||
#> |50 |F **sep** 84 | 18| 0.9%| 1,415| 70.8%|
|
||||
#> |51 |M **sep** 51 | 18| 0.9%| 1,433| 71.7%|
|
||||
#> |52 |M **sep** 52 | 18| 0.9%| 1,451| 72.6%|
|
||||
#> |53 |F **sep** 57 | 17| 0.9%| 1,468| 73.4%|
|
||||
#> |54 |F **sep** 72 | 17| 0.9%| 1,485| 74.3%|
|
||||
#> |55 |M **sep** 66 | 17| 0.9%| 1,502| 75.1%|
|
||||
#> |56 |F **sep** 58 | 16| 0.8%| 1,518| 75.9%|
|
||||
#> |57 |F **sep** 59 | 16| 0.8%| 1,534| 76.7%|
|
||||
#> |58 |M **sep** 56 | 16| 0.8%| 1,550| 77.5%|
|
||||
#> |59 |M **sep** 47 | 15| 0.8%| 1,565| 78.3%|
|
||||
#> |60 |M **sep** 59 | 15| 0.8%| 1,580| 79.0%|
|
||||
#> |61 |M **sep** 84 | 15| 0.8%| 1,595| 79.8%|
|
||||
#> |62 |M **sep** 90 | 15| 0.8%| 1,610| 80.5%|
|
||||
#> |63 |F **sep** 63 | 14| 0.7%| 1,624| 81.2%|
|
||||
#> |64 |M **sep** 53 | 14| 0.7%| 1,638| 81.9%|
|
||||
#> |65 |M **sep** 63 | 14| 0.7%| 1,652| 82.6%|
|
||||
#> |66 |M **sep** 65 | 14| 0.7%| 1,666| 83.3%|
|
||||
#> |67 |M **sep** 61 | 13| 0.7%| 1,679| 84.0%|
|
||||
#> |68 |F **sep** 50 | 12| 0.6%| 1,691| 84.6%|
|
||||
#> |69 |F **sep** 71 | 12| 0.6%| 1,703| 85.2%|
|
||||
#> |70 |M **sep** 57 | 12| 0.6%| 1,715| 85.8%|
|
||||
#> |71 |M **sep** 89 | 12| 0.6%| 1,727| 86.4%|
|
||||
#> |72 |M **sep** 93 | 12| 0.6%| 1,739| 87.0%|
|
||||
#> |73 |F **sep** 62 | 11| 0.6%| 1,750| 87.5%|
|
||||
#> |74 |F **sep** 64 | 11| 0.6%| 1,761| 88.1%|
|
||||
#> |75 |M **sep** 50 | 10| 0.5%| 1,771| 88.6%|
|
||||
#> |76 |F **sep** 43 | 9| 0.5%| 1,780| 89.0%|
|
||||
#> |77 |F **sep** 46 | 9| 0.5%| 1,789| 89.5%|
|
||||
#> |78 |F **sep** 51 | 9| 0.5%| 1,798| 89.9%|
|
||||
#> |79 |F **sep** 53 | 9| 0.5%| 1,807| 90.4%|
|
||||
#> |80 |F **sep** 55 | 9| 0.5%| 1,816| 90.8%|
|
||||
#> |81 |M **sep** 30 | 9| 0.5%| 1,825| 91.3%|
|
||||
#> |82 |F **sep** 44 | 8| 0.4%| 1,833| 91.7%|
|
||||
#> |83 |M **sep** 55 | 8| 0.4%| 1,841| 92.1%|
|
||||
#> |84 |F **sep** 41 | 7| 0.4%| 1,848| 92.4%|
|
||||
#> |85 |F **sep** 48 | 7| 0.4%| 1,855| 92.8%|
|
||||
#> |86 |F **sep** 52 | 7| 0.4%| 1,862| 93.1%|
|
||||
#> |87 |M **sep** 58 | 7| 0.4%| 1,869| 93.5%|
|
||||
#> |88 |M **sep** 60 | 7| 0.4%| 1,876| 93.8%|
|
||||
#> |89 |F **sep** 92 | 6| 0.3%| 1,882| 94.1%|
|
||||
#> |90 |M **sep** 43 | 6| 0.3%| 1,888| 94.4%|
|
||||
#> |91 |F **sep** 38 | 5| 0.3%| 1,893| 94.7%|
|
||||
#> |92 |F **sep** 42 | 5| 0.3%| 1,898| 94.9%|
|
||||
#> |93 |F **sep** 56 | 5| 0.3%| 1,903| 95.2%|
|
||||
#> |94 |M **sep** 44 | 5| 0.3%| 1,908| 95.4%|
|
||||
#> |95 |M **sep** 54 | 5| 0.3%| 1,913| 95.7%|
|
||||
#> |96 |F **sep** 20 | 4| 0.2%| 1,917| 95.9%|
|
||||
#> |97 |F **sep** 54 | 4| 0.2%| 1,921| 96.1%|
|
||||
#> |98 |F **sep** 61 | 4| 0.2%| 1,925| 96.3%|
|
||||
#> |99 |F **sep** 91 | 4| 0.2%| 1,929| 96.5%|
|
||||
#> |100 |F **sep** 93 | 4| 0.2%| 1,933| 96.7%|
|
||||
#> |101 |F **sep** 94 | 4| 0.2%| 1,937| 96.9%|
|
||||
#> |102 |M **sep** 46 | 4| 0.2%| 1,941| 97.1%|
|
||||
#> |103 |M **sep** 91 | 4| 0.2%| 1,945| 97.3%|
|
||||
#> |104 |F **sep** 39 | 3| 0.2%| 1,948| 97.4%|
|
||||
#> |105 |M **sep** 19 | 3| 0.2%| 1,951| 97.6%|
|
||||
#> |106 |M **sep** 33 | 3| 0.2%| 1,954| 97.7%|
|
||||
#> |107 |M **sep** 41 | 3| 0.2%| 1,957| 97.9%|
|
||||
#> |108 |M **sep** 48 | 3| 0.2%| 1,960| 98.0%|
|
||||
#> |109 |M **sep** 92 | 3| 0.2%| 1,963| 98.2%|
|
||||
#> |110 |F **sep** 31 | 2| 0.1%| 1,965| 98.3%|
|
||||
#> |111 |F **sep** 49 | 2| 0.1%| 1,967| 98.4%|
|
||||
#> |112 |M **sep** 18 | 2| 0.1%| 1,969| 98.5%|
|
||||
#> |113 |M **sep** 24 | 2| 0.1%| 1,971| 98.6%|
|
||||
#> |114 |M **sep** 29 | 2| 0.1%| 1,973| 98.7%|
|
||||
#> |115 |M **sep** 36 | 2| 0.1%| 1,975| 98.8%|
|
||||
#> |116 |M **sep** 37 | 2| 0.1%| 1,977| 98.9%|
|
||||
#> |117 |M **sep** 40 | 2| 0.1%| 1,979| 99.0%|
|
||||
#> |118 |M **sep** 42 | 2| 0.1%| 1,981| 99.1%|
|
||||
#> |119 |M **sep** 45 | 2| 0.1%| 1,983| 99.2%|
|
||||
#> |120 |M **sep** 49 | 2| 0.1%| 1,985| 99.3%|
|
||||
#> |121 |M **sep** 94 | 2| 0.1%| 1,987| 99.4%|
|
||||
#> |122 |M **sep** 97 | 2| 0.1%| 1,989| 99.5%|
|
||||
#> |123 |F **sep** 22 | 1| 0.1%| 1,990| 99.5%|
|
||||
#> |124 |F **sep** 29 | 1| 0.1%| 1,991| 99.6%|
|
||||
#> |125 |F **sep** 34 | 1| 0.1%| 1,992| 99.6%|
|
||||
#> |126 |F **sep** 35 | 1| 0.1%| 1,993| 99.7%|
|
||||
#> |127 |F **sep** 37 | 1| 0.1%| 1,994| 99.7%|
|
||||
#> |128 |F **sep** 40 | 1| 0.1%| 1,995| 99.8%|
|
||||
#> |129 |M **sep** 14 | 1| 0.1%| 1,996| 99.8%|
|
||||
#> |130 |M **sep** 32 | 1| 0.1%| 1,997| 99.9%|
|
||||
#> |131 |M **sep** 38 | 1| 0.1%| 1,998| 99.9%|
|
||||
#> |132 |M **sep** 39 | 1| 0.1%| 1,999| 100.0%|
|
||||
#> |133 |M **sep** 95 | 1| 0.1%| 2,000| 100.0%|
|
||||
#>
|
||||
#> </div><div class='input'>
|
||||
<span class='fu'>freq</span>(<span class='kw'>sep</span> <span class='kw'>=</span> <span class='st'>" **sep** "</span>)
|
||||
|
||||
|
||||
<span class='co'># only get selected columns</span>
|
||||
<span class='no'>septic_patients</span> <span class='kw'>%>%</span>
|
||||
<span class='fu'>freq</span>(<span class='no'>hospital_id</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/select.html'>select</a></span>(<span class='no'>item</span>, <span class='no'>percent</span>)</div><div class='output co'>#>
|
||||
#>
|
||||
#> **Frequency table of `hospital_id`**
|
||||
#>
|
||||
#>
|
||||
#> | |Item | Percent|
|
||||
#> |:--|:----|-------:|
|
||||
#> |1 |D | 38.1%|
|
||||
#> |2 |B | 33.2%|
|
||||
#> |3 |A | 16.1%|
|
||||
#> |4 |C | 12.7%|
|
||||
#>
|
||||
#> </div><div class='input'>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/select'>select</a></span>(<span class='no'>item</span>, <span class='no'>percent</span>)
|
||||
|
||||
<span class='no'>septic_patients</span> <span class='kw'>%>%</span>
|
||||
<span class='fu'>freq</span>(<span class='no'>hospital_id</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/select.html'>select</a></span>(-<span class='no'>count</span>, -<span class='no'>cum_count</span>)</div><div class='output co'>#>
|
||||
#>
|
||||
#> **Frequency table of `hospital_id`**
|
||||
#>
|
||||
#>
|
||||
#> | |Item | Percent| Cum. Percent|
|
||||
#> |:--|:----|-------:|------------:|
|
||||
#> |1 |D | 38.1%| 38.1%|
|
||||
#> |2 |B | 33.2%| 71.3%|
|
||||
#> |3 |A | 16.1%| 87.3%|
|
||||
#> |4 |C | 12.7%| 100.0%|
|
||||
#>
|
||||
#> </div><div class='input'>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/select'>select</a></span>(-<span class='no'>count</span>, -<span class='no'>cum_count</span>)
|
||||
|
||||
|
||||
<span class='co'># check differences between frequency tables</span>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/diff'>diff</a></span>(<span class='fu'>freq</span>(<span class='no'>septic_patients</span>$<span class='no'>trim</span>),
|
||||
<span class='fu'>freq</span>(<span class='no'>septic_patients</span>$<span class='no'>trsu</span>))</div><div class='output co'>#> Differences between frequency tables
|
||||
#>
|
||||
#> |Item | Count #1| Count #2| Difference| Diff. percent|
|
||||
#> |:----|--------:|--------:|----------:|-------------:|
|
||||
#> |S | 918| 1392| +474| +51.6%|
|
||||
#> |R | 571| 361| -210| -36.8%|
|
||||
#> |I | 10| 6| -4| -40.0%|</div></pre>
|
||||
<span class='fu'>freq</span>(<span class='no'>septic_patients</span>$<span class='no'>trsu</span>))
|
||||
<span class='co'># }</span></pre>
|
||||
</div>
|
||||
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
|
||||
<h2>Contents</h2>
|
||||
@@ -929,6 +477,8 @@ top_freq can be used to get the top/bottom n items of a frequency table, with co
|
||||
|
||||
<li><a href="#details">Details</a></li>
|
||||
|
||||
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
|
||||
|
||||
<li><a href="#examples">Examples</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
<meta property="og:description" content="g.test performs chi-squared contingency table tests and goodness-of-fit tests, just like chisq.test but is more reliable [1]. A G-test can be used to see whether the number of observations in each category fits a theoretical expectation (called a G-test of goodness-of-fit), or to see whether the proportions of one variable are different for different values of the other variable (called a G-test of independence)." />
|
||||
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -93,12 +93,65 @@
|
||||
Home
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
<span class="fa fa-question-circle"></span>
|
||||
|
||||
How to
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="../articles/AMR.html">
|
||||
<span class="fa fa-directions"></span>
|
||||
|
||||
Get Started
|
||||
Conduct AMR analysis
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/Predict.html">
|
||||
<span class="fa fa-dice"></span>
|
||||
|
||||
Predict antimicrobial resistance
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/EUCAST.html">
|
||||
<span class="fa fa-exchange-alt"></span>
|
||||
|
||||
Apply EUCAST rules
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/mo_property.html">
|
||||
<span class="fa fa-bug"></span>
|
||||
|
||||
Get properties of a microorganism
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/ab_property.html">
|
||||
<span class="fa fa-capsules"></span>
|
||||
|
||||
Get properties of an antibiotic
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/freq.html">
|
||||
<span class="fa fa-sort-amount-down"></span>
|
||||
|
||||
Create frequency tables
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/G_test.html">
|
||||
<span class="fa fa-clipboard-check"></span>
|
||||
|
||||
Use the G-test
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../reference/">
|
||||
@@ -121,17 +174,17 @@
|
||||
Changelog
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="https://gitlab.com/msberends/AMR">
|
||||
<span class="fab fa fab fa-gitlab"></span>
|
||||
|
||||
Source Code
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<li>
|
||||
<a href="../LICENSE-text.html">
|
||||
<span class="fa fa-book"></span>
|
||||
|
||||
@@ -260,6 +313,12 @@
|
||||
<p>where <code>df</code> are the degrees of freedom.</p>
|
||||
<p>If there are more than two categories and you want to find out which ones are significantly different from their null expectation, you can use the same method of testing each category vs. the sum of all categories, with the Bonferroni correction. You use <em>G</em>-tests for each category, of course.</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>
|
||||
|
||||
|
||||
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
|
||||
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
|
||||
|
||||
<h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2>
|
||||
|
||||
<p>[1] McDonald, J.H. 2014. <strong>Handbook of Biological Statistics (3rd ed.)</strong>. Sparky House Publishing, Baltimore, Maryland. <a href='http://www.biostathandbook.com/gtestgof.html'>http://www.biostathandbook.com/gtestgof.html</a>.</p>
|
||||
@@ -270,7 +329,8 @@
|
||||
|
||||
|
||||
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
|
||||
<pre class="examples"><div class='input'><span class='co'># = EXAMPLE 1 =</span>
|
||||
<pre class="examples"><span class='co'># NOT RUN {</span>
|
||||
<span class='co'># = EXAMPLE 1 =</span>
|
||||
<span class='co'># Shivrain et al. (2006) crossed clearfield rice (which are resistant</span>
|
||||
<span class='co'># to the herbicide imazethapyr) with red rice (which are susceptible to</span>
|
||||
<span class='co'># imazethapyr). They then crossed the hybrid offspring and examined the</span>
|
||||
@@ -279,7 +339,7 @@
|
||||
<span class='co'># by a single gene with two co-dominant alleles, you would expect a 1:2:1</span>
|
||||
<span class='co'># ratio.</span>
|
||||
|
||||
<span class='no'>x</span> <span class='kw'><-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='fl'>772</span>, <span class='fl'>1611</span>, <span class='fl'>737</span>)<span class='co'>#'</span>
|
||||
<span class='no'>x</span> <span class='kw'><-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='fl'>772</span>, <span class='fl'>1611</span>, <span class='fl'>737</span>)
|
||||
<span class='no'>G</span> <span class='kw'><-</span> <span class='fu'>g.test</span>(<span class='no'>x</span>, <span class='kw'>p</span> <span class='kw'>=</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='fl'>1</span>, <span class='fl'>2</span>, <span class='fl'>1</span>) / <span class='fl'>4</span>)
|
||||
<span class='co'># G$p.value = 0.12574.</span>
|
||||
|
||||
@@ -296,17 +356,13 @@
|
||||
<span class='co'># observed 1752 right-billed and 1895 left-billed crossbills.</span>
|
||||
|
||||
<span class='no'>x</span> <span class='kw'><-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='fl'>1752</span>, <span class='fl'>1895</span>)
|
||||
<span class='fu'>g.test</span>(<span class='no'>x</span>)</div><div class='output co'>#>
|
||||
#> G-test of goodness-of-fit (likelihood ratio test)
|
||||
#>
|
||||
#> data: x
|
||||
#> X-squared = 5.6085, df = 1, p-value = 0.01787
|
||||
#> </div><div class='input'># p = 0.01787343
|
||||
<span class='fu'>g.test</span>(<span class='no'>x</span>)
|
||||
<span class='co'># p = 0.01787343</span>
|
||||
|
||||
# There is a significant difference from a 1:1 ratio.
|
||||
# Meaning: there are significantly more left-billed birds.
|
||||
<span class='co'># There is a significant difference from a 1:1 ratio.</span>
|
||||
<span class='co'># Meaning: there are significantly more left-billed birds.</span>
|
||||
|
||||
</div></pre>
|
||||
<span class='co'># }</span></pre>
|
||||
</div>
|
||||
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
|
||||
<h2>Contents</h2>
|
||||
@@ -325,6 +381,8 @@
|
||||
|
||||
<li><a href="#how-the-test-works">How the test works</a></li>
|
||||
|
||||
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
|
||||
|
||||
<li><a href="#references">References</a></li>
|
||||
|
||||
<li><a href="#see-also">See also</a></li>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
<meta property="og:description" content="Determines the system language to be used for language-dependent output of AMR functions, like mo_gramstain and mo_type." />
|
||||
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -93,12 +93,65 @@
|
||||
Home
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
<span class="fa fa-question-circle"></span>
|
||||
|
||||
How to
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="../articles/AMR.html">
|
||||
<span class="fa fa-directions"></span>
|
||||
|
||||
Get Started
|
||||
Conduct AMR analysis
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/Predict.html">
|
||||
<span class="fa fa-dice"></span>
|
||||
|
||||
Predict antimicrobial resistance
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/EUCAST.html">
|
||||
<span class="fa fa-exchange-alt"></span>
|
||||
|
||||
Apply EUCAST rules
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/mo_property.html">
|
||||
<span class="fa fa-bug"></span>
|
||||
|
||||
Get properties of a microorganism
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/ab_property.html">
|
||||
<span class="fa fa-capsules"></span>
|
||||
|
||||
Get properties of an antibiotic
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/freq.html">
|
||||
<span class="fa fa-sort-amount-down"></span>
|
||||
|
||||
Create frequency tables
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/G_test.html">
|
||||
<span class="fa fa-clipboard-check"></span>
|
||||
|
||||
Use the G-test
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../reference/">
|
||||
@@ -121,17 +174,17 @@
|
||||
Changelog
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="https://gitlab.com/msberends/AMR">
|
||||
<span class="fab fa fab fa-gitlab"></span>
|
||||
|
||||
Source Code
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<li>
|
||||
<a href="../LICENSE-text.html">
|
||||
<span class="fa fa-book"></span>
|
||||
|
||||
@@ -178,6 +231,12 @@
|
||||
|
||||
<p>Supported languages are <code>"en"</code> (English), <code>"de"</code> (German), <code>"nl"</code> (Dutch), <code>"es"</code> (Spanish), <code>"it"</code> (Italian), <code>"fr"</code> (French), and <code>"pt"</code> (Portuguese).</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>
|
||||
|
||||
|
||||
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
|
||||
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
|
||||
@@ -187,6 +246,8 @@
|
||||
<li><a href="#details">Details</a></li>
|
||||
|
||||
<li><a href="#supported-languages">Supported languages</a></li>
|
||||
|
||||
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
|
Before Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 74 KiB |
|
Before Width: | Height: | Size: 74 KiB |
|
Before Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 95 KiB |
|
Before Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 70 KiB |
@@ -49,7 +49,7 @@
|
||||
|
||||
<meta property="og:description" content="Use these functions to create bar plots for antimicrobial resistance analysis. All functions rely on internal ggplot functions." />
|
||||
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -93,12 +93,65 @@
|
||||
Home
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
<span class="fa fa-question-circle"></span>
|
||||
|
||||
How to
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="../articles/AMR.html">
|
||||
<span class="fa fa-directions"></span>
|
||||
|
||||
Get Started
|
||||
Conduct AMR analysis
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/Predict.html">
|
||||
<span class="fa fa-dice"></span>
|
||||
|
||||
Predict antimicrobial resistance
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/EUCAST.html">
|
||||
<span class="fa fa-exchange-alt"></span>
|
||||
|
||||
Apply EUCAST rules
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/mo_property.html">
|
||||
<span class="fa fa-bug"></span>
|
||||
|
||||
Get properties of a microorganism
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/ab_property.html">
|
||||
<span class="fa fa-capsules"></span>
|
||||
|
||||
Get properties of an antibiotic
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/freq.html">
|
||||
<span class="fa fa-sort-amount-down"></span>
|
||||
|
||||
Create frequency tables
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/G_test.html">
|
||||
<span class="fa fa-clipboard-check"></span>
|
||||
|
||||
Use the G-test
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../reference/">
|
||||
@@ -121,17 +174,17 @@
|
||||
Changelog
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="https://gitlab.com/msberends/AMR">
|
||||
<span class="fab fa fab fa-gitlab"></span>
|
||||
|
||||
Source Code
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<li>
|
||||
<a href="../LICENSE-text.html">
|
||||
<span class="fa fa-book"></span>
|
||||
|
||||
@@ -163,7 +216,7 @@
|
||||
|
||||
<div class="ref-description">
|
||||
|
||||
<p>Use these functions to create bar plots for antimicrobial resistance analysis. All functions rely on internal <code><a href='https://ggplot2.tidyverse.org/reference/ggplot.html'>ggplot</a></code> functions.</p>
|
||||
<p>Use these functions to create bar plots for antimicrobial resistance analysis. All functions rely on internal <code><a href='https://www.rdocumentation.org/packages/ggplot2/topics/ggplot'>ggplot</a></code> functions.</p>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -254,97 +307,112 @@
|
||||
<p>At default, the names of antibiotics will be shown on the plots using <code><a href='abname.html'>abname</a></code>. This can be set with the option <code>get_antibiotic_names</code> (a logical value), so change it e.g. to <code>FALSE</code> with <code><a href='https://www.rdocumentation.org/packages/base/topics/options'>options(get_antibiotic_names = FALSE)</a></code>.</p>
|
||||
<p><strong>The functions</strong><br />
|
||||
<code>geom_rsi</code> will take any variable from the data that has an <code>rsi</code> class (created with <code><a href='as.rsi.html'>as.rsi</a></code>) using <code>fun</code> (<code><a href='count.html'>count_df</a></code> at default, can also be <code><a href='portion.html'>portion_df</a></code>) and will plot bars with the percentage R, I and S. The default behaviour is to have the bars stacked and to have the different antibiotics on the x axis.</p>
|
||||
<p><code>facet_rsi</code> creates 2d plots (at default based on S/I/R) using <code><a href='https://ggplot2.tidyverse.org/reference/facet_wrap.html'>facet_wrap</a></code>.</p>
|
||||
<p><code>facet_rsi</code> creates 2d plots (at default based on S/I/R) using <code><a href='https://www.rdocumentation.org/packages/ggplot2/topics/facet_wrap'>facet_wrap</a></code>.</p>
|
||||
<p><code>scale_y_percent</code> transforms the y axis to a 0 to 100% range using <code>scale_continuous</code>.</p>
|
||||
<p><code>scale_rsi_colours</code> sets colours to the bars: green for S, yellow for I and red for R, using <code>scale_brewer</code>.</p>
|
||||
<p><code>theme_rsi</code> is a <code>ggplot <a href='https://ggplot2.tidyverse.org/reference/theme.html'>theme</a></code> with minimal distraction.</p>
|
||||
<p><code>theme_rsi</code> is a <code>ggplot <a href='https://www.rdocumentation.org/packages/ggplot2/topics/theme'>theme</a></code> with minimal distraction.</p>
|
||||
<p><code>labels_rsi_count</code> print datalabels on the bars with percentage and amount of isolates using <code><a href='https://ggplot2.tidyverse.org/reference/geom_text.html'>geom_text</a></code></p>
|
||||
<p><code>ggplot_rsi</code> is a wrapper around all above functions that uses data as first input. This makes it possible to use this function after a pipe (<code>%>%</code>). See Examples.</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>
|
||||
|
||||
|
||||
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
|
||||
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
|
||||
|
||||
|
||||
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
|
||||
<pre class="examples"><div class='input'><span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/library'>library</a></span>(<span class='no'>dplyr</span>)
|
||||
<pre class="examples"><span class='co'># NOT RUN {</span>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/library'>library</a></span>(<span class='no'>dplyr</span>)
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/library'>library</a></span>(<span class='no'>ggplot2</span>)
|
||||
|
||||
<span class='co'># get antimicrobial results for drugs against a UTI:</span>
|
||||
<span class='fu'><a href='https://ggplot2.tidyverse.org/reference/ggplot.html'>ggplot</a></span>(<span class='no'>septic_patients</span> <span class='kw'>%>%</span> <span class='fu'><a href='http://dplyr.tidyverse.org/reference/select.html'>select</a></span>(<span class='no'>amox</span>, <span class='no'>nitr</span>, <span class='no'>fosf</span>, <span class='no'>trim</span>, <span class='no'>cipr</span>)) +
|
||||
<span class='fu'>geom_rsi</span>()</div><div class='img'><img src='ggplot_rsi-1.png' alt='' width='700' height='433' /></div><div class='input'>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/ggplot2/topics/ggplot'>ggplot</a></span>(<span class='no'>septic_patients</span> <span class='kw'>%>%</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/select'>select</a></span>(<span class='no'>amox</span>, <span class='no'>nitr</span>, <span class='no'>fosf</span>, <span class='no'>trim</span>, <span class='no'>cipr</span>)) +
|
||||
<span class='fu'>geom_rsi</span>()
|
||||
|
||||
<span class='co'># prettify the plot using some additional functions:</span>
|
||||
<span class='no'>df</span> <span class='kw'><-</span> <span class='no'>septic_patients</span>[, <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"amox"</span>, <span class='st'>"nitr"</span>, <span class='st'>"fosf"</span>, <span class='st'>"trim"</span>, <span class='st'>"cipr"</span>)]
|
||||
<span class='fu'><a href='https://ggplot2.tidyverse.org/reference/ggplot.html'>ggplot</a></span>(<span class='no'>df</span>) +
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/ggplot2/topics/ggplot'>ggplot</a></span>(<span class='no'>df</span>) +
|
||||
<span class='fu'>geom_rsi</span>() +
|
||||
<span class='fu'>scale_y_percent</span>() +
|
||||
<span class='fu'>scale_rsi_colours</span>() +
|
||||
<span class='fu'>labels_rsi_count</span>() +
|
||||
<span class='fu'>theme_rsi</span>()</div><div class='img'><img src='ggplot_rsi-2.png' alt='' width='700' height='433' /></div><div class='input'>
|
||||
<span class='fu'>theme_rsi</span>()
|
||||
|
||||
<span class='co'># or better yet, simplify this using the wrapper function - a single command:</span>
|
||||
<span class='no'>septic_patients</span> <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/select.html'>select</a></span>(<span class='no'>amox</span>, <span class='no'>nitr</span>, <span class='no'>fosf</span>, <span class='no'>trim</span>, <span class='no'>cipr</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'>ggplot_rsi</span>()</div><div class='img'><img src='ggplot_rsi-3.png' alt='' width='700' height='433' /></div><div class='input'>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/select'>select</a></span>(<span class='no'>amox</span>, <span class='no'>nitr</span>, <span class='no'>fosf</span>, <span class='no'>trim</span>, <span class='no'>cipr</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'>ggplot_rsi</span>()
|
||||
|
||||
<span class='co'># get only portions and no counts:</span>
|
||||
<span class='no'>septic_patients</span> <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/select.html'>select</a></span>(<span class='no'>amox</span>, <span class='no'>nitr</span>, <span class='no'>fosf</span>, <span class='no'>trim</span>, <span class='no'>cipr</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'>ggplot_rsi</span>(<span class='kw'>fun</span> <span class='kw'>=</span> <span class='no'>portion_df</span>)</div><div class='img'><img src='ggplot_rsi-4.png' alt='' width='700' height='433' /></div><div class='input'>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/select'>select</a></span>(<span class='no'>amox</span>, <span class='no'>nitr</span>, <span class='no'>fosf</span>, <span class='no'>trim</span>, <span class='no'>cipr</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'>ggplot_rsi</span>(<span class='kw'>fun</span> <span class='kw'>=</span> <span class='no'>portion_df</span>)
|
||||
|
||||
<span class='co'># add other ggplot2 parameters as you like:</span>
|
||||
<span class='no'>septic_patients</span> <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/select.html'>select</a></span>(<span class='no'>amox</span>, <span class='no'>nitr</span>, <span class='no'>fosf</span>, <span class='no'>trim</span>, <span class='no'>cipr</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/select'>select</a></span>(<span class='no'>amox</span>, <span class='no'>nitr</span>, <span class='no'>fosf</span>, <span class='no'>trim</span>, <span class='no'>cipr</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'>ggplot_rsi</span>(<span class='kw'>width</span> <span class='kw'>=</span> <span class='fl'>0.5</span>,
|
||||
<span class='kw'>colour</span> <span class='kw'>=</span> <span class='st'>"black"</span>,
|
||||
<span class='kw'>size</span> <span class='kw'>=</span> <span class='fl'>1</span>,
|
||||
<span class='kw'>linetype</span> <span class='kw'>=</span> <span class='fl'>2</span>,
|
||||
<span class='kw'>alpha</span> <span class='kw'>=</span> <span class='fl'>0.25</span>)</div><div class='img'><img src='ggplot_rsi-5.png' alt='' width='700' height='433' /></div><div class='input'>
|
||||
<span class='kw'>alpha</span> <span class='kw'>=</span> <span class='fl'>0.25</span>)
|
||||
|
||||
<span class='co'># resistance of ciprofloxacine per age group</span>
|
||||
<span class='no'>septic_patients</span> <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/mutate.html'>mutate</a></span>(<span class='kw'>first_isolate</span> <span class='kw'>=</span> <span class='fu'><a href='first_isolate.html'>first_isolate</a></span>(<span class='no'>.</span>)) <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/filter.html'>filter</a></span>(<span class='no'>first_isolate</span> <span class='kw'>==</span> <span class='fl'>TRUE</span>,
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/mutate'>mutate</a></span>(<span class='kw'>first_isolate</span> <span class='kw'>=</span> <span class='fu'><a href='first_isolate.html'>first_isolate</a></span>(<span class='no'>.</span>)) <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/filter'>filter</a></span>(<span class='no'>first_isolate</span> <span class='kw'>==</span> <span class='fl'>TRUE</span>,
|
||||
<span class='no'>mo</span> <span class='kw'>==</span> <span class='fu'><a href='as.mo.html'>as.mo</a></span>(<span class='st'>"E. coli"</span>)) <span class='kw'>%>%</span>
|
||||
<span class='co'># `age_group` is also a function of this package:</span>
|
||||
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/group_by.html'>group_by</a></span>(<span class='kw'>age_group</span> <span class='kw'>=</span> <span class='fu'><a href='age_groups.html'>age_groups</a></span>(<span class='no'>age</span>)) <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/select.html'>select</a></span>(<span class='no'>age_group</span>,
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/group_by'>group_by</a></span>(<span class='kw'>age_group</span> <span class='kw'>=</span> <span class='fu'><a href='age_groups.html'>age_groups</a></span>(<span class='no'>age</span>)) <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/select'>select</a></span>(<span class='no'>age_group</span>,
|
||||
<span class='no'>cipr</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'>ggplot_rsi</span>(<span class='kw'>x</span> <span class='kw'>=</span> <span class='st'>"age_group"</span>)</div><div class='output co'>#> <span class='message'><span style='color: #0000BB;'>NOTE: Using column `</span><span style='color: #0000BB;font-weight: bold;'>mo</span><span style='color: #0000BB;'>` as input for `col_mo`.</span><span></span></div><div class='output co'>#> <span class='message'></span><span style='color: #0000BB;'>NOTE: Using column `</span><span style='color: #0000BB;font-weight: bold;'>date</span><span style='color: #0000BB;'>` as input for `col_date`.</span><span></span></div><div class='output co'>#> <span class='message'></span><span style='color: #0000BB;'>NOTE: Using column `</span><span style='color: #0000BB;font-weight: bold;'>patient_id</span><span style='color: #0000BB;'>` as input for `col_patient_id`.</span><span></span></div><div class='output co'>#> <span class='message'>=> Found </span><span style='font-weight: bold;'>1,317 first isolates</span><span> (65.9% of total)</span></div><div class='output co'>#> <span class='warning'>Warning: Removed 3 rows containing missing values (geom_bar).</span></div><div class='output co'>#> <span class='warning'>Warning: Removed 3 rows containing missing values (geom_text).</span></div><div class='img'><img src='ggplot_rsi-6.png' alt='' width='700' height='433' /></div></span><div class='input'>
|
||||
<span class='fu'>ggplot_rsi</span>(<span class='kw'>x</span> <span class='kw'>=</span> <span class='st'>"age_group"</span>)
|
||||
<span class='co'># }</span><span class='co'># NOT RUN {</span>
|
||||
<span class='co'># for colourblind mode, use divergent colours from the viridis package:</span>
|
||||
<span class='no'>septic_patients</span> <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/select.html'>select</a></span>(<span class='no'>amox</span>, <span class='no'>nitr</span>, <span class='no'>fosf</span>, <span class='no'>trim</span>, <span class='no'>cipr</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'>ggplot_rsi</span>() + <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/scale_viridis.html'>scale_fill_viridis_d</a></span>()</div><div class='output co'>#> <span class='message'>Scale for 'fill' is already present. Adding another scale for 'fill', which</span>
|
||||
#> <span class='message'>will replace the existing scale.</span></div><div class='img'><img src='ggplot_rsi-7.png' alt='' width='700' height='433' /></div><div class='input'>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/select'>select</a></span>(<span class='no'>amox</span>, <span class='no'>nitr</span>, <span class='no'>fosf</span>, <span class='no'>trim</span>, <span class='no'>cipr</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'>ggplot_rsi</span>() + <span class='fu'><a href='https://www.rdocumentation.org/packages/ggplot2/topics/scale_viridis'>scale_fill_viridis_d</a></span>()
|
||||
|
||||
|
||||
<span class='co'># it also supports groups (don't forget to use the group var on `x` or `facet`):</span>
|
||||
<span class='no'>septic_patients</span> <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/select.html'>select</a></span>(<span class='no'>hospital_id</span>, <span class='no'>amox</span>, <span class='no'>nitr</span>, <span class='no'>fosf</span>, <span class='no'>trim</span>, <span class='no'>cipr</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/group_by.html'>group_by</a></span>(<span class='no'>hospital_id</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/select'>select</a></span>(<span class='no'>hospital_id</span>, <span class='no'>amox</span>, <span class='no'>nitr</span>, <span class='no'>fosf</span>, <span class='no'>trim</span>, <span class='no'>cipr</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/group_by'>group_by</a></span>(<span class='no'>hospital_id</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'>ggplot_rsi</span>(<span class='kw'>x</span> <span class='kw'>=</span> <span class='no'>hospital_id</span>,
|
||||
<span class='kw'>facet</span> <span class='kw'>=</span> <span class='no'>Antibiotic</span>,
|
||||
<span class='kw'>nrow</span> <span class='kw'>=</span> <span class='fl'>1</span>) +
|
||||
<span class='fu'><a href='https://ggplot2.tidyverse.org/reference/labs.html'>labs</a></span>(<span class='kw'>title</span> <span class='kw'>=</span> <span class='st'>"AMR of Anti-UTI Drugs Per Hospital"</span>,
|
||||
<span class='kw'>x</span> <span class='kw'>=</span> <span class='st'>"Hospital"</span>)</div><div class='output co'>#> <span class='error'>Error in ggplot_rsi(., x = hospital_id, facet = Antibiotic, nrow = 1): object 'hospital_id' not found</span></div><div class='input'>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/ggplot2/topics/labs'>labs</a></span>(<span class='kw'>title</span> <span class='kw'>=</span> <span class='st'>"AMR of Anti-UTI Drugs Per Hospital"</span>,
|
||||
<span class='kw'>x</span> <span class='kw'>=</span> <span class='st'>"Hospital"</span>)
|
||||
|
||||
<span class='co'># genuine analysis: check 2 most prevalent microorganisms</span>
|
||||
<span class='no'>septic_patients</span> <span class='kw'>%>%</span>
|
||||
<span class='co'># create new bacterial ID's, with all CoNS under the same group (Becker et al.)</span>
|
||||
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/mutate.html'>mutate</a></span>(<span class='kw'>mo</span> <span class='kw'>=</span> <span class='fu'><a href='as.mo.html'>as.mo</a></span>(<span class='no'>mo</span>, <span class='kw'>Becker</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)) <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/mutate'>mutate</a></span>(<span class='kw'>mo</span> <span class='kw'>=</span> <span class='fu'><a href='as.mo.html'>as.mo</a></span>(<span class='no'>mo</span>, <span class='kw'>Becker</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)) <span class='kw'>%>%</span>
|
||||
<span class='co'># filter on top three bacterial ID's</span>
|
||||
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/filter.html'>filter</a></span>(<span class='no'>mo</span> <span class='kw'>%in%</span> <span class='fu'><a href='freq.html'>top_freq</a></span>(<span class='fu'><a href='freq.html'>freq</a></span>(<span class='no'>.</span>$<span class='no'>mo</span>), <span class='fl'>3</span>)) <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/filter'>filter</a></span>(<span class='no'>mo</span> <span class='kw'>%in%</span> <span class='fu'><a href='freq.html'>top_freq</a></span>(<span class='fu'><a href='freq.html'>freq</a></span>(<span class='no'>.</span>$<span class='no'>mo</span>), <span class='fl'>3</span>)) <span class='kw'>%>%</span>
|
||||
<span class='co'># determine first isolates</span>
|
||||
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/mutate.html'>mutate</a></span>(<span class='kw'>first_isolate</span> <span class='kw'>=</span> <span class='fu'><a href='first_isolate.html'>first_isolate</a></span>(<span class='no'>.</span>,
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/mutate'>mutate</a></span>(<span class='kw'>first_isolate</span> <span class='kw'>=</span> <span class='fu'><a href='first_isolate.html'>first_isolate</a></span>(<span class='no'>.</span>,
|
||||
<span class='kw'>col_date</span> <span class='kw'>=</span> <span class='st'>"date"</span>,
|
||||
<span class='kw'>col_patient_id</span> <span class='kw'>=</span> <span class='st'>"patient_id"</span>,
|
||||
<span class='kw'>col_mo</span> <span class='kw'>=</span> <span class='st'>"mo"</span>)) <span class='kw'>%>%</span>
|
||||
<span class='co'># filter on first isolates</span>
|
||||
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/filter.html'>filter</a></span>(<span class='no'>first_isolate</span> <span class='kw'>==</span> <span class='fl'>TRUE</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/filter'>filter</a></span>(<span class='no'>first_isolate</span> <span class='kw'>==</span> <span class='fl'>TRUE</span>) <span class='kw'>%>%</span>
|
||||
<span class='co'># get short MO names (like "E. coli")</span>
|
||||
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/mutate.html'>mutate</a></span>(<span class='kw'>mo</span> <span class='kw'>=</span> <span class='fu'><a href='mo_property.html'>mo_shortname</a></span>(<span class='no'>mo</span>, <span class='kw'>Becker</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)) <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/mutate'>mutate</a></span>(<span class='kw'>mo</span> <span class='kw'>=</span> <span class='fu'><a href='mo_property.html'>mo_shortname</a></span>(<span class='no'>mo</span>, <span class='kw'>Becker</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)) <span class='kw'>%>%</span>
|
||||
<span class='co'># select this short name and some antiseptic drugs</span>
|
||||
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/select.html'>select</a></span>(<span class='no'>mo</span>, <span class='no'>cfur</span>, <span class='no'>gent</span>, <span class='no'>cipr</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/select'>select</a></span>(<span class='no'>mo</span>, <span class='no'>cfur</span>, <span class='no'>gent</span>, <span class='no'>cipr</span>) <span class='kw'>%>%</span>
|
||||
<span class='co'># group by MO</span>
|
||||
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/group_by.html'>group_by</a></span>(<span class='no'>mo</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/group_by'>group_by</a></span>(<span class='no'>mo</span>) <span class='kw'>%>%</span>
|
||||
<span class='co'># plot the thing, putting MOs on the facet</span>
|
||||
<span class='fu'>ggplot_rsi</span>(<span class='kw'>x</span> <span class='kw'>=</span> <span class='no'>Antibiotic</span>,
|
||||
<span class='kw'>facet</span> <span class='kw'>=</span> <span class='no'>mo</span>,
|
||||
<span class='kw'>translate_ab</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
|
||||
<span class='kw'>nrow</span> <span class='kw'>=</span> <span class='fl'>1</span>) +
|
||||
<span class='fu'><a href='https://ggplot2.tidyverse.org/reference/labs.html'>labs</a></span>(<span class='kw'>title</span> <span class='kw'>=</span> <span class='st'>"AMR of Top Three Microorganisms In Blood Culture Isolates"</span>,
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/ggplot2/topics/labs'>labs</a></span>(<span class='kw'>title</span> <span class='kw'>=</span> <span class='st'>"AMR of Top Three Microorganisms In Blood Culture Isolates"</span>,
|
||||
<span class='kw'>subtitle</span> <span class='kw'>=</span> <span class='st'>"Only First Isolates, CoNS grouped according to Becker et al. (2014)"</span>,
|
||||
<span class='kw'>x</span> <span class='kw'>=</span> <span class='st'>"Microorganisms"</span>)</div><div class='output co'>#> <span class='message'>=> Found <span style='font-weight: bold;'>782 first isolates</span><span> (59.9% of total)</span></div><div class='output co'>#> <span class='error'>Error in ggplot_rsi(., x = Antibiotic, facet = mo, translate_ab = FALSE, nrow = 1): object 'Antibiotic' not found</span></div></span></pre>
|
||||
<span class='kw'>x</span> <span class='kw'>=</span> <span class='st'>"Microorganisms"</span>)
|
||||
<span class='co'># }</span></pre>
|
||||
</div>
|
||||
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
|
||||
<h2>Contents</h2>
|
||||
@@ -353,6 +421,8 @@
|
||||
|
||||
<li><a href="#details">Details</a></li>
|
||||
|
||||
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
|
||||
|
||||
<li><a href="#examples">Examples</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
<script src="../extra.js"></script>
|
||||
<meta property="og:title" content="Function reference" />
|
||||
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -91,12 +91,65 @@
|
||||
Home
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
<span class="fa fa-question-circle"></span>
|
||||
|
||||
How to
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="../articles/AMR.html">
|
||||
<span class="fa fa-directions"></span>
|
||||
|
||||
Get Started
|
||||
Conduct AMR analysis
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/Predict.html">
|
||||
<span class="fa fa-dice"></span>
|
||||
|
||||
Predict antimicrobial resistance
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/EUCAST.html">
|
||||
<span class="fa fa-exchange-alt"></span>
|
||||
|
||||
Apply EUCAST rules
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/mo_property.html">
|
||||
<span class="fa fa-bug"></span>
|
||||
|
||||
Get properties of a microorganism
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/ab_property.html">
|
||||
<span class="fa fa-capsules"></span>
|
||||
|
||||
Get properties of an antibiotic
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/freq.html">
|
||||
<span class="fa fa-sort-amount-down"></span>
|
||||
|
||||
Create frequency tables
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/G_test.html">
|
||||
<span class="fa fa-clipboard-check"></span>
|
||||
|
||||
Use the G-test
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../reference/">
|
||||
@@ -119,17 +172,17 @@
|
||||
Changelog
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="https://gitlab.com/msberends/AMR">
|
||||
<span class="fab fa fab fa-gitlab"></span>
|
||||
|
||||
Source Code
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<li>
|
||||
<a href="../LICENSE-text.html">
|
||||
<span class="fa fa-book"></span>
|
||||
|
||||
@@ -169,7 +222,7 @@
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<h2 id="section-cleaning-your-data" class="hasAnchor"><a href="#section-cleaning-your-data" class="anchor"></a>Cleaning your data</h2>
|
||||
<p class="section-desc"><p>Functions for cleaning and optimising your data, to be able to add variables later on (like taxonomic properties) or to fix and extend antibiotic interpretations by applying EUCAST rules.</p></p>
|
||||
<p class="section-desc"><p>Functions for cleaning and optimising your data, to be able to add variables later on (like taxonomic properties) or to fix and extend antibiotic interpretations by applying <a href="http://www.eucast.org/expert_rules_and_intrinsic_resistance/">EUCAST rules</a>.</p></p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
315
docs/reference/itis.html
Normal file
@@ -0,0 +1,315 @@
|
||||
<!-- Generated by pkgdown: do not edit by hand -->
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>ITIS: Integrated Taxonomic Information System — itis • AMR (for R)</title>
|
||||
|
||||
<!-- favicons -->
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png">
|
||||
<link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png" />
|
||||
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png" />
|
||||
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png" />
|
||||
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png" />
|
||||
<!-- jquery -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
|
||||
<!-- Bootstrap -->
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.3.7/flatly/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous" />
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
|
||||
|
||||
<!-- Font Awesome icons -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
|
||||
|
||||
<!-- clipboard.js -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
|
||||
|
||||
<!-- sticky kit -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
|
||||
|
||||
<!-- pkgdown -->
|
||||
<link href="../pkgdown.css" rel="stylesheet">
|
||||
<script src="../pkgdown.js"></script>
|
||||
|
||||
|
||||
<!-- docsearch -->
|
||||
<script src="../docsearch.js"></script>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/docsearch.js/2.6.1/docsearch.min.css" integrity="sha256-QOSRU/ra9ActyXkIBbiIB144aDBdtvXBcNc3OTNuX/Q=" crossorigin="anonymous" />
|
||||
<link href="../docsearch.css" rel="stylesheet">
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/jquery.mark.min.js" integrity="sha256-4HLtjeVgH0eIB3aZ9mLYF6E8oU5chNdjU6p6rrXpl9U=" crossorigin="anonymous"></script>
|
||||
|
||||
|
||||
<link href="../extra.css" rel="stylesheet">
|
||||
<script src="../extra.js"></script>
|
||||
<meta property="og:title" content="ITIS: Integrated Taxonomic Information System — itis" />
|
||||
|
||||
<meta property="og:description" content="All taxonomic names of all microorganisms are included in this package, using the authoritative Integrated Taxonomic Information System (ITIS)." />
|
||||
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
|
||||
|
||||
|
||||
<!-- mathjax -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container template-reference-topic">
|
||||
<header>
|
||||
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div id="navbar" class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li>
|
||||
<a href="../index.html">
|
||||
<span class="fa fa-home"></span>
|
||||
|
||||
Home
|
||||
</a>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
<span class="fa fa-question-circle"></span>
|
||||
|
||||
How to
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="../articles/AMR.html">
|
||||
<span class="fa fa-directions"></span>
|
||||
|
||||
Conduct AMR analysis
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/Predict.html">
|
||||
<span class="fa fa-dice"></span>
|
||||
|
||||
Predict antimicrobial resistance
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/EUCAST.html">
|
||||
<span class="fa fa-exchange-alt"></span>
|
||||
|
||||
Apply EUCAST rules
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/mo_property.html">
|
||||
<span class="fa fa-bug"></span>
|
||||
|
||||
Get properties of a microorganism
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/ab_property.html">
|
||||
<span class="fa fa-capsules"></span>
|
||||
|
||||
Get properties of an antibiotic
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/freq.html">
|
||||
<span class="fa fa-sort-amount-down"></span>
|
||||
|
||||
Create frequency tables
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/G_test.html">
|
||||
<span class="fa fa-clipboard-check"></span>
|
||||
|
||||
Use the G-test
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../reference/">
|
||||
<span class="fa fa-book-open"></span>
|
||||
|
||||
Manual
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../authors.html">
|
||||
<span class="fa fa-users"></span>
|
||||
|
||||
Authors
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../news/">
|
||||
<span class="far fa far fa-newspaper"></span>
|
||||
|
||||
Changelog
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="https://gitlab.com/msberends/AMR">
|
||||
<span class="fab fa fab fa-gitlab"></span>
|
||||
|
||||
Source Code
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../LICENSE-text.html">
|
||||
<span class="fa fa-book"></span>
|
||||
|
||||
Licence
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<form class="navbar-form navbar-right" role="search">
|
||||
<div class="form-group">
|
||||
<input type="search" class="form-control" name="search-input" id="search-input" placeholder="Search..." aria-label="Search for..." autocomplete="off">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div><!--/.nav-collapse -->
|
||||
</div><!--/.container -->
|
||||
</div><!--/.navbar -->
|
||||
|
||||
|
||||
</header>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-9 contents">
|
||||
<div class="page-header">
|
||||
<h1>ITIS: Integrated Taxonomic Information System</h1>
|
||||
|
||||
<div class="hidden name"><code>itis.Rd</code></div>
|
||||
</div>
|
||||
|
||||
<div class="ref-description">
|
||||
|
||||
<p>All taxonomic names of all microorganisms are included in this package, using the authoritative Integrated Taxonomic Information System (ITIS).</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<h2 class="hasAnchor" id="itis"><a class="anchor" href="#itis"></a>ITIS</h2>
|
||||
|
||||
|
||||
<p><img src='figures/itis_logo.jpg' height=60px style=margin-bottom:5px /> <br />
|
||||
This package contains the <strong>complete microbial taxonomic data</strong> (with all nine taxonomic ranks - from kingdom to subspecies) from the publicly available Integrated Taxonomic Information System (ITIS, <a href='https://www.itis.gov'>https://www.itis.gov</a>).</p>
|
||||
<p>All (sub)species from <strong>the taxonomic kingdoms Bacteria, Fungi and Protozoa are included in this package</strong>, as well as all previously accepted names known to ITIS. Furthermore, the responsible authors and year of publication are available. This allows users to use authoritative taxonomic information for their data analysis on any microorganism, not only human pathogens. It also helps to quickly determine the Gram stain of bacteria, since all bacteria are classified into subkingdom Negibacteria or Posibacteria.</p>
|
||||
<p>ITIS is a partnership of U.S., Canadian, and Mexican agencies and taxonomic specialists [3].</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>
|
||||
|
||||
|
||||
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
|
||||
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
|
||||
|
||||
|
||||
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
|
||||
<pre class="examples"><span class='co'># NOT RUN {</span>
|
||||
<span class='co'># Get a note when a species was renamed</span>
|
||||
<span class='fu'><a href='mo_property.html'>mo_shortname</a></span>(<span class='st'>"Chlamydia psittaci"</span>)
|
||||
<span class='co'># Note: 'Chlamydia psittaci' (Page, 1968) was renamed 'Chlamydophila psittaci' (Everett et al., 1999)</span>
|
||||
<span class='co'># [1] "C. psittaci"</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='st'>"E. coli"</span>)
|
||||
<span class='co'># [1] "Gammaproteobacteria"</span>
|
||||
|
||||
<span class='fu'><a href='mo_property.html'>mo_family</a></span>(<span class='st'>"E. coli"</span>)
|
||||
<span class='co'># [1] "Enterobacteriaceae"</span>
|
||||
|
||||
<span class='fu'><a href='mo_property.html'>mo_subkingdom</a></span>(<span class='st'>"E. coli"</span>)
|
||||
<span class='co'># [1] "Negibacteria"</span>
|
||||
|
||||
<span class='fu'><a href='mo_property.html'>mo_gramstain</a></span>(<span class='st'>"E. coli"</span>) <span class='co'># based on subkingdom</span>
|
||||
<span class='co'># [1] "Gram negative"</span>
|
||||
|
||||
<span class='fu'><a href='mo_property.html'>mo_ref</a></span>(<span class='st'>"E. coli"</span>)
|
||||
<span class='co'># [1] "Castellani and Chalmers, 1919"</span>
|
||||
|
||||
<span class='co'># Do not get mistaken - the package only includes microorganisms</span>
|
||||
<span class='fu'><a href='mo_property.html'>mo_phylum</a></span>(<span class='st'>"C. elegans"</span>)
|
||||
<span class='co'># [1] "Cyanobacteria" # Bacteria?!</span>
|
||||
<span class='fu'><a href='mo_property.html'>mo_fullname</a></span>(<span class='st'>"C. elegans"</span>)
|
||||
<span class='co'># [1] "Chroococcus limneticus elegans" # Because a microorganism was found</span>
|
||||
<span class='co'># }</span></pre>
|
||||
</div>
|
||||
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
|
||||
<h2>Contents</h2>
|
||||
<ul class="nav nav-pills nav-stacked">
|
||||
|
||||
<li><a href="#itis">ITIS</a></li>
|
||||
|
||||
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
|
||||
|
||||
<li><a href="#examples">Examples</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<div class="copyright">
|
||||
<p>Developed by <a href='https://www.rug.nl/staff/m.s.berends/'>Matthijs S. Berends</a>, <a href='https://www.rug.nl/staff/c.f.luz/'>Christian F. Luz</a>, <a href='https://www.rug.nl/staff/c.glasner/'>Corinna Glasner</a>, <a href='https://www.rug.nl/staff/a.w.friedrich/'>Alex W. Friedrich</a>, <a href='https://www.rug.nl/staff/b.sinha/'>Bhanu N. M. Sinha</a>.</p>
|
||||
</div>
|
||||
|
||||
<div class="pkgdown">
|
||||
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/docsearch.js/2.6.1/docsearch.min.js" integrity="sha256-GKvGqXDznoRYHCwKXGnuchvKSwmx9SRMrZOTh2g4Sb0=" crossorigin="anonymous"></script>
|
||||
<script>
|
||||
docsearch({
|
||||
|
||||
|
||||
apiKey: 'f737050abfd4d726c63938e18f8c496e',
|
||||
indexName: 'amr',
|
||||
inputSelector: 'input#search-input.form-control',
|
||||
transformData: function(hits) {
|
||||
return hits.map(function (hit) {
|
||||
hit.url = updateHitURL(hit);
|
||||
return hit;
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
12810
docs/reference/join.html
@@ -49,7 +49,7 @@
|
||||
|
||||
<meta property="og:description" content="These function can be used to determine first isolates (see first_isolate). Using key antibiotics to determine first isolates is more reliable than without key antibiotics. These selected isolates will then be called first weighted isolates." />
|
||||
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -93,12 +93,65 @@
|
||||
Home
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
<span class="fa fa-question-circle"></span>
|
||||
|
||||
How to
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="../articles/AMR.html">
|
||||
<span class="fa fa-directions"></span>
|
||||
|
||||
Get Started
|
||||
Conduct AMR analysis
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/Predict.html">
|
||||
<span class="fa fa-dice"></span>
|
||||
|
||||
Predict antimicrobial resistance
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/EUCAST.html">
|
||||
<span class="fa fa-exchange-alt"></span>
|
||||
|
||||
Apply EUCAST rules
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/mo_property.html">
|
||||
<span class="fa fa-bug"></span>
|
||||
|
||||
Get properties of a microorganism
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/ab_property.html">
|
||||
<span class="fa fa-capsules"></span>
|
||||
|
||||
Get properties of an antibiotic
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/freq.html">
|
||||
<span class="fa fa-sort-amount-down"></span>
|
||||
|
||||
Create frequency tables
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/G_test.html">
|
||||
<span class="fa fa-clipboard-check"></span>
|
||||
|
||||
Use the G-test
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../reference/">
|
||||
@@ -121,17 +174,17 @@
|
||||
Changelog
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="https://gitlab.com/msberends/AMR">
|
||||
<span class="fab fa fab fa-gitlab"></span>
|
||||
|
||||
Source Code
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<li>
|
||||
<a href="../LICENSE-text.html">
|
||||
<span class="fa fa-book"></span>
|
||||
|
||||
@@ -249,34 +302,47 @@
|
||||
<p><strong>2. Using</strong> <code>type = "points"</code> <strong>and parameter</strong> <code>points_threshold</code> <br />
|
||||
A difference from I to S|R (or vice versa) means 0.5 points, a difference from S to R (or vice versa) means 1 point. When the sum of points exceeds <code>points_threshold</code>, an isolate will be (re)selected as a first weighted isolate.</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>
|
||||
|
||||
|
||||
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
|
||||
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
|
||||
|
||||
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
|
||||
|
||||
<div class='dont-index'><p><code><a href='first_isolate.html'>first_isolate</a></code></p></div>
|
||||
|
||||
|
||||
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
|
||||
<pre class="examples"><div class='input'><span class='co'># septic_patients is a dataset available in the AMR package</span>
|
||||
?<span class='no'>septic_patients</span></div><div class='output co'>#> <span class='message'>Rendering development documentation for 'septic_patients'</span></div><div class='input'><span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/library'>library</a></span>(<span class='no'>dplyr</span>)
|
||||
<pre class="examples"><span class='co'># NOT RUN {</span>
|
||||
<span class='co'># septic_patients is a dataset available in the AMR package</span>
|
||||
?<span class='no'>septic_patients</span>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/library'>library</a></span>(<span class='no'>dplyr</span>)
|
||||
<span class='co'># set key antibiotics to a new variable</span>
|
||||
<span class='no'>my_patients</span> <span class='kw'><-</span> <span class='no'>septic_patients</span> <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/mutate.html'>mutate</a></span>(<span class='kw'>keyab</span> <span class='kw'>=</span> <span class='fu'>key_antibiotics</span>(<span class='no'>.</span>)) <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/mutate.html'>mutate</a></span>(
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/mutate'>mutate</a></span>(<span class='kw'>keyab</span> <span class='kw'>=</span> <span class='fu'>key_antibiotics</span>(<span class='no'>.</span>)) <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/mutate'>mutate</a></span>(
|
||||
<span class='co'># now calculate first isolates</span>
|
||||
<span class='kw'>first_regular</span> <span class='kw'>=</span> <span class='fu'><a href='first_isolate.html'>first_isolate</a></span>(<span class='no'>.</span>, <span class='kw'>col_keyantibiotics</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>),
|
||||
<span class='co'># and first WEIGHTED isolates</span>
|
||||
<span class='kw'>first_weighted</span> <span class='kw'>=</span> <span class='fu'><a href='first_isolate.html'>first_isolate</a></span>(<span class='no'>.</span>, <span class='kw'>col_keyantibiotics</span> <span class='kw'>=</span> <span class='st'>"keyab"</span>)
|
||||
)</div><div class='output co'>#> <span class='message'><span style='color: #0000BB;'>NOTE: Using column `</span><span style='color: #0000BB;font-weight: bold;'>mo</span><span style='color: #0000BB;'>` as input for `col_mo`.</span><span></span></div><div class='output co'>#> <span class='message'></span><span style='color: #0000BB;'>NOTE: Using column `</span><span style='color: #0000BB;font-weight: bold;'>mo</span><span style='color: #0000BB;'>` as input for `col_mo`.</span><span></span></div><div class='output co'>#> <span class='message'></span><span style='color: #0000BB;'>NOTE: Using column `</span><span style='color: #0000BB;font-weight: bold;'>date</span><span style='color: #0000BB;'>` as input for `col_date`.</span><span></span></div><div class='output co'>#> <span class='message'></span><span style='color: #0000BB;'>NOTE: Using column `</span><span style='color: #0000BB;font-weight: bold;'>patient_id</span><span style='color: #0000BB;'>` as input for `col_patient_id`.</span><span></span></div><div class='output co'>#> <span class='message'>=> Found </span><span style='font-weight: bold;'>1,317 first isolates</span><span> (65.9% of total)</span></div><div class='output co'>#> <span class='message'></span><span style='color: #0000BB;'>NOTE: Using column `</span><span style='color: #0000BB;font-weight: bold;'>mo</span><span style='color: #0000BB;'>` as input for `col_mo`.</span><span></span></div><div class='output co'>#> <span class='message'></span><span style='color: #0000BB;'>NOTE: Using column `</span><span style='color: #0000BB;font-weight: bold;'>date</span><span style='color: #0000BB;'>` as input for `col_date`.</span><span></span></div><div class='output co'>#> <span class='message'></span><span style='color: #0000BB;'>NOTE: Using column `</span><span style='color: #0000BB;font-weight: bold;'>patient_id</span><span style='color: #0000BB;'>` as input for `col_patient_id`.</span><span></span></div><div class='output co'>#> [Criterion] Inclusion based on key antibiotics, ignoring I.</div><div class='output co'>#> <span class='message'>=> Found </span><span style='font-weight: bold;'>1,413 first weighted isolates</span><span> (70.7% of total)</span></div><div class='input'>
|
||||
)
|
||||
|
||||
<span class='co'># Check the difference, in this data set it results in 7% more isolates:</span>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/sum'>sum</a></span>(<span class='no'>my_patients</span>$<span class='no'>first_regular</span>, <span class='kw'>na.rm</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> [1] 1317</div><div class='input'><span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/sum'>sum</a></span>(<span class='no'>my_patients</span>$<span class='no'>first_weighted</span>, <span class='kw'>na.rm</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> [1] 1413</div><div class='input'>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/sum'>sum</a></span>(<span class='no'>my_patients</span>$<span class='no'>first_regular</span>, <span class='kw'>na.rm</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/sum'>sum</a></span>(<span class='no'>my_patients</span>$<span class='no'>first_weighted</span>, <span class='kw'>na.rm</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
|
||||
|
||||
|
||||
<span class='co'># output of the `key_antibiotics` function could be like this:</span>
|
||||
<span class='no'>strainA</span> <span class='kw'><-</span> <span class='st'>"SSSRR.S.R..S"</span>
|
||||
<span class='no'>strainB</span> <span class='kw'><-</span> <span class='st'>"SSSIRSSSRSSS"</span>
|
||||
|
||||
<span class='fu'>key_antibiotics_equal</span>(<span class='no'>strainA</span>, <span class='no'>strainB</span>)</div><div class='output co'>#> [1] TRUE</div><div class='input'><span class='co'># TRUE, because I is ignored (as well as missing values)</span>
|
||||
<span class='fu'>key_antibiotics_equal</span>(<span class='no'>strainA</span>, <span class='no'>strainB</span>)
|
||||
<span class='co'># TRUE, because I is ignored (as well as missing values)</span>
|
||||
|
||||
<span class='fu'>key_antibiotics_equal</span>(<span class='no'>strainA</span>, <span class='no'>strainB</span>, <span class='kw'>ignore_I</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</div><div class='output co'>#> [1] FALSE</div><div class='input'># FALSE, because I is not ignored and so the 4th value differs
|
||||
</div></span></pre>
|
||||
<span class='fu'>key_antibiotics_equal</span>(<span class='no'>strainA</span>, <span class='no'>strainB</span>, <span class='kw'>ignore_I</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)
|
||||
<span class='co'># FALSE, because I is not ignored and so the 4th value differs</span>
|
||||
<span class='co'># }</span></pre>
|
||||
</div>
|
||||
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
|
||||
<h2>Contents</h2>
|
||||
@@ -287,6 +353,8 @@
|
||||
|
||||
<li><a href="#key-antibiotics">Key antibiotics</a></li>
|
||||
|
||||
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
|
||||
|
||||
<li><a href="#see-also">See also</a></li>
|
||||
|
||||
<li><a href="#examples">Examples</a></li>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
<meta property="og:description" content="Kurtosis is a measure of the "tailedness" of the probability distribution of a real-valued random variable." />
|
||||
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -93,12 +93,65 @@
|
||||
Home
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
<span class="fa fa-question-circle"></span>
|
||||
|
||||
How to
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="../articles/AMR.html">
|
||||
<span class="fa fa-directions"></span>
|
||||
|
||||
Get Started
|
||||
Conduct AMR analysis
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/Predict.html">
|
||||
<span class="fa fa-dice"></span>
|
||||
|
||||
Predict antimicrobial resistance
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/EUCAST.html">
|
||||
<span class="fa fa-exchange-alt"></span>
|
||||
|
||||
Apply EUCAST rules
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/mo_property.html">
|
||||
<span class="fa fa-bug"></span>
|
||||
|
||||
Get properties of a microorganism
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/ab_property.html">
|
||||
<span class="fa fa-capsules"></span>
|
||||
|
||||
Get properties of an antibiotic
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/freq.html">
|
||||
<span class="fa fa-sort-amount-down"></span>
|
||||
|
||||
Create frequency tables
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/G_test.html">
|
||||
<span class="fa fa-clipboard-check"></span>
|
||||
|
||||
Use the G-test
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../reference/">
|
||||
@@ -121,17 +174,17 @@
|
||||
Changelog
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="https://gitlab.com/msberends/AMR">
|
||||
<span class="fab fa fab fa-gitlab"></span>
|
||||
|
||||
Source Code
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<li>
|
||||
<a href="../LICENSE-text.html">
|
||||
<span class="fa fa-book"></span>
|
||||
|
||||
@@ -191,6 +244,12 @@
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
|
||||
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
|
||||
|
||||
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
|
||||
|
||||
<div class='dont-index'><p><code><a href='skewness.html'>skewness</a></code></p></div>
|
||||
@@ -202,6 +261,8 @@
|
||||
<ul class="nav nav-pills nav-stacked">
|
||||
<li><a href="#arguments">Arguments</a></li>
|
||||
|
||||
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
|
||||
|
||||
<li><a href="#see-also">See also</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
<meta property="og:description" content="Convenient wrapper around grep to match a pattern: a %like% b. It always returns a logical vector and is always case-insensitive. Also, pattern (b) can be as long as x (a) to compare items of each index in both vectors." />
|
||||
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -93,12 +93,65 @@
|
||||
Home
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
<span class="fa fa-question-circle"></span>
|
||||
|
||||
How to
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="../articles/AMR.html">
|
||||
<span class="fa fa-directions"></span>
|
||||
|
||||
Get Started
|
||||
Conduct AMR analysis
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/Predict.html">
|
||||
<span class="fa fa-dice"></span>
|
||||
|
||||
Predict antimicrobial resistance
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/EUCAST.html">
|
||||
<span class="fa fa-exchange-alt"></span>
|
||||
|
||||
Apply EUCAST rules
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/mo_property.html">
|
||||
<span class="fa fa-bug"></span>
|
||||
|
||||
Get properties of a microorganism
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/ab_property.html">
|
||||
<span class="fa fa-capsules"></span>
|
||||
|
||||
Get properties of an antibiotic
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/freq.html">
|
||||
<span class="fa fa-sort-amount-down"></span>
|
||||
|
||||
Create frequency tables
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/G_test.html">
|
||||
<span class="fa fa-clipboard-check"></span>
|
||||
|
||||
Use the G-test
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../reference/">
|
||||
@@ -121,17 +174,17 @@
|
||||
Changelog
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="https://gitlab.com/msberends/AMR">
|
||||
<span class="fab fa fab fa-gitlab"></span>
|
||||
|
||||
Source Code
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<li>
|
||||
<a href="../LICENSE-text.html">
|
||||
<span class="fa fa-book"></span>
|
||||
|
||||
@@ -204,44 +257,40 @@
|
||||
|
||||
<p>Using RStudio? This function can also be inserted from the Addins menu and can have its own Keyboard Shortcut like Ctrl+Shift+L or Cmd+Shift+L (see Tools > Modify Keyboard Shortcuts...).</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>
|
||||
|
||||
|
||||
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
|
||||
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
|
||||
|
||||
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
|
||||
|
||||
<div class='dont-index'><p><code><a href='https://www.rdocumentation.org/packages/base/topics/grep'>grep</a></code></p></div>
|
||||
|
||||
|
||||
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
|
||||
<pre class="examples"><div class='input'><span class='co'># simple test</span>
|
||||
<pre class="examples"><span class='co'># NOT RUN {</span>
|
||||
<span class='co'># simple test</span>
|
||||
<span class='no'>a</span> <span class='kw'><-</span> <span class='st'>"This is a test"</span>
|
||||
<span class='no'>b</span> <span class='kw'><-</span> <span class='st'>"TEST"</span>
|
||||
<span class='no'>a</span> <span class='kw'>%like%</span> <span class='no'>b</span></div><div class='output co'>#> [1] TRUE</div><div class='input'><span class='co'>#> TRUE</span>
|
||||
<span class='no'>b</span> <span class='kw'>%like%</span> <span class='no'>a</span></div><div class='output co'>#> [1] FALSE</div><div class='input'><span class='co'>#> FALSE</span>
|
||||
<span class='no'>a</span> <span class='kw'>%like%</span> <span class='no'>b</span>
|
||||
<span class='co'>#> TRUE</span>
|
||||
<span class='no'>b</span> <span class='kw'>%like%</span> <span class='no'>a</span>
|
||||
<span class='co'>#> FALSE</span>
|
||||
|
||||
<span class='co'># also supports multiple patterns, length must be equal to x</span>
|
||||
<span class='no'>a</span> <span class='kw'><-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"Test case"</span>, <span class='st'>"Something different"</span>, <span class='st'>"Yet another thing"</span>)
|
||||
<span class='no'>b</span> <span class='kw'><-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"case"</span>, <span class='st'>"diff"</span>, <span class='st'>"yet"</span>)
|
||||
<span class='no'>a</span> <span class='kw'>%like%</span> <span class='no'>b</span></div><div class='output co'>#> [1] TRUE TRUE TRUE</div><div class='input'><span class='co'>#> TRUE TRUE TRUE</span>
|
||||
<span class='no'>a</span> <span class='kw'>%like%</span> <span class='no'>b</span>
|
||||
<span class='co'>#> TRUE TRUE TRUE</span>
|
||||
|
||||
<span class='co'># get frequencies of bacteria whose name start with 'Ent' or 'ent'</span>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/library'>library</a></span>(<span class='no'>dplyr</span>)
|
||||
<span class='no'>septic_patients</span> <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='join.html'>left_join_microorganisms</a></span>() <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='http://dplyr.tidyverse.org/reference/filter.html'>filter</a></span>(<span class='no'>genus</span> <span class='kw'>%like%</span> <span class='st'>'^ent'</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='freq.html'>freq</a></span>(<span class='no'>genus</span>, <span class='no'>species</span>)</div><div class='output co'>#> <span class='message'>Joining, by = "mo"</span></div><div class='output co'>#>
|
||||
#>
|
||||
#> **Frequency table of `genus` and `species`**
|
||||
#>
|
||||
#>
|
||||
#> | |Item | Count| Percent| Cum. Count| Cum. Percent|
|
||||
#> |:--|:--------------------------|-----:|-------:|----------:|------------:|
|
||||
#> |1 |Enterococcus faecalis | 39| 35.8%| 39| 35.8%|
|
||||
#> |2 |Enterobacter cloacae | 23| 21.1%| 62| 56.9%|
|
||||
#> |3 |Enterococcus faecium | 21| 19.3%| 83| 76.1%|
|
||||
#> |4 |Enterococcus species | 20| 18.3%| 103| 94.5%|
|
||||
#> |5 |Enterobacter aerogenes | 3| 2.8%| 106| 97.2%|
|
||||
#> |6 |Enterococcus avium | 2| 1.8%| 108| 99.1%|
|
||||
#> |7 |Enterococcus casseliflavus | 1| 0.9%| 109| 100.0%|
|
||||
#>
|
||||
#> </div></pre>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/dplyr/topics/filter'>filter</a></span>(<span class='no'>genus</span> <span class='kw'>%like%</span> <span class='st'>'^ent'</span>) <span class='kw'>%>%</span>
|
||||
<span class='fu'><a href='freq.html'>freq</a></span>(<span class='no'>genus</span>, <span class='no'>species</span>)
|
||||
<span class='co'># }</span></pre>
|
||||
</div>
|
||||
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
|
||||
<h2>Contents</h2>
|
||||
@@ -254,6 +303,8 @@
|
||||
|
||||
<li><a href="#details">Details</a></li>
|
||||
|
||||
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
|
||||
|
||||
<li><a href="#see-also">See also</a></li>
|
||||
|
||||
<li><a href="#examples">Examples</a></li>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
<meta property="og:description" content="A data set containing all bacteria codes of Certe MMB. These codes can be joined to data with an ID from microorganisms$mo (using left_join_microorganisms). GLIMS codes can also be translated to valid MOs with guess_mo." />
|
||||
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -93,12 +93,65 @@
|
||||
Home
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
<span class="fa fa-question-circle"></span>
|
||||
|
||||
How to
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="../articles/AMR.html">
|
||||
<span class="fa fa-directions"></span>
|
||||
|
||||
Get Started
|
||||
Conduct AMR analysis
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/Predict.html">
|
||||
<span class="fa fa-dice"></span>
|
||||
|
||||
Predict antimicrobial resistance
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/EUCAST.html">
|
||||
<span class="fa fa-exchange-alt"></span>
|
||||
|
||||
Apply EUCAST rules
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/mo_property.html">
|
||||
<span class="fa fa-bug"></span>
|
||||
|
||||
Get properties of a microorganism
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/ab_property.html">
|
||||
<span class="fa fa-capsules"></span>
|
||||
|
||||
Get properties of an antibiotic
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/freq.html">
|
||||
<span class="fa fa-sort-amount-down"></span>
|
||||
|
||||
Create frequency tables
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/G_test.html">
|
||||
<span class="fa fa-clipboard-check"></span>
|
||||
|
||||
Use the G-test
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../reference/">
|
||||
@@ -121,17 +174,17 @@
|
||||
Changelog
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="https://gitlab.com/msberends/AMR">
|
||||
<span class="fab fa fab fa-gitlab"></span>
|
||||
|
||||
Source Code
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<li>
|
||||
<a href="../LICENSE-text.html">
|
||||
<span class="fa fa-book"></span>
|
||||
|
||||
@@ -176,6 +229,12 @@
|
||||
<dt><code>mo</code></dt><dd><p>Code of microorganism in <code><a href='microorganisms.html'>microorganisms</a></code></p></dd>
|
||||
</dl>
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
|
||||
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
|
||||
|
||||
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
|
||||
|
||||
<div class='dont-index'><p><code><a href='as.mo.html'>as.mo</a></code> <code><a href='microorganisms.html'>microorganisms</a></code></p></div>
|
||||
@@ -188,6 +247,8 @@
|
||||
|
||||
<li><a href="#format">Format</a></li>
|
||||
|
||||
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
|
||||
|
||||
<li><a href="#see-also">See also</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
<meta property="og:description" content="A data set containing the complete microbial taxonomy of the kingdoms Bacteria, Fungi and Protozoa. MO codes can be looked up using as.mo." />
|
||||
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/logo.png" />
|
||||
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9008</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9009</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -93,12 +93,65 @@
|
||||
Home
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
<span class="fa fa-question-circle"></span>
|
||||
|
||||
How to
|
||||
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="../articles/AMR.html">
|
||||
<span class="fa fa-directions"></span>
|
||||
|
||||
Get Started
|
||||
Conduct AMR analysis
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/Predict.html">
|
||||
<span class="fa fa-dice"></span>
|
||||
|
||||
Predict antimicrobial resistance
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/EUCAST.html">
|
||||
<span class="fa fa-exchange-alt"></span>
|
||||
|
||||
Apply EUCAST rules
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/mo_property.html">
|
||||
<span class="fa fa-bug"></span>
|
||||
|
||||
Get properties of a microorganism
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/ab_property.html">
|
||||
<span class="fa fa-capsules"></span>
|
||||
|
||||
Get properties of an antibiotic
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/freq.html">
|
||||
<span class="fa fa-sort-amount-down"></span>
|
||||
|
||||
Create frequency tables
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../articles/G_test.html">
|
||||
<span class="fa fa-clipboard-check"></span>
|
||||
|
||||
Use the G-test
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../reference/">
|
||||
@@ -121,17 +174,17 @@
|
||||
Changelog
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="https://gitlab.com/msberends/AMR">
|
||||
<span class="fab fa fab fa-gitlab"></span>
|
||||
|
||||
Source Code
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<li>
|
||||
<a href="../LICENSE-text.html">
|
||||
<span class="fa fa-book"></span>
|
||||
|
||||
@@ -201,6 +254,12 @@ This package contains the <strong>complete microbial taxonomic data</strong> (wi
|
||||
<p>All (sub)species from <strong>the taxonomic kingdoms Bacteria, Fungi and Protozoa are included in this package</strong>, as well as all previously accepted names known to ITIS. Furthermore, the responsible authors and year of publication are available. This allows users to use authoritative taxonomic information for their data analysis on any microorganism, not only human pathogens. It also helps to quickly determine the Gram stain of bacteria, since all bacteria are classified into subkingdom Negibacteria or Posibacteria.</p>
|
||||
<p>ITIS is a partnership of U.S., Canadian, and Mexican agencies and taxonomic specialists [3].</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>
|
||||
|
||||
|
||||
<p><img src='figures/logo.png' height=40px style=margin-bottom:5px /> <br />
|
||||
On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a omprehensive tutorial</a> about how to conduct AMR analysis and find <a href='https://msberends.gitlab.io/AMR/reference'>the complete documentation of all functions</a>, which reads a lot easier than in R.</p>
|
||||
|
||||
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
|
||||
|
||||
<div class='dont-index'><p><code><a href='as.mo.html'>as.mo</a></code> <code><a href='mo_property.html'>mo_property</a></code> <code><a href='microorganisms.umcg.html'>microorganisms.umcg</a></code></p></div>
|
||||
@@ -217,6 +276,8 @@ This package contains the <strong>complete microbial taxonomic data</strong> (wi
|
||||
|
||||
<li><a href="#itis">ITIS</a></li>
|
||||
|
||||
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
|
||||
|
||||
<li><a href="#see-also">See also</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||