plyr (version 1.8.6)

create_progress_bar: Create progress bar.

Description

Create progress bar object from text string.

Usage

create_progress_bar(name = "none", ...)

Arguments

name

type of progress bar to create

...

other arguments passed onto progress bar function

Details

Progress bars give feedback on how apply step is proceeding. This is mainly useful for long running functions, as for short functions, the time taken up by splitting and combining may be on the same order (or longer) as the apply step. Additionally, for short functions, the time needed to update the progress bar can significantly slow down the process. For the trivial examples below, using the tk progress bar slows things down by a factor of a thousand.

Note the that progress bar is approximate, and if the time taken by individual function applications is highly non-uniform it may not be very informative of the time left.

There are currently four types of progress bar: "none", "text", "tk", and "win". See the individual documentation for more details. In plyr functions, these can either be specified by name, or you can create the progress bar object yourself if you want more control over its apperance. See the examples.

See Also

progress_none, progress_text, progress_tk, progress_win

Examples

Run this code
# NOT RUN {
# No progress bar
l_ply(1:100, identity, .progress = "none")
# }
# NOT RUN {
# Use the Tcl/Tk interface
l_ply(1:100, identity, .progress = "tk")
# }
# NOT RUN {
# Text-based progress (|======|)
l_ply(1:100, identity, .progress = "text")
# Choose a progress character, run a length of time you can see
l_ply(1:10000, identity, .progress = progress_text(char = "."))
# }

Run the code above in your browser using DataCamp Workspace