mirror of
https://github.com/msberends/AMR.git
synced 2025-08-19 11:42:15 +02:00
fix unit tests
This commit is contained in:
@@ -4,9 +4,9 @@
|
||||
\alias{as.mo}
|
||||
\alias{mo}
|
||||
\alias{is.mo}
|
||||
\alias{mo_failures}
|
||||
\alias{mo_uncertainties}
|
||||
\alias{mo_renamed}
|
||||
\alias{mo_failures}
|
||||
\alias{mo_reset_session}
|
||||
\alias{mo_cleaning_regex}
|
||||
\title{Transform Input to a Microorganism Code}
|
||||
@@ -27,12 +27,12 @@ as.mo(
|
||||
|
||||
is.mo(x)
|
||||
|
||||
mo_failures()
|
||||
|
||||
mo_uncertainties()
|
||||
|
||||
mo_renamed()
|
||||
|
||||
mo_failures()
|
||||
|
||||
mo_reset_session()
|
||||
|
||||
mo_cleaning_regex()
|
||||
|
@@ -3,9 +3,9 @@
|
||||
\docType{data}
|
||||
\name{microorganisms.codes}
|
||||
\alias{microorganisms.codes}
|
||||
\title{Data Set with 5,508 Common Microorganism Codes}
|
||||
\title{Data Set with 5,411 Common Microorganism Codes}
|
||||
\format{
|
||||
A \link[tibble:tibble]{tibble} with 5,508 observations and 2 variables:
|
||||
A \link[tibble:tibble]{tibble} with 5,411 observations and 2 variables:
|
||||
\itemize{
|
||||
\item \code{code}\cr Commonly used code of a microorganism
|
||||
\item \code{mo}\cr ID of the microorganism in the \link{microorganisms} data set
|
||||
|
@@ -261,7 +261,7 @@ mo_property(
|
||||
|
||||
\item{keep_synonyms}{a \link{logical} to indicate if old, previously valid taxonomic names must be preserved and not be corrected to currently accepted names. The default is \code{FALSE}, which will return a note if old taxonomic names were processed. The default can be set with \code{options(AMR_keep_synonyms = TRUE)} or \code{options(AMR_keep_synonyms = FALSE)}.}
|
||||
|
||||
\item{...}{other arguments passed on to \code{\link[=as.mo]{as.mo()}}, such as 'allow_uncertain' and 'ignore_pattern'}
|
||||
\item{...}{other arguments passed on to \code{\link[=as.mo]{as.mo()}}, such as 'minimum_matching_score', 'ignore_pattern', and 'remove_from_input'}
|
||||
|
||||
\item{ab}{any (vector of) text that can be coerced to a valid antibiotic code with \code{\link[=as.ab]{as.ab()}}}
|
||||
|
||||
@@ -285,8 +285,8 @@ Use these functions to return a specific property of a microorganism based on th
|
||||
All functions will, at default, keep old taxonomic properties. Please refer to this example, knowing that \emph{Escherichia blattae} was renamed to \emph{Shimwellia blattae} in 2010:
|
||||
\itemize{
|
||||
\item \code{mo_name("Escherichia blattae")} will return \code{"Shimwellia blattae"} (with a message about the renaming)
|
||||
\item \code{mo_ref("Escherichia blattae")} will return \code{"Burgess et al., 1973"} (with a message about the renaming)
|
||||
\item \code{mo_ref("Shimwellia blattae")} will return \code{"Priest et al., 2010"} (without a message)
|
||||
\item \code{mo_ref("Escherichia blattae", keep_synonyms = TRUE)} will return \code{"Burgess et al., 1973"} (with a warning about the renaming)
|
||||
\item \code{mo_ref("Shimwellia blattae", keep_synonyms = FALSE)} will return \code{"Priest et al., 2010"} (without a message)
|
||||
}
|
||||
|
||||
The short name - \code{\link[=mo_shortname]{mo_shortname()}} - almost always returns the first character of the genus and the full species, like \code{"E. coli"}. Exceptions are abbreviations of staphylococci (such as \emph{"CoNS"}, Coagulase-Negative Staphylococci) and beta-haemolytic streptococci (such as \emph{"GBS"}, Group B Streptococci). Please bear in mind that e.g. \emph{E. coli} could mean \emph{Escherichia coli} (kingdom of Bacteria) as well as \emph{Entamoeba coli} (kingdom of Protozoa). Returning to the full name will be done using \code{\link[=as.mo]{as.mo()}} internally, giving priority to bacteria and human pathogens, i.e. \code{"E. coli"} will be considered \emph{Escherichia coli}. In other words, \code{mo_fullname(mo_shortname("Entamoeba coli"))} returns \code{"Escherichia coli"}.
|
||||
|
Reference in New Issue
Block a user