mirror of
https://github.com/msberends/AMR.git
synced 2025-07-09 02:03:04 +02:00
(v0.7.1.9091) percentage from clean pkg
This commit is contained in:
@ -33,7 +33,7 @@
|
||||
#' @inheritParams base::formatC
|
||||
#' @importFrom dplyr %>% rename group_by select mutate filter pull
|
||||
#' @importFrom tidyr spread
|
||||
#' @importFrom clean freq
|
||||
#' @importFrom clean freq percentage
|
||||
#' @details The function \code{format} calculates the resistance per bug-drug combination. Use \code{combine_IR = FALSE} (default) to test R vs. S+I and \code{combine_IR = TRUE} to test R+I vs. S.
|
||||
#'
|
||||
#' The language of the output can be overwritten with \code{options(AMR_locale)}, please see \link{translate}.
|
||||
@ -140,7 +140,7 @@ format.bug_drug_combinations <- function(x,
|
||||
summarise(isolates = sum(isolates, na.rm = TRUE),
|
||||
total = sum(total, na.rm = TRUE)) %>%
|
||||
ungroup() %>%
|
||||
mutate(txt = paste0(percent(isolates / total, force_zero = TRUE, decimal.mark = decimal.mark, big.mark = big.mark),
|
||||
mutate(txt = paste0(percentage(isolates / total, decimal.mark = decimal.mark, big.mark = big.mark),
|
||||
" (", trimws(format(isolates, big.mark = big.mark)), "/",
|
||||
trimws(format(total, big.mark = big.mark)), ")")) %>%
|
||||
select(ab, ab_txt, mo, txt) %>%
|
||||
|
Reference in New Issue
Block a user