pbtick {mikropml} | R Documentation |
Update progress if the progress bar is not NULL
.
Description
This allows for flexible code that only initializes a progress bar if the
progressr
package is installed.
Usage
pbtick(pb, message = NULL)
Arguments
pb |
a progress bar created with |
message |
optional message to report (default: |
Author(s)
Kelly Sovacool sovacool@umich.edu
Examples
## Not run:
f <- function() {
if (isTRUE(check_packages_installed("progressr"))) {
pb <- progressr::progressor(steps = 5, message = "looping")
} else {
pb <- NULL
}
for (i in 1:5) {
pbtick(pb)
Sys.sleep(0.5)
}
}
progressr::with_progress(
f()
)
## End(Not run)
[Package mikropml version 1.6.1 Index]