Browse Source

set_mo_source

main
parent
commit
46dcc7e2e8
  1. 1
      .Rbuildignore
  2. 1
      .gitignore
  3. 5
      DESCRIPTION
  4. 2
      NAMESPACE
  5. 2
      NEWS.md
  6. 24
      R/data.R
  7. 3
      R/globals.R
  8. 56
      R/mo.R
  9. 174
      R/mo_source.R
  10. 141
      _pkgdown.yml
  11. BIN
      data/microorganisms.certe.rda
  12. BIN
      data/microorganisms.codes.rda
  13. BIN
      data/microorganisms.umcg.rda
  14. 2
      docs/LICENSE-text.html
  15. 4
      docs/articles/benchmarks.html
  16. 2
      docs/articles/index.html
  17. 2
      docs/authors.html
  18. 66
      docs/extra.css
  19. 12
      docs/extra.js
  20. 13
      docs/index.html
  21. 5
      docs/news/index.html
  22. 6
      docs/reference/as.mo.html
  23. 22
      docs/reference/index.html
  24. 297
      docs/reference/microorganisms.codes.html
  25. 4
      docs/reference/microorganisms.html
  26. 334
      docs/reference/mo_source.html
  27. 8
      docs/sitemap.xml
  28. 11
      index.md
  29. 4
      man/as.mo.Rd
  30. 2
      man/microorganisms.Rd
  31. 14
      man/microorganisms.codes.Rd
  32. 27
      man/microorganisms.umcg.Rd
  33. 63
      man/mo_source.Rd
  34. 66
      pkgdown/extra.css
  35. 12
      pkgdown/extra.js
  36. 10
      tests/testthat/test-mo.R

1
.Rbuildignore

@ -15,6 +15,7 @@ @@ -15,6 +15,7 @@
^docs$
^git_merge\.sh$
^git_premaster\.sh$
^git_siteonly\.sh$
^index\.md$
^installed_deps$
^Meta$

1
.gitignore vendored

@ -20,5 +20,6 @@ vignettes/*.R @@ -20,5 +20,6 @@ vignettes/*.R
^CRAN-RELEASE$
git_premaster.sh
git_merge.sh
git_siteonly.sh
packrat/lib*/
packrat/src/

5
DESCRIPTION

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
Package: AMR
Version: 0.5.0.9010
Date: 2019-01-17
Version: 0.5.0.9011
Date: 2019-01-21
Title: Antimicrobial Resistance Analysis
Authors@R: c(
person(
@ -58,6 +58,7 @@ Imports: @@ -58,6 +58,7 @@ Imports:
Suggests:
covr (>= 3.0.1),
ggplot2,
readxl,
rmarkdown,
rstudioapi,
testthat (>= 1.0.2)

2
NAMESPACE

@ -77,6 +77,7 @@ export(full_join_microorganisms) @@ -77,6 +77,7 @@ export(full_join_microorganisms)
export(g.test)
export(geom_rsi)
export(get_locale)
export(get_mo_source)
export(ggplot_rsi)
export(ggplot_rsi_predict)
export(guess_ab_col)
@ -136,6 +137,7 @@ export(rsi_predict) @@ -136,6 +137,7 @@ export(rsi_predict)
export(scale_rsi_colours)
export(scale_y_percent)
export(semi_join_microorganisms)
export(set_mo_source)
export(skewness)
export(theme_rsi)
export(top_freq)

2
NEWS.md

@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
* 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
* New functions `set_mo_source()` and `get_mo_source()` to use your own predefined MO codes as input for `as.mo()` and consequently all `mo_*` functions
* Support for the upcoming [`dplyr`](https://dplyr.tidyverse.org) version 0.8.0
* New function `guess_ab_col()` to find an antibiotic column in a table
* New 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.
@ -55,6 +56,7 @@ @@ -55,6 +56,7 @@
* Removed parameter `output_logical`, the function will now always return a logical value
* Renamed parameter `filter_specimen` to `specimen_group`, although using `filter_specimen` will still work
* A note to the manual pages of the `portion` functions, that low counts can influence the outcome and that the `portion` functions may camouflage this, since they only return the portion (albeit being dependent on the `minimum` parameter)
* Merged data sets `microorganisms.certe` and `microorganisms.umcg` into `microorganisms.codes`
* Function `mo_taxonomy()` now contains the kingdom too
* Reduce false positives for `is.rsi.eligible()`
* Summaries of class `mo` will now return the top 3 and the unique count, e.g. using `summary(mo)`

24
R/data.R

@ -148,7 +148,7 @@ @@ -148,7 +148,7 @@
#' }
#' @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}}
#' @seealso \code{\link{as.mo}} \code{\link{mo_property}} \code{\link{microorganisms.codes}}
"microorganisms"
#' Data set with old taxonomic data from ITIS
@ -167,29 +167,17 @@ @@ -167,29 +167,17 @@
#' @seealso \code{\link{as.mo}} \code{\link{mo_property}} \code{\link{microorganisms}}
"microorganisms.old"
#' Translation table for UMCG
#' Translation table for microorganism codes
#'
#' A data set containing all bacteria codes of UMCG MMB. These codes can be joined to data with an ID from \code{\link{microorganisms}$mo} (using \code{\link{left_join_microorganisms}}). GLIMS codes can also be translated to valid \code{MO}s with \code{\link{guess_mo}}.
#' @format A \code{\link{data.frame}} with 1,095 observations and 2 variables:
#' A data set containing commonly used codes for microorganisms. Define your own with \code{\link{set_mo_source}}.
#' @format A \code{\link{data.frame}} with 3,303 observations and 2 variables:
#' \describe{
#' \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"
#' Translation table for Certe
#'
#' A data set containing all bacteria codes of Certe MMB. These codes can be joined to data with an ID from \code{\link{microorganisms}$mo} (using \code{\link{left_join_microorganisms}}). GLIMS codes can also be translated to valid \code{MO}s with \code{\link{guess_mo}}.
#' @format A \code{\link{data.frame}} with 2,665 observations and 2 variables:
#' \describe{
#' \item{\code{certe}}{Code of microorganism according to Certe MMB}
#' \item{\code{certe}}{Commonly used code of a microorganism}
#' \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"
"microorganisms.codes"
#' Data set with 2000 blood culture isolates of septic patients
#'

3
R/globals.R

@ -54,11 +54,10 @@ globalVariables(c(".", @@ -54,11 +54,10 @@ globalVariables(c(".",
"median",
"mic",
"microorganisms",
"microorganisms.certe",
"microorganisms.codes",
"microorganisms.old",
"microorganisms.oldDT",
"microorganisms.prevDT",
"microorganisms.umcg",
"microorganisms.unprevDT",
"microorganismsDT",
"mo",

56
R/mo.R

@ -30,7 +30,7 @@ @@ -30,7 +30,7 @@
#'
#' This excludes \emph{Enterococci} at default (who are in group D), use \code{Lancefield = "all"} to also categorise all \emph{Enterococci} as group D.
#' @param allow_uncertain a logical to indicate whether the input should be checked for less possible results, see Details
#' @param reference_df a \code{data.frame} to use for extra reference when translating \code{x} to a valid \code{mo}. The first column can be any microbial name, code or ID (used in your analysis or organisation), the second column must be a valid \code{mo} as found in the \code{\link{microorganisms}} data set.
#' @param reference_df a \code{data.frame} to use for extra reference when translating \code{x} to a valid \code{mo}. See \code{\link{set_mo_source}} and \code{\link{get_mo_source}} to automate the usage of your own codes (e.g. used in your analysis or organisation).
#' @rdname as.mo
#' @aliases mo
#' @keywords mo Becker becker Lancefield lancefield guess
@ -139,7 +139,7 @@ @@ -139,7 +139,7 @@
#' df <- df %>%
#' mutate(mo = as.mo(paste(genus, species)))
#' }
as.mo <- function(x, Becker = FALSE, Lancefield = FALSE, allow_uncertain = TRUE, reference_df = NULL) {
as.mo <- function(x, Becker = FALSE, Lancefield = FALSE, allow_uncertain = TRUE, reference_df = get_mo_source()) {
mo <- mo_validate(x = x, property = "mo",
Becker = Becker, Lancefield = Lancefield,
allow_uncertain = allow_uncertain, reference_df = reference_df)
@ -152,11 +152,11 @@ is.mo <- function(x) { @@ -152,11 +152,11 @@ is.mo <- function(x) {
identical(class(x), "mo")
}
#' @importFrom dplyr %>% pull left_join n_distinct progress_estimated
#' @importFrom dplyr %>% pull left_join n_distinct progress_estimated filter
#' @importFrom data.table data.table as.data.table setkey
#' @importFrom crayon magenta red italic
exec_as.mo <- function(x, Becker = FALSE, Lancefield = FALSE,
allow_uncertain = TRUE, reference_df = NULL,
allow_uncertain = TRUE, reference_df = get_mo_source(),
property = "mo", clear_options = TRUE) {
if (!"AMR" %in% base::.packages()) {
@ -206,11 +206,16 @@ exec_as.mo <- function(x, Becker = FALSE, Lancefield = FALSE, @@ -206,11 +206,16 @@ exec_as.mo <- function(x, Becker = FALSE, Lancefield = FALSE,
if (!is.data.frame(reference_df) | NCOL(reference_df) < 2) {
stop('`reference_df` must be a data.frame with at least two columns.', call. = FALSE)
}
# remove factors, just keep characters
if (!"mo" %in% colnames(reference_df)) {
stop("`reference_df` must contain a column `mo` with values from the 'microorganisms' data set.", call. = FALSE)
}
reference_df <- reference_df %>% filter(!is.na(mo))
# # remove factors, just keep characters
suppressWarnings(
reference_df[] <- lapply(reference_df, as.character)
)
}
if (all(identical(trimws(x_input), "") | is.na(x_input))) {
# all empty
if (property == "mo") {
@ -220,24 +225,25 @@ exec_as.mo <- function(x, Becker = FALSE, Lancefield = FALSE, @@ -220,24 +225,25 @@ exec_as.mo <- function(x, Becker = FALSE, Lancefield = FALSE,
} else {
return(rep(NA_character_, length(x_input)))
}
} else if (all(x %in% microorganismsDT[["mo"]])) {
# existing mo codes when not looking for property "mo", like mo_genus("B_ESCHR_COL")
x <- microorganismsDT[data.table(mo = x), on = "mo", ..property][[1]]
} else if (!is.null(reference_df)
& all(x %in% reference_df[, 1])
& all(reference_df[, 2] %in% microorganismsDT[["mo"]])) {
# manually defined reference
} else if (all(x %in% reference_df[, 1])
& all(reference_df[, "mo"] %in% microorganismsDT[["mo"]])) {
# all in reference df
colnames(reference_df)[1] <- "x"
colnames(reference_df)[2] <- "mo"
suppressWarnings(
x <- data.frame(x = x, stringsAsFactors = FALSE) %>%
left_join(reference_df, by = "x") %>%
left_join(microorganisms, by = "mo") %>%
pull(property)
)
} else if (all(toupper(x) %in% microorganisms.certe[, "certe"])) {
# old Certe codes
y <- as.data.table(microorganisms.certe)[data.table(certe = toupper(x)), on = "certe", ]
} else if (all(x %in% microorganismsDT[["mo"]])) {
# existing mo codes when not looking for property "mo", like mo_genus("B_ESCHR_COL")
x <- microorganismsDT[data.table(mo = x), on = "mo", ..property][[1]]
} else if (all(toupper(x) %in% microorganisms.codes[, "code"])) {
# commonly used MO codes
y <- as.data.table(microorganisms.codes)[data.table(code = toupper(x)), on = "code", ]
x <- microorganismsDT[data.table(mo = y[["mo"]]), on = "mo", ..property][[1]]
} else if (!all(x %in% microorganismsDT[[property]])) {
@ -419,28 +425,16 @@ exec_as.mo <- function(x, Becker = FALSE, Lancefield = FALSE, @@ -419,28 +425,16 @@ exec_as.mo <- function(x, Becker = FALSE, Lancefield = FALSE,
}
# TRY OTHER SOURCES ----
if (toupper(x_backup[i]) %in% microorganisms.certe[, 1]) {
mo_found <- microorganisms.certe[toupper(x_backup[i]) == microorganisms.certe[, 1], 2][1L]
if (toupper(x_backup[i]) %in% microorganisms.codes[, 1]) {
mo_found <- microorganisms.codes[toupper(x_backup[i]) == microorganisms.codes[, 1], "mo"][1L]
if (length(mo_found) > 0) {
x[i] <- microorganismsDT[mo == mo_found, ..property][[1]][1L]
next
}
}
if (x_backup[i] %in% microorganisms.umcg[, 1]) {
mo_umcg <- microorganisms.umcg[microorganisms.umcg[, 1] == x_backup[i], 2]
mo_found <- microorganisms.certe[microorganisms.certe[, 1] == mo_umcg, 2][1L]
if (length(mo_found) == 0) {
# not found
x[i] <- NA_character_
failures <- c(failures, x_backup[i])
} else {
x[i] <- microorganismsDT[mo == mo_found, ..property][[1]][1L]
}
next
}
if (!is.null(reference_df)) {
if (x_backup[i] %in% reference_df[, 1]) {
ref_mo <- reference_df[reference_df[, 1] == x_backup[i], 2]
ref_mo <- reference_df[reference_df[, 1] == x_backup[i], "mo"]
if (ref_mo %in% microorganismsDT[, mo]) {
x[i] <- microorganismsDT[mo == ref_mo, ..property][[1]][1L]
next

174
R/mo_source.R

@ -0,0 +1,174 @@ @@ -0,0 +1,174 @@
# ==================================================================== #
# 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. #
# ==================================================================== #
#' Use predefined reference data set
#'
#' These functions can be used to predefine your own reference to be used in \code{\link{as.mo}} and consequently all \code{mo_*} functions like \code{\link{mo_genus}} and \code{\link{mo_gramstain}}.
#' @param path location of your reference file, see Details
#' @rdname mo_source
#' @name mo_source
#' @aliases set_mo_source get_mo_source
#' @details The reference file can be a text file seperated with commas (CSV) or pipes, an Excel file (old 'xls' format or new 'xlsx' format) or an R object file (extension '.rds'). To use an Excel file, you need to have the \code{readxl} package installed.
#'
#' \code{set_mo_source} will check the file for validity: it must be a \code{data.frame}, must have a column named \code{"mo"} which contains values from \code{microorganisms$mo} and must have a reference column with your own defined values. If all tests pass, \code{set_mo_source} will read the file into R and export it to \code{"~/.mo_source.rds"}. This compressed data file will then be used at default for MO determination (function \code{\link{as.mo}} and consequently all \code{mo_*} functions like \code{\link{mo_genus}} and \code{\link{mo_gramstain}}). The location of the original file will be saved as option with \code{\link{options}(mo_source = path)}. Its timestamp will be saved with \code{\link{options}(mo_source_datetime = ...)}.
#'
#' \code{get_mo_source} will return the data set by reading \code{"~/.mo_source.rds"} with \code{\link{readRDS}}. If the original file has changed (the file defined with \code{path}), it will call \code{set_mo_source} to update the data file automatically.
#'
#' Reading an Excel file (\code{.xlsx}) with only one row has a size of 8-9 kB. The compressed file will have a size of 0.1 kB and can be read by \code{get_mo_source} in only a couple of microseconds (a millionth of a second).
#' @importFrom dplyr select everything
#' @export
#' @inheritSection AMR Read more on our website!
#' @examples
#' \dontrun{
#'
#' # imagine this Excel file (mo codes looked up in `microorganisms` data set):
#' # A B
#' # 1 our code mo
#' # 2 lab_mo_ecoli B_ESCHR_COL
#' # 3 lab_mo_kpneumoniae B_KLBSL_PNE
#'
#' # 1. We save it as 'home/me/ourcodes.xlsx'
#'
#' # 2. We use it for input:
#' set_mo_source("C:\path\ourcodes.xlsx")
#' #> Created mo_source file '~/.mo_source.rds' from 'home/me/ourcodes.xlsx'.
#'
#' # 3. And use it in our functions:
#' as.mo("lab_mo_ecoli")
#' #> B_ESCHR_COL
#'
#' mo_genus("lab_mo_kpneumoniae")
#' #> "Klebsiella"
#'
#' # 4. It will look for changes itself:
#' # (add new row to the Excel file and save it)
#'
#' mo_genus("lab_mo_kpneumoniae")
#' #> Updated mo_source file '~/.mo_source.rds' from 'home/me/ourcodes.xlsx'.
#' #> "Klebsiella"
#' }
set_mo_source <- function(path) {
if (!is.character(path) | length(path) > 1) {
stop("`path` must be a character of length 1.")
}
if (path == "") {
options(mo_source = NULL)
options(mo_source_timestamp = NULL)
if (file.exists("~/.mo_source.rds")) {
unlink("~/.mo_source.rds")
message("Removed mo_source file '~/.mo_source.rds'.")
}
return(invisible())
}
if (!file.exists(path)) {
stop("File not found: ", path)
}
is_valid <- function(df) {
valid <- TRUE
if (!is.data.frame(df)) {
valid <- FALSE
} else if (!"mo" %in% colnames(df)) {
valid <- FALSE
} else if (!all(df$mo %in% AMR::microorganisms$mo)) {
valid <- FALSE
} else if (NCOL(df) < 2) {
valid <- FALSE
}
valid
}
if (path %like% '[.]rds$') {
df <- readRDS(path)
} else if (path %like% '[.]xlsx?$') {
# is Excel file (old or new)
if (!"readxl" %in% utils::installed.packages()) {
stop("Install the 'readxl' package first.")
}
if (path %like% '[.]xlsx$') {
df <- readxl::read_xlsx(path)
} else {
df <- readxl::read_xls(path)
}
} else {
# try comma first
try(
df <- utils::read.table(header = TRUE, sep = ",", stringsAsFactors = FALSE),
silent = TRUE)
if (!is_valid(df)) {
# try pipe
try(
df <- utils::read.table(header = TRUE, sep = "|", stringsAsFactors = FALSE),
silent = TRUE)
}
}
if (!is_valid(df)) {
stop("File must contain a column with self-defined values and a reference column `mo` with valid values from the `microorganisms` data set.")
}
if (colnames(df)[1] == "mo") {
# put mo to the end
df <- df %>% select(-"mo", everything(), "mo")
}
df <- as.data.frame(df, stringAsFactors = FALSE)
# success
if (file.exists("~/.mo_source.rds")) {
action <- "Updated"
} else {
action <- "Created"
}
saveRDS(df, "~/.mo_source.rds")
options(mo_source = path)
options(mo_source_timestamp = as.character(file.info(path)$mtime))
message(action, " mo_source file '~/.mo_source.rds' from '", path, "'.")
}
#' @rdname mo_source
#' @export
get_mo_source <- function() {
if (is.null(getOption("mo_source", NULL))) {
return(NULL)
} else {
old_time <- as.POSIXct(getOption("mo_source_timestamp"))
new_time <- as.POSIXct(as.character(file.info(getOption("mo_source", ""))$mtime))
if (is.na(new_time)) {
# source file was deleted, remove reference too
set_mo_source("")
return(NULL)
}
if (new_time != old_time) {
# set updated source
set_mo_source(getOption("mo_source"))
}
}
readRDS("~/.mo_source.rds")
}

141
_pkgdown.yml

@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
# Visit our website for more info: https://msberends.gitab.io/AMR. #
# ==================================================================== #
url: https://msberends.gitlab.io/AMR
url: 'https://msberends.gitlab.io/AMR'
title: 'AMR (for R)'
@ -74,74 +74,77 @@ navbar: @@ -74,74 +74,77 @@ navbar:
href: 'LICENSE-text.html'
reference:
- title: 'Background information'
desc: >
Some pages about our package and its external sources. Be sure to read our [How To's](./../articles/index.html)
for more information about how to work with functions in this package.
contents:
- '`AMR`'
- '`ITIS`'
- title: 'Cleaning your data'
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](http://www.eucast.org/expert_rules_and_intrinsic_resistance/).
contents:
- starts_with("as.")
- '`eucast_rules`'
- '`guess_ab_col`'
- '`read.4D`'
- title: 'Adding variables to your data'
desc: >
Functions to add new data to existing data, like the determination
of first isolates,
contents:
- '`first_isolate`'
- '`mdro`'
- '`key_antibiotics`'
- '`mo_property`'
- '`ab_property`'
- '`atc_property`'
- '`abname`'
- '`age`'
- '`age_groups`'
- '`p.symbol`'
- '`join`'
- title: 'Analysing your data'
desc: >
Functions for conducting AMR analysis
contents:
- '`count`'
- '`portion`'
- '`freq`'
- '`g.test`'
- '`ggplot_rsi`'
- '`kurtosis`'
- '`resistance_predict`'
- '`rsi`'
- '`skewness`'
- title: 'Included data sets'
desc: >
References for microorganisms and antibiotics, and even a
genuine data set with isolates from septic patients.
contents:
- '`antibiotics`'
- '`microorganisms`'
- '`septic_patients`'
- '`microorganisms.certe`'
- '`microorganisms.old`'
- '`microorganisms.umcg`'
- '`supplementary_data`'
- title: Other
desc: >
These functions are mostly for internal use, but some of
them may also be suitable for your analysis. Especially the
'like' function can be useful: `if (x %like% y) {...}`.
contents:
- '`get_locale`'
- '`like`'
- '`mo_failures`'
- '`mo_renamed`'
- title: 'Background information'
desc: >
Some pages about our package and its external sources. Be sure to read our [How To's](./../articles/index.html)
for more information about how to work with functions in this package.
contents:
- '`AMR`'
- '`ITIS`'
- title: 'Cleaning your data'
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](http://www.eucast.org/expert_rules_and_intrinsic_resistance/).
contents:
- starts_with("as.")
- '`mo_source`'
- '`eucast_rules`'
- '`guess_ab_col`'
- '`read.4D`'
- title: 'Adding variables to your data'
desc: >
Functions to add new data to existing data, like the determination
of first isolates, multi-drug resistant microorganisms (MDRO), getting
properties of microorganisms or antibiotics and determining the age of
patients or divide ages into age groups.
contents:
- '`first_isolate`'
- '`mdro`'
- '`key_antibiotics`'
- '`mo_property`'
- '`ab_property`'
- '`atc_property`'
- '`abname`'
- '`age`'
- '`age_groups`'
- '`p.symbol`'
- '`join`'
- title: 'Analysing your data'
desc: >
Functions for conducting AMR analysis, like counting isolates, calculating
resistance or susceptibility, creating frequency tables or make plots.
contents:
- '`count`'
- '`portion`'
- '`freq`'
- '`g.test`'
- '`ggplot_rsi`'
- '`kurtosis`'
- '`resistance_predict`'
- '`rsi`'
- '`skewness`'
- title: 'Included data sets'
desc: >
References for microorganisms and antibiotics, and even a
genuine data set with isolates from septic patients.
contents:
- '`antibiotics`'
- '`microorganisms`'
- '`septic_patients`'
- '`microorganisms.codes`'
- '`microorganisms.old`'
- '`supplementary_data`'
- title: Other
desc: >
These functions are mostly for internal use, but some of
them may also be suitable for your analysis. Especially the
'like' function can be useful: `if (x %like% y) {...}`.
contents:
- '`get_locale`'
- '`like`'
- '`mo_failures`'
- '`mo_renamed`'
authors:
Matthijs S. Berends:

BIN
data/microorganisms.certe.rda

Binary file not shown.

BIN
data/microorganisms.codes.rda

Binary file not shown.

BIN
data/microorganisms.umcg.rda

Binary file not shown.

2
docs/LICENSE-text.html

@ -78,7 +78,7 @@ @@ -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.9010</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9011</span>
</span>
</div>

4
docs/articles/benchmarks.html

@ -40,7 +40,7 @@ @@ -40,7 +40,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.9010</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9011</span>
</span>
</div>
@ -178,7 +178,7 @@ @@ -178,7 +178,7 @@
<h1>Benchmarks</h1>
<h4 class="author">Matthijs S. Berends</h4>
<h4 class="date">17 January 2019</h4>
<h4 class="date">21 January 2019</h4>
<div class="hidden name"><code>benchmarks.Rmd</code></div>

2
docs/articles/index.html

@ -78,7 +78,7 @@ @@ -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.9010</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9011</span>
</span>
</div>

2
docs/authors.html

@ -78,7 +78,7 @@ @@ -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.9010</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9011</span>
</span>
</div>

66
docs/extra.css

@ -23,22 +23,22 @@ @@ -23,22 +23,22 @@
/* class for footer */
.university {
background-image: url(logo_rug.png);
height: 40px;
background-size: 160px;
background-repeat: no-repeat;
background-image: url(logo_rug.png);
background-size: 200px;
background-repeat: no-repeat;
background-position: center right;
}
/* Supports icons for brand using font-awesome */
.fab {
font-family: "Font Awesome 5 Brands" !important;
font-family: "Font Awesome 5 Brands" !important;
}
/* 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;
display: none;
}
/* make colour darker and better readable for links */
@ -60,21 +60,33 @@ a pre[href], a pre[href]:hover, a pre[href]:focus { @@ -60,21 +60,33 @@ a pre[href], a pre[href]:hover, a pre[href]:focus {
/* syntax font */
pre, code {
font-family: 'Courier New', monospace;
font-size: 100% !important;
font-weight: bold;
background-color: transparent;
font-family: 'Courier New', monospace;
font-size: 100% !important;
font-weight: bold;
background-color: transparent;
}
pre {
font-size: 90% !important;
}
kbd {
display: inline-block;
padding: 0 4px;
box-shadow: 1px 1px 1px #2c3e50;
margin: 2px;
font-size: small;
vertical-align: text-bottom;
color: #2c3e50;
background: #eee;
font-weight: bold;
}
li, p {
line-height: 1.5;
line-height: 1.5;
}
/* slightly smaller blockquote */
blockquote {
font-size: 98%;
font-size: 98%;
}
/* 2nd list in navigation should be smaller */
@ -91,11 +103,11 @@ help { @@ -91,11 +103,11 @@ help {
/* replace 'Developers' with 'Authors' */
.developers h2 {
display: none;
display: none;
}
.developers:before {
content: 'Authors';
font-size: 1.5em;
content: 'Authors';
font-size: 1.5em;
}
/* hide version label */
@ -105,11 +117,11 @@ help { @@ -105,11 +117,11 @@ help {
/* Date of vignettes */
.template-article .date:before {
content: 'Last updated: ';
content: 'Last updated: ';
}
.template-article .date {
font-size: 14px;
padding-top: 40px;
font-size: 14px;
padding-top: 40px;
}
/* more space between icon and text in top menu */
@ -134,15 +146,21 @@ help { @@ -134,15 +146,21 @@ help {
padding: 4px !important;
}
thead {
border-top: 2px solid black;
border-bottom: 2px solid black;
border-top: 2px solid black;
border-bottom: 2px solid black;
}
tbody {
border-bottom: 2px solid black;
thead ~ tbody {
/* only when it has a header */
border-bottom: 2px solid black;
}
table a:not(.btn), .table a:not(.btn) {
text-decoration: inherit;
text-decoration: inherit;
}
table a:not(.btn):hover, .table a:not(.btn):hover {
text-decoration: underline;
text-decoration: underline;
}
.template-reference-index h2 ~ p {
font-size: 110%;
/* font-weight: bold; */
}

12
docs/extra.js

@ -29,11 +29,19 @@ $('head').append('<!-- Updated Font Awesome library --><link rel="stylesheet" hr @@ -29,11 +29,19 @@ $('head').append('<!-- Updated Font Awesome library --><link rel="stylesheet" hr
// Edit footer
$( document ).ready(function() {
// redirect to GitLab
var url_old = window.location.href;
var url_new = url_old.replace("github", "gitlab");
if (url_old != url_new) {
window.location.replace(url);
}
$('footer').html('<p>' +
$('footer .copyright p').html().replace("Developed by",
"<code>AMR</code> (for R). Developed at the University of Groningen.<br>Authors:") +
'<code>AMR</code> (for R). Developed at the <a href="https://www.rug.nl" target="_blank">University of Groningen</a>.<br>Authors:') +
'</p>');
//$('footer').prepend("<div class='university'/>");
$('footer').addClass("university");
// Edit title of manual
$('.template-reference-index h1').text('Manual');

13
docs/index.html

@ -42,7 +42,7 @@ @@ -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.9010</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9011</span>
</span>
</div>
@ -191,6 +191,7 @@ @@ -191,6 +191,7 @@
<li>Research Microbiologists</li>
<li>Biomedical Researchers</li>
<li>Research Pharmacologists</li>
<li>Data Scientists / Data Analysts</li>
</ul>
<p>Veterinary Microbiology:</p>
<ul>
@ -203,14 +204,6 @@ @@ -203,14 +204,6 @@
<li>Extremophile Researchers</li>
<li>Astrobiologists</li>
</ul>
<p>Other specialists in any of the above fields:</p>
<ul>
<li>Data Scientists/Data Analysts</li>
<li>Biotechnologists</li>
<li>Biochemists</li>
<li>Geneticists</li>
<li>Molecular Biologists/Microbiologists</li>
</ul>
<p>Developers:</p>
<ul>
<li>Package developers for R</li>
@ -222,7 +215,7 @@ @@ -222,7 +215,7 @@
<a href="#get-this-package" class="anchor"></a>Get this package</h3>
<p>This package is available on the official R network (CRAN), which has a peer-reviewed submission process. Install this package in R with:</p>
<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. For RStudio, click on menu <em>Tools</em> &gt; <em>Install Packages…</em>, then type in “AMR” and press <kbd>Install</kbd>.</p>
<p>It will be downloaded and installed automatically. For RStudio, click on the menu <em>Tools</em> &gt; <em>Install Packages…</em> and then type in “AMR” and press <kbd>Install</kbd>.</p>
</div>
<div id="get-started" class="section level3">
<h3 class="hasAnchor">

5
docs/news/index.html

@ -78,7 +78,7 @@ @@ -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.9010</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9011</span>
</span>
</div>
@ -235,6 +235,7 @@ @@ -235,6 +235,7 @@
<li>Contains a comprehensive tutorial about how to conduct antimicrobial resistance analysis</li>
</ul>
</li>
<li>New functions <code><a href="../reference/mo_source.html">set_mo_source()</a></code> and <code><a href="../reference/mo_source.html">get_mo_source()</a></code> to use your own predefined MO codes as input for <code><a href="../reference/as.mo.html">as.mo()</a></code> and consequently all <code>mo_*</code> functions</li>
<li>Support for the upcoming <a href="https://dplyr.tidyverse.org"><code>dplyr</code></a> version 0.8.0</li>
<li>New function <code><a href="../reference/guess_ab_col.html">guess_ab_col()</a></code> to find an antibiotic column in a table</li>
<li>New 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>
@ -297,6 +298,8 @@ @@ -297,6 +298,8 @@
</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>Merged data sets <code>microorganisms.certe</code> and <code>microorganisms.umcg</code> into <code>microorganisms.codes</code>
</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>
</li>

6
docs/reference/as.mo.html

@ -80,7 +80,7 @@ @@ -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.9010</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9011</span>
</span>
</div>
@ -228,7 +228,7 @@ @@ -228,7 +228,7 @@
</div>
<pre class="usage"><span class='fu'>as.mo</span>(<span class='no'>x</span>, <span class='kw'>Becker</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>Lancefield</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>allow_uncertain</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>reference_df</span> <span class='kw'>=</span> <span class='kw'>NULL</span>)
<span class='kw'>reference_df</span> <span class='kw'>=</span> <span class='fu'><a href='mo_source.html'>get_mo_source</a></span>())
<span class='fu'>is.mo</span>(<span class='no'>x</span>)</pre>
@ -255,7 +255,7 @@ @@ -255,7 +255,7 @@
</tr>
<tr>
<th>reference_df</th>
<td><p>a <code>data.frame</code> to use for extra reference when translating <code>x</code> to a valid <code>mo</code>. The first column can be any microbial name, code or ID (used in your analysis or organisation), the second column must be a valid <code>mo</code> as found in the <code><a href='microorganisms.html'>microorganisms</a></code> data set.</p></td>
<td><p>a <code>data.frame</code> to use for extra reference when translating <code>x</code> to a valid <code>mo</code>. See <code><a href='mo_source.html'>set_mo_source</a></code> and <code><a href='mo_source.html'>get_mo_source</a></code> to automate the usage of your own codes (e.g. used in your analysis or organisation).</p></td>
</tr>
</table>

22
docs/reference/index.html

@ -78,7 +78,7 @@ @@ -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.9010</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.5.0.9011</span>
</span>
</div>
@ -278,6 +278,12 @@ @@ -278,6 +278,12 @@
<td><p>Class 'rsi'</p></td>
</tr><tr>
<td>
<p><code><a href="mo_source.html">set_mo_source()</a></code> <code><a href="mo_source.html">get_mo_source()</a></code> </p>
</td>
<td><p>Use predefined reference data set</p></td>
</tr><tr>
<td>
<p><code><a href="eucast_rules.html">eucast_rules()</a></code> <code><a href="eucast_rules.html">EUCAST_rules()</a></code> <code><a href="eucast_rules.html">interpretive_reading()</a></code> </p>
</td>
@ -299,7 +305,7 @@ @@ -299,7 +305,7 @@
<tr>
<th colspan="2">
<h2 id="section-adding-variables-to-your-data" class="hasAnchor"><a href="#section-adding-variables-to-your-data" class="anchor"></a>Adding variables to your data</h2>
<p class="section-desc"><p>Functions to add new data to existing data, like the determination of first isolates,</p></p>
<p class="section-desc"><p>Functions to add new data to existing data, like the determination of first isolates, multi-drug resistant microorganisms (MDRO), getting properties of microorganisms or antibiotics and determining the age of patients or divide ages into age groups.</p></p>
</th>
</tr>
<tr>
@ -373,7 +379,7 @@ @@ -373,7 +379,7 @@
<tr>
<th colspan="2">
<h2 id="section-analysing-your-data" class="hasAnchor"><a href="#section-analysing-your-data" class="anchor"></a>Analysing your data</h2>
<p class="section-desc"><p>Functions for conducting AMR analysis</p></p>
<p class="section-desc"><p>Functions for conducting AMR analysis, like counting isolates, calculating resistance or susceptibility, creating frequency tables or make plots.</p></p>
</th>
</tr>
<tr>
@ -459,9 +465,9 @@ @@ -459,9 +465,9 @@
</tr><tr>
<td>
<p><code><a href="microorganisms.certe.html">microorganisms.certe</a></code> </p>
<p><code><a href="microorganisms.codes.html">microorganisms.codes</a></code> </p>
</td>
<td><p>Translation table for Certe</p></td>
<td><p>Translation table for microorganism codes</p></td>
</tr><tr>
<td>
@ -470,12 +476,6 @@ @@ -470,12 +476,6 @@
<td><p>Data set with old taxonomic data from ITIS</p></td>
</tr><tr>
<td>
<p><code><a href="microorganisms.umcg.html">microorganisms.umcg</a></code> </p>
</td>
<td><p>Translation table for UMCG</p></td>
</tr><tr>
<td>
<p><code><a href="supplementary_data.html">microorganismsDT</a></code> <code><a href="supplementary_data.html">microorganisms.prevDT</a></code> <code><a href="supplementary_data.html">microorganisms.unprevDT</a></code> <code><a href="supplementary_data.html">microorganisms.oldDT</a></code> </p>
</td>

297
docs/reference/microorganisms.codes.html

@ -0,0 +1,297 @@ @@ -0,0 +1,297 @@
<!-- 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>Translation table for microorganism codes — microorganisms.codes • 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="Translation table for microorganism codes — microorganisms.codes" />
<meta property="og:description" content="A data set containing commonly used codes for microorganisms. Define your own with set_mo_source." />
<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.9011</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>
<li>
<a href="../articles/benchmarks.html">
<span class="fa fa-shipping-fast"></span>
Other: benchmarks
</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>Translation table for microorganism codes</h1>
<div class="hidden name"><code>microorganisms.codes.Rd</code></div>
</div>
<div class="ref-description">
<p>A data set containing commonly used codes for microorganisms. Define your own with <code><a href='mo_source.html'>set_mo_source</a></code>.</p>
</div>
<pre class="usage"><span class='no'>microorganisms.codes</span></pre>
<h2 class="hasAnchor" id="format"><a class="anchor" href="#format"></a>Format</h2>
<p>A <code><a href='https://www.rdocumentation.org/packages/base/topics/data.frame'>data.frame</a></code> with 3,303 observations and 2 variables:</p><dl class='dl-horizontal'>
<dt><code>certe</code></dt><dd><p>Commonly used code of a microorganism</p></dd>
<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>
</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="#format">Format</a></li>