handler_pbcol: Progression Handler: Progress Reported as an ANSI Background...

Description Usage Arguments Requirements Examples

View source: R/handler_pbcol.R

Description

Progression Handler: Progress Reported as an ANSI Background Color in the Terminal

Usage

1
2
3
4
5
6
7
8
9
handler_pbcol(
  adjust = 0,
  pad = 1L,
  complete = function(s) crayon::bgBlue(crayon::white(s)),
  incomplete = function(s) crayon::bgCyan(crayon::white(s)),
  intrusiveness = getOption("progressr.intrusiveness.terminal", 1),
  target = "terminal",
  ...
)

Arguments

adjust

(numeric) The adjustment of the progress update, where adjust = 0 positions the message to the very left, and adjust = 1 positions the message to the very right.

pad

(integer) Amount of padding on each side of the message, where padding is done by spaces.

complete, incomplete

(function) Functions that take "complete" and "incomplete" strings that comprise the progress bar as input and annotate them to reflect their two different parts. The default is to annotation them with two different background colors and the same foreground color using the crayon package.

intrusiveness

(numeric) A non-negative scalar on how intrusive (disruptive) the reporter to the user.

target

(character vector) Specifies where progression updates are rendered.

...

Additional arguments passed to make_progression_handler().

Requirements

This progression handler requires the crayon package.

Examples

1
2
3

progressr documentation built on Sept. 24, 2021, 5:07 p.m.