mirror of
https://github.com/msberends/AMR.git
synced 2025-07-08 16:42:10 +02:00
(v1.7.1.9022) rely on vctrs for ab selectors
This commit is contained in:
@ -86,7 +86,7 @@ These functions allow for filtering rows and selecting columns based on antibiot
|
||||
\details{
|
||||
These functions can be used in data set calls for selecting columns and filtering rows. They are heavily inspired by the \link[tidyselect:language]{Tidyverse selection helpers} such as \code{\link[tidyselect:everything]{everything()}}, but also work in base \R and not only in \code{dplyr} verbs. Nonetheless, they are very convenient to use with \code{dplyr} functions such as \code{\link[dplyr:select]{select()}}, \code{\link[dplyr:filter]{filter()}} and \code{\link[dplyr:summarise]{summarise()}}, see \emph{Examples}.
|
||||
|
||||
All columns in the data in which these functions are called will be searched for known antibiotic names, abbreviations, brand names, and codes (ATC, EARS-Net, WHO, etc.) in the \link{antibiotics} data set. This means that a selector such as \code{\link[=aminoglycosides]{aminoglycosides()}} will pick up column names like 'gen', 'genta', 'J01GB03', 'tobra', 'Tobracin', etc. Use the \code{\link[=ab_class]{ab_class()}} function to filter/select on a manually defined antibiotic class.
|
||||
All columns in the data in which these functions are called will be searched for known antibiotic names, abbreviations, brand names, and codes (ATC, EARS-Net, WHO, etc.) according to the \link{antibiotics} data set. This means that a selector such as \code{\link[=aminoglycosides]{aminoglycosides()}} will pick up column names like 'gen', 'genta', 'J01GB03', 'tobra', 'Tobracin', etc. Use the \code{\link[=ab_class]{ab_class()}} function to filter/select on a manually defined antibiotic class.
|
||||
}
|
||||
\section{Full list of supported agents}{
|
||||
|
||||
|
@ -42,11 +42,11 @@ italicise_taxonomy("An overview of S. aureus isolates")
|
||||
cat(italicise_taxonomy("An overview of S. aureus isolates", type = "ansi"))
|
||||
|
||||
# since ggplot2 supports no markdown (yet), use
|
||||
# italicise_taxonomy() and the `ggtext` pkg for titles:
|
||||
# italicise_taxonomy() and the `ggtext` package for titles:
|
||||
\donttest{
|
||||
if (require("ggplot2") && require("ggtext")) {
|
||||
ggplot(example_isolates$AMC,
|
||||
title = italicise_taxonomy("Amoxi/clav in E. coli")) +
|
||||
autoplot(example_isolates$AMC,
|
||||
title = italicise_taxonomy("Amoxi/clav in E. coli")) +
|
||||
theme(plot.title = ggtext::element_markdown())
|
||||
}
|
||||
}
|
||||
|
@ -7,14 +7,14 @@
|
||||
\alias{random_rsi}
|
||||
\title{Random MIC Values/Disk Zones/RSI Generation}
|
||||
\usage{
|
||||
random_mic(size, mo = NULL, ab = NULL, ...)
|
||||
random_mic(size = NULL, mo = NULL, ab = NULL, ...)
|
||||
|
||||
random_disk(size, mo = NULL, ab = NULL, ...)
|
||||
random_disk(size = NULL, mo = NULL, ab = NULL, ...)
|
||||
|
||||
random_rsi(size, prob_RSI = c(0.33, 0.33, 0.33), ...)
|
||||
random_rsi(size = NULL, prob_RSI = c(0.33, 0.33, 0.33), ...)
|
||||
}
|
||||
\arguments{
|
||||
\item{size}{desired size of the returned vector}
|
||||
\item{size}{desired size of the returned vector. If used in a \link{data.frame} call or \code{dplyr} verb, will get the current (group) size if left blank.}
|
||||
|
||||
\item{mo}{any \link{character} that can be coerced to a valid microorganism code with \code{\link[=as.mo]{as.mo()}}}
|
||||
|
||||
|
Reference in New Issue
Block a user