tests/zzz,plyr.R

source("incl/start.R")

if (requireNamespace("plyr", quietly = TRUE)) {
  message("* with_progress()")

  with_progress({
    y <- plyr::llply(3:6, function(n, ...) {
      slow_sum(1:n, stdout=TRUE, message=TRUE)
    }, .progress = "progressr")
  })



  message("* global progression handler")

  handlers(global = TRUE)
    
  local({
    y <- plyr::llply(3:6, function(n, ...) {
      slow_sum(1:n, stdout=TRUE, message=TRUE)
    }, .progress = "progressr")
  })
    
  handlers(global = FALSE)
}

source("incl/end.R")

Try the progressr package in your browser

Any scripts or data that you put into this service are public.

progressr documentation built on Aug. 11, 2023, 1:07 a.m.