1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-18 05:23:15 +02:00

(v2.1.1.9129) unit test fix

This commit is contained in:
2025-01-27 16:17:03 +01:00
parent 6efa317a81
commit 1149360b27
66 changed files with 94 additions and 80 deletions

View File

@ -100,7 +100,7 @@ This function returns a table with values between 0 and 100 for \emph{susceptibi
For estimating antimicrobial coverage, especially when creating a WISCA, the outcome might become more reliable by only including the top \emph{n} species encountered in the data. You can filter on this top \emph{n} using \code{\link[=top_n_microorganisms]{top_n_microorganisms()}}. For example, use \code{top_n_microorganisms(your_data, n = 10)} as a pre-processing step to only include the top 10 species in the data.
The numeric values of an antibiogram are stored in a long format as the \link{attribute} \code{long_numeric}. You can retrieve them using \code{attributes(x)$long_numeric}, where \code{x} is the outcome of \code{\link[=antibiogram]{antibiogram()}} or \code{\link[=wisca]{wisca()}}. This is ideal for e.g. advanced plotting.
The numeric values of an antibiogram are stored in a long format as the \link[=attributes]{attribute} \code{long_numeric}. You can retrieve them using \code{attributes(x)$long_numeric}, where \code{x} is the outcome of \code{\link[=antibiogram]{antibiogram()}} or \code{\link[=wisca]{wisca()}}. This is ideal for e.g. advanced plotting.
\subsection{Formatting Type}{
The formatting of the 'cells' of the table can be set with the argument \code{formatting_type}. In these examples, \code{5} is the susceptibility percentage (for WISCA: \code{4-6} indicates the confidence level), \code{15} the numerator, and \code{300} the denominator:

View File

@ -21,6 +21,8 @@ bug_drug_combinations(x, col_mo = NULL, FUN = mo_shortname,
\item{FUN}{the function to call on the \code{mo} column to transform the microorganism codes - the default is \code{\link[=mo_shortname]{mo_shortname()}}}
\item{include_n_rows}{a \link{logical} to indicate if the total number of rows must be included in the output}
\item{...}{arguments passed on to \code{FUN}}
\item{translate_ab}{a \link{character} of length 1 containing column names of the \link{antibiotics} data set}

View File

@ -24,7 +24,7 @@ top_n_microorganisms(x, n, property = "fullname", n_for_each = NULL,
This function filters a data set to include only the top \emph{n} microorganisms based on a specified property, such as taxonomic family or genus. For example, it can filter a data set to the top 3 species, or to any species in the top 5 genera, or to the top 3 species in each of the top 5 genera.
}
\details{
This function is useful for preprocessing data before creating \link[=antibiograms]{antibiograms} or other analyses that require focused subsets of microbial data. For example, it can filter a data set to only include isolates from the top 10 species.
This function is useful for preprocessing data before creating \link[=antibiogram]{antibiograms} or other analyses that require focused subsets of microbial data. For example, it can filter a data set to only include isolates from the top 10 species.
}
\examples{
# filter to the top 3 species: