Skip to contents

A progressr handler useful for Futureverse tutorials

Usage

handler_tutorial(
  ...,
  spec = c("progress", "cli"),
  type = "time",
  clear = FALSE
)

Arguments

spec

The progress handler to use.

type

Controls which predefined handler format string to use.

clear

(logical) If TRUE, any output, typically visual, produced by a reporter will be cleared/removed upon completion, if possible.

...

Arguments passed to the selected progress handler.

Value

A function of class progression_handler that takes a progression condition as its first and only argument.

Details

The default is to use the progress package. Contrary to the cli package, the progress package has the capacity to display all progress updates, even when receiving progress updates at a high rate from, for example, parallel processing.

Examples

# Display progress and keep the progress output when done
handlers("tutorial")

# Display progress and keep every progress reported
handlers("tutorial", "newline")