1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-08 16:42:10 +02:00

(v1.4.0.9044) mo tibble printing, mo_shortname() fix

This commit is contained in:
2020-12-24 23:29:10 +01:00
parent 128ebcfd62
commit df37584189
96 changed files with 1039 additions and 2847 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -85,7 +85,7 @@ mo_url(x, open = FALSE, language = get_locale(), ...)
mo_property(x, property = "fullname", language = get_locale(), ...)
}
\arguments{
\item{x}{any character (vector) that can be coerced to a valid microorganism code with \code{\link[=as.mo]{as.mo()}}. Can be omitted for auto-guessing in \verb{mo_is_*()} functions when used inside \code{dplyr} verbs, such as \code{\link[dplyr:filter]{filter()}}, \code{\link[dplyr:mutate]{mutate()}} and \code{\link[dplyr:summarise]{summarise()}}, please see \emph{Examples}.}
\item{x}{any character (vector) that can be coerced to a valid microorganism code with \code{\link[=as.mo]{as.mo()}}. Can be omitted for auto-guessing the column containing microorganism codes when used inside \code{dplyr} verbs, such as \code{\link[dplyr:filter]{filter()}}, \code{\link[dplyr:mutate]{mutate()}} and \code{\link[dplyr:summarise]{summarise()}}, please see \emph{Examples}.}
\item{language}{language of the returned text, defaults to system language (see \code{\link[=get_locale]{get_locale()}}) and can be overwritten by setting the option \code{AMR_locale}, e.g. \code{options(AMR_locale = "de")}, see \link{translate}. Also used to translate text like "no growth". Use \code{language = NULL} or \code{language = ""} to prevent translation.}
@ -93,7 +93,7 @@ mo_property(x, property = "fullname", language = get_locale(), ...)
\item{ab}{any (vector of) text that can be coerced to a valid antibiotic code with \code{\link[=as.ab]{as.ab()}}}
\item{open}{browse the URL using \code{\link[utils:browseURL]{utils::browseURL()}}}
\item{open}{browse the URL using \code{\link[utils:browseURL]{browseURL()}}}
\item{property}{one of the column names of the \link{microorganisms} data set: "\code{mo}", "\code{fullname}", "\code{kingdom}", "\code{phylum}", "\code{class}", "\code{order}", "\code{family}", "\code{genus}", "\code{species}", "\code{subspecies}", "\code{rank}", "\code{ref}", "\code{species_id}", "\code{source}", "\code{prevalence}", "\code{snomed}", or must be \code{"shortname"}}
}

View File

@ -19,9 +19,9 @@ get_mo_source(destination = getOption("AMR_mo_source", "~/mo_source.rds"))
\item{destination}{destination of the compressed data file, default to the user's home directory.}
}
\description{
These functions can be used to predefine your own reference to be used in \code{\link[=as.mo]{as.mo()}} and consequently all \verb{mo_*} functions like \code{\link[=mo_genus]{mo_genus()}} and \code{\link[=mo_gramstain]{mo_gramstain()}}.
These functions can be used to predefine your own reference to be used in \code{\link[=as.mo]{as.mo()}} and consequently all \code{\link[=mo_property]{mo_*}} functions (such as \code{\link[=mo_genus]{mo_genus()}} and \code{\link[=mo_gramstain]{mo_gramstain()}}).
This is \strong{the fastest way} to have your organisation (or analysis) specific codes picked up and translated by this package.
This is \strong{the fastest way} to have your organisation (or analysis) specific codes picked up and translated by this package, since you don't have to bother about it again after setting it up once.
}
\details{
The reference file can be a text file separated with commas (CSV) or tabs or pipes, an Excel file (either 'xls' or 'xlsx' format) or an \R object file (extension '.rds'). To use an Excel file, you will need to have the \code{readxl} package installed.
@ -79,7 +79,7 @@ If we edit the Excel file by, let's say, adding row 4 like this:\preformatted{
...any new usage of an MO function in this package will update your data file:\preformatted{as.mo("lab_mo_ecoli")
#> NOTE: Updated mo_source file '/Users/me/mo_source.rds' (0.3 kB) from
#> '/Users/me/Documents/ourcodes.xlsx' (9 kB), columns
#> '/Users/me/Documents/ourcodes.xlsx' (9 kB), columns
#> "Organisation XYZ" and "mo"
#> Class <mo>
#> [1] B_ESCHR_COLI
@ -92,7 +92,7 @@ To delete the reference data file, just use \code{""}, \code{NULL} or \code{FALS
#> Removed mo_source file '/Users/me/mo_source.rds'
}
If the original Excel file is moved or deleted, the mo_source file will be removed upon the next use of \code{\link[=as.mo]{as.mo()}}.
If the original file (in the previous case an Excel file) is moved or deleted, the \code{mo_source.rds} file will be removed upon the next use of \code{\link[=as.mo]{as.mo()}} or any \code{\link[=mo_property]{mo_*}} function.
}
\section{Stable lifecycle}{