1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-10 15:01:54 +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

@ -165,6 +165,7 @@ globalVariables(c(
"lang",
"language",
"lookup",
"lower",
"method",
"mic ",
"mic",
@ -198,6 +199,7 @@ globalVariables(c(
"total",
"txt",
"type",
"upper",
"uti_index",
"value",
"varname",

View File

@ -60,7 +60,7 @@
#'
#' For estimating antimicrobial coverage, especially when creating a WISCA, the outcome might become more reliable by only including the top *n* species encountered in the data. You can filter on this top *n* using [top_n_microorganisms()]. For example, use `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 [attribute] `long_numeric`. You can retrieve them using `attributes(x)$long_numeric`, where `x` is the outcome of [antibiogram()] or [wisca()]. This is ideal for e.g. advanced plotting.
#' The numeric values of an antibiogram are stored in a long format as the [attribute][attributes()] `long_numeric`. You can retrieve them using `attributes(x)$long_numeric`, where `x` is the outcome of [antibiogram()] or [wisca()]. This is ideal for e.g. advanced plotting.
#'
#' ### Formatting Type
#'

View File

@ -36,6 +36,7 @@
#' @param remove_intrinsic_resistant [logical] to indicate that rows and columns with 100% resistance for all tested antimicrobials must be removed from the table
#' @param FUN the function to call on the `mo` column to transform the microorganism codes - the default is [mo_shortname()]
#' @param translate_ab a [character] of length 1 containing column names of the [antibiotics] data set
#' @param include_n_rows a [logical] to indicate if the total number of rows must be included in the output
#' @param ... arguments passed on to `FUN`
#' @inheritParams sir_df
#' @inheritParams base::formatC
@ -182,8 +183,8 @@ bug_drug_combinations <- function(x,
out <- out[, colnames(out)[colnames(out) != "total_rows"], drop = FALSE]
}
out <- out %pm>% pm_arrange(mo, ab)
out <- as_original_data_class(out, class(x.bak)) # will remove tibble groups
out <- out %pm>% pm_arrange(mo, ab)
rownames(out) <- NULL
structure(out, class = c("bug_drug_combinations", if(data_has_groups) "grouped" else NULL, class(out)))
}

View File

@ -261,7 +261,7 @@ ggplot_pca <- function(x,
type = "open"
),
colour = arrows_colour,
size = arrows_size,
linewidth = arrows_size,
alpha = arrows_alpha
)
if (arrows_textangled == TRUE) {

View File

@ -36,7 +36,7 @@
#' @param n_for_each an optional integer specifying the maximum number of rows to retain for each value of the selected property. If `NULL`, all rows within the top *n* groups will be included.
#' @param col_mo A character string indicating the column in `x` that contains microorganism names or codes. Defaults to the first column of class [`mo`]. Values will be coerced using [as.mo()].
#' @param ... Additional arguments passed on to [mo_property()] when `property` is not `NULL`.
#' @details This function is useful for preprocessing data before creating [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.
#' @details This function is useful for preprocessing data before creating [antibiograms][antibiogram()] 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.
#' @export
#' @seealso [mo_property()], [as.mo()], [antibiogram()]
#' @examples