Learn R Programming

IFC (version 0.1.1)

newPB: Progress Bar Initializer

Description

Initializes a progress bar.

Usage

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

Arguments

session

the shiny session object, as provided by shinyServer to the server function. Default is missing, to use "txtProgressBar" or "winProgressBar" (on Windows).

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

only apply when 'session' is missing,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 "".

Value

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

Details

shiny progress bar will be available only if shiny package is found.