1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plyr_progress_progressr.R
\name{progress_progressr}
\alias{progress_progressr}
\title{Use Progressr with Plyr Map-Reduce Functions}
\usage{
progress_progressr(...)
}
\arguments{
\item{\ldots}{Not used.}
}
\value{
A named \link[base:list]{base::list} that can be passed as argument \code{.progress}
to any of \pkg{plyr} function accepting that argument.
}
\description{
A "progress bar" for \pkg{plyr}'s \code{.progress} argument.
}
\section{Limitations}{
One can use use \code{\link[doFuture:registerDoFuture]{doFuture::registerDoFuture()}} to run \pkg{plyr} functions
in parallel, e.g. \code{plyr::l_ply(..., .parallel = TRUE)}. Unfortunately,
using \code{.parallel = TRUE} disables progress updates because, internally,
\pkg{plyr} forces \code{.progress = "none"} whenever \code{.parallel = TRUE}.
Thus, despite the \pkg{future} ecosystem and \pkg{progressr} would support
it, it is not possible to run \pkg{dplyr} in parallel \emph{and} get progress
updates at the same time.
}
\examples{
if (requireNamespace("plyr", quietly=TRUE)) {
with_progress({
y <- plyr::llply(1:10, function(x) {
Sys.sleep(0.1)
sqrt(x)
}, .progress = "progressr")
})
}
}
|