newPB: Progress Bar Initializer

View source: R/progress_utils.R

newPBR Documentation

Progress Bar Initializer

Description

Initializes a progress bar.

Usage

newPB(
  title,
  label,
  min = 0,
  max = 1,
  initial = 0,
  steps = 21,
  width,
  style,
  char = "=",
  file = "",
  ...
)

Arguments

title, label

character strings, giving the 'title'(='message' for shiny progress bar) and the 'label'(='detail' for shiny progress bar).

min, max

(finite) numeric values for the extremes of the progress bar. Must have 'min' < 'max'.

initial

initial value for the progress bar.

steps

(finite) numeric value for the number of individual chunk of the progress bar. Default is 21.

width

the width of the progress bar. If missing, the default, will be NA for "txtProgressBar" and 300 for "winProgressBar".

style

does not apply for "winProgressBar", the style of the bar. If missing, the default, will be 3 "txtProgressBar" and getShinyOption("progress.style", default = "notification") for shiny progress bar.

char

only apply for "txtProgressBar", the character (or character string) to form the progress bar.

file

only apply for "txtProgressBar", an open connection object or "" which indicates the console: stderr() might be useful here. Default is "".

...

Other arguments to be passed.

Details

shiny progress bar will be available only if shiny package is found and within a shiny app.

Value

pb an object of class 'IFC_progress' containing a progress bar of class 'txtProgressBar', 'winProgressBar' or 'Progress'.


IFC documentation built on Sept. 14, 2023, 1:08 a.m.