1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-08 13:21:50 +02:00

(v0.7.1.9091) percentage from clean pkg

This commit is contained in:
2019-09-30 16:45:36 +02:00
parent b39e7feae6
commit edb599ae0b
30 changed files with 419 additions and 435 deletions

View File

@ -75,6 +75,7 @@
#' @export
#' @importFrom dplyr arrange_at lag between row_number filter mutate arrange pull ungroup
#' @importFrom crayon blue bold silver
#' @importFrom clean percentage
#' @return Logical vector
#' @source Methodology of this function is based on: \strong{M39 Analysis and Presentation of Cumulative Antimicrobial Susceptibility Test Data, 4th Edition}, 2014, \emph{Clinical and Laboratory Standards Institute (CLSI)}. \url{https://clsi.org/standards/products/microbiology/documents/m39/}.
#' @inheritSection AMR Read more on our website!
@ -525,8 +526,8 @@ first_isolate <- function(x,
if (info == TRUE) {
n_found <- base::sum(all_first, na.rm = TRUE)
p_found_total <- percent(n_found / nrow(x), force_zero = TRUE)
p_found_scope <- percent(n_found / scope.size, force_zero = TRUE)
p_found_total <- percentage(n_found / nrow(x))
p_found_scope <- percentage(n_found / scope.size)
# mark up number of found
n_found <- base::format(n_found, big.mark = big.mark, decimal.mark = decimal.mark)
if (p_found_total != p_found_scope) {