https://github.com/hadley/dplyr
Raw File
Tip revision: 2708de6009e29bfa8e93d69b92e0da05a0c3c484 authored by Romain Francois on 20 November 2020, 09:52:32 UTC
rethrow shiny errors as is, instead of promoting them like other errors.
Tip revision: 2708de6
progress_estimated.Rd
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/progress.R
\name{progress_estimated}
\alias{progress_estimated}
\title{Progress bar with estimated time.}
\usage{
progress_estimated(n, min_time = 0)
}
\arguments{
\item{n}{Total number of items}

\item{min_time}{Progress bar will wait until at least \code{min_time}
seconds have elapsed before displaying any results.}
}
\value{
A ref class with methods \code{tick()}, \code{print()},
\code{pause()}, and \code{stop()}.
}
\description{
\Sexpr[results=rd, stage=render]{lifecycle::badge("deprecated")}

This progress bar has been deprecated since providing progress bars is not
the responsibility of dplyr. Instead, you might try the more powerful
\href{https://github.com/r-lib/progress}{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
\code{dplyr.show_progress} to \code{FALSE}.
}
\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()

\dontrun{
p <- progress_estimated(10, min_time = 3)
for (i in 1:10) p$pause(0.5)$tick()$print()
}
}
\keyword{internal}
back to top