R/utils-parallel.R

Defines functions pb

Documented in pb

#' Show progress bar
#'
#' @param expr R expression.
#' @inheritDotParams progressr::with_progress -handlers
#'
#' @return Return data from the function called.
#' @export
pb <- function(expr, ...) {
  progress_bar <-
    progressr::handler_progress(format = "(:current/:total) [:bar] :percent")
  progressr::with_progress(expr,
                           ...,
                           handlers = progress_bar)
}
special-uor/smpds documentation built on July 9, 2024, 5:39 p.m.