Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

progress_estimated

Progress bar with estimated time.


Description

[Deprecated]

This progress bar has been deprecated since providing progress bars is not the responsibility of dplyr. Instead, you might try the more powerful progress package.

This reference class represents a text progress bar displayed estimated time remaining. When finished, it displays the total duration. The automatic progress bar can be disabled by setting option dplyr.show_progress to FALSE.

Usage

progress_estimated(n, min_time = 0)

Arguments

n

Total number of items

min_time

Progress bar will wait until at least min_time seconds have elapsed before displaying any results.

Value

A ref class with methods tick(), print(), pause(), and stop().

Examples

p <- progress_estimated(3)
p$tick()
p$tick()
p$tick()

p <- progress_estimated(3)
for (i in 1:3) p$pause(0.1)$tick()$print()

p <- progress_estimated(3)
p$tick()$print()$
 pause(1)$stop()

# If min_time is set, progress bar not shown until that many
# seconds have elapsed
p <- progress_estimated(3, min_time = 3)
for (i in 1:3) p$pause(0.1)$tick()$print()

## Not run: 
p <- progress_estimated(10, min_time = 3)
for (i in 1:10) p$pause(0.5)$tick()$print()

## End(Not run)

dplyr

A Grammar of Data Manipulation

v1.0.6
MIT + file LICENSE
Authors
Hadley Wickham [aut, cre] (<https://orcid.org/0000-0003-4757-117X>), Romain François [aut] (<https://orcid.org/0000-0002-2444-4226>), Lionel Henry [aut], Kirill Müller [aut] (<https://orcid.org/0000-0002-1416-3412>), RStudio [cph, fnd]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.